CN111294786A - Card writing protection method and device for mobile terminal, mobile terminal and storage medium - Google Patents

Card writing protection method and device for mobile terminal, mobile terminal and storage medium Download PDF

Info

Publication number
CN111294786A
CN111294786A CN201811503593.8A CN201811503593A CN111294786A CN 111294786 A CN111294786 A CN 111294786A CN 201811503593 A CN201811503593 A CN 201811503593A CN 111294786 A CN111294786 A CN 111294786A
Authority
CN
China
Prior art keywords
file
written
mobile terminal
writing
comparison result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811503593.8A
Other languages
Chinese (zh)
Other versions
CN111294786B (en
Inventor
张涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN201811503593.8A priority Critical patent/CN111294786B/en
Publication of CN111294786A publication Critical patent/CN111294786A/en
Application granted granted Critical
Publication of CN111294786B publication Critical patent/CN111294786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/183Processing at user equipment or user record carrier
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/20Transfer of user or subscriber data
    • H04W8/205Transfer to or from user equipment or user record carrier
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application relates to a card writing protection method and device of a mobile terminal, the mobile terminal and a storage medium, wherein after the mobile terminal receives a writing request for identifying an SIM card aiming at the identity of a user, the mobile terminal reads information in the SIM card according to an update file type carried in the writing request and acquires a first file matched with the update file type; and then, comparing the file to be written with the first file to obtain a comparison result, and determining whether to execute the writing request according to the comparison result. The application can reduce the writing-in times of the SIM card, thereby reducing the burning risk of the SIM card and further improving the use stability of the product.

Description

Card writing protection method and device for mobile terminal, mobile terminal and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a card writing protection method and apparatus for a mobile terminal, and a storage medium.
Background
With the popularization of mobile communication technology, Subscriber identity modules (SIM cards) are widely used in handheld communication devices and internet of things (vehicle network) devices. In the use scene of the internet of things, because the device is in a multipoint connected network, the SIM card is used as a key unit of communication, and has a storage function in addition to a certain data processing function, and can frequently interact with the device of the internet of things in the use process to process a large number of read-write operation requests.
In the conventional technology, when the device writes into the SIM, and when the network needs to update information, the device will issue a card writing request to the SIM card, and directly write the card after the request.
However, since the number of times of writing the SIM card is limited, the device frequently writes the SIM card, which may cause the SIM card to burn, and affect the stability of the product.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a card writing protection method and apparatus for a mobile terminal, and a storage medium.
A card writing protection method of a mobile terminal, the method comprising:
receiving a write-in request aiming at a user identity identification SIM card sent by a communication network, wherein the write-in request carries an updated file type and a file to be written in;
reading information in an SIM card according to the update file type, acquiring a first file matched with the update file type, and comparing the file to be written with the first file to acquire a comparison result;
and determining whether to execute the write request according to the comparison result.
In one embodiment, the determining whether to execute the write request according to the comparison result includes: if the comparison result is that the file to be written is the same as the first file, refusing to execute the writing request; and if the comparison result shows that the file to be written is different from the first file, executing the writing request.
In one embodiment, the executing the write request includes writing the file to be written into the SIM card, and deleting the first file.
In one embodiment, the comparing the file to be written with the first file to obtain a comparison result includes: determining whether the characters in the file to be written are the same as the characters at the same position in the first file or not according to the character sequence; if each character is the same, the comparison result is the same; if at least one character is different, the comparison result is different.
In one embodiment, after receiving a write request for a subscriber identity module SIM card sent by a communication network, the method further includes: formatting the file to be written to obtain a target file to be written, wherein the target file to be written is the same as the type of the updated file; and caching the target file to be written.
In one embodiment, after caching the target file to be written, the caching method includes: and updating the card writing attempt times according to the received writing request times.
In one embodiment, the method further comprises: and if the file to be written is different from the first file, adding 1 to the current actual card writing times.
A card-writing protection device of a mobile terminal, the device comprising:
the device comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a writing request which is sent by a communication network and aims at a user identity identification SIM card, and the writing request carries an updated file type and a file to be written;
the comparison module is used for reading information in the SIM card according to the update file type, acquiring a first file matched with the update file type, and comparing the file to be written with the first file to acquire a comparison result;
and the determining module is used for determining whether to execute the writing request according to the comparison result.
A mobile terminal comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the card writing protection method of the mobile terminal when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described write card protection method for a mobile terminal.
After the mobile terminal receives a write request for identifying the SIM card aiming at the identity of a user, reading information in the SIM card according to an update file type carried in the write request, and acquiring a first file matched with the update file type; and then, comparing the file to be written with the first file to obtain a comparison result, and determining whether to execute the writing request according to the comparison result. The files to be written in the mobile terminal are compared with the first files matched with the updated file types in the SIM card, and then the files to be written in the SIM card are determined according to the comparison result, instead of writing all the files to be written in all the writing requests in the SIM card, so that the writing times of the SIM card can be reduced, the burning risk of the SIM card is reduced, and the use stability of the product is further improved.
Drawings
FIG. 1 is a diagram of an application environment of a card-writing protection method of a mobile terminal in an embodiment;
fig. 2 is a schematic flowchart illustrating a card-writing protection method of a mobile terminal according to an embodiment;
fig. 3 is a schematic flowchart of a card-writing protection method of a mobile terminal in another embodiment;
fig. 4 is a data flow diagram of a card-writing protection method of a mobile terminal in another embodiment;
FIG. 5 is a block diagram of a card-writing protection apparatus of a mobile terminal according to an embodiment;
fig. 6 is a block diagram of a card-writing protection device of a mobile terminal in another embodiment;
fig. 7 is an internal structural diagram of a mobile terminal in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The card writing protection method of the mobile terminal provided by the embodiment of the application can be applied to the application environment shown in fig. 1. The SIM card 120 is carried in the mobile terminal 110, and communicates with the communication station 130 through a network. The mobile terminal 110 may be, but is not limited to, various handheld communication devices, and terminal devices of the internet of things, such as a vehicle-mounted device.
In an embodiment, as shown in fig. 2, a card-writing protection method for a mobile terminal is provided, which is described by taking the application of the method to the mobile terminal in fig. 1 as an example, and the method includes:
s101, receiving a writing request aiming at a user identity identification SIM card sent by a communication network, wherein the writing request carries an updated file type and a file to be written.
The SIM card is a data card for uniquely identifying the identity of a client, stores the data, the authentication method, the key and other contents of the user and is used for a mobile communication network or a communication network such as the Internet of things to identify the identity of the client; the user can only complete the connection with the communication network and the exchange of information through the SIM card. The SIM card may be a normal SIM card, a micro SIM card or a Nano SIM card, and the type of the SIM card is not limited herein.
The file type contained in the SIM card is determined by the SIM card related protocol, different protocols may correspond to different SIM card file types, and the file type of the SIM card is not limited herein. For example, the information in the SIM card can be divided into four parts: the first part is a fixedly stored file type, and data of the type is written by a SIM card center before the mobile terminal is sold, and comprises an international mobile subscriber identification number (IMSI), an authentication Key (KI), an authentication and encryption algorithm and the like; the second part is the type of files related to the network, such as Location Area Identification (LAI), temporary subscriber identification (TMSI), public telephone network code of forbidden access, and the like, which are temporarily stored; the third part is the file type such as the relevant service code, such as Personal Identification Number (PIN), unlocking code (PUK), charging rate, etc.; the fourth part is a telephone directory, which is a telephone number input by the mobile phone user at any time. Each file in the file types includes a file identifier and a file body, where the file identifier may be used to store information such as the type and storage address of the file, and the file body stores real data, for example, for a file with a file type of TMSI, the file identifier stored in the SIM card may be 6F07, where 6F refers to the storage directory of the file, and 07 is the file type of the file.
The write request carries the update file type and the file to be written, and the specific form of the write request is related to the communication network, and the specific form of the write request sent by different communication networks may be different, which is not limited herein.
S102, reading information in the SIM card according to the updated file type, acquiring a first file matched with the updated file type, comparing the file to be written with the first file, and acquiring a comparison result.
After the mobile terminal obtains the write-in request, the mobile terminal can read the information in the SIM card according to the update file type carried in the write-in request, and store the first file matched with the update file type in the SIM card in the mobile terminal. For example, if the communication network sends a write request for the TMSI, the mobile terminal may read out the TMSI file in the SIM card information, for example, by reading the file identified as 6F07 to obtain the first file matching the update file type. When the first file is obtained, the mobile terminal can store the file which is directly read from the SIM card and is matched with the type of the updated file according to the format of the file to be written carried in the writing request, so as to obtain the first file; the file body in the file read from the SIM card and matched with the updated file type can also be saved as a first file; the manner of acquiring the first file is not limited herein.
Optionally, the mobile terminal may format the file to be written to obtain a target file to be written, which is the same as the updated file type, and cache the target file to be written.
Specifically, the mobile terminal may format the file to be written, and may store the file in the SIM according to the format corresponding to the update file type, for example, when the update file type is the TMSI file, the mobile terminal may add a corresponding file identifier, such as 6F07, to the file to be written, obtain the formatted target profile, and cache the file in the mobile terminal.
After the mobile terminal obtains the first file, the file to be written may be compared with the first file to determine whether the information of the SIM card includes the file to be written. For example, the mobile terminal may compare the formatted target file to be written with the characters in the first file one by one; the number of characters of the target file to be written in and the number of characters of the first file can be compared firstly, then a section of character string is randomly extracted, and the character strings at the same position in the two files are compared to determine whether the target file to be written in and the first file are the same; the comparison method between the file to be written and the first file is not limited herein.
After the mobile terminal compares the file to be written with the first file, an obtained comparison result can be an instruction and carries the same or different information of the file to be written and the first file; in addition, the comparison result can also be a comparison result file, and whether the file to be written and the first file are the same or not is determined according to the content of the comparison result file; the type of the comparison result is not limited herein.
S103, determining whether to execute the write request according to the comparison result.
Specifically, when determining whether to execute the write request according to the comparison result, the mobile terminal may select to execute or not execute according to the comparison result; the write-in reminder may be sent to the user according to the comparison result, and then the write-in request is executed according to an instruction of the user, where an execution manner of the write-in request is not limited herein.
According to the card writing protection method of the mobile terminal, after the mobile terminal receives a writing request for identifying the SIM card aiming at the user identity, information in the SIM card is read according to the type of an updated file carried in the writing request, and a first file matched with the type of the updated file is obtained; and then, comparing the file to be written with the first file to obtain a comparison result, and determining whether to execute the writing request according to the comparison result. The files to be written in the mobile terminal are compared with the first files matched with the updated file types in the SIM card, and then the files to be written in the SIM card are determined according to the comparison result, instead of writing all the files to be written in all the writing requests in the SIM card, so that the writing times of the SIM card can be reduced, the burning risk of the SIM card is reduced, and the use stability of the product is further improved.
In an embodiment, regarding a manner that the mobile terminal determines whether to execute the write request according to the comparison result, on the basis of the embodiment shown in fig. 2, the S103 includes:
and if the comparison result shows that the file to be written is the same as the first file, refusing to execute the writing request.
And if the comparison result shows that the file to be written is different from the first file, executing the writing request.
Specifically, whether the file to be written is the same as the first file or not can be determined according to the comparison result, if so, the mobile terminal considers that the file to be written already exists in the information of the SIM card, and the mobile terminal can refuse to execute the write request without repeatedly writing the file to be written; if the information of the SIM card is different from the information of the SIM card, the mobile terminal considers that the information of the SIM card does not contain the file to be written, the file matched with the type of the updated file in the SIM card can be updated, and the mobile terminal can execute the writing request and write the file to be written into the SIM card.
Further, when executing the write request, the mobile terminal may write a file to be written into the SIM card, and add a file to the SIM card; optionally, the mobile terminal may further write the file to be written into the SIM card, and delete the first file, for example, when the mobile terminal receives a write request sent by a communication network, and updates the TMSI file in the SIM card, the file to be written may be written into the SIM card, and then delete the TMSI file in the original SIM card.
According to the card writing protection method of the mobile terminal, the mobile terminal refuses to execute the writing request when the file to be written is the same as the first file according to the comparison result, so that the number of times of writing operation on the SIM card is reduced, the card burning risk of the SIM card is reduced, and the use stability of the product is further improved.
Fig. 3 is a schematic flow chart of a card-writing protection method of a mobile terminal in another embodiment, which relates to a comparison method for comparing the file to be written and the first file by the mobile terminal, and based on the embodiment shown in fig. 2, as shown in fig. 3, the S102 includes:
s201, according to the character sequence, determining whether the characters in the file to be written are the same as the characters at the same position in the first file.
Specifically, the mobile terminal may compare the characters at the same positions in the file to be written and the first file one by one, and determine whether the characters at each character position of the file to be written and the first file are the same.
S202, if all characters are the same, the comparison result is the same.
S203, if at least one character is different, the comparison result is different.
Further, the mobile terminal may form the comparison result into a comparison result file, for example, if the characters on the first character bits of the file to be written and the first file are the same, the first character bit in the comparison result file may be true; if the characters on the nth character bit of the file to be written and the first file are different, the nth character bit in the comparison result file may be false.
If all the character bits in the comparison result file are true, the mobile terminal considers that the characters on each character bit of the file to be written and the first file are the same, and then the file to be written and the first file are the same; if the comparison result file contains false, the mobile terminal determines that the file to be written and the first file are not the same in characters on each character position, and the file to be written and the first file are different.
According to the card writing protection method of the mobile terminal, the mobile terminal can more accurately determine whether the file to be written is the same as the first file or not by comparing the characters at the same position of the file to be written and the first file, so that a more accurate comparison result is obtained, the mobile terminal can determine whether to execute the writing operation or not according to the comparison result, and the number of times of writing operation on the SIM card can be reduced.
On the basis of the above embodiment, after the mobile terminal caches the target file to be written, the number of times of card writing attempts can be updated according to the number of times of the received writing request, for example, after the mobile terminal receives a writing request, 1 can be added to the current number of times of card writing attempts; further, after the mobile terminal determines that the file to be written is different from the first file according to the comparison result, the current actual card writing times can be increased by 1.
For example, after caching the target file to be written, the mobile terminal may initialize a flag bit of the target file to be written, execute updata _ flag ═ false, update the number of times of attempted card writing, add 1 to the current number of times of attempted card writing, and execute retry _ count _ a + +; further, the mobile terminal determines that the file to be written is different from the first file, then sets a flag bit of the target file to be written, executes updata _ flag equal to true, updates the actual card writing times, adds 1 to the current actual card writing times, executes write _ count _ a + +, then executes the write request, and writes the file to be written into the SIM card.
According to the card writing protection method of the mobile terminal, the mobile terminal updates the number of times of card writing attempts according to the number of times of received writing requests, so that a user can know the situation that the communication network attempts to write the SIM card more intuitively; furthermore, the mobile terminal counts the actual card writing times, and can effectively provide the current service condition of the SIM card for the user, so that the user can master the health degree of the SIM card.
Fig. 4 is a data flow diagram of a card-writing protection method of a mobile terminal in another embodiment, and as shown in fig. 4, on the basis of the above embodiment, a card-writing protection method of a mobile terminal includes:
s301, receiving a write request aiming at a user identity identification SIM card sent by a communication network.
S302, formatting the file to be written to obtain a target file to be written, wherein the target file to be written is the same as the updated file in type; and caching the target file to be written.
And S303, updating the card writing trial times according to the received writing request times.
S304, reading information in the SIM card according to the updated file type, and acquiring a first file matched with the updated file type.
S305, comparing the file to be written with the first file, and if the file to be written is the same as the first file, ending the process; if not, go to step S306.
And S306, adding 1 to the current actual card writing times.
S307, executing the write request.
The technical effect of the card-writing protection method of the mobile terminal in this embodiment is similar to that of the embodiment corresponding to the above-mentioned embodiment, and is not described herein again.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a card writing protection apparatus of a mobile terminal, including: a receiving module 10, a comparing module 20 and a determining module 30, wherein:
the receiving module 10 is configured to receive a write request for identifying the SIM card by a user identity sent by a communication network, where the write request carries an update file type and a file to be written.
And the comparison module 20 is configured to read information in the SIM card according to the update file type, obtain a first file matching the update file type, compare the file to be written with the first file, and obtain a comparison result.
And a determining module 30, configured to determine whether to execute the write request according to the comparison result.
The card writing protection device of the mobile terminal can execute the method embodiment, and the implementation principle and the technical effect are similar, and are not described herein again.
In one embodiment, on the basis of the embodiment of fig. 5, the determining module 30 includes a first executing unit and a second executing unit, where:
and the first execution unit is used for refusing to execute the write request when the comparison result shows that the file to be written is the same as the first file.
And the second execution unit is used for executing the write request when the comparison result shows that the file to be written is different from the first file.
In one embodiment, the determining module 30 is specifically configured to write the file to be written into the SIM card, and delete the first file.
In one embodiment, as shown in fig. 6, on the basis of the above embodiment, the comparing module 20 includes a determining unit 201 and a comparing unit 202, wherein:
the determining unit 201 is configured to determine, according to a character sequence, whether a character to be written in a file is the same as a character at the same position in the first file.
A comparing unit 202 for determining that the comparison result is the same when each character is the same.
The comparing unit 202 is further configured to determine that the comparison result is different when at least one of the characters is different.
In one embodiment, the receiving module 10 is further configured to format the file to be written, obtain a target file to be written having the same type as the updated file, and cache the target file to be written.
In one embodiment, the apparatus further includes an updating module, configured to update the number of card attempts according to the number of received write requests.
In one embodiment, the update module is further configured to add 1 to the current actual card writing times when the file to be written and the first file are different.
The card-writing protection device of the mobile terminal provided by the embodiment of the application can execute the method embodiment, the implementation principle and the technical effect are similar, and details are not repeated here.
For specific limitations of the card-writing protection device of the mobile terminal, reference may be made to the above limitations of the card-writing protection method of the mobile terminal, which are not described herein again. All or part of each module in the card writing protection device of the mobile terminal can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the mobile terminal, and can also be stored in a memory in the mobile terminal in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a mobile terminal is provided, the internal structure of which may be as shown in fig. 7. The mobile terminal comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the mobile terminal is configured to provide computing and control capabilities. The memory of the mobile terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the mobile terminal is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a card-writing protection method of a mobile terminal. The display screen of the mobile terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device of the mobile terminal can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the mobile terminal, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the mobile terminal to which the subject application applies, as a particular mobile terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a mobile terminal is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a write-in request aiming at a user identity identification SIM card sent by a communication network, wherein the write-in request carries an updated file type and a file to be written in;
reading information in the SIM card according to the type of the updated file, acquiring a first file matched with the type of the updated file, and comparing the file to be written with the first file to acquire a comparison result;
whether to execute the write request is determined according to the comparison result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the comparison result is that the file to be written is the same as the first file, refusing to execute the writing request; and if the comparison result shows that the file to be written is different from the first file, executing the writing request.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and writing the file to be written into the SIM card, and deleting the first file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining whether the characters to be written in the file are the same as the characters at the same position in the first file or not according to the character sequence; if each character is the same, the comparison result is the same; if at least one of the characters is different, the comparison result is different.
In one embodiment, the processor, when executing the computer program, further performs the steps of: formatting the file to be written to obtain a target file to be written, wherein the target file to be written is the same as the type of the updated file; and caching the target file to be written.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and updating the card writing attempt times according to the received writing request times.
In one embodiment, the current actual number of writes is incremented by 1.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a write-in request aiming at a user identity identification SIM card sent by a communication network, wherein the write-in request carries an updated file type and a file to be written in;
reading information in the SIM card according to the type of the updated file, acquiring a first file matched with the type of the updated file, and comparing the file to be written with the first file to acquire a comparison result;
whether to execute the write request is determined according to the comparison result.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the comparison result is that the file to be written is the same as the first file, refusing to execute the writing request; and if the comparison result shows that the file to be written is different from the first file, executing the writing request.
In one embodiment, the computer program when executed by the processor further performs the steps of: and writing the file to be written into the SIM card, and deleting the first file.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining whether the characters to be written in the file are the same as the characters at the same position in the first file or not according to the character sequence; if each character is the same, the comparison result is the same; if at least one of the characters is different, the comparison result is different.
In one embodiment, the computer program when executed by the processor further performs the steps of: formatting the file to be written to obtain a target file to be written, wherein the target file to be written is the same as the type of the updated file; and caching the target file to be written.
In one embodiment, the computer program when executed by the processor further performs the steps of: and updating the card writing attempt times according to the received writing request times.
In one embodiment, the computer program when executed by the processor further performs the steps of: and if the file to be written is different from the first file, adding 1 to the current actual card writing times.
The implementation principle and technical effect of the computer-readable storage medium provided by this embodiment are similar to those of the above-described method embodiment, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A card writing protection method of a mobile terminal is characterized by comprising the following steps:
receiving a write-in request aiming at a user identity identification SIM card sent by a communication network, wherein the write-in request carries an updated file type and a file to be written in;
reading information in an SIM card according to the update file type, acquiring a first file matched with the update file type, and comparing the file to be written with the first file to acquire a comparison result;
and determining whether to execute the write request according to the comparison result.
2. The method of claim 1, wherein the determining whether to execute the write request according to the comparison comprises:
if the comparison result is that the file to be written is the same as the first file, refusing to execute the writing request;
and if the comparison result shows that the file to be written is different from the first file, executing the writing request.
3. The method of claim 2, wherein the executing the write request comprises:
and writing the file to be written into the SIM card, and deleting the first file.
4. The method according to any one of claims 1 to 3, wherein the comparing the file to be written with the first file to obtain a comparison result comprises:
determining whether the characters in the file to be written are the same as the characters at the same position in the first file or not according to the character sequence;
if each character is the same, the comparison result is the same;
if at least one character is different, the comparison result is different.
5. The method according to any one of claims 1-3, wherein after receiving the write request for the subscriber identity module SIM card sent by the communication network, the method further comprises:
formatting the file to be written to obtain a target file to be written, wherein the target file to be written is the same as the type of the updated file;
and caching the target file to be written.
6. The method of claim 5, wherein after caching the target file to be written, the method comprises:
and updating the card writing attempt times according to the received writing request times.
7. The method according to any one of claims 1-3, further comprising: and if the file to be written is different from the first file, adding 1 to the current actual card writing times.
8. A card-writing protection device of a mobile terminal, the device comprising:
the device comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a writing request which is sent by a communication network and aims at a user identity identification SIM card, and the writing request carries an updated file type and a file to be written;
the comparison module is used for reading information in the SIM card according to the update file type, acquiring a first file matched with the update file type, and comparing the file to be written with the first file to acquire a comparison result;
and the determining module is used for determining whether to execute the writing request according to the comparison result.
9. A mobile terminal comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201811503593.8A 2018-12-10 2018-12-10 Card writing protection method and device for mobile terminal, mobile terminal and storage medium Active CN111294786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811503593.8A CN111294786B (en) 2018-12-10 2018-12-10 Card writing protection method and device for mobile terminal, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811503593.8A CN111294786B (en) 2018-12-10 2018-12-10 Card writing protection method and device for mobile terminal, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111294786A true CN111294786A (en) 2020-06-16
CN111294786B CN111294786B (en) 2023-04-07

Family

ID=71028941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811503593.8A Active CN111294786B (en) 2018-12-10 2018-12-10 Card writing protection method and device for mobile terminal, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111294786B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901227A (en) * 2009-05-31 2010-12-01 深圳市江波龙电子有限公司 Intelligent storage and expansion equipment and access control system and method thereof
CN102402698A (en) * 2010-09-08 2012-04-04 中兴通讯股份有限公司 Method and device for decreasing frequency of erasing and writing subscriber identity module files
CN102592358A (en) * 2011-01-04 2012-07-18 中国移动通信集团公司 Method, system and device for writing electronic data
EP2712220A1 (en) * 2012-09-25 2014-03-26 Eastcompeace Technology Co. Ltd Telecom smart card, air writing card system and air writing card method
CN104113621A (en) * 2014-06-26 2014-10-22 青岛海信移动通信技术股份有限公司 Method and terminal for realizing data synchronization of internal memory and subscriber identification module card
CN104156745A (en) * 2014-08-12 2014-11-19 烽火通信科技股份有限公司 Method of reading SIM card at high speed on set-card separation type terminal, and device of reading SIM card at high speed on set-card separation type terminal
CN104469739A (en) * 2014-12-31 2015-03-25 北京大唐智能卡技术有限公司 Card writing method and client terminal device
WO2016045478A1 (en) * 2014-09-25 2016-03-31 北京橙鑫数据科技有限公司 Sim card reading and writing method, and terminal
CN105677383A (en) * 2015-12-28 2016-06-15 北京华大智宝电子系统有限公司 Method for updating data of smart card
CN105868239A (en) * 2015-12-10 2016-08-17 乐视网信息技术(北京)股份有限公司 File updating method, device and terminal
WO2016206532A1 (en) * 2015-06-26 2016-12-29 维沃移动通信有限公司 Terminal device and data transmission method applied to the terminal device
CN107194292A (en) * 2017-05-02 2017-09-22 中国联合网络通信集团有限公司 A kind of card writing method and system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901227A (en) * 2009-05-31 2010-12-01 深圳市江波龙电子有限公司 Intelligent storage and expansion equipment and access control system and method thereof
CN102402698A (en) * 2010-09-08 2012-04-04 中兴通讯股份有限公司 Method and device for decreasing frequency of erasing and writing subscriber identity module files
CN102592358A (en) * 2011-01-04 2012-07-18 中国移动通信集团公司 Method, system and device for writing electronic data
EP2712220A1 (en) * 2012-09-25 2014-03-26 Eastcompeace Technology Co. Ltd Telecom smart card, air writing card system and air writing card method
CN104113621A (en) * 2014-06-26 2014-10-22 青岛海信移动通信技术股份有限公司 Method and terminal for realizing data synchronization of internal memory and subscriber identification module card
CN104156745A (en) * 2014-08-12 2014-11-19 烽火通信科技股份有限公司 Method of reading SIM card at high speed on set-card separation type terminal, and device of reading SIM card at high speed on set-card separation type terminal
WO2016045478A1 (en) * 2014-09-25 2016-03-31 北京橙鑫数据科技有限公司 Sim card reading and writing method, and terminal
CN104469739A (en) * 2014-12-31 2015-03-25 北京大唐智能卡技术有限公司 Card writing method and client terminal device
WO2016206532A1 (en) * 2015-06-26 2016-12-29 维沃移动通信有限公司 Terminal device and data transmission method applied to the terminal device
CN105868239A (en) * 2015-12-10 2016-08-17 乐视网信息技术(北京)股份有限公司 File updating method, device and terminal
CN105677383A (en) * 2015-12-28 2016-06-15 北京华大智宝电子系统有限公司 Method for updating data of smart card
CN107194292A (en) * 2017-05-02 2017-09-22 中国联合网络通信集团有限公司 A kind of card writing method and system

Also Published As

Publication number Publication date
CN111294786B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN112765271B (en) Block chain transaction index storage method and device, computer equipment and medium
US7873956B2 (en) Communication terminal and communication network for partially updating software, software update method, and software creation device and method therefor
CN106155596B (en) Data writing method and device
CN112423281B (en) Wireless module upgrading method, device, computer equipment and storage medium
CN111275448A (en) Face data processing method and device and computer equipment
CN112527835B (en) Authentication request processing method and device based on cache and related equipment
CN108512948B (en) Address book updating method and device, computer equipment and storage medium
CN114416121A (en) Firmware burning method and device, burning equipment and firmware burning system
CN112860953A (en) Data importing method, device, equipment and storage medium of graph database
US8412270B2 (en) Using network authentication to counter subscriber identity module card man-in-the-middle subsidy lock attack
CN104462893A (en) Method and device for managing multiple SE modules
CN111400684B (en) Electronic license information acquisition method, system, device, equipment and storage medium
JP5209281B2 (en) Communication terminal device, access control method, IC card
CN111294786B (en) Card writing protection method and device for mobile terminal, mobile terminal and storage medium
CN105303083A (en) Data communication method and wearable device
CN111328068A (en) Card writing method and device, computer equipment and storage medium
CN114792016A (en) Processing method and electronic equipment
CN114448722A (en) Cross-browser login method and device, computer equipment and storage medium
TWI539786B (en) Method of establishing links between contact information according to data validity of elementary files stored in smartcard
CN112188591A (en) Network access method, device, computer equipment and storage medium
CN113301203A (en) Method and device for updating historical information data based on address book
CN112783866A (en) Data reading method and device, computer equipment and storage medium
CN111752919A (en) Data writing method, data reading method and device
CN105630811A (en) Update method and update system of access control rule
CN111752977B (en) Data reading request and data writing request processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant