WO2023273289A1 - Anti-theft method and apparatus for sim card - Google Patents

Anti-theft method and apparatus for sim card Download PDF

Info

Publication number
WO2023273289A1
WO2023273289A1 PCT/CN2022/070819 CN2022070819W WO2023273289A1 WO 2023273289 A1 WO2023273289 A1 WO 2023273289A1 CN 2022070819 W CN2022070819 W CN 2022070819W WO 2023273289 A1 WO2023273289 A1 WO 2023273289A1
Authority
WO
WIPO (PCT)
Prior art keywords
imei
sim card
terminal device
card
imeis
Prior art date
Application number
PCT/CN2022/070819
Other languages
French (fr)
Chinese (zh)
Inventor
张咏霞
武海峰
张燕
Original Assignee
展讯通信(上海)有限公司
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 展讯通信(上海)有限公司 filed Critical 展讯通信(上海)有限公司
Publication of WO2023273289A1 publication Critical patent/WO2023273289A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/126Anti-theft arrangements, e.g. protection against subscriber identity module [SIM] cloning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent
    • H04W12/71Hardware identity

Definitions

  • the present application relates to SIM card anti-theft technology, in particular to a SIM card anti-theft method and device.
  • SIM Subscriber Identity Module
  • USIM Universal Subscriber Identity Module, global user identity authentication module
  • the mobile phone compares the International Mobile Equipment Identity (IMEI for short) stored in the SIM card with its own IMEI, and if they are the same, the SIM card is used through anti-theft verification.
  • IMEI International Mobile Equipment Identity
  • the IMEI on the mobile phone can be forged, so that the anti-theft verification can be passed, that is, any SIM card can be used in the mobile phone, and the information security in the SIM card is relatively low.
  • the present application provides an anti-theft method and device for a SIM card to solve the problem of low security of information in the SIM card.
  • the present application provides an anti-theft method for a SIM card, including:
  • the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
  • the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
  • IMSI International Mobile Subscriber Identity
  • the acquisition of the first International Mobile Equipment Identity IMEI of the terminal equipment, and comparing the first IMEI with the second IMEI stored in the SIM card The steps include:
  • the state of the International Mobile Subscriber Identity IMSI stored in the SIM card is set to a valid state, including:
  • the SIM card includes a second list, and the second list includes a plurality of second entries, and each second entry includes a second IMEI corresponding to a card slot and a card slot. Slot identification; comparing each of the first IMEI with the second IMEI stored in the SIM card, including:
  • the first IMEI corresponding to each card slot and the card slot identification form a first entry, and a plurality of first entries form a first list;
  • each of the first entries has the same second entry in the second list, it is determined that each of the first IMEIs has the same second IMEI in the SIM card; Alternatively, some of said first entries all have the same second entry in said second list, and each of said first IMEIs of the remainder of said first entries has the same second entry in said remainder of said first entries.
  • the second entry has the same second IMEI, it is determined that each of the first IMEIs has the same second IMEI in the SIM card.
  • the step of obtaining the first International Mobile Equipment Identity IMEI of the terminal device includes:
  • the response to the first acquisition instruction includes a plurality of first preset fields, each of the first preset fields corresponds to a card slot, and the first preset fields are used for The first IMEI corresponding to the memory card slot.
  • the response to the first obtaining instruction includes a plurality of second preset fields, and each of the second preset fields includes a card slot identifier and a first IMEI corresponding to the card slot.
  • the step of obtaining the first International Mobile Equipment Identity IMEI of the terminal device it also includes:
  • the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card of the user identity authentication module is set to an invalid state.
  • IMSI International Mobile Subscriber Identity
  • the SIM card when the SIM card is powered on and/or when it is detected that the identifier of the card slot where the SIM card is currently located is different from the saved identifier of the card slot, the SIM card activates the anti-theft function.
  • the step of obtaining the first International Mobile Equipment Identity IMEI of the terminal device it also includes:
  • a second acquisition instruction of IMEI is sent to the terminal device, wherein the preset menu is a menu for opening the anti-theft function of the SIM card;
  • the present application also provides a SIM card, including:
  • An acquisition module configured to acquire the first International Mobile Equipment Identity IMEI of the terminal equipment, and compare the first IMEI with the second IMEI stored in the SIM card, the terminal equipment has one or more The first IMEI, when the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
  • a setting module configured to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card to a valid state when the first IMEI is the same as the second IMEI, and when the IMSI is in a valid state, the The above-mentioned terminal equipment is connected to the network normally.
  • IMSI International Mobile Subscriber Identity
  • the present application also provides a SIM card, including:
  • An acquisition module configured to acquire the first International Mobile Equipment Identity IMEI of the terminal equipment, and compare the first IMEI with the second IMEI stored in the SIM card, the terminal equipment has one or more The first IMEI, when the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
  • a setting module configured to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card to a valid state when the first IMEI is the same as the second IMEI, and when the IMSI is in a valid state, the The above-mentioned terminal equipment is connected to the network normally.
  • IMSI International Mobile Subscriber Identity
  • the present application also provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to implement the following operations when executed by a processor:
  • the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
  • the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
  • IMSI International Mobile Subscriber Identity
  • the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the following operations are realized:
  • the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
  • the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
  • IMSI International Mobile Subscriber Identity
  • the anti-theft method and device of the SIM card obtained the corresponding IMEI of each card slot of the terminal equipment. If the IMEI of the terminal equipment is the same as the IMEI stored in the SIM card, the state of the IMSI is set to a normal state so that the terminal equipment Normal networking. In this application, the anti-theft process of the SIM card is carried out through the SIM card, and the terminal device cannot obtain the IMEI in the SIM card, so that the terminal device cannot forge its own IMEI into the IMEI in the SIM card.
  • the SIM card will not change the IMSI to the normal state, which means that the terminal device cannot be connected to the Internet through the lost SIM card, avoiding the information leakage of the SIM card and improving the information security of the SIM card.
  • Fig. 1 is the system frame diagram of the terminal equipment loaded with SIM card of the present application
  • Fig. 2 is the schematic flow chart of the first embodiment of the anti-theft method of the SIM card of the present application
  • FIG. 3 is a schematic diagram of a refinement process of step S20 in the second embodiment of the anti-theft method for a SIM card of the present application;
  • FIG. 4 is a schematic diagram of a detailed flow chart of step S20 in the third embodiment of the anti-theft method for the SIM card of the present application;
  • FIG. 5 is a schematic diagram of a detailed flow chart of step S10 in the fourth embodiment of the anti-theft method for a SIM card of the present application;
  • Fig. 6 is the brief schematic flow chart of the anti-theft method of the SIM card of the present application.
  • Fig. 7 is the functional module schematic diagram of the SIM card of the present application.
  • Fig. 8 is a schematic diagram of the hardware structure of the SIM card of the present application.
  • FIG. 1 is a system architecture diagram of a terminal device.
  • a terminal device 100 is provided with a card slot 101 on which a SIM card 102 is loaded.
  • the terminal device may also include a plurality of card slots 101, and each card slot 101 is correspondingly provided with an International Mobile Equipment Identity (IMEI for short).
  • IMEI International Mobile Equipment Identity
  • the SIM card can be a traditional SIM card or a USIM card.
  • the USIM card can be a SIM card that supports 4G networks. Of course, the SIM card can also be other cards that support 5G networks or even support 5G networks.
  • Fig. 2 is the first embodiment of the anti-theft method of the SIM card of the present application, and the anti-theft method comprises the following steps:
  • Step S10 obtain the first international mobile equipment identity code IMEI of the terminal device, and compare the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when the terminal device has multiple first IMEIs For one IMEI, the terminal device is provided with multiple card slots for loading SIM cards, and each card slot corresponds to one IMEI.
  • IMEI international mobile equipment identity code
  • the execution subject is a SIM card.
  • the SIM card can be a USIM card or a traditional SIM card.
  • IMSI International Mobile Subscriber Identity
  • the terminal device When the SIM card is loaded on the terminal device, it will first set the state of the International Mobile Subscriber Identity (IMSI) stored by itself to an invalid state.
  • IMSI International Mobile Subscriber Identity
  • the terminal device cannot register with the network through the SIM card, that is, the terminal device cannot connect to the Internet.
  • IMSI is a string of letters and numbers, and the letters or numbers in different positions have different meanings. For example, IMSI is formed by sequentially connecting Mobile Country Code (MCC, Mobile Country Code), Mobile Network Code (MNC, Mobile Network Code) and Mobile Subscriber Identification Number (MSIN, Mobile subscription identification number).
  • the length of the MCC is 3 digits
  • the length of the MNC is determined by the value of the MCC, which can be 2 or 3 digits
  • the value of the MSIN is assigned by the operator.
  • MCC, MNC, and MSIN have corresponding formats, and the corresponding numbers or letters also have corresponding meanings.
  • MCC is 310, which means the United States
  • MCC is 460, which means China.
  • the SIM card can change the format or the number of words, so that at least one of the MCC, MNC and MSIN has a wrong format or has no corresponding meaning, thereby setting the status of the IMSI to an invalid status.
  • the terminal device is provided with one or more card slots, and each card slot is correspondingly provided with an IMEI, and the IMEI of the terminal device is defined as the first IMEI.
  • One or more IMEIs are stored in the SIM card, and the IMEI stored in the SIM card is defined as the second IMEI.
  • the second IMEI is the IMEI of the terminal device stored in the SIM card in advance, and the terminal device is bound with the SIM card . It can be understood that when the user obtains a new SIM card, the SIM card can be bound to the terminal device, and after binding, the SIM card can obtain the IMEI of the terminal device for storage.
  • Step S20 when the first IMEI is the same as the second IMEI, the status of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid status, and when the IMSI is a valid status, the terminal device is connected to the network normally.
  • IMSI International Mobile Subscriber Identity
  • the terminal device After the SIM card sets the IMSI status to invalid, the terminal device cannot connect to the Internet. At this time, the SIM card can ask the terminal device to provide its own IMEI for verification, that is, the SIM card obtains the first international mobile equipment identification of the terminal device. Code IMEI. When the terminal device has only one card slot, the terminal device has a unique IMEI. The SIM card compares the first IMEI with the second IMEI stored by itself.
  • the terminal device is a terminal bound to the SIM
  • the SIM card initiates an IMSI refresh process, so that the SIM card sets the state of the IMSI to a valid state
  • the SIM then sends the information that the IMSI is set to a valid state to the terminal device, so that the terminal device can perform network registration through the SIM card to connect to the network, so as to use the SIM card normally.
  • the SIM card sets the state of the IMSI to an invalid state, it will back up the IMSI in the valid state, and when it needs to switch from the invalid state to the valid state, the backup IMSI will overwrite the IMSI in the invalid state.
  • the IMSI refresh process can be realized through the recovery process of STK (SIM Tool Kit, user identification application development tool, referred to as STK).
  • the SIM sends the second acquisition instruction of the IMEI to the terminal device; the SIM card receives the second acquisition instruction from the terminal device and storing each second IMEI in the response to the second acquisition instruction, so as to bind the terminal device with the SIM card.
  • step S10-step S30 can be performed to verify the network connection of the terminal device.
  • the anti-theft function of the SIM can be enabled through the STK menu in the terminal device. If the anti-theft function is enabled, the SIM needs the terminal device to provide the IMEI for storage.
  • the SIM card when it receives the key information of the preset menu sent by the terminal device, it sends the second acquisition instruction of IMEI to the terminal device.
  • the preset menu is the opening menu of the anti-theft function of the SIM card, that is, the preset menu can be STK menu.
  • the SIM card receives the response of the second instruction fed back by the terminal device, and thus stores the IMEI in the response as the second IMEI.
  • the IMEI corresponding to each card slot of the terminal device is obtained, and if the IMEI of the terminal device is the same as the IMEI stored in the SIM card, the state of the IMSI is set to a normal state so that the terminal device can be connected to the network normally .
  • the anti-theft process of the SIM card is carried out through the SIM card, and the terminal device cannot obtain the IMEI in the SIM card, so that the terminal device cannot forge its own IMEI into the IMEI in the SIM card.
  • the SIM card will not change the IMSI to the normal state, which means that the terminal device cannot be connected to the Internet through the lost SIM card, avoiding the information leakage of the SIM card and improving the information security of the SIM card.
  • step S20 includes:
  • Step S21 obtaining the first IMEI corresponding to each card slot.
  • Step S22 comparing each first IMEI with the second IMEI stored in the SIM card.
  • the terminal device When the terminal device is a mobile phone supporting multiple SIM cards such as dual cards and triple cards, the terminal device is provided with multiple card slots, and each card slot has a corresponding IMEI. At this time, the SIM card requires the terminal device to provide all IMEIs. If the terminal device bound to the SIM card is a multi-card mobile phone, all IMEIs of the terminal device are stored in the SIM card.
  • the position of the insertion slot should not be fixed.
  • the first IMEI provided by the terminal device to the SIM card is the IMEI corresponding to card slot 1
  • the first IMEI provided by the terminal device to the SIM card is the IMEI corresponding to card slot 2.
  • the SIM performs the IMEI comparison process at this time, it will find that the IMEI does not match, which will cause the SIM card to think that the terminal device is not allowed to use. terminal equipment. But in fact, although the IMEIs corresponding to card slot 1 and card slot 2 are different, they both belong to the same terminal device, so it should be considered that the user has not changed the terminal, so the UE should continue to use normally at this time.
  • the SIM card compares all the first IMEIs obtained with the IMEI stored in itself, and if each first IMEI has the same second IMEI in the SIM card, it can be considered that the current terminal device is bound by the SIM card.
  • the terminal device currently loaded with the SIM card is not the terminal device bound by the SIM card, and the SIM maintains the state of the IMSI as an invalid state, so that the terminal device Unable to use the SIM card to connect to the Internet, avoiding information leakage of the SIM card.
  • the SIM card can first compare the number of the acquired first IMEI with the number of the second IMEI stored in itself, if the number is inconsistent, then maintain the invalid state of the IMSI; IMEI comparison.
  • the SIM card compares whether each first IMEI has the same second IMEI in the SIM card, and if so, the IMSI in the SIM card The state is set to a valid state, so that the terminal device is connected to the network.
  • Fig. 4 is the third embodiment of the anti-theft method of the SIM card of the present application, based on the second embodiment, step S22 includes:
  • step S221 the first IMEI and the card slot identifier corresponding to each card slot are formed into a first entry, and multiple first entries form a first list.
  • Step S222 comparing each first entry with each second entry in the second list, wherein, when each first entry has the same second entry in the second list, determine Each first IMEI has the same second IMEI in the SIM card; or, some of the first entries have the same second entry in the second list, and each of the remaining first entries has the same second When one IMEI has the same second IMEI in the remaining second entries, it is determined that each first IMEI has the same second IMEI in the SIM card.
  • the terminal device is a multi-card terminal.
  • the terminal device will provide the SIM card with a first list, the first list includes a plurality of first entries, and each first entry is identified by a first IMEI and a card slot corresponding to the first IMEI.
  • a second list is stored in the SIM card, and the second list is composed of a plurality of second entries, and each second entry is composed of a second IMEI and a card slot identifier corresponding to the second IMEI.
  • the SIM card After obtaining the first list, the SIM card compares each first entry in the first list with the second entry in the second list stored by itself. When the card slot identifier in the first entry is the same as the card slot identifier in the second entry, but the first IMEI of the first entry is different from the second IMEI of the second entry, it may be that the terminal device loads the SIM card For another card slot, at this time, the SIM card obtains the first IMEI of each card slot pair to compare the first IMEI with the second IMEI. If each first IMEI has the same The second IMEI can accurately determine that the terminal device loads the SIM card into another card slot, that is, the terminal device is a practical terminal device permitted by the SIM card. At this time, the SIM card sets the status of the IMSI to a valid state.
  • each first entry has the same second entry in the second list, it is determined that each first IMEI has the same second IMEI in the SIM card. In this case, the terminal device has not replaced the loaded SIM card slot. Also, when some of the first entries all have the same second entry in the second list, and the first IMEIs of the remainder of the first entries all have the same second IMEI in the remainder of the second entries , to determine that each first IMEI has the same second IMEI in the SIM card; in this case, a transmission error occurs when the terminal device transmits the IMEI. For example, a terminal device has three card slots. The first list transmitted by the terminal device is (IMEI1, IMEI2, IMEI3).
  • the first list received by the SIM card is (IMEI1, IMEI3, IMEI2), and The order of positions in the list is represented by the card slot identification, therefore, some of the first entries have the same second entry in the second list, and the first IMEI of the remaining first entries are all in the remaining When there is the same second IMEI in the second entry of the part, it is determined that each first IMEI has the same second IMEI in the SIM card.
  • the card slot identifier may be a simple number or letter, for example, card slot 1.
  • the card slot identifier can be determined by the queue position of the first IMEI in the first list, for example, the card slot identifier corresponding to the first IMEI in the first position of the first list is card slot 1, and the first IMEI in the first list corresponds to the card slot identifier.
  • the card slot ID corresponding to the first IMEI in the two positions is the card slot 2.
  • the card slot identifier corresponding to the second IMEI in the SIM card is also determined by the queue position of the second IMEI in the second list.
  • the SIM card obtains the first list provided by the terminal device, and compares the first entry in the first list with the second entry in the second list stored by itself, and then When each first entry has the same second entry in the second list, it is determined that each first IMEI has the same second IMEI in the SIM card, or part of the first entries are all in the When the second list has the same second entry, and each first IMEI of the first entry of the remaining part has the same second IMEI in the second entry of the remaining part, it is determined that each first IMEI is in The SIM card has the same second IMEI, which prevents the terminal device from being unable to use the SIM card due to the replacement of the loading position of the SIM card.
  • Fig. 5 is the fourth embodiment of the anti-theft method of the SIM card of the present application, based on any one of the first to third embodiments, step S10 includes:
  • Step S11 sending a first IMEI acquisition instruction to the terminal device.
  • step S12 the receiving terminal device feeds back a response to the first obtaining instruction, and the response to the first obtaining instruction includes each first IMEI.
  • the SIM card may send the first IMEI acquisition instruction to the terminal device.
  • the SIM card sends an active command (the first acquisition command) of PROVIDE LOCAL INFORMATION to the terminal device, and the command type is 01: IMEI of the terminal.
  • the terminal device parses the first acquisition instruction to obtain the command type. If the command type is 01, it needs to provide its own IMEI to the SIM card.
  • the mobile terminal sends a TERMINAL RESPONSE to the USIM card, and the TERMINAL RESPONSE carries the first IMEI corresponding to all card slots of the terminal device. That is, the SIM receives the response to the first acquisition command, and the response to the first acquisition command is TERMINAL RESPONSE.
  • the response to the first acquisition command includes a plurality of first preset fields, each first preset field corresponds to a card slot, and the first preset field is used to store the first IMEI corresponding to the card slot.
  • the response to the first obtaining instruction includes a plurality of second preset fields, and each second preset field includes a card slot identifier and the first IMEI corresponding to the card slot.
  • the SIM card sends a first IMEI acquisition instruction to the terminal device, thereby receiving a response to the first acquisition instruction fed back by the terminal device, and then acquires each first IMEI from the response.
  • the SIM card and the terminal device perform data interaction through a communication protocol.
  • the communication protocol can be TS 31.111.
  • the communication protocol is modified based on the IMEI corresponding to each card slot of the terminal device. Specifically, taking the terminal device as a dual-card terminal as an example, the structure of the communication protocol is as follows in Table-1:
  • an optional IMEI (last line) field is added. If the terminal is a single-card terminal, this field does not need to be filled. If it is a dual-card terminal, this field can be filled in, and it is the IMEI of the other card slot. If it is a three-card terminal, another IMEI field needs to be added, and so on, an N-card terminal can provide N IMEIs.
  • the IMEI corresponding to the current card slot position is filled in the IMEI field defined by the original agreement, and is ranked at the top of all IMEI fields.
  • the IMEIs corresponding to other card slots are no longer in order.
  • the IMEI order provided can be (IMEI1, IMEI2, IMEI3), and the TERMINAL RESPONSE structure can be as follows Table-2:
  • the IMEI sequence provided by the terminal device can also be (IMEI1, IMEI3, IMEI2), as shown in Table-3:
  • the SIM card quickly obtains the first IMEI of the terminal device through the communication protocol between the terminal device and the SIM card, thereby shortening the verification time of the SIM card.
  • an anti-theft function is set in the SIM. That is, before the SIM card obtains the first IMEI of the terminal equipment, if after the anti-theft function of the SIM card is started, the SIM card sets the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card of the user identity authentication module to an invalid state. Perform the SIM anti-theft detection process. However, when the SIM card is powered on, it is detected that the ID of the card slot where the SIM card is currently located is different from the ID of the saved card slot, or the SIM card is powered on and the ID of the card slot where the SIM card is currently located is different from the ID of the saved card slot. to enable the anti-theft function of the SIM card.
  • IMSI International Mobile Subscriber Identity
  • the SIM card when the SIM is powered on, the SIM card detects whether the identifier represented by the anti-theft function of itself is an activation identifier, and if so, the SIM activates the anti-theft function.
  • the anti-theft function of the SIM card can be enabled by the user.
  • the user can open the STK menu through the terminal device.
  • the SIK menu includes the anti-theft function. The user can choose to enable the anti-theft function, and the terminal device will notify the SIM card so that the SIM card changes the identification of the anti-theft function to Turn on the logo, that is, the SIM card starts the anti-theft function.
  • the SIM card when the status of the IMSI in the SIM card is valid, the SIM card will record the identification of the card slot where it is located, so that when the subsequent anti-theft verification is required, the identification of the card slot where the SIM card is currently located is compared with the stored card Whether the identifications of the slots are the same, if not, it can be determined that the SIM card has changed the position of the card slot in the mobile phone.
  • the following takes the terminal equipment (User Equipment, UE for short, representing terminal equipment) as a dual-card terminal, and the SIM card as a USIM card as an example, and after the user replaces the SIM card from card slot 1 to card slot 2, the SIM A brief description of the anti-theft method.
  • terminal equipment User Equipment, UE for short, representing terminal equipment
  • SIM card as a USIM card as an example
  • the user replaces the card from card slot 1 to card slot 2, and starts the machine.
  • UE powers on to reset the SIM card, and executes the SIM card initialization process; after the USIM card is powered on and reset, it is judged that the USIM card anti-theft function has been enabled, and the IMSI in the card is set to an invalid value.
  • the invalid value indicates that the state of the IMSI is invalid;
  • the USIM card sends the PROVIDE LOCAL INFORMATION active command to the UE, and the command type is 01: IMEI of the terminal;
  • the UE sends TERMINAL RESPONSE to the USIM card, which carries the IMEI corresponding to all the card slots of the UE, in this embodiment, it is the current card slot IMEI2 and the IMEI1 corresponding to other card slot positions;
  • the USIM card compares the IMEI list saved in the card with the IMEI list provided by the UE this time;
  • the USIM card checks the IMEI list provided by the UE, and finds that the values IMEI2 and IMEI1 in the IMEI list provided by the UE are both in the IMEI list saved by the USIM card, then the USIM card considers that the UE has passed the USIM card anti-theft detection process, and the USIM The card initiates the IMSI refresh process, that is, the state of the IMSI is set to a valid state, and the UE can normally perform subsequent registration network processes.
  • the present application also provides a SIM card 800.
  • the SIM card 800 includes:
  • the obtaining module 801 is used to obtain the first international mobile equipment identity IMEI of the terminal device, and compare the first IMEI with the second IMEI stored in the SIM card.
  • the terminal device has multiple first IMEIs, the terminal device has Multiple card slots for loading SIM cards, each corresponding to an IMEI;
  • the setting module 802 is used to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card to a valid state when the first IMEI is the same as the second IMEI.
  • IMSI International Mobile Subscriber Identity
  • the terminal device is normally connected to the network.
  • the SIM card 800 includes:
  • Obtaining module 801 configured to obtain the first IMEI corresponding to each card slot
  • a comparison module configured to compare each first IMEI with the second IMEI stored in the SIM card
  • the setting module is used to set the state of the IMSI in the SIM card to be valid when each first IMEI has the same second IMEI in the SIM card.
  • the SIM card 800 includes:
  • a building block configured to form a first entry with the first IMEI corresponding to each card slot and the card slot identifier, and a plurality of first entries to form a first list;
  • a comparison module for comparing each first entry with each second entry in the second list, wherein when each first entry has the same second entry in the second list , determine that each first IMEI has the same second IMEI in the SIM card; or, some of the first entries all have the same second entry in the second list, and each of the remaining first entries When all the first IMEIs have the same second IMEI in the remaining second entries, it is determined that each first IMEI has the same second IMEI in the SIM card.
  • the SIM card 800 includes:
  • a sending module configured to send the first acquisition instruction of the IMEI to the terminal device
  • the receiving module is configured to receive a response from the terminal device to feed back the first acquisition instruction, and the response to the first acquisition instruction includes each first IMEI.
  • the SIM card 800 includes:
  • the setting module 801 is also used to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card of the user identity authentication module to an invalid state after the anti-theft function is activated.
  • IMSI International Mobile Subscriber Identity
  • the SIM card 800 includes:
  • the sending module is used to send the second acquisition instruction of IMEI to the terminal device when receiving the key information of the preset menu sent by the terminal device, wherein the preset menu is the opening menu of the anti-theft function of the SIM card;
  • the receiving module is configured to receive a response from the terminal device to feed back the second acquisition instruction, and store each second IMEI in the response to the second acquisition instruction.
  • Fig. 8 is a block diagram of a SIM card according to an exemplary embodiment.
  • the SIM card may include: a processor 91 such as a CPU, a memory 92 and a transceiver 93 .
  • a processor 91 such as a CPU
  • memory 92 and a transceiver 93 .
  • Memory 91 can be realized by any type of volatile or nonvolatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk any type of volatile or nonvolatile storage device or their combination, such as static random access memory (SRAM), electrically eras
  • the processor 92 can call the computer program stored in the memory 92 to complete all or part of the steps of the software defect prediction method described above.
  • the transceiver 93 is used for receiving information sent by the terminal equipment and sending information to the terminal equipment.
  • a non-transitory computer-readable storage medium when the instructions in the storage medium are executed by the processor of the terminal device, the terminal device can execute the above SIM card anti-theft method.
  • a computer program product including a computer program, when the computer program is executed by a processor of a terminal device, the terminal device can execute the above SIM card anti-theft method.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • a computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • a computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a router or a data center integrated with one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)).

Landscapes

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

Abstract

The present application provides an anti-theft method and apparatus for a SIM card. The method comprises: acquiring a first international mobile equipment identity (IMEI) of a terminal device, and comparing the first IMEI with a second IMEI stored in a SIM card, wherein the terminal device has one or more first IMEIs, when the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading the SIM card, and each card slot corresponds to one IMEI; and when the first IMEI is the same as the second IMEI, setting the state of an IMSI to be a valid state, and when the IMSI is in the valid state, normally networking the terminal device. According to the method of the present application, the information security of the SIM card is improved.

Description

SIM卡的防盗方法和装置SIM card anti-theft method and device
本申请要求于2021年06月29日提交中国专利局、申请号为2021107270340、申请名称为“SIM卡的防盗方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 2021107270340 and the application name "SIM card anti-theft method and device" submitted to the China Patent Office on June 29, 2021, the entire content of which is incorporated by reference in this application .
技术领域technical field
本申请涉及SIM卡防盗技术,尤其涉及一种SIM卡的防盗方法和装置。The present application relates to SIM card anti-theft technology, in particular to a SIM card anti-theft method and device.
背景技术Background technique
随着无线通信技术的蓬勃发展,手机已经成为人们生活的必需品。SIM(Subscriber Identity Module,用户身份认证模块)卡作为手机中的用户身份认证模块,承担着极其重要的安全角色,该SIM卡可以为传统SIM卡或者USIM(Universal Subscriber Identity Module,全球用户身份认证模块)卡。由于当前许多智能手机应用都将个人的手机号与账号绑定使用,看似简单安全,但一旦手机丢失,则可能导致隐私泄漏甚至是财产损失。With the vigorous development of wireless communication technology, mobile phones have become a necessity of people's life. SIM (Subscriber Identity Module, user identity authentication module) card, as the user identity authentication module in the mobile phone, assumes an extremely important security role. The SIM card can be a traditional SIM card or a USIM (Universal Subscriber Identity Module, global user identity authentication module )Card. Since many current smart phone applications bind personal mobile phone numbers with account numbers, it seems simple and safe, but once the mobile phone is lost, it may lead to privacy leakage or even property loss.
现有技术中,手机通过获取SIM卡内存储的国际移动设备识别码(International Mobile Equipment Identity,简称IMEI)以及自身的IMEI进行比对,若是相同,则通过防盗验证进行SIM卡的使用。In the prior art, the mobile phone compares the International Mobile Equipment Identity (IMEI for short) stored in the SIM card with its own IMEI, and if they are the same, the SIM card is used through anti-theft verification.
但是手机上的IMEI可以伪造,从而可以使得防盗验证通过,也即手机可以使用任何SIM卡,SIM卡内信息安全性较低。However, the IMEI on the mobile phone can be forged, so that the anti-theft verification can be passed, that is, any SIM card can be used in the mobile phone, and the information security in the SIM card is relatively low.
发明内容Contents of the invention
本申请提供一种SIM卡的防盗方法和装置,用以解决SIM卡内信息安全性较低的问题。The present application provides an anti-theft method and device for a SIM card to solve the problem of low security of information in the SIM card.
第一方面,本申请提供一种SIM卡的防盗方法,包括:In a first aspect, the present application provides an anti-theft method for a SIM card, including:
获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;Obtaining the first International Mobile Equipment Identity IMEI of the terminal device, and comparing the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
一种可选的实施方式中。当所述终端设备具有多个第一IMEI时,所述获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较的步骤包括:In an optional implementation. When the terminal equipment has multiple first IMEIs, the acquisition of the first International Mobile Equipment Identity IMEI of the terminal equipment, and comparing the first IMEI with the second IMEI stored in the SIM card The steps include:
获取每个所述卡槽对应的第一IMEI;Obtain the first IMEI corresponding to each of the card slots;
将各个所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较;comparing each of said first IMEIs with a second IMEI stored in said SIM card;
在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态IMSI的状态设置为有效状态,包括:When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity IMSI stored in the SIM card is set to a valid state, including:
在每个所述第一IMEI均在所述SIM卡内具有相同的第二IMEI时,将所述SIM卡中的所述IMSI的状态设置为有效状态。When each of the first IMEIs has the same second IMEI in the SIM card, setting the state of the IMSI in the SIM card to a valid state.
一种可选的实施方式中,所述SIM卡中包括第二列表,所述第二列表中包括多个第二条目,每个第二条目包括一个卡槽对应的第二IMEI和卡槽标识;所述将各个所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,包括:In an optional implementation manner, the SIM card includes a second list, and the second list includes a plurality of second entries, and each second entry includes a second IMEI corresponding to a card slot and a card slot. Slot identification; comparing each of the first IMEI with the second IMEI stored in the SIM card, including:
将每个卡槽对应的第一IMEI和卡槽标识形成一条第一条目,多个第一条目形成第一列表;The first IMEI corresponding to each card slot and the card slot identification form a first entry, and a plurality of first entries form a first list;
将每个所述第一条目分别与所述第二列表中的各第二条目进行比较;comparing each of said first entries with respective second entries in said second list;
其中,在每个所述第一条目均在所述第二列表内具有相同的第二条目时,确定每个所述第一IMEI均在所述SIM卡内具有相同的第二IMEI;或者,部分的所述第一条目均在所述第二列表中具有相同的第二条目,且剩余部分的所述第一条目的每个所述第一IMEI均在剩余部分的所述第二条目中具有相同的第二IMEI时,确定每个所述第一IMEI均在所述SIM卡内具有相同的第二IMEI。Wherein, when each of the first entries has the same second entry in the second list, it is determined that each of the first IMEIs has the same second IMEI in the SIM card; Alternatively, some of said first entries all have the same second entry in said second list, and each of said first IMEIs of the remainder of said first entries has the same second entry in said remainder of said first entries. When the second entry has the same second IMEI, it is determined that each of the first IMEIs has the same second IMEI in the SIM card.
一种可选的实施方式中,所述获取所述终端设备的第一国际移动设备识别码IMEI的步骤包括:In an optional implementation manner, the step of obtaining the first International Mobile Equipment Identity IMEI of the terminal device includes:
向所述终端设备发送IMEI的第一获取指令;sending a first acquisition instruction of the IMEI to the terminal device;
接收所述终端设备反馈所述第一获取指令的响应,所述第一获取指令的响应中包括各个所述第一IMEI。Receiving a response fed back by the terminal device to the first acquisition instruction, where the response to the first acquisition instruction includes each of the first IMEIs.
一种可选的实施方式中,所述第一获取指令的响应中包括多个第一预设字段,每个所述第一预设字段对应一个卡槽,所述第一预设字段用于存储卡槽对应的第一IMEI。In an optional implementation manner, the response to the first acquisition instruction includes a plurality of first preset fields, each of the first preset fields corresponds to a card slot, and the first preset fields are used for The first IMEI corresponding to the memory card slot.
一种可选的实施方式中,所述第一获取指令的响应中包括多个第二预设字段,每个所述第二预设字段包括一个卡槽标识以及卡槽对应的第一IMEI。In an optional implementation manner, the response to the first obtaining instruction includes a plurality of second preset fields, and each of the second preset fields includes a card slot identifier and a first IMEI corresponding to the card slot.
一种可选的实施方式中,所述获取所述终端设备的第一国际移动设备识别码IMEI的步骤之前,还包括:In an optional implementation manner, before the step of obtaining the first International Mobile Equipment Identity IMEI of the terminal device, it also includes:
在启动防盗功能后,将用户身份认证模块SIM卡内存储的国际移动用户识别码IMSI的状态设置为无效状态。After the anti-theft function is activated, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card of the user identity authentication module is set to an invalid state.
一种可选的实施方式中,在所述SIM卡上电和/或检测到所述SIM卡当前所在的卡槽的标识与保存的卡槽的标识不同时,所述SIM卡启动防盗功能。In an optional implementation manner, when the SIM card is powered on and/or when it is detected that the identifier of the card slot where the SIM card is currently located is different from the saved identifier of the card slot, the SIM card activates the anti-theft function.
一种可选的实施方式中,所述获取所述终端设备的第一国际移动设备识别码IMEI的步骤之前,还包括:In an optional implementation manner, before the step of obtaining the first International Mobile Equipment Identity IMEI of the terminal device, it also includes:
在接收到所述终端设备发送的预设菜单的按键信息时,向所述终端设备发送IMEI的第二获取指令,其中,所述预设菜单为所述SIM卡的防盗功能的开启菜单;When the key information of the preset menu sent by the terminal device is received, a second acquisition instruction of IMEI is sent to the terminal device, wherein the preset menu is a menu for opening the anti-theft function of the SIM card;
接收所述终端设备反馈所述第二获取指令的响应,并存储所述第二获取指令的响应中的各个所述第二IMEI。receiving a response from the terminal device feeding back the second acquisition instruction, and storing each of the second IMEIs in the response to the second acquisition instruction.
第二方面,本申请还提供一种SIM卡,包括:In a second aspect, the present application also provides a SIM card, including:
获取模块,用于获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;An acquisition module, configured to acquire the first International Mobile Equipment Identity IMEI of the terminal equipment, and compare the first IMEI with the second IMEI stored in the SIM card, the terminal equipment has one or more The first IMEI, when the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
设置模块,用于在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。A setting module, configured to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card to a valid state when the first IMEI is the same as the second IMEI, and when the IMSI is in a valid state, the The above-mentioned terminal equipment is connected to the network normally.
第三方面,本申请还提供一种SIM卡,包括:In a third aspect, the present application also provides a SIM card, including:
获取模块,用于获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;An acquisition module, configured to acquire the first International Mobile Equipment Identity IMEI of the terminal equipment, and compare the first IMEI with the second IMEI stored in the SIM card, the terminal equipment has one or more The first IMEI, when the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
设置模块,用于在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为 有效状态时,所述终端设备正常联网。A setting module, configured to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card to a valid state when the first IMEI is the same as the second IMEI, and when the IMSI is in a valid state, the The above-mentioned terminal equipment is connected to the network normally.
第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现如下操作:In a fourth aspect, the present application also provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to implement the following operations when executed by a processor:
获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;Obtaining the first International Mobile Equipment Identity IMEI of the terminal device, and comparing the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
第五方面,本申请还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现如下操作:In the fifth aspect, the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the following operations are realized:
获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;Obtaining the first International Mobile Equipment Identity IMEI of the terminal device, and comparing the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
本申请提供的SIM卡的防盗方法和装置,获取终端设备的每个卡槽对应的IMEI,若终端设备的IMEI与SIM卡内存储的IMEI相同,则将IMSI的状态设置为正常状态使得终端设备正常联网。本申请中SIM卡的防盗流程通过SIM卡进行,终端设备无法获取SIM卡内的IMEI,使得终端设备无法将自身的IMEI伪造成SIM卡内的IMEI,若当前终端设备与装载SIM卡的初始终端设备不同的情况下,SIM卡不会将IMSI更改为正常状态,也即使得终端设备无法通过丢失的SIM卡进行联网,避免SIM卡的信息泄露,提高了SIM卡的信息安全性。The anti-theft method and device of the SIM card provided by the present application obtain the corresponding IMEI of each card slot of the terminal equipment. If the IMEI of the terminal equipment is the same as the IMEI stored in the SIM card, the state of the IMSI is set to a normal state so that the terminal equipment Normal networking. In this application, the anti-theft process of the SIM card is carried out through the SIM card, and the terminal device cannot obtain the IMEI in the SIM card, so that the terminal device cannot forge its own IMEI into the IMEI in the SIM card. If the current terminal device and the initial terminal loaded with the SIM card In the case of different devices, the SIM card will not change the IMSI to the normal state, which means that the terminal device cannot be connected to the Internet through the lost SIM card, avoiding the information leakage of the SIM card and improving the information security of the SIM card.
附图说明Description of drawings
为了更清楚地说明本申请或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in this application or the prior art, the accompanying drawings that need to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are the present For some embodiments of the application, those of ordinary skill in the art can also obtain other drawings based on these drawings without any creative effort.
图1为本申请装载SIM卡的终端设备的***构架图;Fig. 1 is the system frame diagram of the terminal equipment loaded with SIM card of the present application;
图2为本申请SIM卡的防盗方法第一实施例的流程示意图;Fig. 2 is the schematic flow chart of the first embodiment of the anti-theft method of the SIM card of the present application;
图3为本申请SIM卡的防盗方法第二实施例中步骤S20的细化流程示意图;FIG. 3 is a schematic diagram of a refinement process of step S20 in the second embodiment of the anti-theft method for a SIM card of the present application;
图4为本申请SIM卡的防盗方法第三实施例中步骤S20的细化流程示意图;FIG. 4 is a schematic diagram of a detailed flow chart of step S20 in the third embodiment of the anti-theft method for the SIM card of the present application;
图5为本申请SIM卡的防盗方法第四实施例中步骤S10的细化流程示意图;FIG. 5 is a schematic diagram of a detailed flow chart of step S10 in the fourth embodiment of the anti-theft method for a SIM card of the present application;
图6为本申请SIM卡的防盗方法的简要流程示意图;Fig. 6 is the brief schematic flow chart of the anti-theft method of the SIM card of the present application;
图7为本申请SIM卡的功能模块示意图;Fig. 7 is the functional module schematic diagram of the SIM card of the present application;
图8为本申请SIM卡的硬件结构示意图本申请SIM卡的硬件结构示意图。Fig. 8 is a schematic diagram of the hardware structure of the SIM card of the present application.
通过上述附图,已示出本公开明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本公开构思的范围,而是通过参考特定实施例为本领域技术人员说明本公开的概念。By means of the above-mentioned drawings, certain embodiments of the present disclosure have been shown and will be described in more detail hereinafter. These drawings and written description are not intended to limit the scope of the disclosed concept in any way, but to illustrate the disclosed concept for those skilled in the art by referring to specific embodiments.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.
本申请提供一种SIM卡的防盗方法,可以通过图1所示的终端设备实现,终端设备可以为装载SIM卡的设备,例如,手机。图1为终端设备的一种***构架图。如图1所示,终端设备100设有卡槽101,卡槽101上装载SIM卡102。终端设备可以也包括多个卡槽101,每个卡槽101对应设置有国际移动设备识别码(International Mobile Equipment Identity,简称IMEI)。SIM卡可以是传统的SIM卡,也可以是USIM卡,USIM卡可以是支持4G网络的 SIM卡,当然,SIM卡还可以是支持5G网络甚至于支持5G网络以后的其他卡。The present application provides an anti-theft method for a SIM card, which can be realized by the terminal device shown in FIG. 1 , and the terminal device can be a device loaded with a SIM card, for example, a mobile phone. FIG. 1 is a system architecture diagram of a terminal device. As shown in FIG. 1 , a terminal device 100 is provided with a card slot 101 on which a SIM card 102 is loaded. The terminal device may also include a plurality of card slots 101, and each card slot 101 is correspondingly provided with an International Mobile Equipment Identity (IMEI for short). The SIM card can be a traditional SIM card or a USIM card. The USIM card can be a SIM card that supports 4G networks. Of course, the SIM card can also be other cards that support 5G networks or even support 5G networks.
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below in conjunction with the accompanying drawings.
参照图2,图2为本申请SIM卡的防盗方法的第一实施例,防盗方法包括以下步骤:With reference to Fig. 2, Fig. 2 is the first embodiment of the anti-theft method of the SIM card of the present application, and the anti-theft method comprises the following steps:
步骤S10,获取终端设备的第一国际移动设备识别码IMEI,并将第一IMEI与SIM卡存储的第二IMEI进行比较,终端设备具有一个或者多个第一IMEI,当终端设备具有多个第一IMEI时,终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI。Step S10, obtain the first international mobile equipment identity code IMEI of the terminal device, and compare the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when the terminal device has multiple first IMEIs For one IMEI, the terminal device is provided with multiple card slots for loading SIM cards, and each card slot corresponds to one IMEI.
在本实施例中,执行主体为SIM卡。SIM卡可以为USIM卡或者传统的SIM卡。SIM卡装载于终端设备时,会先将自身存储的国际用户识别码(International Mobile Subscriber Identity,简称IMSI)的状态设置为无效状态。IMSI的状态为无效状态时,终端设备是无法通过SIM卡注册网络,也即终端设备无法联网。IMSI是一串字母数字构成的字符串,且不同位置的字母或者数字表示的含义不同。例如,IMSI由移动国家代码(MCC,Mobile Country Code)、移动网络代码(MNC,Mobile Network Code)和移动订户识别代码(MSIN,Mobile subscription identification number)依次连接而成。MCC长度为3位,MNC长度由MCC的值决定,可以是2位或3位数字,MSIN的值由运营商自行分配。MCC、MNC以及MSIN有对应的格式,且对应的数字或者字母也是有对应的含义,例如,MCC为310,表示美国;MCC为460,表示中国。对此,SIM卡可以将格式或者字数进行改动,使得MCC、MNC以及MSIN中的至少一个格式错误或者数字无对应的意义,从而将IMSI的状态设置为无效状态。In this embodiment, the execution subject is a SIM card. The SIM card can be a USIM card or a traditional SIM card. When the SIM card is loaded on the terminal device, it will first set the state of the International Mobile Subscriber Identity (IMSI) stored by itself to an invalid state. When the status of the IMSI is invalid, the terminal device cannot register with the network through the SIM card, that is, the terminal device cannot connect to the Internet. IMSI is a string of letters and numbers, and the letters or numbers in different positions have different meanings. For example, IMSI is formed by sequentially connecting Mobile Country Code (MCC, Mobile Country Code), Mobile Network Code (MNC, Mobile Network Code) and Mobile Subscriber Identification Number (MSIN, Mobile subscription identification number). The length of the MCC is 3 digits, the length of the MNC is determined by the value of the MCC, which can be 2 or 3 digits, and the value of the MSIN is assigned by the operator. MCC, MNC, and MSIN have corresponding formats, and the corresponding numbers or letters also have corresponding meanings. For example, MCC is 310, which means the United States; MCC is 460, which means China. In this regard, the SIM card can change the format or the number of words, so that at least one of the MCC, MNC and MSIN has a wrong format or has no corresponding meaning, thereby setting the status of the IMSI to an invalid status.
终端设备内设有一个或者多个卡槽,每个卡槽对应设置一个IMEI,终端设备的IMEI定义为第一IMEI。SIM卡中存储有一个或者多个IMEI,且将SIM卡中存储的IMEI定义为第二IMEI,第二IMEI是SIM卡事先存储的终端设备的IMEI,且该终端设备与SIM卡进行了绑定。可以理解 的是,在用户得到一张新的SIM卡时,可以将SIM卡与终端设备进行绑定,绑定之后,SIM卡即可获取终端设备的IMEI进行存储。The terminal device is provided with one or more card slots, and each card slot is correspondingly provided with an IMEI, and the IMEI of the terminal device is defined as the first IMEI. One or more IMEIs are stored in the SIM card, and the IMEI stored in the SIM card is defined as the second IMEI. The second IMEI is the IMEI of the terminal device stored in the SIM card in advance, and the terminal device is bound with the SIM card . It can be understood that when the user obtains a new SIM card, the SIM card can be bound to the terminal device, and after binding, the SIM card can obtain the IMEI of the terminal device for storage.
步骤S20,在第一IMEI与第二IMEI相同时,将SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,IMSI为有效状态时,终端设备正常联网。Step S20, when the first IMEI is the same as the second IMEI, the status of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid status, and when the IMSI is a valid status, the terminal device is connected to the network normally.
SIM卡在将IMSI的状态设置为无效状态后,终端设备是无法联网的,此时,SIM卡可以要求终端设备提供自身的IMEI进行验证,也即SIM卡获取终端设备的第一国际移动设备识别码IMEI。在当终端设备只有一个卡槽时,则终端设备具有唯一的IMEI。SIM卡将第一IMEI与自身存储的第二IMEI进行比较。若是第一IMEI在SIM卡内具有相同的第二IMEI时,即可认为该终端设备为SIM所绑定的终端,SIM卡发起IMSI的刷新流程,使得SIM卡将IMSI的状态设置为有效状态,SIM再将IMSI设置为有效状态的信息发送至终端设备,使得终端设备可以通过SIM卡进行网络注册从而连入网络,以正常使用SIM卡。需要说明是,SIM卡在将IMSI的状态设置为无效状态时,会将有效状态下的IMSI进行备份,在需要将无效状态切换为有效状态时,则将备份的IMSI覆盖无效状态下的IMSI。IMSI刷新流程可以通过STK(SIM Tool Kit,用户识别应用开发工具,简称STK)的恢复流程实现。After the SIM card sets the IMSI status to invalid, the terminal device cannot connect to the Internet. At this time, the SIM card can ask the terminal device to provide its own IMEI for verification, that is, the SIM card obtains the first international mobile equipment identification of the terminal device. Code IMEI. When the terminal device has only one card slot, the terminal device has a unique IMEI. The SIM card compares the first IMEI with the second IMEI stored by itself. If the first IMEI has the same second IMEI in the SIM card, it can be considered that the terminal device is a terminal bound to the SIM, and the SIM card initiates an IMSI refresh process, so that the SIM card sets the state of the IMSI to a valid state, The SIM then sends the information that the IMSI is set to a valid state to the terminal device, so that the terminal device can perform network registration through the SIM card to connect to the network, so as to use the SIM card normally. It should be noted that when the SIM card sets the state of the IMSI to an invalid state, it will back up the IMSI in the valid state, and when it needs to switch from the invalid state to the valid state, the backup IMSI will overwrite the IMSI in the invalid state. The IMSI refresh process can be realized through the recovery process of STK (SIM Tool Kit, user identification application development tool, referred to as STK).
需要说明的是,在SIM卡内未存储IMEI时,即可确定SIM卡未绑定终端设备,此时,SIM向终端设备发送IMEI的第二获取指令;SIM卡接收终端设备反馈第二获取指令的响应,并存述第二获取指令的响应中的各个第二IMEI,从而将终端设备与SIM卡进行绑定。在完成绑定后,即可进行步骤S10-步骤S30进行终端设备的联网验证。另外,SIM的防盗功能可以通过终端设备中STK菜单进行开启,若是防盗功能开启,SIM则需要终端设备提供IMEI进行存储。也即SIM卡在接收到终端设备发送的预设菜单的按键信息时,向终端设备发送IMEI的第二获取指令,预设菜单为SIM卡的防盗功能的开启菜单,也即预设菜单可为STK菜单。SIM卡接收到终端设备反馈的第二指令的响应,从而存储响应中的IMEI作为第二IMEI。It should be noted that when the IMEI is not stored in the SIM card, it can be determined that the SIM card is not bound to the terminal device. At this time, the SIM sends the second acquisition instruction of the IMEI to the terminal device; the SIM card receives the second acquisition instruction from the terminal device and storing each second IMEI in the response to the second acquisition instruction, so as to bind the terminal device with the SIM card. After the binding is completed, step S10-step S30 can be performed to verify the network connection of the terminal device. In addition, the anti-theft function of the SIM can be enabled through the STK menu in the terminal device. If the anti-theft function is enabled, the SIM needs the terminal device to provide the IMEI for storage. That is to say, when the SIM card receives the key information of the preset menu sent by the terminal device, it sends the second acquisition instruction of IMEI to the terminal device. The preset menu is the opening menu of the anti-theft function of the SIM card, that is, the preset menu can be STK menu. The SIM card receives the response of the second instruction fed back by the terminal device, and thus stores the IMEI in the response as the second IMEI.
在本实施例提供的技术方案中,获取终端设备的每个卡槽对应的IMEI,若终端设备的IMEI与SIM卡内存储的IMEI相同,则将IMSI的状态设置为正常状态使得终端设备正常联网。本申请中SIM卡的防盗流程通过SIM 卡进行,终端设备无法获取SIM卡内的IMEI,使得终端设备无法将自身的IMEI伪造成SIM卡内的IMEI,若当前终端设备与装载SIM卡的初始终端设备不同的情况下,SIM卡不会将IMSI更改为正常状态,也即使得终端设备无法通过丢失的SIM卡进行联网,避免SIM卡的信息泄露,提高了SIM卡的信息安全性。In the technical solution provided by this embodiment, the IMEI corresponding to each card slot of the terminal device is obtained, and if the IMEI of the terminal device is the same as the IMEI stored in the SIM card, the state of the IMSI is set to a normal state so that the terminal device can be connected to the network normally . In this application, the anti-theft process of the SIM card is carried out through the SIM card, and the terminal device cannot obtain the IMEI in the SIM card, so that the terminal device cannot forge its own IMEI into the IMEI in the SIM card. If the current terminal device and the initial terminal loaded with the SIM card In the case of different devices, the SIM card will not change the IMSI to the normal state, which means that the terminal device cannot be connected to the Internet through the lost SIM card, avoiding the information leakage of the SIM card and improving the information security of the SIM card.
参照图3,图3为本申请SIM卡的防盗方法的第二实施例,基于第一实施例,步骤S20包括:Referring to Fig. 3, Fig. 3 is the second embodiment of the anti-theft method of the SIM card of the present application, based on the first embodiment, step S20 includes:
步骤S21,获取每个卡槽对应的第一IMEI。Step S21, obtaining the first IMEI corresponding to each card slot.
步骤S22,将各个第一IMEI与SIM卡中存储的第二IMEI进行比较。Step S22, comparing each first IMEI with the second IMEI stored in the SIM card.
在当终端设备为支持双卡、三卡等多SIM卡的手机时,终端设备则设置有多个卡槽,每个卡槽具有对应的IMEI。此时,SIM卡需要终端设备提供所有的IMEI。若SIM卡所绑定的终端设备为多卡手机,则SIM卡中存储有该终端设备的所有IMEI。When the terminal device is a mobile phone supporting multiple SIM cards such as dual cards and triple cards, the terminal device is provided with multiple card slots, and each card slot has a corresponding IMEI. At this time, the SIM card requires the terminal device to provide all IMEIs. If the terminal device bound to the SIM card is a multi-card mobile phone, all IMEIs of the terminal device are stored in the SIM card.
考虑到用户的使用习惯,用户将一张SIM卡***到终端设备中时,***卡槽位置应该不是固定的。以双卡终端为例,假设用户***SIM卡的位置为卡槽1,终端设备提供给SIM卡的第一IMEI为卡槽1对应的IMEI,而后续开机时,用户将该SIM卡***卡槽2,此时终端设备提供给SIM卡的第一IMEI为卡槽2对应的IMEI,如果此时SIM进行IMEI比对流程,就会发现IMEI不匹配,从而导致SIM卡认为该终端设备不是许可使用的终端设备。但是实际上,虽然卡槽1和卡槽2对应的IMEI不同,但是都属于同一终端设备,所以应该认为用户没有更换终端,所以此时该UE应该继续正常使用。Considering the usage habit of the user, when the user inserts a SIM card into the terminal device, the position of the insertion slot should not be fixed. Taking a dual-card terminal as an example, assuming that the position where the user inserts the SIM card is card slot 1, the first IMEI provided by the terminal device to the SIM card is the IMEI corresponding to card slot 1, and when the user starts up later, the user inserts the SIM card into the card slot 2. At this time, the first IMEI provided by the terminal device to the SIM card is the IMEI corresponding to card slot 2. If the SIM performs the IMEI comparison process at this time, it will find that the IMEI does not match, which will cause the SIM card to think that the terminal device is not allowed to use. terminal equipment. But in fact, although the IMEIs corresponding to card slot 1 and card slot 2 are different, they both belong to the same terminal device, so it should be considered that the user has not changed the terminal, so the UE should continue to use normally at this time.
对此,SIM卡将获得的所有第一IMEI与自身存储的IMEI进行比对,若是每个第一IMEI在SIM卡中具有相同的第二IMEI时,即可认为当前终端设备为SIM卡所绑定的终端设备,则将IMSI的状态设置为有效状态,使得终端设备可以通过SIM卡进行网络注册从而连入网络,以正常使用SIM卡。若是存在第一IMEI在SIM卡不具有相同的第二IMEI时,即可认为当前装载SIM卡的终端设备不是SIM卡所绑定的终端设备,SIM将IMSI的状态维持为无效状态,使得终端设备无法使用SIM卡联网,避免SIM卡的信息泄露。In this regard, the SIM card compares all the first IMEIs obtained with the IMEI stored in itself, and if each first IMEI has the same second IMEI in the SIM card, it can be considered that the current terminal device is bound by the SIM card. Set the IMSI status to a valid state, so that the terminal device can perform network registration through the SIM card to connect to the network, so that the SIM card can be used normally. If there is a first IMEI when the SIM card does not have the same second IMEI, it can be considered that the terminal device currently loaded with the SIM card is not the terminal device bound by the SIM card, and the SIM maintains the state of the IMSI as an invalid state, so that the terminal device Unable to use the SIM card to connect to the Internet, avoiding information leakage of the SIM card.
当然,SIM卡可以先将获取的第一IMEI的数量与自身存储的第二IMEI的数量进行比对,若是数量不一致,则维持IMSI的无效状态;若是数量一致,再进行第一IMEI与第二IMEI的比对。Of course, the SIM card can first compare the number of the acquired first IMEI with the number of the second IMEI stored in itself, if the number is inconsistent, then maintain the invalid state of the IMSI; IMEI comparison.
在本实施例提供的技术方案中,在当终端设备为多卡终端时,SIM卡比较每个第一IMEI在SIM卡中是否有相同的第二IMEI,若是,则将SIM卡内的IMSI的状态设置为有效状态,使得终端设备联网。In the technical solution provided in this embodiment, when the terminal device is a multi-card terminal, the SIM card compares whether each first IMEI has the same second IMEI in the SIM card, and if so, the IMSI in the SIM card The state is set to a valid state, so that the terminal device is connected to the network.
参照图4,图4为本申请SIM卡的防盗方法的第三实施例,基于第二实施例,步骤S22包括:Referring to Fig. 4, Fig. 4 is the third embodiment of the anti-theft method of the SIM card of the present application, based on the second embodiment, step S22 includes:
步骤S221,将每个卡槽对应的第一IMEI和卡槽标识形成一条第一条目,多个第一条目形成第一列表。In step S221, the first IMEI and the card slot identifier corresponding to each card slot are formed into a first entry, and multiple first entries form a first list.
步骤S222,将每个第一条目分别与第二列表中的各第二条目进行比较,其中,在每个第一条目均在第二列表内具有相同的第二条目时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI;或者,部分的第一条目均在第二列表中具有相同的第二条目,且剩余部分的第一条目的每个第一IMEI均在剩余部分的第二条目中具有相同的第二IMEI时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI。Step S222, comparing each first entry with each second entry in the second list, wherein, when each first entry has the same second entry in the second list, determine Each first IMEI has the same second IMEI in the SIM card; or, some of the first entries have the same second entry in the second list, and each of the remaining first entries has the same second When one IMEI has the same second IMEI in the remaining second entries, it is determined that each first IMEI has the same second IMEI in the SIM card.
在本实施例中,终端设备为多卡终端。终端设备会提供给SIM卡第一列表,第一列表中包括有多个第一条目,每个第一条目由第一IMEI与第一IMEI对应的卡槽标识。而SIM卡中存储有第二列表,第二列表由多个第二条目构成,每个第二条目由第二IMEI与第二IMEI对应的卡槽标识构成。In this embodiment, the terminal device is a multi-card terminal. The terminal device will provide the SIM card with a first list, the first list includes a plurality of first entries, and each first entry is identified by a first IMEI and a card slot corresponding to the first IMEI. A second list is stored in the SIM card, and the second list is composed of a plurality of second entries, and each second entry is composed of a second IMEI and a card slot identifier corresponding to the second IMEI.
SIM卡在得到第一列表后,则将第一列表中的每个第一条目与自身存储的第二列表的第二条目进行比对。在当第一条目中卡槽标识与第二条目中卡槽标识相同,单第一条目的第一IMEI与该第二条目的第二IMEI不相同,则可能是终端设备将SIM卡装载于另一个卡槽,此时,SIM卡再获取每个卡槽对有的第一IMEI,以进行第一IMEI与第二IMEI的比对,若是每个第一IMEI在SIM卡中都具有相同的第二IMEI,即可准确的确定终端设备将SIM卡装载于另一个卡槽,也即终端设备是SIM卡所许可实用的终端设备,此时,SIM卡将IMSI的状态设置为有效状态。After obtaining the first list, the SIM card compares each first entry in the first list with the second entry in the second list stored by itself. When the card slot identifier in the first entry is the same as the card slot identifier in the second entry, but the first IMEI of the first entry is different from the second IMEI of the second entry, it may be that the terminal device loads the SIM card For another card slot, at this time, the SIM card obtains the first IMEI of each card slot pair to compare the first IMEI with the second IMEI. If each first IMEI has the same The second IMEI can accurately determine that the terminal device loads the SIM card into another card slot, that is, the terminal device is a practical terminal device permitted by the SIM card. At this time, the SIM card sets the status of the IMSI to a valid state.
若是在每个第一条目均在第二列表内具有相同的第二条目时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI,此种情况为终端设备未更换 装载SIM卡的卡槽。此外,部分的第一条目均在第二列表中具有相同的第二条目,且剩余部分的第一条目的第一IMEI均在剩余部分的第二条目中具有相同的第二IMEI时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI;此种情况是为终端设备在传输IMEI时,发生了传输错误。例如,终端设备有三个卡槽,终端设备原本传输的第一列表为(IMEI1,IMEI2,IMEI3),由于出现某种错误,使得SIM卡接收的第一列表为(IMEI1,IMEI3,IMEI2),IMEI在列表中的位置顺序即为表征为卡槽标识,故而,部分的第一条目均在第二列表中具有相同的第二条目,且剩余部分的第一条目的第一IMEI均在剩余部分的第二条目中具有相同的第二IMEI时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI。If each first entry has the same second entry in the second list, it is determined that each first IMEI has the same second IMEI in the SIM card. In this case, the terminal device has not replaced the loaded SIM card slot. Also, when some of the first entries all have the same second entry in the second list, and the first IMEIs of the remainder of the first entries all have the same second IMEI in the remainder of the second entries , to determine that each first IMEI has the same second IMEI in the SIM card; in this case, a transmission error occurs when the terminal device transmits the IMEI. For example, a terminal device has three card slots. The first list transmitted by the terminal device is (IMEI1, IMEI2, IMEI3). Due to some error, the first list received by the SIM card is (IMEI1, IMEI3, IMEI2), and The order of positions in the list is represented by the card slot identification, therefore, some of the first entries have the same second entry in the second list, and the first IMEI of the remaining first entries are all in the remaining When there is the same second IMEI in the second entry of the part, it is determined that each first IMEI has the same second IMEI in the SIM card.
需要说明的是,卡槽标识可以是简单的数值或者字母,比如,卡槽1。此外,卡槽标识可以通过第一IMEI在第一列表中的队列位置确定,例如,第一列表的第一个位置的第一IMEI对应的卡槽标识即为卡槽1,第一列表的第二个位置的第一IMEI对应的卡槽标识即为卡槽2。同理,SIM卡中第二IMEI对应的卡槽标识也是通过第二IMEI在第二列表中的队列位置确定。It should be noted that the card slot identifier may be a simple number or letter, for example, card slot 1. In addition, the card slot identifier can be determined by the queue position of the first IMEI in the first list, for example, the card slot identifier corresponding to the first IMEI in the first position of the first list is card slot 1, and the first IMEI in the first list corresponds to the card slot identifier. The card slot ID corresponding to the first IMEI in the two positions is the card slot 2. Similarly, the card slot identifier corresponding to the second IMEI in the SIM card is also determined by the queue position of the second IMEI in the second list.
在本实施例提供的技术方案中,SIM卡获取终端设备的提供的第一列表,并将第一列表中的第一条目与自身存储的第二列表的第二条目进行比对,在每个第一条目均在第二列表内具有相同的第二条目时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI,或者,部分的第一条目均在第二列表中具有相同的第二条目,且剩余部分的第一条目的每个第一IMEI均在剩余部分的第二条目中具有相同的第二IMEI时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI,避免因SIM卡更换装载位置导致终端设备无法使用SIM卡。In the technical solution provided by this embodiment, the SIM card obtains the first list provided by the terminal device, and compares the first entry in the first list with the second entry in the second list stored by itself, and then When each first entry has the same second entry in the second list, it is determined that each first IMEI has the same second IMEI in the SIM card, or part of the first entries are all in the When the second list has the same second entry, and each first IMEI of the first entry of the remaining part has the same second IMEI in the second entry of the remaining part, it is determined that each first IMEI is in The SIM card has the same second IMEI, which prevents the terminal device from being unable to use the SIM card due to the replacement of the loading position of the SIM card.
参照图5,图5为本申请SIM卡的防盗方法的第四实施例,基于第一至第三中任一实施例,步骤S10包括:Referring to Fig. 5, Fig. 5 is the fourth embodiment of the anti-theft method of the SIM card of the present application, based on any one of the first to third embodiments, step S10 includes:
步骤S11,向终端设备发送IMEI的第一获取指令。Step S11, sending a first IMEI acquisition instruction to the terminal device.
步骤S12,接收终端设备反馈第一获取指令的响应,第一获取指令的响应中包括各个第一IMEI。In step S12, the receiving terminal device feeds back a response to the first obtaining instruction, and the response to the first obtaining instruction includes each first IMEI.
在本实施例中,SIM卡可以向终端设备发送IMEI的第一获取指令。In this embodiment, the SIM card may send the first IMEI acquisition instruction to the terminal device.
具体的,SIM卡发送PROVIDE LOCAL INFORMATION的主动式命令(第一获取指令)给终端设备,其命令类型为01:IMEI of the terminal。终端设备在接收到第一获取指令后,解析第一获取指令,得到命令类型,若是命令类型为01,则需要向SIM卡提供自身的IMEI。此时,移动端发送TERMINAL RESPONSE给USIM卡,TERMINAL RESPONSE中携带终端设备所有卡槽对应的第一IMEI。也即SIM接收到第一获取指令的响应,第一获取指令的响应即为TERMINAL RESPONSE。Specifically, the SIM card sends an active command (the first acquisition command) of PROVIDE LOCAL INFORMATION to the terminal device, and the command type is 01: IMEI of the terminal. After receiving the first acquisition instruction, the terminal device parses the first acquisition instruction to obtain the command type. If the command type is 01, it needs to provide its own IMEI to the SIM card. At this time, the mobile terminal sends a TERMINAL RESPONSE to the USIM card, and the TERMINAL RESPONSE carries the first IMEI corresponding to all card slots of the terminal device. That is, the SIM receives the response to the first acquisition command, and the response to the first acquisition command is TERMINAL RESPONSE.
需要说明的是,第一获取指令的响应中包括多个第一预设字段,每个第一预设字段对应一个卡槽,第一预设字段用于存储卡槽对应的第一IMEI。It should be noted that the response to the first acquisition command includes a plurality of first preset fields, each first preset field corresponds to a card slot, and the first preset field is used to store the first IMEI corresponding to the card slot.
或者,第一获取指令的响应中包括多个第二预设字段,每个第二预设字段包括一个卡槽标识以及卡槽对应的第一IMEI。Alternatively, the response to the first obtaining instruction includes a plurality of second preset fields, and each second preset field includes a card slot identifier and the first IMEI corresponding to the card slot.
在本实施例提供的技术方案中,SIM卡向终端设备发送IMEI的第一获取指令,从而接收终端设备反馈的第一获取指令的响应,进而从响应中获取各个第一IMEI。In the technical solution provided by this embodiment, the SIM card sends a first IMEI acquisition instruction to the terminal device, thereby receiving a response to the first acquisition instruction fed back by the terminal device, and then acquires each first IMEI from the response.
一种可选的实施方式中,SIM卡与终端设备通过通信协议进行数据交互。通信协议可以为TS 31.111。在本实施例中,通信协议基于终端设备的各个卡槽对应的IMEI进行了修改。具体的,以终端设备为双卡终端为例,通信协议的结构如下表-1:In an optional implementation manner, the SIM card and the terminal device perform data interaction through a communication protocol. The communication protocol can be TS 31.111. In this embodiment, the communication protocol is modified based on the IMEI corresponding to each card slot of the terminal device. Specifically, taking the terminal device as a dual-card terminal as an example, the structure of the communication protocol is as follows in Table-1:
表-1Table 1
Figure PCTCN2022070819-appb-000001
Figure PCTCN2022070819-appb-000001
Figure PCTCN2022070819-appb-000002
Figure PCTCN2022070819-appb-000002
从上表中可以看出,在原有协议基础之上,新增了一个可选的IMEI(最后一行)字段,如果终端为单卡终端,不需要填写该字段。如果是双卡终端,该字段可填写,填写的是 其他卡槽位置的IMEI。如果是三卡终端,就需要再增加一个IMEI字段,以此类推,N卡终端可提供N个IMEI。而当前卡槽位置对应的IMEI填写在原有协议定义的IMEI字段中,排在所有IMEI字段的最前面。It can be seen from the above table that on the basis of the original agreement, an optional IMEI (last line) field is added. If the terminal is a single-card terminal, this field does not need to be filled. If it is a dual-card terminal, this field can be filled in, and it is the IMEI of the other card slot. If it is a three-card terminal, another IMEI field needs to be added, and so on, an N-card terminal can provide N IMEIs. The IMEI corresponding to the current card slot position is filled in the IMEI field defined by the original agreement, and is ranked at the top of all IMEI fields.
Note1(Note1为通信协议的第三预设字段,表-1的倒数第二行):Note1 (Note1 is the third preset field of the communication protocol, the penultimate row of Table-1):
当命令为PROVIDE LOCAL INFORMATION(IMEI of the terminal)时,该字段填写的是当前卡槽位置对应的IMEI;When the command is PROVIDE LOCAL INFORMATION (IMEI of the terminal), this field is filled with the IMEI corresponding to the current card slot location;
Note2(Note2为通信协议的第三预设字段,表-1的倒数第一行):Note2 (Note2 is the third preset field of the communication protocol, the penultimate row of Table-1):
当命令为PROVIDE LOCAL INFORMATION(IMEI of the terminal)时,该字段填写的是其他卡槽位置对应的IMEI。When the command is PROVIDE LOCAL INFORMATION (IMEI of the terminal), this field is filled with the corresponding IMEI of other card slot locations.
其他卡槽位置对应的IMEI不再区分顺序,比如当前卡***的卡槽位置为卡槽1时,提供的IMEI顺序可以是(IMEI1,IMEI2,IMEI3),TERMINAL RESPONSE结构可以如下表-2:The IMEIs corresponding to other card slots are no longer in order. For example, when the current card is inserted into the slot 1, the IMEI order provided can be (IMEI1, IMEI2, IMEI3), and the TERMINAL RESPONSE structure can be as follows Table-2:
表-2Table 2
DescriptionDescription ClauseClause M/O/CM/O/C MinMin LengthLength
Command detailsCommand details 8.68.6 Mm YY AA
Device identitiesDevice identities 8.78.7 Mm NN BB
ResultResult 8.128.12 Mm YY CC
IMEI1IMEI1 8.208.20 CC NN GG
IMEI2IMEI2 8.208.20 Oo NN XXXX
IMEI3IMEI3 8.208.20 Oo NN XXXX
终端设备提供的IMEI顺序也可以是(IMEI1,IMEI3,IMEI2),如表-3:The IMEI sequence provided by the terminal device can also be (IMEI1, IMEI3, IMEI2), as shown in Table-3:
表-3table 3
DescriptionDescription ClauseClause M/O/CM/O/C MinMin LengthLength
Command detailsCommand details 8.68.6 Mm YY AA
Device identitiesDevice identities 8.78.7 Mm NN BB
ResultResult 8.128.12 Mm YY CC
IMEI1IMEI1 8.208.20 CC NN GG
IMEI3IMEI3 8.208.20 Oo NN XXXX
IMEI2IMEI2 8.208.20 Oo NN XXXX
在本实施例提供的技术方案中,SIM卡通过终端设备与SIM卡之间的通信协议快速的获取终端设备的第一IMEI,从而缩短SIM卡的验证时间。In the technical solution provided by this embodiment, the SIM card quickly obtains the first IMEI of the terminal device through the communication protocol between the terminal device and the SIM card, thereby shortening the verification time of the SIM card.
一种可选的实施方式中,SIM中设置防盗功能。也即在SIM卡获取终端设备的第一IMEI之前,若SIM卡的防盗功能启动后,SIM卡再将用户身份认证模块SIM卡内存储的国际移动用户识别码IMSI的状态设置为无效状态,以进行SIM的防盗检测流程。而在SIM卡上电、检测到SIM卡当前所在的卡槽的标识与保存的卡槽的标识不同、或者SIM卡上电且SIM卡当前所在的卡槽的标识与保存的卡槽的标识不同,开启SIM卡的防盗功能。具体的,SIM上电时,SIM卡检测自身的防盗功能所表征的标识是否为开启标识,若是,则SIM启动了防盗功能。SIM卡的防盗功能可以通过用户开启。SIM卡位于绑定的终端设备时,用户可以通过终端设备打开STK菜单,SIK菜单中包括防盗功能,用户可以选择开启防盗功能,则终端设备通知SIM卡,使得SIM卡将防盗功能的标识更改为开启标识,也即是的SIM卡启动防盗功能。In an optional implementation manner, an anti-theft function is set in the SIM. That is, before the SIM card obtains the first IMEI of the terminal equipment, if after the anti-theft function of the SIM card is started, the SIM card sets the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card of the user identity authentication module to an invalid state. Perform the SIM anti-theft detection process. However, when the SIM card is powered on, it is detected that the ID of the card slot where the SIM card is currently located is different from the ID of the saved card slot, or the SIM card is powered on and the ID of the card slot where the SIM card is currently located is different from the ID of the saved card slot. to enable the anti-theft function of the SIM card. Specifically, when the SIM is powered on, the SIM card detects whether the identifier represented by the anti-theft function of itself is an activation identifier, and if so, the SIM activates the anti-theft function. The anti-theft function of the SIM card can be enabled by the user. When the SIM card is in the bound terminal device, the user can open the STK menu through the terminal device. The SIK menu includes the anti-theft function. The user can choose to enable the anti-theft function, and the terminal device will notify the SIM card so that the SIM card changes the identification of the anti-theft function to Turn on the logo, that is, the SIM card starts the anti-theft function.
需要说明的是,SIM卡中IMSI的状态为有效状态时,SIM卡会记录其所在卡槽的标识,从而在后续需要进行防盗验证时,比对SIM卡当前所在卡槽的标识与存储的卡槽的标识是否相同,若不同,即可确定SIM卡在手机中更换了卡槽位置。It should be noted that when the status of the IMSI in the SIM card is valid, the SIM card will record the identification of the card slot where it is located, so that when the subsequent anti-theft verification is required, the identification of the card slot where the SIM card is currently located is compared with the stored card Whether the identifications of the slots are the same, if not, it can be determined that the SIM card has changed the position of the card slot in the mobile phone.
参照图6,以下以终端设备(User Equipment,简称UE,表示终端设备)为双卡终端、SIM卡为USIM卡为例、且用户将SIM卡从卡槽1更换到卡槽2后,对SIM的防盗方法进行简要说明。Referring to Fig. 6, the following takes the terminal equipment (User Equipment, UE for short, representing terminal equipment) as a dual-card terminal, and the SIM card as a USIM card as an example, and after the user replaces the SIM card from card slot 1 to card slot 2, the SIM A brief description of the anti-theft method.
1、用户将卡从卡槽1更换到卡槽2,开机。UE开机复位SIM卡,执行SIM卡初始化流程;USIM卡上电复位后,判断当前已经开启了USIM卡防盗功能,将卡中的IMSI设置成无效值,无效值表示IMSI的状态为无效状态;1. The user replaces the card from card slot 1 to card slot 2, and starts the machine. UE powers on to reset the SIM card, and executes the SIM card initialization process; after the USIM card is powered on and reset, it is judged that the USIM card anti-theft function has been enabled, and the IMSI in the card is set to an invalid value. The invalid value indicates that the state of the IMSI is invalid;
2、USIM卡发送PROVIDE LOCAL INFORMATION主动式命令给UE,命令类型为01:IMEI of the terminal;2. The USIM card sends the PROVIDE LOCAL INFORMATION active command to the UE, and the command type is 01: IMEI of the terminal;
3、UE端发送TERMINAL RESPONSE给USIM卡,当中携带UE所有卡槽对应的IMEI,本实施例中为当前卡槽IMEI2和其他卡槽位置对应的IMEI1;3. The UE sends TERMINAL RESPONSE to the USIM card, which carries the IMEI corresponding to all the card slots of the UE, in this embodiment, it is the current card slot IMEI2 and the IMEI1 corresponding to other card slot positions;
4、USIM卡将卡中保存的IMEI列表与UE本次提供的IMEI列表进行比较;4. The USIM card compares the IMEI list saved in the card with the IMEI list provided by the UE this time;
5、USIM卡对UE提供的IMEI列表进行检查,发现UE提供的IMEI列表中的值IMEI2和IMEI1都在USIM卡保存的IMEI列表中,那么USIM卡即认为UE通过了USIM卡防盗检测流程,USIM卡发起IMSI刷新流程,也即将IMSI的状态设置为有效状态,UE就能正常执行后续的注册网络流程。5. The USIM card checks the IMEI list provided by the UE, and finds that the values IMEI2 and IMEI1 in the IMEI list provided by the UE are both in the IMEI list saved by the USIM card, then the USIM card considers that the UE has passed the USIM card anti-theft detection process, and the USIM The card initiates the IMSI refresh process, that is, the state of the IMSI is set to a valid state, and the UE can normally perform subsequent registration network processes.
本申请还提供一种SIM卡800,参照图7,SIM卡800包括:The present application also provides a SIM card 800. Referring to FIG. 7, the SIM card 800 includes:
获取模块801,用于获取终端设备的第一国际移动设备识别码IMEI,并将第一IMEI与SIM卡存储的第二IMEI进行比较,当终端设备具有多个第一IMEI时,终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;The obtaining module 801 is used to obtain the first international mobile equipment identity IMEI of the terminal device, and compare the first IMEI with the second IMEI stored in the SIM card. When the terminal device has multiple first IMEIs, the terminal device has Multiple card slots for loading SIM cards, each corresponding to an IMEI;
设置模块802,用于在第一IMEI与第二IMEI相同时,将SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,IMSI为有效状态时,终端设备正常联网。The setting module 802 is used to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card to a valid state when the first IMEI is the same as the second IMEI. When the IMSI is in a valid state, the terminal device is normally connected to the network.
一种可选的实施方式中,SIM卡800包括:In an optional implementation manner, the SIM card 800 includes:
获取模块801,用于获取每个卡槽对应的第一IMEI;Obtaining module 801, configured to obtain the first IMEI corresponding to each card slot;
比较模块,用于将各个第一IMEI与SIM卡中存储的第二IMEI进行比较;A comparison module, configured to compare each first IMEI with the second IMEI stored in the SIM card;
设置模块,用于在每个第一IMEI均在SIM卡内具有相同的第二IMEI时,将SIM卡中的IMSI的状态设置为有效状态。The setting module is used to set the state of the IMSI in the SIM card to be valid when each first IMEI has the same second IMEI in the SIM card.
一种可选的实施方式中,SIM卡800包括:In an optional implementation manner, the SIM card 800 includes:
构建模块,用于将每个卡槽对应的第一IMEI和卡槽标识形成一条第一条目,多个第一条目形成第一列表;A building block, configured to form a first entry with the first IMEI corresponding to each card slot and the card slot identifier, and a plurality of first entries to form a first list;
比较模块,用于将每个第一条目分别与第二列表中的各第二条目进行比较,其中,在每个第一条目均在第二列表内具有相同的第二条目时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI;或者,部分的第一条目均在第二列表中具有相同的第二条目,且剩余部分的第一条目的每个第一IMEI均在剩余部分的第二条目中具有相同的第二IMEI时,确定每个第一IMEI均在SIM卡内具有相同的第二IMEI。a comparison module for comparing each first entry with each second entry in the second list, wherein when each first entry has the same second entry in the second list , determine that each first IMEI has the same second IMEI in the SIM card; or, some of the first entries all have the same second entry in the second list, and each of the remaining first entries When all the first IMEIs have the same second IMEI in the remaining second entries, it is determined that each first IMEI has the same second IMEI in the SIM card.
一种可选的实施方式中,SIM卡800包括:In an optional implementation manner, the SIM card 800 includes:
发送模块,用于向终端设备发送IMEI的第一获取指令;A sending module, configured to send the first acquisition instruction of the IMEI to the terminal device;
接收模块,用于接收终端设备反馈第一获取指令的响应,第一获取指令 的响应中包括各个第一IMEI。The receiving module is configured to receive a response from the terminal device to feed back the first acquisition instruction, and the response to the first acquisition instruction includes each first IMEI.
一种可选的实施方式中,SIM卡800包括:In an optional implementation manner, the SIM card 800 includes:
设置模块801,还用于在启动防盗功能后,将用户身份认证模块SIM卡内存储的国际移动用户识别码IMSI的状态设置为无效状态。The setting module 801 is also used to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card of the user identity authentication module to an invalid state after the anti-theft function is activated.
一种可选的实施方式中,SIM卡800包括:In an optional implementation manner, the SIM card 800 includes:
发送模块,用于在接收到终端设备发送的预设菜单的按键信息时,向终端设备发送IMEI的第二获取指令,其中,预设菜单为SIM卡的防盗功能的开启菜单;The sending module is used to send the second acquisition instruction of IMEI to the terminal device when receiving the key information of the preset menu sent by the terminal device, wherein the preset menu is the opening menu of the anti-theft function of the SIM card;
接收模块,用于接收终端设备反馈第二获取指令的响应,并存储第二获取指令的响应中的各个第二IMEI。The receiving module is configured to receive a response from the terminal device to feed back the second acquisition instruction, and store each second IMEI in the response to the second acquisition instruction.
图8是根据一示例性实施例示出的一种SIM卡的框图。Fig. 8 is a block diagram of a SIM card according to an exemplary embodiment.
SIM卡可以包括:处理器91,例如CPU,存储器92以及接发器93。本领域技术人员可以理解,图8中示出的结构并不构成对SIM卡的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。存储器91可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The SIM card may include: a processor 91 such as a CPU, a memory 92 and a transceiver 93 . Those skilled in the art can understand that the structure shown in FIG. 8 does not constitute a limitation on the SIM card, and may include more or less components than those shown in the figure, or combine some components, or arrange different components. Memory 91 can be realized by any type of volatile or nonvolatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
处理器92可以调用存储器92内存储的计算机程序,以完成上述的软件的缺陷预测方法的全部或部分步骤。The processor 92 can call the computer program stored in the memory 92 to complete all or part of the steps of the software defect prediction method described above.
接发器93用于接收终端设备发送的信息以及向终端设备发送信息。The transceiver 93 is used for receiving information sent by the terminal equipment and sending information to the terminal equipment.
一种非临时性计算机可读存储介质,当该存储介质中的指令由终端设备的处理器执行时,使得终端设备能够执行上述SIM卡的防盗方法。A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the terminal device, the terminal device can execute the above SIM card anti-theft method.
一种计算机程序产品,包括计算机程序,当该计算机程序由终端设备的处理器执行时,使得终端设备能够执行上述SIM卡的防盗方法。A computer program product, including a computer program, when the computer program is executed by a processor of a terminal device, the terminal device can execute the above SIM card anti-theft method.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施 例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、路由器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、路由器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的路由器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. A computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) to another website site, computer, router, or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a router or a data center integrated with one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)).
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit it; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the application. scope.

Claims (13)

  1. 一种SIM卡的防盗方法,其特征在于,包括:An anti-theft method for a SIM card, comprising:
    获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;Obtaining the first International Mobile Equipment Identity IMEI of the terminal device, and comparing the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
    在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
  2. 根据权利要求1所述的SIM卡的防盗方法,其特征在于,当所述终端设备具有多个第一IMEI时,所述获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较的步骤包括:The anti-theft method for a SIM card according to claim 1, wherein when the terminal equipment has a plurality of first IMEIs, the acquisition of the first International Mobile Equipment Identity IMEI of the terminal equipment, and the The step of comparing the first IMEI with the second IMEI stored in the SIM card includes:
    获取每个所述卡槽对应的第一IMEI;Obtain the first IMEI corresponding to each of the card slots;
    将各个所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较;comparing each of said first IMEIs with a second IMEI stored in said SIM card;
    在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态IMSI的状态设置为有效状态,包括:When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity IMSI stored in the SIM card is set to a valid state, including:
    在每个所述第一IMEI均在所述SIM卡内具有相同的第二IMEI时,将所述SIM卡中的所述IMSI的状态设置为有效状态。When each of the first IMEIs has the same second IMEI in the SIM card, setting the state of the IMSI in the SIM card to a valid state.
  3. 根据权利要求2所述的SIM卡的防盗方法,其特征在于,所述SIM卡中包括第二列表,所述第二列表中包括多个第二条目,每个第二条目包括一个卡槽对应的第二IMEI和卡槽标识;所述将各个所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,包括:The anti-theft method for a SIM card according to claim 2, wherein the SIM card includes a second list, and the second list includes a plurality of second entries, and each second entry includes a card The second IMEI corresponding to the slot and the card slot identification; the comparison of each of the first IMEI with the second IMEI stored in the SIM card includes:
    将每个卡槽对应的第一IMEI和卡槽标识形成一条第一条目,多个第一条目形成第一列表;The first IMEI corresponding to each card slot and the card slot identification form a first entry, and a plurality of first entries form a first list;
    将每个所述第一条目分别与所述第二列表中的各第二条目进行比较;comparing each of said first entries with respective second entries in said second list;
    其中,在每个所述第一条目均在所述第二列表内具有相同的第二条目时,确定每个所述第一IMEI均在所述SIM卡内具有相同的第二IMEI;或者,部分的所述第一条目均在所述第二列表中具有相同的第二条目,且剩余部分的所述第一条目的每个所述第一IMEI均在剩余部分的所述 第二条目中具有相同的第二IMEI时,确定每个所述第一IMEI均在所述SIM卡内具有相同的第二IMEI。Wherein, when each of the first entries has the same second entry in the second list, it is determined that each of the first IMEIs has the same second IMEI in the SIM card; Alternatively, some of said first entries all have the same second entry in said second list, and each of said first IMEIs of the remainder of said first entries has the same second entry in said remainder of said first entries. When the second entry has the same second IMEI, it is determined that each of the first IMEIs has the same second IMEI in the SIM card.
  4. 根据权利要求1所述的SIM卡的防盗方法,其特征在于,所述获取所述终端设备的第一国际移动设备识别码IMEI的步骤包括:The anti-theft method of the SIM card according to claim 1, wherein the step of obtaining the first International Mobile Equipment Identity (IMEI) of the terminal equipment comprises:
    向所述终端设备发送IMEI的第一获取指令;sending a first acquisition instruction of the IMEI to the terminal device;
    接收所述终端设备反馈所述第一获取指令的响应,所述第一获取指令的响应中包括各个所述第一IMEI。Receiving a response fed back by the terminal device to the first acquisition instruction, where the response to the first acquisition instruction includes each of the first IMEIs.
  5. 根据权利要求4所述的SIM卡的防盗方法,其特征在于,所述第一获取指令的响应中包括多个第一预设字段,每个所述第一预设字段对应一个卡槽,所述第一预设字段用于存储卡槽对应的第一IMEI。The anti-theft method for a SIM card according to claim 4, wherein the response to the first acquisition instruction includes a plurality of first preset fields, and each of the first preset fields corresponds to a card slot, so The first preset field is used to store the first IMEI corresponding to the card slot.
  6. 根据权利要求4所述的SIM卡的防盗方法,其特征在于,所述第一获取指令的响应中包括多个第二预设字段,每个所述第二预设字段包括一个卡槽标识以及卡槽对应的第一IMEI。The anti-theft method for a SIM card according to claim 4, wherein the response to the first acquisition instruction includes a plurality of second preset fields, and each of the second preset fields includes a card slot identification and The first IMEI corresponding to the card slot.
  7. 根据权利要求1-6任一项所述的防盗方法,其特征在于,所述获取所述终端设备的第一国际移动设备识别码IMEI的步骤之前,还包括:The anti-theft method according to any one of claims 1-6, wherein, before the step of obtaining the first International Mobile Equipment Identity (IMEI) of the terminal device, further comprising:
    在启动防盗功能后,将用户身份认证模块SIM卡内存储的国际移动用户识别码IMSI的状态设置为无效状态。After the anti-theft function is activated, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card of the user identity authentication module is set to an invalid state.
  8. 根据权利要求7所述的防盗方法,其特征在于,在所述SIM卡上电和/或检测到所述SIM卡当前所在的卡槽的标识与保存的卡槽的标识不同时,所述SIM卡启动防盗功能。The anti-theft method according to claim 7, wherein when the SIM card is powered on and/or when it is detected that the ID of the card slot where the SIM card is currently located is different from the ID of the saved card slot, the SIM card The card activates the anti-theft function.
  9. 根据权利要求1-6任一项所述的防盗方法,其特征在于,所述获取所述终端设备的第一国际移动设备识别码IMEI的步骤之前,还包括:The anti-theft method according to any one of claims 1-6, wherein, before the step of obtaining the first International Mobile Equipment Identity (IMEI) of the terminal device, further comprising:
    在接收到所述终端设备发送的预设菜单的按键信息时,向所述终端设备发送IMEI的第二获取指令,其中,所述预设菜单为所述SIM卡的防盗功能的开启菜单;When the key information of the preset menu sent by the terminal device is received, a second acquisition instruction of IMEI is sent to the terminal device, wherein the preset menu is a menu for opening the anti-theft function of the SIM card;
    接收所述终端设备反馈所述第二获取指令的响应,并存储所述第二获取指令的响应中的各个所述第二IMEI。receiving a response from the terminal device feeding back the second acquisition instruction, and storing each of the second IMEIs in the response to the second acquisition instruction.
  10. 一种SIM卡,其特征在于,包括:A kind of SIM card is characterized in that, comprises:
    获取模块,用于获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备 具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;An acquisition module, configured to acquire the first International Mobile Equipment Identity IMEI of the terminal equipment, and compare the first IMEI with the second IMEI stored in the SIM card, the terminal equipment has one or more The first IMEI, when the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
    设置模块,用于在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。A setting module, configured to set the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card to a valid state when the first IMEI is the same as the second IMEI, and when the IMSI is in a valid state, the The above-mentioned terminal equipment is connected to the network normally.
  11. 一种SIM卡,其特征在于,包括:存储器和处理器;A kind of SIM card, is characterized in that, comprises: memory and processor;
    所述存储器存储计算机执行指令;the memory stores computer-executable instructions;
    所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如下操作:The processor executes computer-implemented instructions stored in the memory such that the processor performs the following operations:
    获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;Obtaining the first International Mobile Equipment Identity IMEI of the terminal device, and comparing the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
    在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现如下操作:A computer-readable storage medium, characterized in that computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to implement the following operations when executed by a processor:
    获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;Obtaining the first International Mobile Equipment Identity IMEI of the terminal device, and comparing the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
    在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
  13. 一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时,实现如下操作:A computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, the following operations are realized:
    获取所述终端设备的第一国际移动设备识别码IMEI,并将所述第一IMEI与所述SIM卡中存储的第二IMEI进行比较,所述终端设备具有一 个或者多个第一IMEI,当所述终端设备具有多个第一IMEI时,所述终端设备设有多个装载SIM卡的卡槽,每个卡槽对应一个IMEI;Obtaining the first International Mobile Equipment Identity IMEI of the terminal device, and comparing the first IMEI with the second IMEI stored in the SIM card, the terminal device has one or more first IMEIs, when When the terminal device has a plurality of first IMEIs, the terminal device is provided with a plurality of card slots for loading SIM cards, and each card slot corresponds to an IMEI;
    在所述第一IMEI与所述第二IMEI相同时,将所述SIM卡内存储的国际移动用户识别码IMSI的状态设置为有效状态,所述IMSI为有效状态时,所述终端设备正常联网。When the first IMEI is the same as the second IMEI, the state of the International Mobile Subscriber Identity (IMSI) stored in the SIM card is set to a valid state, and when the IMSI is in a valid state, the terminal device is normally connected to the network .
PCT/CN2022/070819 2021-06-29 2022-01-07 Anti-theft method and apparatus for sim card WO2023273289A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110727034.0A CN113301570B (en) 2021-06-29 2021-06-29 Anti-theft method and device for SIM card
CN202110727034.0 2021-06-29

Publications (1)

Publication Number Publication Date
WO2023273289A1 true WO2023273289A1 (en) 2023-01-05

Family

ID=77329893

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/070819 WO2023273289A1 (en) 2021-06-29 2022-01-07 Anti-theft method and apparatus for sim card

Country Status (2)

Country Link
CN (1) CN113301570B (en)
WO (1) WO2023273289A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113301570B (en) * 2021-06-29 2023-04-07 展讯通信(上海)有限公司 Anti-theft method and device for SIM card

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120264400A1 (en) * 2011-03-01 2012-10-18 Tracfone Wireless, Inc. System, method and apparatus for pairing sim or uicc cards with authorized wireless devices
US20160098675A1 (en) * 2014-10-03 2016-04-07 Device Cloud Networks Methods and systems for inventory control
CN107872786A (en) * 2016-09-23 2018-04-03 ***通信有限公司研究院 A kind of control method and smart card
CN111182536A (en) * 2019-12-30 2020-05-19 中移(杭州)信息技术有限公司 SIM card state detection method, device, network equipment and storage medium
CN112929881A (en) * 2019-12-05 2021-06-08 华为技术有限公司 Machine card verification method applied to extremely simple network and related equipment
CN113301570A (en) * 2021-06-29 2021-08-24 展讯通信(上海)有限公司 Anti-theft method and device for SIM card

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103702331A (en) * 2013-12-13 2014-04-02 北京奇虎科技有限公司 Mobile terminal antitheft method and client
CN106304033A (en) * 2016-08-31 2017-01-04 北京握奇数据***有限公司 A kind of cellphone information defence method based on binding machine and card and system
CN107819950A (en) * 2017-11-02 2018-03-20 平安科技(深圳)有限公司 Anti-theft method for mobile terminal, device, equipment and computer-readable recording medium
WO2020227925A1 (en) * 2019-05-14 2020-11-19 北京小米移动软件有限公司 Network registration method, apparatus and system, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120264400A1 (en) * 2011-03-01 2012-10-18 Tracfone Wireless, Inc. System, method and apparatus for pairing sim or uicc cards with authorized wireless devices
US20160098675A1 (en) * 2014-10-03 2016-04-07 Device Cloud Networks Methods and systems for inventory control
CN107872786A (en) * 2016-09-23 2018-04-03 ***通信有限公司研究院 A kind of control method and smart card
CN112929881A (en) * 2019-12-05 2021-06-08 华为技术有限公司 Machine card verification method applied to extremely simple network and related equipment
CN111182536A (en) * 2019-12-30 2020-05-19 中移(杭州)信息技术有限公司 SIM card state detection method, device, network equipment and storage medium
CN113301570A (en) * 2021-06-29 2021-08-24 展讯通信(上海)有限公司 Anti-theft method and device for SIM card

Also Published As

Publication number Publication date
CN113301570B (en) 2023-04-07
CN113301570A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
US10356602B2 (en) Method, device, and system for dynamically binding a smart card
JP6231044B2 (en) Handling of application identification information of electronic subscriber identification module (eSIM)
US20170013442A1 (en) Electronic subscriber identity module selection
US9439062B2 (en) Electronic subscriber identity module application identifier handling
CN106162517B (en) Virtual SIM card management method and system
US8560015B2 (en) Application selection for multi-SIM environment
KR101340982B1 (en) Me network parameters configuration by uicc
US10862881B2 (en) Method of managing shared files and device for authenticating subscriber by using same
US8903370B2 (en) Network access credential migration
US20150011202A1 (en) Method and Terminal for Loading Operator Configuration Information
WO2020057400A1 (en) Multi-card roaming network registration method and apparatus, computer device and storage medium
US20150119017A1 (en) Method and system for implementing smart card remote operation based on smart card web server
US10820189B2 (en) Installation of a profile in an embedded subscriber identity module
BRPI0823384B1 (en) METHOD TO TRANSFER AN APPLICATION TO A TELECOMMUNICATION TERMINAL
CN106131816B (en) Virtual SIM card management method and terminal
WO2015180242A1 (en) Method, device, and system for dynamically binding a machine card
CN107371234B (en) Registration method, device and terminal
EP1733580A1 (en) Updating of the preferred roaming list (prl) in a sim (subscriber identity module) / ruim (removable user identity module) card.
US10911945B1 (en) Automated eUICC service profile configuration in view of operational issue with respect to eUICC service profile
US11805397B2 (en) IMEI binding and dynamic IMEI provisioning for wireless devices
WO2013023510A1 (en) User information storage method and equipment thereof
WO2023273289A1 (en) Anti-theft method and apparatus for sim card
WO2016095371A1 (en) Method and device for updating mobile network information, and method and device for implementing network selection
WO2016173070A1 (en) Terminal network searching method and terminal
US12022284B2 (en) System and methods for over-the-air SIM profile transfer

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22831126

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22831126

Country of ref document: EP

Kind code of ref document: A1