WO2012031441A1 - Method and apparatus for reducing erasing and writing operation times of subscriber identity module card files - Google Patents

Method and apparatus for reducing erasing and writing operation times of subscriber identity module card files Download PDF

Info

Publication number
WO2012031441A1
WO2012031441A1 PCT/CN2010/080174 CN2010080174W WO2012031441A1 WO 2012031441 A1 WO2012031441 A1 WO 2012031441A1 CN 2010080174 W CN2010080174 W CN 2010080174W WO 2012031441 A1 WO2012031441 A1 WO 2012031441A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
storage area
user identification
identification card
card
Prior art date
Application number
PCT/CN2010/080174
Other languages
French (fr)
Chinese (zh)
Inventor
吴传喜
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012031441A1 publication Critical patent/WO2012031441A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices

Definitions

  • the present invention relates to the field of machine type communication terminal technologies, and in particular, to a method and apparatus for reducing the number of times a user recognizes a card file erasing operation. Background technique
  • the Internet of Things has been regarded as one of the key technologies for coping with the economic crisis and revitalizing the economy.
  • the IoT business can be widely applied to many industries, including vehicles, electricity, finance, environmental protection, petroleum, personal and corporate security, hydrology, military, fire, weather, coal, agriculture and forestry, elevators, etc.
  • the Internet of Things business will quickly enter many industries, and its number of users will also grow rapidly. It is estimated that by the end of 2012, the number of Internet of Things users based on mobile cellular communication technology in China will reach 30-40 million.
  • the Internet of Things application will become one of the core applications of LTE in a few years, and it has broad prospects for development.
  • SIM Subscriber Identity Module
  • erasing operations are very frequent, so the number of erasable writes to the SIM card is very high.
  • SIM cards play a key role, and SIM cards allow communication between objects to be reliably transmitted over the network.
  • the traditional human-to-human mobile communication environment requires SIM cards more at the software level, such as authentication algorithms, encryption and decryption functions, business logic and presentation.
  • the current demand for SIM cards in the IoT environment focuses on the physical and environmental requirements of the SIM card software and hardware platform, packaging process and service life. For example, in the IoT environment, it is required to save the chip data for a long time.
  • the ordinary SIM card is in the mobile phone.
  • the average storage time is about 10 years.
  • the data retention time is longer, which can reach 15 years or even higher.
  • the response speed of the SIM card to the read data command sent by the mobile terminal is particularly slow.
  • SIM card data storage area Requires SIM card data storage area to have more erasable times.
  • the SIM card used in the Internet of Things and the mobile phone use SIM card are not used in the same conditions.
  • the SIM card data storage area is mainly written on the switch or in the switch.
  • the main object of the present invention is to provide a method and apparatus for reducing the number of times of user identification card file erasing operations, which are used to solve the problem that the Internet of Things service frequently erases the user identification card in the Internet of Things environment, resulting in the user identification card.
  • the problem is that the life is too short and the business operation is not smooth.
  • a method for reducing the number of times of user identification card file erasing operations comprising: opening a preset storage area in a terminal, and writing data to the preset storage area when writing data to the user identification card When the writing condition is met, the data buffered in the preset storage area is written into the user identification card;
  • the data When the data needs to be read, it is first determined whether the required data is cached in the preset storage area, and if it is cached in the preset storage area, it is read from the preset storage area, otherwise the user identification card is Reading in, and synchronizing the read data into the preset storage area. Further, the data is stored in a linear fixed length file in the user identification card, and the data includes the original data type in the Internet of Things service data and the linear fixed length file.
  • the index field in the data index is used to indicate whether data is stored in the corresponding storage slot and the type of the data; in the preset storage area, the data index is further used to indicate corresponding storage Whether the data in the slot needs to be written to the user identification card.
  • the method of writing data buffered in the preset storage area to the user identification card is:
  • the writing condition When the writing condition is satisfied, the data that needs to be written into the user identification card is read from the preset storage area according to the data index in the preset storage area, and is synchronized to the user identification card;
  • the write condition includes at least the shutdown time of the set write timer.
  • the type of the subscriber identity card includes at least: a subscriber identity module (SIM) card, a mobile subscriber identity module (RUIM) card, a global subscriber identity module (USIM) card, and a universal integrated circuit card (UICC).
  • SIM subscriber identity module
  • RUIM mobile subscriber identity module
  • USIM global subscriber identity module
  • UICC universal integrated circuit card
  • the present invention also provides an apparatus for reducing the number of times of user identification card file erasing operations, the apparatus comprising:
  • a reading module configured to: when data needs to be read, determine whether data to be read is cached in the preset storage area, and if cached in the preset storage area, read from the preset storage area Taking, otherwise reading from the user identification card, and synchronizing the read data into the preset storage area;
  • a writing module configured to write data into the preset storage area, and when the condition for writing data to the user identification card is satisfied, write data buffered in the preset storage area to the use In the household identification card.
  • the data is stored in a linear fixed length file in the user identification card, and the data includes the original data type in the Internet of Things service data and the linear fixed length file.
  • the user identification card linear fixed length file and the preset storage area include: a storage area for storing a data index, and an index field in the data index is used to indicate whether a storage slot is stored in the corresponding storage slot.
  • the data and the type of the data, in the preset storage area, the data index is further used to indicate whether data in the corresponding storage slot needs to be written into the user identification card;
  • the writing module reads data that needs to be written into the user identification card from the preset storage area according to the data index in the preset storage area, and synchronizes the data to the user identification. In the card.
  • FIG. 1 is a flow chart of a method for reducing the number of times of user identification card file erasing operations according to the present invention
  • FIG. 2 is a schematic structural diagram of a linear fixed length file according to the present invention
  • FIG. 3 is a schematic diagram of a linear fixed length file recording structure of the present invention.
  • FIG. 4 is a schematic diagram of a data structure of a linear fixed length file according to the present invention.
  • FIG. 5 is a structural diagram of an apparatus for reducing the number of erasing operations of a user identification card file according to the present invention. detailed description
  • the basic idea of the present invention is: using the linear fixed length file of the user identification card to store the service data of the related IoT application, and the terminal controls the service data that needs to be pre-read, and reads the pre-read to the terminal at the time of startup or when needed.
  • the storage area when reading occurs later, it is read from the preset storage area of the terminal; when writing, it is temporarily written into the preset storage area of the terminal, when the writing condition is satisfied (such as when shutting down, Or the timer is timed to) and then the terminal's default storage area
  • the data is synchronized to the linear fixed length file in the user identification card.
  • the user identification card of the present invention includes, but is not limited to, a SIM card, a Removable User Identity Module (RUIM) card, a Universal Subscriber Identity Module (USIM) card, and a Universal Integrated Circuit card. Card, UICC).
  • SIM Subscriber Identity Module
  • USIM Universal Subscriber Identity Module
  • UICC Universal Integrated Circuit Card
  • the linear fixed length file refers to a file that stores data content in a linear fixed file format, such as an EF (Element File) file, and the EF file can be further divided into various types, for example, for storing short messages.
  • the EF file is an EFsms file
  • the EF file used to store the phone book is an EFadn file, and the like
  • an EF file for storing fixed dialing, abbreviated dialing, performance parameters, and call count In the actual IoT application, many linear fixed length files such as EFadn, EFsms, etc. are often idle, and the present invention utilizes these idle linear fixed length files to store business data of the Internet of Things application.
  • the SIM card is taken as an example for description.
  • the files and data on the SIM card include the following four types: (1) System raw data stored by the SIM card manufacturer. This type of data is usually permanent and cannot be changed after being injected by the SIM card manufacturer and stored in the root directory.
  • Network parameters and user data injected by the network operation department or other business departments when issuing the card to the user such as authentication and encryption information, International Mobile Subscriber Number (IMSI);
  • IMSI International Mobile Subscriber Number
  • Network connection and user information data automatically saved and updated by the user during the card use process, including the last location, the location identification number (LAI) of the mobile phone at the time of registration, and the set week Periodic location update interval, Temporary Mobile Subscriber Number (TMSI), etc.
  • LAI location identification number
  • TMSI Temporary Mobile Subscriber Number
  • the above four types of data are stored in their respective directory entries. When the power is turned on, they first enter the root directory, and then enter the relevant subdirectories according to the instructions. Each directory and its internal data fields have their own ID protection. The data in the data domain can be queried, read, and updated only after verification.
  • Step 101 After the IoT terminal is powered on, after normal authentication, the terminal reads required service data from the user identification card to the terminal. In the preset storage area;
  • the reading in the step may be to read the service data corresponding to all currently running IoT applications into the preset storage area, or read part of the service data according to certain rules.
  • Step 102 Detect whether it is necessary to perform a read/write operation of the service data, if it needs to perform a read operation, execute 103; if it needs to perform a write operation, execute 106;
  • Step 103 During the operation of the IoT service application, if the service data in the user identification card needs to be read, first determine whether the service data to be read is cached in the memory preset by the terminal, if the cache is preset in the terminal. In the memory, step 104 is performed; otherwise, step 105 is performed; step 104, the related service data is read from the preset memory; and then returning to the step
  • Step 105 Read related service data from the user identification card, and store the read service data into the preset memory; then return to step 102;
  • Step 106 During the operation of the IoT service application, if the service data needs to be written to the user identification card, the terminal is first written into the terminal preset memory, and the write flag is set, and the write flag is used to indicate the service data. Need to be synchronized to the user identification card;
  • the definition of the write flag is as follows: 00 indicates that the storage slot is empty data, 01 indicates that the storage slot stores the pre-read short message data, 02 indicates that the storage slot stores the pre-read service data, 03 indicates the newly written short message data in this operation, and 04 indicates that the current operation is new.
  • the storage slot is a storage space of one record in a linear fixed length file.
  • Step 107 judging whether the write condition is satisfied, when the write condition is satisfied, for example, the shutdown, the set time of the write timer is up to, etc., step 108 is performed, otherwise return to step 102;
  • Step 108 Write the service data with the write flag cached in the terminal preset memory to the user identification card, and set the corresponding write flag bit to the synchronized status flag, for example, 1 or 2.
  • the present invention utilizes some infrequently used linear fixed length files in the user identification card of the Internet of Things service to store the service data of the related Internet of Things application, and may also utilize some infrequently used loop files of the user identification card. Storing the business data of the Internet of Things application.
  • the following is an example of a linear fixed length file of the EFsms type in the SIM card.
  • the description information describing the linear fixed length file in the user identification card and the identification information (Service ID) of the service data stored in the linear fixed length file are stored in the corresponding EF file, and the identification information includes the number of service data, and the like.
  • the information is implemented by: opening a storage area for storing the identification information of the service data in the corresponding EF file in the user identification card, and further opening a storage area for data index, wherein the index field in the data index area is used to indicate Whether the data and the type of the data are stored in each storage slot of the EF file, for example, selecting a short message record slot in the EFsms in the user identification card, not storing any short message data and service data, and storing the data index (Index)
  • the data can be regarded as a short message describing the EFsms file, and it can be specified that the first record or the last record is used to store the above data index.
  • the data index occupies a storage space of EF short message records (which can occupy 2 or more records as needed), and the space size varies according to different user identification cards, for example, One record of EFsms in the SIM card or USIM card is 176 bytes, and one type of RUIM card is 255 bytes.
  • the data index consists of multiple consecutive bytes.
  • the data index is logically composed of two components.
  • An implementation example is to select the first byte of the data index.
  • As a label field it is used to indicate that this field is a data index field, and is given a specific value, such as "OxAA", which distinguishes the data index from other EFsms records.
  • the storage data type of each storage slot is determined for every 2 bits. For example, 00 indicates that a storage slot is empty data, 01 indicates that a storage slot stores short message data, and 02 indicates a storage slot.
  • Stored is the service data, 03 indicates the newly written data in this run, and the flag 03 is the write flag described in the above steps.
  • Bitt Bit2 of Index 01
  • Bit3 Bit4 02
  • Bit5 Bit6 00
  • the data index of the EFsms file is re-implemented, and the data index field can describe the storage condition of up to 1/2*8*(N-1) EFsms storage slots, if the SIM card and the SIM card are as described above.
  • Step R1 When the terminal is powered on, the related file of the SIM card is read in the order predetermined by the terminal; Step R2, when reading the linear fixed length file of the SIM card, first read the Sevice ID of the linear fixed length file, if Sevice ID is not 0 (as an example, Sevice ID can The number of service data stored in the EF is saved. If one byte is insufficient, it can be expanded to 2, 3 etc bytes until the service is used. Then, the data index is read, and the process proceeds to step R3. If the Sevice ID is 0, the linear fixed length file is not read;
  • Step R3 Create a storage area in the mobile terminal having the same structure as the linear fixed length file of the SIM card, including a data index, and assign the data index to the corresponding data index in the terminal, if only need to read and the Internet of Things Applying relevant business data, according to the data identification, the all valid records, that is, the records marked as 02, are pre-read (copied) into the preset storage area of the terminal.
  • Step W1 The mobile terminal receives a command related to writing the service data to the user identification card; Step W2, querying the data index in the preset storage area of the terminal, and writing the service data into a certain free storage slot in the memory according to the query result. , and change the corresponding flag bit to 04 (indicating the newly written business data in this run);
  • Step W3 When the writing condition is satisfied, that is, in the case that the SIM card and the terminal perform data synchronization, for example, the timing of the shutdown and/or the set write timer is up, the index identifier in the terminal preset storage area is set.
  • the service data for 04 is written to the SIM card at one time, and the corresponding data index item is modified to 02 (representing that the service data is synchronized), and in the case of adding a new record, the service ID needs to be updated synchronously.
  • FIG. 5 is a device 100 for reducing the number of times of user identification card file erasing operations provided by the present invention, the device includes:
  • a user identification card 101 configured to store data, where the data is stored in a linear fixed length file in the user identification card, where the data includes the original data type in the Internet of Things service data and the linear fixed length file,
  • the original data types include SMS data, phone book data, and so on.
  • a preset storage area 102 configured to cache data in the terminal, where the data includes the number of Internet of Things services According to the original type data in the linear fixed length file.
  • the reading module 103 is configured to determine, when the data needs to be read, whether the data to be read is cached in the preset storage area, and if it is cached in the preset storage area, from the preset storage area Reading, otherwise reading from the user identification card, and synchronizing the read data into the preset storage area;
  • the writing module 104 is configured to write data into the preset storage area, and write the data cached in the preset storage area when the condition for writing data to the user identification card is satisfied In the user identification card.
  • a storage area having the same data structure as the linear identification file of the user identification card is opened in the terminal memory for use as the preset storage area, and the linear identification file and the preset storage area of the user identification card include: The storage area for storing the data index, the index field in the data index is used to indicate whether the data is stored in the corresponding storage slot and the type of the data. In the preset storage area, the data index is further used to indicate the corresponding storage slot. Whether the data needs to be written to the user identification card;
  • the writing module first writes it into the preset storage area.
  • the data index reads the data that needs to be written into the user identification card from the preset storage area and synchronizes it to the user identification card.
  • the writing includes writing of newly added data and modification of historical data. If the data is newly added, the writing module needs to retrieve a data slot (ie, a data record) that has not stored data according to the data index in the preset storage area. The storage space), and then write the data into the retrieved data slot. Regardless of whether it is added or modified, the index items corresponding to the data index are marked with the write identifier. When the write condition is satisfied, the write module system writes the data to be written to the user identification card. The corresponding position in .
  • the invention has the advantages of good generalization, low cost, and effectively utilizes the linear fixed length file that the original user identification card is not frequently used in some services, and the pre-read EF file enters the terminal storage area, thereby improving The speed at which the business system runs, and the operation of erasing the EF file of the user identification card during the operation of the business system is first stored in the terminal memory card, and then the user identification card is erased and written after the writing condition is satisfied.
  • the method effectively reduces the number of accesses to the user identification card, prolongs the service life of the user identification card, and also facilitates the operator to uniformly control the service without redesigning and manufacturing a new type of user identification card. In actual use, the operator can also write its business data into the previously issued user identification card through instruments or third-party software, so that the business can be conveniently carried out.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method and apparatus for reducing erasing and writing operation times of Subscriber Identity Module (SIM) card files are provided. The present technical solution uses the linear length-fixed files in the SIM card that are unusually used in some services, and pre-reads the linear length-fixed files into storage areas of a terminal, thus improves the running speed of a service system. With regard to the operation of erasing and writing on the SIM card in the operating of service system, the present technical solution performs storing at the memory card of the terminal first, and performs the operations of erasing and writing on the SIM card uniformly when a writing condition is satisfied. By the above method, the access times to the SIM card are reduced effectively, and the using life of the SIM card is prolonged.

Description

一种减少用户识别卡文件擦写操作次数的方法及装置 技术领域  Method and device for reducing number of erasing operation of user identification card file
本发明涉及到机器类型通信终端技术领域, 尤其涉及一种减少用户识 别卡文件擦写操作次数的方法及装置。 背景技术  The present invention relates to the field of machine type communication terminal technologies, and in particular, to a method and apparatus for reducing the number of times a user recognizes a card file erasing operation. Background technique
物联网, 作为新兴高技术产业的重要组成部分, 已被世界各国当作应 对经济危机、 振兴经济的重点技术之一。 物联网业务可以广泛地应用到众 多的行业中, 包括车辆、 电力、 金融、 环保、 石油、 个人与企业安防、 水 文、 军事、 消防、 气象、 煤炭、 农业与林业、 电梯等。 根据专家预计, 未 来几年间, 物联网业务将快速地进入很多行业, 其用户数也将快速成长, 预计至 2012年底, 中国国内基于移动蜂窝通信技术的物联网用户数将可能 达到 3000 ~ 4000万,物联网应用也会在若干年后成为 LTE的核心应用之一, 具有广阔的发展前景, 目前物联网业务的应用类型中, 有些是应用终端一 旦部署后不便实施经常性的维护, 有些是对业务***运行的可靠性有较高 的要求, 有些是对响应时间要求较严, 还有些对物联网终端的硬件耐用性 有较高要求, 例如有一类物联网业务对用户识别模块(Subscriber Identity Module, SIM )卡擦写操作非常地频繁, 因此对 SIM卡的可擦写次数要求 非常之高。 另一方面, 在越来越多的领域, SIM 卡起到关键的作用, SIM 卡可以让物体之间的通信能够在网络中可靠传输。 传统的人与人之间的移 动通信环境对 SIM卡的需求更多体现在软件层面, 如鉴权算法、 加解密功 能、 业务逻辑和呈现等。 当前的物联网环境对 SIM卡提出的需求集中在物 理环境对 SIM卡的软硬件平台、 封装工艺的要求以及使用寿命的要求。 比 如在物联网环境下要求芯片数据保存在时间要长, 普通 SIM卡是在手机中 使用, 平均保存时间约为 10年左右, 但在物联网环境下如工业和特种行业 下,要求数据保存时间更长,可以达到 15年甚至更高,再比如当前由于 SIM 卡硬件条件的限制, SIM 卡对移动终端发来的读数据命令的响应速度特别 慢, 因此对于一些交互响应时间要求较严格的业务执行造成了较大影响, 成为业务流畅运行的瓶颈, 另外还有些类型的物联网应用要求 SIM卡数据 存储区的可擦写次数要多, 在物联网使用 SIM卡和手机使用 SIM卡使用条 件不一样, 对手机来说, SIM 卡数据存储区域的擦写动作主要在开关机或 者在移动位置更换的时候, 但在物联网环境下, 不同应用环境的需求变化 较大, 正如上面所述, 有些物联网业务对 SIM卡擦写操作非常地频繁, 因 此对最大的可擦写次数要求更高, 否则容易出现使用寿命过短的现象, 不 能满足在物联网下业务的实际需要, 一种解决方法是按照物联网业务类型 的要求设计、 生产新的用户识别卡, 但是物联网应用业务模型非常之多, 这样做的代价将是非常巨大的。 发明内容 As an important part of the emerging high-tech industry, the Internet of Things has been regarded as one of the key technologies for coping with the economic crisis and revitalizing the economy. The IoT business can be widely applied to many industries, including vehicles, electricity, finance, environmental protection, petroleum, personal and corporate security, hydrology, military, fire, weather, coal, agriculture and forestry, elevators, etc. According to experts, in the next few years, the Internet of Things business will quickly enter many industries, and its number of users will also grow rapidly. It is estimated that by the end of 2012, the number of Internet of Things users based on mobile cellular communication technology in China will reach 30-40 million. The Internet of Things application will become one of the core applications of LTE in a few years, and it has broad prospects for development. Some of the application types of the Internet of Things business are that after the deployment of the application terminal, it is inconvenient to implement regular maintenance, and some are The reliability of the operation of the business system has higher requirements. Some have strict requirements on response time, and some have higher requirements on the hardware durability of the IoT terminal. For example, there is a kind of IoT service to the subscriber identification module (Subscriber Identity Module). , SIM) card erasing operations are very frequent, so the number of erasable writes to the SIM card is very high. On the other hand, in more and more areas, SIM cards play a key role, and SIM cards allow communication between objects to be reliably transmitted over the network. The traditional human-to-human mobile communication environment requires SIM cards more at the software level, such as authentication algorithms, encryption and decryption functions, business logic and presentation. The current demand for SIM cards in the IoT environment focuses on the physical and environmental requirements of the SIM card software and hardware platform, packaging process and service life. For example, in the IoT environment, it is required to save the chip data for a long time. The ordinary SIM card is in the mobile phone. The average storage time is about 10 years. However, in the IoT environment, such as industrial and special industries, the data retention time is longer, which can reach 15 years or even higher. For example, due to the limitations of the SIM card hardware conditions, The response speed of the SIM card to the read data command sent by the mobile terminal is particularly slow. Therefore, it has a great impact on the business execution with stricter interaction response time requirements, and becomes a bottleneck for the smooth operation of the service. In addition, there are some types of Internet of Things applications. Requires SIM card data storage area to have more erasable times. The SIM card used in the Internet of Things and the mobile phone use SIM card are not used in the same conditions. For the mobile phone, the SIM card data storage area is mainly written on the switch or in the switch. When the mobile location is changed, but in the IoT environment, the requirements of different application environments vary greatly. As mentioned above, some IoT services have very frequent SIM card erasing operations, so the maximum number of erasable times is required. Higher, otherwise it is prone to short-lived life and cannot meet the actual business of the Internet of Things. To a solution is in accordance with the type of things business can design, produce a new SIM card, but networking applications business model very much, the cost of doing so would be enormous. Summary of the invention
有鉴于此, 本发明的主要目的在于提供一种减少用户识别卡文件擦写 操作次数的方法及装置, 用于解决物联网环境下, 物联网业务对用户识别 卡擦写频繁, 导致用户识别卡寿命过短、 业务运行不流畅等问题。  In view of this, the main object of the present invention is to provide a method and apparatus for reducing the number of times of user identification card file erasing operations, which are used to solve the problem that the Internet of Things service frequently erases the user identification card in the Internet of Things environment, resulting in the user identification card. The problem is that the life is too short and the business operation is not smooth.
为达到上述目的, 本发明的技术方案是这样实现的:  In order to achieve the above object, the technical solution of the present invention is achieved as follows:
一种减少用户识别卡文件擦写操作次数的方法, 该方法包括: 在终端中开辟预置存储区, 在需要向用户识别卡写入数据时, 先将数 据写入所述预置存储区中, 当满足写入条件时, 再将緩存于所述预置存储 区中的数据写入用户识别卡;  A method for reducing the number of times of user identification card file erasing operations, the method comprising: opening a preset storage area in a terminal, and writing data to the preset storage area when writing data to the user identification card When the writing condition is met, the data buffered in the preset storage area is written into the user identification card;
在需要读取数据时, 先判断所需数据是否緩存于所述预置存储区中, 如果緩存于所述预置存储区中, 则从所述预置存储区读取, 否则从用户识 别卡中读取, 并且将读取的数据同步到所述预置存储区中。 进一步地, 所述数据存储于所述用户识别卡中的线性定长文件中, 所 述数据包含物联网业务数据及线性定长文件中的原有数据类型。 When the data needs to be read, it is first determined whether the required data is cached in the preset storage area, and if it is cached in the preset storage area, it is read from the preset storage area, otherwise the user identification card is Reading in, and synchronizing the read data into the preset storage area. Further, the data is stored in a linear fixed length file in the user identification card, and the data includes the original data type in the Internet of Things service data and the linear fixed length file.
进一步地, 在所述用户识别卡中的线性定长文件中及所述预置存储区 中存储数据的方式为:  Further, the manner of storing data in the linear fixed length file in the user identification card and in the preset storage area is:
开辟一个存储区用于数据索引, 该数据索引中的索引字段用于指示对 应存储槽中是否存储了数据以及数据的类型; 在所述预置存储区中, 该数 据索引还用于指示对应存储槽中的数据是否需要写入到用户识别卡中。  Opening a storage area for data indexing, the index field in the data index is used to indicate whether data is stored in the corresponding storage slot and the type of the data; in the preset storage area, the data index is further used to indicate corresponding storage Whether the data in the slot needs to be written to the user identification card.
进一步地, 将将緩存于所述预置存储区中的数据写入用户识别卡的方 法为:  Further, the method of writing data buffered in the preset storage area to the user identification card is:
当满足写入条件时, 将依据所述预置存储区中的数据索引, 从所述预 置存储区中读取需要写入用户识别卡的数据, 并将其同步到用户识别卡中; 所述写入条件至少包括关机、 设置的写入定时器的定时时间到。  When the writing condition is satisfied, the data that needs to be written into the user identification card is read from the preset storage area according to the data index in the preset storage area, and is synchronized to the user identification card; The write condition includes at least the shutdown time of the set write timer.
进一步地,所述用户识别卡的类型至少包括: 用户识别模块(SIM )卡、 移动用户识别模块(RUIM )卡、 全球用户识别模块(USIM )卡、 通用集 成电路卡 (UICC )。  Further, the type of the subscriber identity card includes at least: a subscriber identity module (SIM) card, a mobile subscriber identity module (RUIM) card, a global subscriber identity module (USIM) card, and a universal integrated circuit card (UICC).
基于上述方法, 本发明还提出一种减少用户识别卡文件擦写操作次数 的装置, 该装置包括:  Based on the above method, the present invention also provides an apparatus for reducing the number of times of user identification card file erasing operations, the apparatus comprising:
用户识别卡, 用于存储数据;  User identification card for storing data;
预置存储区, 用于在终端中緩存数据;  a preset storage area for buffering data in the terminal;
读取模块, 用于在需要读取数据时, 判断要读取的数据是否緩存于所 述预置存储区中, 如果緩存于所述预置存储区中, 则从所述预置存储区读 取, 否则从所述用户识别卡中读取, 并且将读取的数据同步到所述预置存 储区中;  a reading module, configured to: when data needs to be read, determine whether data to be read is cached in the preset storage area, and if cached in the preset storage area, read from the preset storage area Taking, otherwise reading from the user identification card, and synchronizing the read data into the preset storage area;
写入模块, 用于向所述预置存储区中写入数据, 在满足向所述用户识 别卡写入数据的条件时, 再将緩存于所述预置存储区中的数据写入所述用 户识别卡中。 a writing module, configured to write data into the preset storage area, and when the condition for writing data to the user identification card is satisfied, write data buffered in the preset storage area to the use In the household identification card.
进一步地, 所述数据存储于所述用户识别卡中的线性定长文件中, 所 述数据包含物联网业务数据及线性定长文件中的原有数据类型。  Further, the data is stored in a linear fixed length file in the user identification card, and the data includes the original data type in the Internet of Things service data and the linear fixed length file.
进一步地, 在所述用户识别卡线性定长文件及所述预置存储区中包含: 用于存储数据索引的存储区, 所述数据索引中的索引字段用于指示对应存 储槽中是否存储了数据以及数据的类型, 在所述预置存储区中, 该数据索 引还用于指示对应存储槽中的数据是否需要写入到用户识别卡中;  Further, the user identification card linear fixed length file and the preset storage area include: a storage area for storing a data index, and an index field in the data index is used to indicate whether a storage slot is stored in the corresponding storage slot. The data and the type of the data, in the preset storage area, the data index is further used to indicate whether data in the corresponding storage slot needs to be written into the user identification card;
当满足写入条件时, 所述写入模块依据所述预置存储区中的数据索引, 从所述预置存储区中读取需要写入用户识别卡的数据, 并将其同步到用户 识别卡中。  When the writing condition is satisfied, the writing module reads data that needs to be written into the user identification card from the preset storage area according to the data index in the preset storage area, and synchronizes the data to the user identification. In the card.
不用重新设计、 生产新的用户识别卡, 并且不增加硬件成本, 可以提 高***响应速度, 并减少 SIM卡的擦写次数,延长用户识别卡的使用寿命。 附图说明  There is no need to redesign and produce a new user identification card, and without increasing the hardware cost, the system response speed can be improved, and the number of erasing and writing of the SIM card can be reduced, and the service life of the user identification card can be prolonged. DRAWINGS
图 1为本发明减少用户识别卡文件擦写操作次数的方法流程图; 图 2为本发明线性定长文件结构示意图;  1 is a flow chart of a method for reducing the number of times of user identification card file erasing operations according to the present invention; FIG. 2 is a schematic structural diagram of a linear fixed length file according to the present invention;
图 3为本发明线性定长文件记录结构示意图;  3 is a schematic diagram of a linear fixed length file recording structure of the present invention;
图 4为本发明线性定长文件数据索引结构示意图;  4 is a schematic diagram of a data structure of a linear fixed length file according to the present invention;
图 5为本发明减少用户识别卡文件擦写操作次数的装置结构图。 具体实施方式  FIG. 5 is a structural diagram of an apparatus for reducing the number of erasing operations of a user identification card file according to the present invention. detailed description
本发明的基本思想是: 利用用户识别卡的线性定长文件来存储相关物 联网应用的业务数据, 由终端控制把需要预读的业务数据, 在开机运行时 或需要时读入到终端的预设存储区中, 以后在发生读取操作时, 从终端的 预设存储区中读取; 写入时, 暂时写入终端的预设存储区中, 在满足写入 条件时 (如关机时, 或者计时器定时时间到)再将终端的预设存储区的业 务数据同步到用户识别卡中的线性定长文件中, 通过本方法, 可以缩短某 些行业应用交互响应时间、 减少用户识别卡的擦写次数, 从而延长使用用 户识别卡的寿命, 满足某些行业应用的需求。 The basic idea of the present invention is: using the linear fixed length file of the user identification card to store the service data of the related IoT application, and the terminal controls the service data that needs to be pre-read, and reads the pre-read to the terminal at the time of startup or when needed. In the storage area, when reading occurs later, it is read from the preset storage area of the terminal; when writing, it is temporarily written into the preset storage area of the terminal, when the writing condition is satisfied (such as when shutting down, Or the timer is timed to) and then the terminal's default storage area The data is synchronized to the linear fixed length file in the user identification card. Through this method, the interaction response time of some industries can be shortened, the number of erasing and erasing of the user identification card can be reduced, thereby prolonging the life of the user identification card, and satisfying certain Industry application needs.
本发明所述用户识别卡包含但不限于 SIM 卡、 移动用户识别模块 ( Removable User Identity Module, RUIM )卡、全球用户识别模块( Universal Subscriber Identity Module , USIM )卡、通用集成电路卡 ( Universal Integrated Circuit Card, UICC )。  The user identification card of the present invention includes, but is not limited to, a SIM card, a Removable User Identity Module (RUIM) card, a Universal Subscriber Identity Module (USIM) card, and a Universal Integrated Circuit card. Card, UICC).
本发明所述的线性定长文件是指以线性固定的文件格式存储数据内容 的文件, 例如 EF ( Element File, 基本文件)文件, EF文件又可以分为多 种, 例如用于存储短消息的 EF文件为 EFsms文件、 用于存储电话本的 EF 文件为 EFadn文件等, 另外还有用于存储固定拨号、 缩位拨号、 性能参数、 话费记数的 EF文件。实际物联网应用时很多线性定长文件如 EFadn, EFsms 等经常被闲置, 本发明利用这些闲置的线性定长文件来存储物联网应用的 业务数据。  The linear fixed length file according to the present invention refers to a file that stores data content in a linear fixed file format, such as an EF (Element File) file, and the EF file can be further divided into various types, for example, for storing short messages. The EF file is an EFsms file, the EF file used to store the phone book is an EFadn file, and the like, and an EF file for storing fixed dialing, abbreviated dialing, performance parameters, and call count. In the actual IoT application, many linear fixed length files such as EFadn, EFsms, etc. are often idle, and the present invention utilizes these idle linear fixed length files to store business data of the Internet of Things application.
现以 SIM卡为例进行说明, SIM卡上的文件、数据包括以下四种类型: ( 1 )由 SIM卡生产厂商存入的***原始数据。该类数据通常属永久性 的数据, 由 SIM卡生产厂商注入以后无法更改, 存放于根目录中。  The SIM card is taken as an example for description. The files and data on the SIM card include the following four types: (1) System raw data stored by the SIM card manufacturer. This type of data is usually permanent and cannot be changed after being injected by the SIM card manufacturer and stored in the root directory.
( 2 )由网络运营部门或者其他经营部门在将卡发放给用户时注入的网 络参数和用户数据, 例如鉴权和加密信息、 国际移动用户号(IMSI ); 该类 数据通常网络运行部门的专门机构才允许查阅和更新。  (2) Network parameters and user data injected by the network operation department or other business departments when issuing the card to the user, such as authentication and encryption information, International Mobile Subscriber Number (IMSI); The organization allows access and updates.
( 3 )由应用写入的数据,例如存于 EFsms文件中的短消息、存于 EFadn 文件中的通讯录等。 该类数据中的大部分允许用户利用终端对其进行读 /写 操作。  (3) Data written by the application, such as short messages stored in EFsms files, address books stored in EFadn files, and so on. Most of this type of data allows the user to read/write it using the terminal.
( 4 ) 用户在用卡过程中自动存入和更新的网络接续和用户信息类数 据, 包括最近一次位置、 登记时的手机所在位置区识别号 (LAI)、 设置的周 期性位置更新间隔时间、 临时移动用户号 ( TMSI )等。 (4) Network connection and user information data automatically saved and updated by the user during the card use process, including the last location, the location identification number (LAI) of the mobile phone at the time of registration, and the set week Periodic location update interval, Temporary Mobile Subscriber Number (TMSI), etc.
上述四种类型的数据都存放在各自的目录项内, 当电源开启后首先进 入根目录, 再根据指令进入相关的子目录, 每种目录及其内部的数据域均 有各自的识别码保护, 只有经过核对判别以后才能对数据域中的数据进行 查询、 读出和更新。  The above four types of data are stored in their respective directory entries. When the power is turned on, they first enter the root directory, and then enter the relevant subdirectories according to the instructions. Each directory and its internal data fields have their own ID protection. The data in the data domain can be queried, read, and updated only after verification.
为使本发明的目的、 技术方案和优点更加清楚明白, 以下举实施例并 参照附图, 对本发明进一步详细说明。  The present invention will be further described in detail below with reference to the accompanying drawings.
图 1为本发明提供的减少用户识别卡文件擦写操作次数的方法流程图; 步骤 101、 物联网终端开机后, 经过正常鉴权后, 终端从用户识别卡中 读取所需业务数据到终端预设存储区中;  1 is a flowchart of a method for reducing the number of erasing operations of a user identification card file provided by the present invention; Step 101: After the IoT terminal is powered on, after normal authentication, the terminal reads required service data from the user identification card to the terminal. In the preset storage area;
该步骤中所述的读取可以是一次将所有当前运行的物联网应用所对应 的业务数据读入预置存储区, 也可以根据一定规则读入部分业务数据。  The reading in the step may be to read the service data corresponding to all currently running IoT applications into the preset storage area, or read part of the service data according to certain rules.
步骤 102、检测是否需要执行业务数据的读写操作, 若需要执行读操作 则执行 103; 若需要执行写操作则执行 106;  Step 102: Detect whether it is necessary to perform a read/write operation of the service data, if it needs to perform a read operation, execute 103; if it needs to perform a write operation, execute 106;
步骤 103、在物联网业务应用运行过程中, 如果需要读取用户识别卡中 的业务数据, 则首先判断要读取的业务数据是否緩存于终端预置的存储器 中,如果緩存于终端预置的存储器中, 则执行步骤 104; 否则执行步骤 105; 步骤 104、从所述预置的存储器中读取相关的业务数据; 然后返回步骤 Step 103: During the operation of the IoT service application, if the service data in the user identification card needs to be read, first determine whether the service data to be read is cached in the memory preset by the terminal, if the cache is preset in the terminal. In the memory, step 104 is performed; otherwise, step 105 is performed; step 104, the related service data is read from the preset memory; and then returning to the step
102; 102;
步骤 105、从用户识别卡中读取相关业务数据, 并且将读取的业务数据 存入所述预置的存储器中; 然后返回步骤 102;  Step 105: Read related service data from the user identification card, and store the read service data into the preset memory; then return to step 102;
步骤 106、在物联网业务应用运行过程中, 如果需要向用户识别卡写入 业务数据, 则先写入终端预设存储器中, 并置写入标志, 所述写入标志用 于指示该业务数据需要同步到用户识别卡中;  Step 106: During the operation of the IoT service application, if the service data needs to be written to the user identification card, the terminal is first written into the terminal preset memory, and the write flag is set, and the write flag is used to indicate the service data. Need to be synchronized to the user identification card;
本发明实施例中, 所述写入标志的定义如下: 00表示存储槽为空数据、 01表示存储槽存储的是预读入的短消息数据、 02表示存储槽存储的是预读 入的业务数据、 03表示本次运行中新写入的短消息数据、 04表示本次运行 中新写入的业务数据。 所述存储槽即为线性定长文件中一条记录的存储空 间。 In the embodiment of the present invention, the definition of the write flag is as follows: 00 indicates that the storage slot is empty data, 01 indicates that the storage slot stores the pre-read short message data, 02 indicates that the storage slot stores the pre-read service data, 03 indicates the newly written short message data in this operation, and 04 indicates that the current operation is new. The business data written. The storage slot is a storage space of one record in a linear fixed length file.
步骤 107、 判断是否满足写入条件, 当满足写入条件时, 例如关机、 设 置的写入定时器的定时时间到等, 执行步骤 108, 否则返回步骤 102;  Step 107, judging whether the write condition is satisfied, when the write condition is satisfied, for example, the shutdown, the set time of the write timer is up to, etc., step 108 is performed, otherwise return to step 102;
步骤 108、将所述终端预设存储器中緩存的拥有写入标志的业务数据写 入到用户识别卡中, 同时将对应的写入标志位设置为已同步的状态标志, 例如 1或 2。  Step 108: Write the service data with the write flag cached in the terminal preset memory to the user identification card, and set the corresponding write flag bit to the synchronized status flag, for example, 1 or 2.
优选地, 本发明利用物联网业务下用户识别卡中某些不常使用的线性 定长文件来存储相关物联网应用的业务数据, 也可以利用用户识别卡中某 些不常使用的循环文件来存储所述物联网应用的业务数据。  Preferably, the present invention utilizes some infrequently used linear fixed length files in the user identification card of the Internet of Things service to store the service data of the related Internet of Things application, and may also utilize some infrequently used loop files of the user identification card. Storing the business data of the Internet of Things application.
以下以 SIM卡内 EFsms类型的线性定长文件为例, 举例说明书业务数 据的存储方式:  The following is an example of a linear fixed length file of the EFsms type in the SIM card.
将描述用户识别卡内线性定长文件的描述信息、 以及该线性定长文件 中存储业务数据的标识信息 (Service ID )保存于相应的 EF文件内, 所述 标识信息包含业务数据的个数等信息, 实现方法是: 在用户识别卡内的相 应 EF文件中开辟一个存储区用于存储业务数据的标识信息,另外开辟一个 存储区用于数据索引,该数据索引区中的索引字段用于指示该 EF文件的各 存储槽中是否存储了数据以及数据的类型, 例如, 在用户识别卡中选取 EFsms 中的一个短消息记录槽, 不存放任何短消息数据及业务数据, 而存 放数据索引 (Index ), 可以将该数据所以看作是描述 EFsms文件的短消息, 可以规定在第一条记录或者最后一条记录用于存放上述的数据索引。如图 2 所示, 数据索引占用一条 EF短消息记录的存储空间(根据需要可以占 2个 或更多的记录), 其空间大小因不同的用户识别卡的不同而不同, 例如一种 SIM卡或者 USIM卡中 EFsms的一条记录为 176个字节, 一种 RUIM卡为 255个字节。 The description information describing the linear fixed length file in the user identification card and the identification information (Service ID) of the service data stored in the linear fixed length file are stored in the corresponding EF file, and the identification information includes the number of service data, and the like. The information is implemented by: opening a storage area for storing the identification information of the service data in the corresponding EF file in the user identification card, and further opening a storage area for data index, wherein the index field in the data index area is used to indicate Whether the data and the type of the data are stored in each storage slot of the EF file, for example, selecting a short message record slot in the EFsms in the user identification card, not storing any short message data and service data, and storing the data index (Index) The data can be regarded as a short message describing the EFsms file, and it can be specified that the first record or the last record is used to store the above data index. As shown in Figure 2, the data index occupies a storage space of EF short message records (which can occupy 2 or more records as needed), and the space size varies according to different user identification cards, for example, One record of EFsms in the SIM card or USIM card is 176 bytes, and one type of RUIM card is 255 bytes.
如图 3 所示, 从物理存储结构上看, 数据索引由多个连续的字节所组 成, 数据索引逻辑上由两个组成部分, 一个实现的例子是, 选择数据索引 的第一个字节作为标示字段, 用于标示这个字段是数据索引字段, 给它赋 予特定的值, 比如 "OxAA" , 这个字段就把数据索引和其它 EFsms的记录 区分开。  As shown in Figure 3, from the physical storage structure, the data index consists of multiple consecutive bytes. The data index is logically composed of two components. An implementation example is to select the first byte of the data index. As a label field, it is used to indicate that this field is a data index field, and is given a specific value, such as "OxAA", which distinguishes the data index from other EFsms records.
本发明中, 在 EFsms中存储着三种数据, 一种是物联网应用的业务数 据, 一种是普通短消息数据, 另外就是空槽。 数据索引剩余的字节中, 每 2 个 bit确定了各个存储槽的存储数据类型,比如: 00表示某存储槽为空数据、 01表示某存储槽存储的是短消息数据、 02表示某存储槽存储的是业务数据、 03表示本次运行中新写入的数据,标志 03即为上述步骤中所述的写入标志。  In the present invention, three types of data are stored in the EFsms, one is the service data of the Internet of Things application, the other is the ordinary short message data, and the other is the empty slot. In the remaining bytes of the data index, the storage data type of each storage slot is determined for every 2 bits. For example, 00 indicates that a storage slot is empty data, 01 indicates that a storage slot stores short message data, and 02 indicates a storage slot. Stored is the service data, 03 indicates the newly written data in this run, and the flag 03 is the write flag described in the above steps.
举例说明,如果 Index的 Bitl Bit2 为 01则指示第一个存储槽存入的是 普通短消息数据, 如果 Bit3 Bit4为 02, 则指示第二个存储槽存入的是业务 数据, 如果 Bit5 Bit6为 00, 则指示第三个存储槽没有存入数据。  For example, if Bitt Bit2 of Index is 01, it indicates that the first slot stores normal short message data. If Bit3 Bit4 is 02, it indicates that the second slot stores business data, if Bit5 Bit6 is 00, it indicates that the third storage slot does not store data.
按照上述方法对 EFsms文件的数据索引重新实施逻辑划分, 则数据索 引字段可以描述最多达 1/2*8* ( N-1 )个 EFsms存储槽的存储情况, 如果 如上述所述则 SIM卡和 USIM卡的 N=176, 那么, 1/2*8* ( N-1 ) =700条 记录, 如果是 RUIM卡则达到 1/2*8* ( 255-1 ) =1016条记录, 如果需要可 以使用 2个甚至多个存储槽作为 Index的描述。  According to the above method, the data index of the EFsms file is re-implemented, and the data index field can describe the storage condition of up to 1/2*8*(N-1) EFsms storage slots, if the SIM card and the SIM card are as described above. USIM card N=176, then, 1/2*8* (N-1) =700 records, if it is a RUIM card, it will reach 1/2*8* (255-1) =1016 records, if necessary Use 2 or more storage slots as a description of Index.
下面描述移动终端开机时, 移动终端预读用户识别卡中的业务相关数 据的情况, 步骤如下:  The following describes the case where the mobile terminal pre-reads the service related data in the user identification card when the mobile terminal is powered on, and the steps are as follows:
步骤 Rl、 终端开机时, 按终端预定的顺序读取 SIM卡的相关文件; 步骤 R2、 当读取 SIM卡的有关线性定长文件时, 先读取该线性定长文 件的 Sevice ID , 如果该 Sevice ID不为 0 (作为一种例子, Sevice ID 可以 保存该 EF中存有的业务数据的个数, 如果一个字节不够, 可以扩充到 2, 3.....个字节, 直到满足业务的使用), 则读取数据索引, 转步骤 R3 , 如果 该 Sevice ID为 0则不读取该线性定长文件; Step R1: When the terminal is powered on, the related file of the SIM card is read in the order predetermined by the terminal; Step R2, when reading the linear fixed length file of the SIM card, first read the Sevice ID of the linear fixed length file, if Sevice ID is not 0 (as an example, Sevice ID can The number of service data stored in the EF is saved. If one byte is insufficient, it can be expanded to 2, 3..... bytes until the service is used. Then, the data index is read, and the process proceeds to step R3. If the Sevice ID is 0, the linear fixed length file is not read;
步骤 R3、在移动终端中创建一个与该 SIM卡线性定长文件相同的结构 的存储区, 包括数据索引, 并将数据索引赋值给终端中的对应的数据索引, 如果只需要读取与物联网应用有关的业务数据, 则根据数据索弓 I字段标识, 将所有有效记录, 即标示为 02的纪录, 预读 (复制 )到终端的预置的存储 区中。  Step R3: Create a storage area in the mobile terminal having the same structure as the linear fixed length file of the SIM card, including a data index, and assign the data index to the corresponding data index in the terminal, if only need to read and the Internet of Things Applying relevant business data, according to the data identification, the all valid records, that is, the records marked as 02, are pre-read (copied) into the preset storage area of the terminal.
终端在使用过程中, 若有新的物联网业务应用的业务数据需要写入 SIM卡, 则执行如下步骤:  During the use of the terminal, if the service data of the new IoT service application needs to be written to the SIM card, perform the following steps:
步骤 Wl、 移动终端接收到写入业务数据到用户识别卡相关的命令; 步骤 W2、 查询终端预置存储区中的数据索引, 根据查询结果将业务数 据写入内存中的某一个空闲存储槽中, 并将对应的标志位更改为 04 (表示 本次运行中新写入的业务数据 );  Step W1: The mobile terminal receives a command related to writing the service data to the user identification card; Step W2, querying the data index in the preset storage area of the terminal, and writing the service data into a certain free storage slot in the memory according to the query result. , and change the corresponding flag bit to 04 (indicating the newly written business data in this run);
步骤 W 3、 在满足写入条件时, 即在满足 SIM卡和终端进行数据同步 的情况下, 例如关机和 /或设置的写入定时器的定时时间到, 将终端预置存 储区中索引标识为 04的业务数据一次性写入到 SIM卡中,同时将对应的数 据索引项修改为 02 (代表该业务数据已同步), 同时在新增记录的情况下, 还需要同步更新 Service ID。  Step W3: When the writing condition is satisfied, that is, in the case that the SIM card and the terminal perform data synchronization, for example, the timing of the shutdown and/or the set write timer is up, the index identifier in the terminal preset storage area is set. The service data for 04 is written to the SIM card at one time, and the corresponding data index item is modified to 02 (representing that the service data is synchronized), and in the case of adding a new record, the service ID needs to be updated synchronously.
图 5 为本发明提供的一种减少用户识别卡文件擦写操作次数的装置 100, 该装置包括:  FIG. 5 is a device 100 for reducing the number of times of user identification card file erasing operations provided by the present invention, the device includes:
用户识别卡 101 , 用于存储数据, 所述数据存储于所述用户识别卡中的 线性定长文件中, 所述数据包含物联网业务数据及线性定长文件中的原有 数据类型, 所述原有数据类型包括短信数据、 电话簿数据等。  a user identification card 101, configured to store data, where the data is stored in a linear fixed length file in the user identification card, where the data includes the original data type in the Internet of Things service data and the linear fixed length file, The original data types include SMS data, phone book data, and so on.
预置存储区 102, 用于在终端中緩存数据, 所述数据包含物联网业务数 据及线性定长文件中的原有类型数据。 a preset storage area 102, configured to cache data in the terminal, where the data includes the number of Internet of Things services According to the original type data in the linear fixed length file.
读取模块 103 , 用于在需要读取数据时, 判断要读取的数据是否緩存于 所述预置存储区中, 如果緩存于所述预置存储区中, 则从所述预置存储区 读取, 否则从所述用户识别卡中读取, 并且将读取的数据同步到所述预置 存储区中;  The reading module 103 is configured to determine, when the data needs to be read, whether the data to be read is cached in the preset storage area, and if it is cached in the preset storage area, from the preset storage area Reading, otherwise reading from the user identification card, and synchronizing the read data into the preset storage area;
写入模块 104, 用于向所述预置存储区中写入数据, 在满足向所述用户 识别卡写入数据的条件时, 再将緩存于所述预置存储区中的数据写入所述 用户识别卡中。  The writing module 104 is configured to write data into the preset storage area, and write the data cached in the preset storage area when the condition for writing data to the user identification card is satisfied In the user identification card.
在终端启动后, 在终端存储器中开辟一块与用户识别卡线性定长文件 数据结构相同的存储区域用作所述预置存储区, 在用户识别卡线性定长文 件及预置存储区中包含: 用于存储数据索引的存储区, 数据索引中的索引 字段用于指示对应存储槽中是否存储了数据以及数据的类型, 在预置存储 区中, 该数据索引还用于指示对应存储槽中的数据是否需要写入到用户识 别卡中;  After the terminal is started, a storage area having the same data structure as the linear identification file of the user identification card is opened in the terminal memory for use as the preset storage area, and the linear identification file and the preset storage area of the user identification card include: The storage area for storing the data index, the index field in the data index is used to indicate whether the data is stored in the corresponding storage slot and the type of the data. In the preset storage area, the data index is further used to indicate the corresponding storage slot. Whether the data needs to be written to the user identification card;
在物联网应用运行过程中, 如需要向用户识别卡写入数据, 则写入模 块首先将其写入预置存储区中, 当满足写入条件时, 写入模块依据预置存 储区中的数据索引, 从预置存储区中读取需要写入用户识别卡的数据, 并 将其同步到用户识别卡中。 所述写入包括新增数据的写入及历史数据的修 改, 若是新增数据, 则所述写入模块需根据预置存储区中数据索引检索出 还未存储数据的数据槽 (即数据记录的存储空间), 然后将数据写入检索出 的数据槽内。 无论是新增还是修改, 其数据索引对应索引项都以写入标识 进行标记, 当满足写入条件时, 所述写入模块统——次性将需要写入的数 据写入到用户识别卡中对应的位置。  During the operation of the IoT application, if the data needs to be written to the user identification card, the writing module first writes it into the preset storage area. When the writing condition is satisfied, the writing module is based on the preset storage area. The data index reads the data that needs to be written into the user identification card from the preset storage area and synchronizes it to the user identification card. The writing includes writing of newly added data and modification of historical data. If the data is newly added, the writing module needs to retrieve a data slot (ie, a data record) that has not stored data according to the data index in the preset storage area. The storage space), and then write the data into the retrieved data slot. Regardless of whether it is added or modified, the index items corresponding to the data index are marked with the write identifier. When the write condition is satisfied, the write module system writes the data to be written to the user identification card. The corresponding position in .
本发明可推广性好、 成本低、 有效利用了原有用户识别卡在某些业务 中不被经常使用的线性定长文件, 预读 EF文件进入终端存储区中, 提高了 业务***运行的速度,并在业务***运行中对于擦写用户识别卡 EF文件的 操作釆用先在终端存储卡中进行存储, 待满足写入条件时再统一对用户识 别卡进行擦写操作的方法, 有效地减少了对用户识别卡的访问次数, 延长 了用户识别卡的使用寿命, 也便于运营商统一控制业务并不用重新设计、 制造新型的用户识别卡。 在实际运用时, 运营商也可以通过仪器或者第三 方软件将其业务数据写入以前发行的用户识别卡内, 便可以方便的开展业 务。 The invention has the advantages of good generalization, low cost, and effectively utilizes the linear fixed length file that the original user identification card is not frequently used in some services, and the pre-read EF file enters the terminal storage area, thereby improving The speed at which the business system runs, and the operation of erasing the EF file of the user identification card during the operation of the business system is first stored in the terminal memory card, and then the user identification card is erased and written after the writing condition is satisfied. The method effectively reduces the number of accesses to the user identification card, prolongs the service life of the user identification card, and also facilitates the operator to uniformly control the service without redesigning and manufacturing a new type of user identification card. In actual use, the operator can also write its business data into the previously issued user identification card through instruments or third-party software, so that the business can be conveniently carried out.
在实际应用时, 一般安全相关的数据, 如鉴权、 安全、 ***等相关的 数据等不做为用户数据预先读入终端存储区内, 有读取这类数据的需求时, 仍按照正常的 SIM卡访问流程执行。 而与业务相关的数据才被终端读入预 置存储区中。  In practical applications, general safety-related data, such as authentication, security, system and other related data, are not read into the terminal storage area as user data. When there is a need to read such data, it is still in accordance with normal conditions. The SIM card access process is executed. The data related to the business is read into the pre-stored area by the terminal.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。  The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

Claims

权利要求书 Claim
1、一种减少用户识别卡文件擦写操作次数的方法,其特征在于, 包括: 在终端中开辟预置存储区, 在需要向用户识别卡写入数据时, 先将数 据写入所述预置存储区中, 当满足写入条件时, 再将緩存于所述预置存储 区中的数据写入用户识别卡; A method for reducing the number of erasing operations of a user identification card file, comprising: opening a preset storage area in the terminal, and writing data to the pre-write when the data needs to be written to the user identification card In the storage area, when the writing condition is met, the data cached in the preset storage area is written into the user identification card;
在需要读取数据时, 先判断所需数据是否緩存于所述预置存储区中, 如果緩存于所述预置存储区中, 则从所述预置存储区读取, 否则从用户识 别卡中读取, 并且将读取的数据同步到所述预置存储区中。  When the data needs to be read, it is first determined whether the required data is cached in the preset storage area, and if it is cached in the preset storage area, it is read from the preset storage area, otherwise the user identification card is Reading in, and synchronizing the read data into the preset storage area.
2、 根据权利要求 1所述的方法, 其特征在于, 所述数据存储于所述用 户识别卡中的线性定长文件中, 所述数据包含物联网业务数据及线性定长 文件中的原有数据类型。  2. The method according to claim 1, wherein the data is stored in a linear fixed length file in the user identification card, and the data includes an original in the Internet of Things service data and the linear fixed length file. type of data.
3、 根据权利要求 2所述的方法, 其特征在于, 在所述用户识别卡中的 线性定长文件中及所述预置存储区中存储数据的方式为:  3. The method according to claim 2, wherein the manner of storing data in the linear fixed length file in the user identification card and in the preset storage area is:
设置数据索引, 所述数据索引中的索引字段用于指示对应存储槽中是 否存储了数据以及数据的类型; 在所述预置存储区中, 所述数据索引还用 于指示对应存储槽中的数据是否需要写入到用户识别卡中。  Setting a data index, the index field in the data index is used to indicate whether data is stored in the corresponding storage slot and the type of the data; in the preset storage area, the data index is further used to indicate the corresponding storage slot Whether the data needs to be written to the user identification card.
4、 根据权利要求 3所述的方法, 其特征在于, 将将緩存于所述预置存 储区中的数据写入用户识别卡的方法为:  4. The method according to claim 3, wherein the method of writing data cached in the preset storage area to the user identification card is:
当满足写入条件时, 依据所述预置存储区中的数据索引, 从所述预置 存储区中读取需要写入用户识别卡的数据, 并将其同步到用户识别卡中; 所述写入条件至少包括关机、 设置的写入定时器的定时时间到。  When the writing condition is satisfied, reading data that needs to be written into the user identification card from the preset storage area according to the data index in the preset storage area, and synchronizing the data to the user identification card; The write condition includes at least the shutdown time of the set write timer.
5、 根据权利要求 1所述的方法, 其特征在于, 所述用户识别卡的类型 包括: 用户识别模块(SIM )卡、 移动用户识别模块(RUIM )卡、 全球用 户识别模块(USIM )卡、 通用集成电路卡(UICC )。 5. The method according to claim 1, wherein the type of the subscriber identity card comprises: a subscriber identity module (SIM) card, a mobile subscriber identity module (RUIM) card, a global subscriber identity module (USIM) card, Universal Integrated Circuit Card (UICC).
6、 一种减少用户识别卡文件擦写操作次数的装置, 其特征在于, 该装 置包括: 6. A device for reducing the number of times a user identification card file is erased, characterized in that the device comprises:
用户识别卡, 用于存储数据;  User identification card for storing data;
预置存储区, 用于在终端中緩存数据;  a preset storage area for buffering data in the terminal;
读取模块, 用于在需要读取数据时, 判断要读取的数据是否緩存于所 述预置存储区中, 如果緩存于所述预置存储区中, 则从所述预置存储区读 取, 否则从所述用户识别卡中读取, 并且将读取的数据同步到所述预置存 储区中;  a reading module, configured to: when data needs to be read, determine whether data to be read is cached in the preset storage area, and if cached in the preset storage area, read from the preset storage area Taking, otherwise reading from the user identification card, and synchronizing the read data into the preset storage area;
写入模块, 用于向所述预置存储区中写入数据, 在满足向所述用户识 别卡写入数据的条件时, 再将緩存于所述预置存储区中的数据写入所述用 户识别卡中。  a writing module, configured to write data into the preset storage area, and when the condition for writing data to the user identification card is satisfied, write data buffered in the preset storage area to the User identification card.
7、 根据权利要求 6所述的装置, 其特征在于, 所述数据存储于所述用 户识别卡中的线性定长文件中, 所述数据包含物联网业务数据及线性定长 文件中的原有数据类型。  The device according to claim 6, wherein the data is stored in a linear fixed length file in the user identification card, and the data includes an original in the Internet of Things service data and the linear fixed length file. type of data.
8、 根据权利要求 7所述的装置, 其特征在于,  8. Apparatus according to claim 7 wherein:
在所述用户识别卡线性定长文件及所述预置存储区中包含: 用于存储 数据索引的存储区, 所述数据索引中的索引字段用于指示对应存储槽中是 否存储了数据以及数据的类型, 在所述预置存储区中, 该数据索引还用于 指示对应存储槽中的数据是否需要写入到用户识别卡中;  The user identification card linear fixed length file and the preset storage area include: a storage area for storing a data index, and an index field in the data index is used to indicate whether data and data are stored in the corresponding storage slot. Type of the data, in the preset storage area, the data index is further used to indicate whether data in the corresponding storage slot needs to be written into the user identification card;
当满足写入条件时, 所述写入模块依据所述预置存储区中的数据索引, 从所述预置存储区中读取需要写入用户识别卡的数据, 并将其写入到用户 识别卡中。  When the writing condition is satisfied, the writing module reads data that needs to be written into the user identification card from the preset storage area according to the data index in the preset storage area, and writes the data to the user. Identification card.
9、 根据权利要求 8所述的装置, 其特征在于, 所述用户识别卡的类型 包括: SIM卡、 RUIM卡、 USIM卡、 UICC卡。  9. The device according to claim 8, wherein the type of the subscriber identity card comprises: a SIM card, a RUIM card, a USIM card, and a UICC card.
PCT/CN2010/080174 2010-09-08 2010-12-23 Method and apparatus for reducing erasing and writing operation times of subscriber identity module card files WO2012031441A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010277545.9A CN102402698B (en) 2010-09-08 2010-09-08 A kind of method and device reducing the erasable number of operations of Subscriber Identity Module file
CN201010277545.9 2010-09-08

Publications (1)

Publication Number Publication Date
WO2012031441A1 true WO2012031441A1 (en) 2012-03-15

Family

ID=45810085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/080174 WO2012031441A1 (en) 2010-09-08 2010-12-23 Method and apparatus for reducing erasing and writing operation times of subscriber identity module card files

Country Status (2)

Country Link
CN (1) CN102402698B (en)
WO (1) WO2012031441A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104599708A (en) * 2015-01-16 2015-05-06 珠海格力电器股份有限公司 Display data storage method
CN105930100B (en) * 2016-04-15 2019-01-29 烽火通信科技股份有限公司 A kind of implementation method optimizing usim card file read-write speed and frequency
CN109283995B (en) * 2018-09-28 2020-04-28 上海移芯通信科技有限公司 Method and system for reducing power consumption of terminal user identification card of Internet of things
CN111294786B (en) * 2018-12-10 2023-04-07 深圳市广和通无线股份有限公司 Card writing protection method and device for mobile terminal, mobile terminal and storage medium
CN112231244B (en) * 2020-12-21 2021-04-20 深圳杰睿联科技有限公司 SIM card file erasing and writing system and method applied to SoftSIM and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1856138A (en) * 2005-04-20 2006-11-01 英华达(上海)电子有限公司 Quickly turning-on of mobile telephone
CN101426052A (en) * 2008-12-05 2009-05-06 上海闻泰电子科技有限公司 Backup and importing method for address book and short message of mobile terminal
CN101441634A (en) * 2007-11-19 2009-05-27 凤凰微电子(中国)有限公司 Embedded type file system suitable for smart card application environment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101400164B (en) * 2007-09-29 2013-01-16 锐迪科微电子(上海)有限公司 Smart card, system and method for realizing deployment customized service
KR20090056278A (en) * 2007-11-30 2009-06-03 (주)케이티에프테크놀로지스 Method for changing mobile telecommunication service provider

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1856138A (en) * 2005-04-20 2006-11-01 英华达(上海)电子有限公司 Quickly turning-on of mobile telephone
CN101441634A (en) * 2007-11-19 2009-05-27 凤凰微电子(中国)有限公司 Embedded type file system suitable for smart card application environment
CN101426052A (en) * 2008-12-05 2009-05-06 上海闻泰电子科技有限公司 Backup and importing method for address book and short message of mobile terminal

Also Published As

Publication number Publication date
CN102402698A (en) 2012-04-04
CN102402698B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN101526923B (en) Data processing method, device thereof and flash-memory storage system
CN100573476C (en) Flash memory medium data management method
CN103440205B (en) A kind of set top box data storage method and device
TWI406130B (en) Data processing system, controller, and method thereof for searching specific memory area
CN100367306C (en) Nonvolatile memory card
CN102737715B (en) For the method for power fail safeguard of data of NOR flash memory
WO2012031441A1 (en) Method and apparatus for reducing erasing and writing operation times of subscriber identity module card files
CN112231244B (en) SIM card file erasing and writing system and method applied to SoftSIM and readable storage medium
CN100378663C (en) Method, system and module for dynamic downloading of applied programe to user identification
CN103581229A (en) Distributed file system, file access method and client terminal
CN103206961A (en) Vehicle navigation system and information storing method thereof
CN101187936B (en) A log data storage method and device
EP3343395A1 (en) Data storage method and apparatus for mobile terminal
CN101266538B (en) Intelligent memory card interface access control method
WO2012031443A1 (en) Method and system for storing service data
CN101453513A (en) System and method for short message function fast using after mobile phone starting
CN100535872C (en) NOR FLASH equalising method based on address mapping
CN102508690A (en) Storing method and decoding method for command line of embedded equipment
CN1780429A (en) Automatic timing SMS transmitting method from mobile terminal
CN103124309B (en) Method and terminal for read-write control of mobile phone files
CN103379461A (en) Data service traffic statistical method and terminal
CN102065180A (en) Method for quickening power-on speed of mobile phone
CN101826097A (en) Method, system and mobile terminal for saving memory space of address book database
JP2003203007A (en) Nonvolatile area control method for memory of mobile phone
WO2012031442A1 (en) Method for storing service data and system thereof

Legal Events

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

Ref document number: 10856903

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10856903

Country of ref document: EP

Kind code of ref document: A1