Method for preventing VSIM data from being lost, terminal equipment and storage medium

By monitoring and updating VSIM data in the terminal device, the networking abnormality caused by VSIM data loss is solved, ensuring the stability and user experience of the terminal device.

CN119272343APending Publication Date: 2025-01-07ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310830840.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problem of abnormal terminal equipment networking caused by VSIM data loss, reducing the user experience.

Method used

After monitoring the power-on command, the VSIM file in the memory writable area is read. If the data is abnormal, the backup data is obtained from the memory read-only area or data memory to the memory writable area to ensure the integrity of the VSIM data.

Benefits of technology

It effectively reduces the problem of networking of terminal devices caused by VSIM data loss, ensures the stability of terminal devices, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272343A_ABST
    Figure CN119272343A_ABST
Patent Text Reader

Abstract

The method for preventing the VSIM data from being lost, the terminal equipment and the storage medium provided by the embodiment of the invention comprise the following steps: after a startup instruction is monitored, reading a first VSIM file in a writable area of a memory; when it is determined that the first VSIM data in the first VSIM file is abnormal, obtaining second VSIM data from the memory read-only area or the data memory; and updating the first VSIM file according to the second VSIM data. When the terminal equipment leaves a factory, the VSIM data is prefabricated to be stored in a memory writable area and a memory read-only area, if a data storage exists, the VSIM data are stored in the data storage, verification is carried out on the VSIM data in the memory writable area used by a user every time after the terminal equipment is started, and if the VSIM data in the memory writable area is abnormal, verification is carried out on the VSIM data in the memory read-only area. If yes, recovering the VSIM data in the memory read-only area or the data memory to the memory writable area, so that the integrity of the VSIM data in the memory writable area used by the user is ensured, the problem of networking abnormality of the terminal equipment is effectively reduced, and the user experience is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of communications, and in particular to a method, terminal device, and storage medium for preventing VSIM data loss. Background Art

[0002] On the terminal device, the use of SIM (Subscriber Identity Module) can realize the terminal device networking function. The SIM cards currently used are generally divided into USIM (Universal Subscriber Identity Module) cards, ESIM (Embedded Subscriber Identity Module) cards and VSIM (Virtual Subscriber Identity Module) cards. The so-called VSIM card is the data in the original physical SIM card simulated by software, so that the terminal does not need a physical SIM card. Since the VSIM card has the advantage of reducing the cost of terminal equipment, the VSIM card is widely used.

[0003] However, after using terminal devices with VSIM function for a period of time, users will encounter problems with being unable to connect to the Internet normally. Through research and analysis, it was found that most of the problems were caused by the loss of VSIM data. However, there is currently no good way to solve the problem of abnormal terminal device networking caused by VSIM data loss, which greatly reduces the user experience. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method, terminal device and storage medium for preventing VSIM data loss, which can ensure the integrity of VSIM data, effectively reduce the problem of terminal device networking abnormalities caused by VSIM data loss, ensure the stability of terminal device use, and thus greatly improve the user experience.

[0005] In a first aspect, an embodiment of the present invention provides a method for preventing VSIM data loss, wherein the method includes:

[0006] After detecting the power-on command, read the first VSIM file in the writable area of ​​the memory;

[0007] When determining that the first VSIM data in the first VSIM file is abnormal, obtaining the second VSIM data from the read-only area of ​​the memory or the data storage device;

[0008] The first VSIM file is updated according to the second VSIM data.

[0009] In a possible implementation, after reading the first VSIM file in the writable area of ​​the memory, the method further includes:

[0010] When it is determined that the first VSIM file is empty, it is determined that the first VSIM data in the first VSIM file is abnormal.

[0011] In one possible implementation, after reading the first VSIM file in the writable area of ​​the memory, the method further includes:

[0012] When determining that the first VSIM file is not empty, obtaining the first VSIM data from the first VSIM file;

[0013] When it is determined that the first VSIM data is not identical to the second VSIM data in the read-only area of ​​the memory, it is determined that the first VSIM data in the first VSIM file is abnormal.

[0014] In one possible implementation, obtaining the second VSIM data from the memory read-only area or the data storage device includes:

[0015] In the case where it is determined that no data storage device exists, the second VSIM data is obtained from the read-only memory area.

[0016] In one possible implementation, obtaining the second VSIM data from the memory read-only area or the data storage device includes:

[0017] When it is determined that the data storage device exists, the second VSIM data is obtained from the data storage device.

[0018] In one possible implementation, the data storage device is an NFC module or a memory card, wherein the memory card is a TF card, an SD card or a memory card;

[0019] Acquiring the second VSIM data from the data storage device includes:

[0020] Get the second VSIM data from the NFC module or memory card.

[0021] In a possible implementation, after the power-on instruction is detected and before the first VSIM file in the writable area of ​​the memory is read, the method further includes:

[0022] Write the second VSIM data into the read-only area of ​​the memory;

[0023] Verify whether the second VSIM data written into the read-only area of ​​the memory is correct;

[0024] When it is verified that the second VSIM data written in the read-only area of ​​the memory is correct, the second VSIM data is written into the writable area of ​​the memory.

[0025] In one possible implementation, the method further includes:

[0026] If it is determined that the data storage device exists, the second VSIM data is written into the data storage device.

[0027] In one possible implementation, the first VSIM data and the second VSIM data respectively include at least one of KI, OPC, IMSI, and ICCID.

[0028] In a second aspect, an embodiment of the present invention provides a device for preventing VSIM data loss, wherein the method includes:

[0029] A reading module, used to read the first VSIM file in the writable area of ​​the memory after detecting the power-on instruction;

[0030] An acquisition module, configured to acquire second VSIM data from a read-only memory area or a data storage device when determining that the first VSIM data in the first VSIM file is abnormal;

[0031] An update module is used to update the first VSIM file according to the second VSIM data.

[0032] In a third aspect, an embodiment of the present invention provides a terminal device, which includes: a processor and a memory, the processor is used to execute a VSIM data loss prevention program stored in the memory to implement the above-mentioned VSIM data loss prevention method.

[0033] In a fourth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned method for preventing VSIM data loss.

[0034] The method, terminal device and storage medium for preventing VSIM data loss provided by the embodiment of the present invention include: after monitoring the power-on instruction, reading the first VSIM file in the memory writable area; when determining that the first VSIM data in the first VSIM file is abnormal, obtaining the second VSIM data from the memory read-only area or the data storage device; updating the first VSIM file according to the second VSIM data. The VSIM data of the present invention is prefabricated in the terminal device when leaving the factory, so the VSIM data is stored in the memory writable area and the memory read-only area respectively. If there is a data storage device, the VSIM data is also stored in the data storage device. After each startup, the VSIM data in the memory writable area used by the user will be checked. If the VSIM data in the memory writable area is abnormal, the VSIM data in the memory read-only area or the data storage device will be restored to the memory writable area to ensure the integrity of the VSIM data in the memory writable area used by the user, effectively reducing the problem of abnormal terminal device networking caused by the loss of VSIM data, ensuring the stability of the terminal device, and thus greatly improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flowchart of an embodiment of a method for preventing VSIM data loss provided by an embodiment of the present invention;

[0036] Figure 2 A flowchart of another method for preventing VSIM data loss provided by an embodiment of the present invention;

[0037] Figure 3 A flowchart of another method for preventing VSIM data loss provided by an embodiment of the present invention;

[0038] Figure 4 A block diagram of an embodiment of a device for preventing VSIM data loss provided by an embodiment of the present invention;

[0039] Figure 5 A schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0042] An embodiment of the present invention provides a method for preventing VSIM data loss, which is applicable to terminal devices, which may be mobile phones, tablet computers, laptop computers, smart bracelets, smart watches, smart helmets, smart glasses, etc. The terminal device may also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device, a computing device or other processing devices connected to a wireless modem, a vehicle-mounted device, and other electronic devices that need to be networked.

[0043] See also Figure 1 , Figure 1 A flow chart of an embodiment of a method for preventing VSIM data loss provided in an embodiment of the present invention. Figure 1 The process shown may include the following steps:

[0044] Step 101, after detecting the power-on instruction, read the first VSIM file in the writable area of ​​the memory;

[0045] In this embodiment, the above-mentioned memory writable area is a readable and writable area, which stores the first VSIM file of the first VSIM data used for networking, so that the terminal device can read the first VSIM data in the first VSIM file from the memory writable area for networking of the terminal device each time it is turned on.

[0046] Step 102, when it is determined that the first VSIM data in the first VSIM file is abnormal, obtaining the second VSIM data from the read-only area of ​​the memory or the data storage device;

[0047] In actual use, the phenomenon of all or part of the first VISM data in the writable area of ​​​​the memory being deleted due to program loopholes or human operation, or the loss of all or part of the first VISM data in the writable area of ​​​​the memory due to automatic restart after a memory failure, are all regarded as first VSIM data abnormalities.

[0048] The specific process of determining whether the first VSIM data is abnormal is: when it is determined that the first VSIM file is empty, determining that the first VSIM data in the first VSIM file is abnormal.

[0049] Alternatively, the first VSIM file is not read in the writable area of ​​the memory. Both of these situations can indicate that all the first VSIM data in the first VSIM file is lost, which is regarded as an abnormality of the first VSIM data.

[0050] Alternatively, when it is determined that the first VSIM file is not empty, the first VSIM data is obtained from the first VSIM file; when it is determined that the first VSIM data is different from the second VSIM data in the read-only area of ​​the memory, it is determined that the first VSIM data in the first VSIM file is abnormal.

[0051] This situation can indicate that part of the first VSIM data in the first VSIM file is lost. The above-mentioned first VSIM data and second VSIM data respectively include at least one of KI (Key identifier), OPC (OLE for Process Control), IMSI (International Mobile Subscriber Identity), and ICCID (Integrate circuit card identity).

[0052] For example, the second VSIM data includes KI, OPC, IMSI, and ICCID, but the first VSIM data includes any one, two, or three of KI, OPC, IMSI, and ICCID. In this case, there is a difference between the first VSIM data and the second VSIM data, and it is considered that the first VSIM data is partially lost and the first VSIM data is abnormal. These four data are subsequently updated and restored for the abnormal first VSIM data.

[0053] It should be understood that terms such as "first", "second", etc. are only used to distinguish similar objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features.

[0054] In the case of abnormal first VSIM data, the terminal device cannot use the abnormal first VSIM data to connect to the Internet normally, which makes the user unable to access the Internet, greatly reducing the user experience. In this embodiment, in order to ensure that the terminal device can connect to the Internet normally, the abnormal first VSIM data needs to be restored. Specifically, it is necessary to obtain the second VSIM data from the read-only area of ​​the memory or the data storage device for updating the first VSIM file. The second VSIM data is normal VISM data, that is, the abnormal first VISM data in the first VSIM file is replaced with the second VSIM data, which is regarded as copying the second VSIM data to the first VSIM file as the first VSIM data, thereby ensuring the integrity of the first VSIM data in the first VSIM file, effectively reducing the problem of abnormal terminal device networking caused by the loss of VSIM data, ensuring the stability of the terminal device use, and thus greatly improving the user experience.

[0055] The above-mentioned data storage device is an NFC (Near Field Communication) module or a storage card, wherein the storage card is a TF (Trans-flash Card) card, an SD (Secure Digital Card) card or a memory card. Since the data in the data storage device and the read-only area of ​​the memory are not easily rewritten, the second VSIM data, that is, the normal and complete VSIM data, is stored in the data storage device and / or the read-only area of ​​the memory in advance. If the first VSIM data in the first VSIM file is abnormal, the second VSIM data can be obtained from the read-only area of ​​the memory or the data storage device to restore the abnormal first VSIM data, so that the terminal device can always read the normal VSIM data for networking use.

[0056] Step 103: Update the first VSIM file according to the second VSIM data.

[0057] In actual use, if the second VSIM data is obtained from the read-only area of ​​the memory, the first VSIM data in the first VSIM file can be updated with the second VSIM data, that is, the first VSIM data is replaced with the second VSIM data; if the second VSIM data is obtained from the data storage device, it is necessary to first generate a bin format file based on the second VSIM data, and then use the generated file to update the first VSIM file, that is, replace the first VSIM file in the writable area of ​​the memory with the generated file, and regard the generated file as the first VSIM file in the writable area of ​​the memory.

[0058] By using the second VSIM data to update the first VSIM file, the integrity and correctness of the first VSIM data in the first VSIM file can be effectively guaranteed, so that the terminal device can use the first VSIM data without abnormalities in the first VSIM file to connect to the Internet normally, thereby ensuring the stability of the terminal device and greatly improving the user experience.

[0059] The method for preventing VSIM data loss provided by an embodiment of the present invention includes: after monitoring a power-on instruction, reading a first VSIM file in a memory writable area; when determining that the first VSIM data in the first VSIM file is abnormal, obtaining second VSIM data from a memory read-only area or a data storage device; and updating the first VSIM file according to the second VSIM data. The VSIM data of the present invention is prefabricated in the terminal device when it leaves the factory, so the VSIM data is stored in the memory writable area and the memory read-only area respectively. If there is a data storage device, the VSIM data is also stored in the data storage device. After each power-on, the VSIM data in the memory writable area used by the user will be checked. If the VSIM data in the memory writable area is abnormal, the VSIM data in the memory read-only area or the data storage device will be restored to the memory writable area to ensure the integrity of the VSIM data in the memory writable area used by the user, effectively reducing the problem of abnormal terminal device networking caused by the loss of VSIM data, ensuring the stability of the use of the terminal device, and thus greatly improving the user experience.

[0060] In this embodiment, for different situations of whether the terminal device has a data storage device, it is specifically determined whether to obtain the second VSIM data from the read-only memory area or from the data storage device. The specific process of obtaining the second VSIM data from the read-only memory area or the data storage device in the above step 102 includes: when it is determined that there is no data storage device, the second VSIM data is obtained from the read-only memory area. That is, when the terminal device does not have a data storage device, the second VSIM data can only be obtained from the read-only memory area for updating the first VSIM file.

[0061] However, when it is determined that there is a data storage device, the second VSIM data is obtained from the data storage device. That is, when the terminal device has a data storage device, in this embodiment, the second VSIM data needs to be obtained from the data storage device for updating the first VSIM file.

[0062] Since the above-mentioned data storage device is an NFC module or a memory card, the terminal device can specifically obtain the second VSIM data from the NFC module or the memory card.

[0063] To facilitate the above understanding, Figure 1 On the basis of Figure 2 A flow chart of another method for preventing VSIM data loss provided in an embodiment of the present invention. Figure 2 The process shown may include the following steps:

[0064] Step 201, after detecting the power-on instruction, read the first VSIM file in the writable area of ​​the memory;

[0065] Step 202, when it is determined that the first VSIM data in the first VSIM file is abnormal, determining whether there is a data storage device;

[0066] If it is determined that the data storage does not exist, step 203 is executed; if it is determined that the data storage does exist, step 204 is executed.

[0067] Step 203, obtaining the second VSIM data from the read-only area of ​​the memory;

[0068] Step 204, obtaining second VSIM data from the data storage;

[0069] Step 205: Update the first VSIM file according to the second VSIM data.

[0070] The method for preventing VSIM data loss provided in this embodiment can rely on the writable memory area or data storage device of the terminal device itself to achieve secure storage of VSIM data, ensure the security and integrity of the VSIM data, and enable users to use the terminal device normally to surf the Internet, thereby improving the user experience.

[0071] In this embodiment, the VSIM data in the writable memory area is mainly restored through the read-only memory area or the data storage device. Therefore, it is necessary to ensure the completeness and correctness of the VSIM data in the read-only memory area and the data storage device. Figure 1 On the basis of Figure 3 A flow chart of another method for preventing VSIM data loss provided in an embodiment of the present invention. Figure 3 The process shown may include the following steps:

[0072] Step 301, writing the second VSIM data into the read-only area of ​​the memory;

[0073] This writing operation is performed when the VSIM data is pre-made before the terminal device leaves the factory.

[0074] Step 302, verifying whether the second VSIM data written into the read-only area of ​​the memory is correct;

[0075] Specifically, the consistency of the VSIM data before and after writing can be verified by performing MD5 (Message-Digest Algorithm 5) and other algorithms used to determine the consistency of data transmission on the VISM data before writing and the second VSIM data written in the read-only area of ​​memory. Through verification, it can be determined whether the second VSIM data written in the read-only area of ​​memory is complete and correct.

[0076] Step 303, when verifying that the second VSIM data written into the read-only area of ​​the memory is correct, writing the second VSIM data into the writable area of ​​the memory;

[0077] Only when the second VSIM data written into the read-only area of ​​the memory is correct and complete, the second VSIM data is written into the writable area of ​​the memory so as to be read by the terminal device as the first VSIM data for networking use.

[0078] Step 304, if it is determined that there is a data storage device, write the second VSIM data into the data storage device;

[0079] Furthermore, when the terminal device has a data storage device, the second VSIM data needs to be written into the data storage device, and after writing, a check can be performed to determine whether the written second VSIM data is correct and complete. When the terminal device does not have a data storage device, the second VSIM data does not need to be written into the data storage device.

[0080] If the terminal device has a data storage device, then in step 306, the second VSIM data needs to be obtained from the data storage device for updating the first VSIM file. If the terminal device does not have a data storage device, then in step 306, the second VSIM data needs to be obtained from the read-only area of ​​the memory for updating the first VSIM file.

[0081] Step 305, after detecting the power-on instruction, read the first VSIM file in the writable area of ​​the memory;

[0082] Step 306, when it is determined that the first VSIM data in the first VSIM file is abnormal, obtaining the second VSIM data from the read-only area of ​​the memory or the data storage device;

[0083] Step 307: Update the first VSIM file according to the second VSIM data.

[0084] The process of the above steps 305 to 307 can refer to the process of steps 101 to 103, and will not be repeated here.

[0085] The method for preventing VSIM data loss provided in this embodiment is to pre-prepare the second VSIM data in the read-only area of ​​memory and the data storage device, or only in the read-only area of ​​memory before the terminal device leaves the factory, to ensure that when an abnormality occurs in the first VSIM data in the writable area of ​​memory, the second VSIM data in the read-only area of ​​memory or the data storage device is updated and restored to the first VSIM data, so that the terminal device can always read the first VSIM data without abnormalities from the first VSIM file for normal networking, thereby ensuring the stability of the terminal device and greatly improving the user experience.

[0086] See also Figure 4 , is a block diagram of an embodiment of a device for preventing VSIM data loss provided by an embodiment of the present invention. Figure 4 As shown, the device comprises:

[0087] The reading module 401 is used to read the first VSIM file in the writable area of ​​the memory after detecting the power-on instruction;

[0088] An acquisition module 402 is used to acquire second VSIM data from a read-only memory area or a data storage device when it is determined that the first VSIM data in the first VSIM file is abnormal;

[0089] The updating module 403 is configured to update the first VSIM file according to the second VSIM data.

[0090] The device for preventing VSIM data loss provided in the embodiment of the present invention is to pre-store the VSIM data in the writable area of ​​memory and the read-only area of ​​memory before the terminal device leaves the factory. If there is a data storage device, the VSIM data is also stored in the data storage device. After each startup, the VSIM data in the writable area of ​​memory used by the user will be verified. If the VSIM data in the writable area of ​​memory is abnormal, the VSIM data in the read-only area of ​​memory or the data storage device will be restored to the writable area of ​​memory to ensure the integrity of the VSIM data in the writable area of ​​memory used by the user, effectively reduce the problem of terminal device networking abnormality caused by VSIM data loss, ensure the stability of terminal device use, and thus greatly improve the user experience.

[0091] Figure 5 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention, Figure 5The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the terminal device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505 .

[0092] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0093] It can be understood that the memory 502 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0094] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .

[0095] The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 5022.

[0096] In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:

[0097] After detecting the power-on command, read the first VSIM file in the writable area of ​​the memory;

[0098] When determining that the first VSIM data in the first VSIM file is abnormal, obtaining the second VSIM data from the read-only area of ​​the memory or the data storage device;

[0099] The first VSIM file is updated according to the second VSIM data.

[0100] In a possible implementation, after reading the first VSIM file in the writable area of ​​the memory, the method further includes:

[0101] When it is determined that the first VSIM file is empty, it is determined that the first VSIM data in the first VSIM file is abnormal.

[0102] In one possible implementation, after reading the first VSIM file in the writable area of ​​the memory, the method further includes:

[0103] When determining that the first VSIM file is not empty, obtaining the first VSIM data from the first VSIM file;

[0104] When it is determined that the first VSIM data is not identical to the second VSIM data in the read-only area of ​​the memory, it is determined that the first VSIM data in the first VSIM file is abnormal.

[0105] In one possible implementation, obtaining the second VSIM data from the memory read-only area or the data storage device includes:

[0106] In the case where it is determined that no data storage device exists, the second VSIM data is obtained from the read-only memory area.

[0107] In one possible implementation, obtaining the second VSIM data from the memory read-only area or the data storage device includes:

[0108] When it is determined that the data storage device exists, the second VSIM data is obtained from the data storage device.

[0109] In one possible implementation, the data storage device is an NFC module or a memory card, wherein the memory card is a TF card, an SD card or a memory card;

[0110] Acquiring the second VSIM data from the data storage device includes:

[0111] Get the second VSIM data from the NFC module or memory card.

[0112] In a possible implementation, after the power-on instruction is detected and before the first VSIM file in the writable area of ​​the memory is read, the method further includes:

[0113] Write the second VSIM data into the read-only area of ​​the memory;

[0114] Verify whether the second VSIM data written into the read-only area of ​​the memory is correct;

[0115] When it is verified that the second VSIM data written in the read-only area of ​​the memory is correct, the second VSIM data is written into the writable area of ​​the memory.

[0116] In one possible implementation, the method further includes:

[0117] If it is determined that the data storage device exists, the second VSIM data is written into the data storage device.

[0118] In one possible implementation, the first VSIM data and the second VSIM data respectively include at least one of KI, OPC, IMSI, and ICCID.

[0119] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 501 or the instruction in the form of software. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

[0120] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0121] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0122] The terminal device provided in this embodiment may be as follows Figure 5 The terminal device shown in FIG. 1 can execute the following Figure 1-3 All steps of the method to prevent VSIM data loss in Figure 1-3 For details, please refer to the technical effect of the method for preventing VSIM data loss shown in Figure 1-3 For the sake of brevity, the relevant description is not repeated here.

[0123] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0124] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned method of preventing VSIM data loss can be implemented.

[0125] The processor is used to execute a program for preventing VSIM data loss stored in a memory to implement the steps of a method for preventing VSIM data loss:

[0126] After detecting the power-on command, read the first VSIM file in the writable area of ​​the memory;

[0127] When determining that the first VSIM data in the first VSIM file is abnormal, obtaining the second VSIM data from the read-only area of ​​the memory or the data storage device;

[0128] The first VSIM file is updated according to the second VSIM data.

[0129] In a possible implementation, after reading the first VSIM file in the writable area of ​​the memory, the method further includes:

[0130] When it is determined that the first VSIM file is empty, it is determined that the first VSIM data in the first VSIM file is abnormal.

[0131] In one possible implementation, after reading the first VSIM file in the writable area of ​​the memory, the method further includes:

[0132] When determining that the first VSIM file is not empty, obtaining the first VSIM data from the first VSIM file;

[0133] When it is determined that the first VSIM data is not identical to the second VSIM data in the read-only area of ​​the memory, it is determined that the first VSIM data in the first VSIM file is abnormal.

[0134] In one possible implementation, obtaining the second VSIM data from the memory read-only area or the data storage device includes:

[0135] In the case where it is determined that no data storage device exists, the second VSIM data is obtained from the read-only memory area.

[0136] In one possible implementation, obtaining the second VSIM data from the memory read-only area or the data storage device includes:

[0137] When it is determined that the data storage device exists, the second VSIM data is obtained from the data storage device.

[0138] In one possible implementation, the data storage device is an NFC module or a memory card, wherein the memory card is a TF card, an SD card or a memory card;

[0139] Acquiring the second VSIM data from the data storage device includes:

[0140] Get the second VSIM data from the NFC module or memory card.

[0141] In a possible implementation, after the power-on instruction is detected and before the first VSIM file in the writable area of ​​the memory is read, the method further includes:

[0142] Write the second VSIM data into the read-only area of ​​the memory;

[0143] Verify whether the second VSIM data written into the read-only area of ​​the memory is correct;

[0144] When it is verified that the second VSIM data written in the read-only area of ​​the memory is correct, the second VSIM data is written into the writable area of ​​the memory.

[0145] In one possible implementation, the method further includes:

[0146] If it is determined that the data storage device exists, the second VSIM data is written into the data storage device.

[0147] In one possible implementation, the first VSIM data and the second VSIM data respectively include at least one of KI, OPC, IMSI, and ICCID.

[0148] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0149] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0150] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for preventing VSIM data loss, characterized in that: The method comprises: After detecting the power-on command, read the first VSIM file in the writable area of ​​the memory; When determining that the first VSIM data in the first VSIM file is abnormal, obtaining the second VSIM data from the read-only area of ​​the memory or the data storage device; Update the first VSIM file according to the second VSIM data.

2. The method according to claim 1, characterized in that After reading the first VSIM file in the writable area of ​​the memory, the method further includes: In a case where it is determined that the first VSIM file is empty, it is determined that the first VSIM data in the first VSIM file is abnormal.

3. The method according to claim 1, characterized in that After reading the first VSIM file in the writable area of ​​the memory, the method further includes: When determining that the first VSIM file is not empty, obtaining first VSIM data from the first VSIM file; When it is determined that the first VSIM data is different from the second VSIM data in the memory read-only area, it is determined that the first VSIM data in the first VSIM file is abnormal.

4. The method according to claim 1, characterized in that: The acquiring the second VSIM data from the memory read-only area or the data storage device includes: When it is determined that the data storage device does not exist, the second VSIM data is obtained from the memory read-only area.

5. The method according to claim 1, characterized in that The acquiring the second VSIM data from the memory read-only area or the data storage device includes: When it is determined that the data storage device exists, the second VSIM data is obtained from the data storage device.

6. The method according to claim 5, characterized in that The data storage device is an NFC module or a memory card, wherein the memory card is a TF card, an SD card or a memory card; The acquiring the second VSIM data from the data storage device includes: Acquire second VSIM data from the NFC module or the memory card.

7. The method according to claim 1, characterized in that After the power-on instruction is detected and before the first VSIM file in the writable area of ​​the memory is read, the method further includes: Writing the second VSIM data into the memory read-only area; Verify whether the second VSIM data written into the memory read-only area is correct; When it is verified that the second VSIM data written into the read-only area of ​​the memory is correct, the second VSIM data is written into the writable area of ​​the memory.

8. The method according to claim 7, characterized in that The method further comprises: If it is determined that the data storage device exists, the second VSIM data is written into the data storage device.

9. The method according to claim 1, characterized in that: The first VSIM data and the second VSIM data respectively include at least one of KI, OPC, IMSI, and ICCID.

10. A terminal device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a VSIM data loss prevention program stored in the memory to implement the VSIM data loss prevention method according to any one of claims 1 to 9.

11. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for preventing VSIM data loss according to any one of claims 1 to 9.