Data management methods, smart cards and computer-readable storage media

By pre-installing the security management application in the smart card, saving and managing key user data, the problem of losing key user data after application or system upgrades in the smart card is solved, data security and the normal operation of the target program are achieved, and data transmission security is avoided. question.

CN113569208BActive Publication Date: 2024-10-22HENGBAO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110854118.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2024-10-22
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

After the application or system in the smart card is upgraded, key user data will be lost or need to be restored, affecting the user experience.

Method used

The security management application is pre-installed in the smart card to receive and save key user data of the target program to ensure that the data will not be lost during upgrades, and is associated and saved through unique identification and type identification to achieve data isolation and security between different target programs. manage.

Benefits of technology

It effectively avoids the loss or recovery of key user data after the target program in the smart card is upgraded, ensures data security and the normal operation of the target program, and avoids data transmission security issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113569208B_ABST
    Figure CN113569208B_ABST
Patent Text Reader

Abstract

The present application provides a data management method, a smart card, and a computer-readable storage medium, the method comprising: the security management application of the smart card obtains the user key data of the target program; the target program is a program installed in the smart card; and the user key data is stored. In this way, when the target program is upgraded, the original version of the target program is deleted, and after the new version of the target program is installed, since the user key data is located in the security management application, it will not be lost, and can still be called normally by the upgraded target program, thereby effectively avoiding the problem that the user key data in the smart card will be lost or need to be restored after the target program is upgraded. In addition, since the target program and the security management application are both located in the smart card, data interaction is completed in the smart card, and there will be no data transmission security issues.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of smart cards, and in particular to a data management method, a smart card and a computer-readable storage medium. Background Art

[0002] A smart card-based application or system is a small program that runs on a smart card chip with limited storage space and computing power. This program contains user key data (including key data such as keys, accounts, amounts, etc.) and business program code. User key data belongs to the application itself and cannot be accessed by other applications or systems.

[0003] With the popularity of smart cards, most smart cards (especially Java cards that support downloading and installing applications or systems after card issuance, such as eSIM (Embedded Subscriber Identity Module) cards, financial cards, etc.) need to have the ability to support application or system upgrades. Currently, the conventional upgrade method is to delete the original application or system and then download the new version of the application or system to achieve the upgrade.

[0004] However, when the application or system in the smart card is deleted, the user's key data and business program code will be deleted together. When reinstalling a new version of the application or system, new user key data needs to be re-established or personalized. This results in the existing upgrade method that after the application or system is upgraded, the original user key data will be lost or need to be restored, which seriously affects the user experience. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a data management method, a smart card and a computer-readable storage medium to solve the problem in the prior art that user key data may be lost or need to be restored after an application or system upgrade in a smart card.

[0006] An embodiment of the present application provides a data management method, which is applied to the security management application of a smart card. The method includes: obtaining user key data of a target program; the target program is a program installed in the smart card; and storing the user key data.

[0007] In the above implementation process, by pre-installing the security management application in the smart card, the user key data of the target program in the smart card is received and saved through the security management application. In this way, when the target program is upgraded, the original version of the target program is deleted. After the new version of the target program is installed, the user key data is located in the security management application and will not be lost. It can still be called normally by the upgraded target program, which can effectively avoid the problem that the user key data in the smart card will be lost or need to be restored after the target program is upgraded. In addition, since the target program and the security management application are both located in the smart card, data interaction is completed in the smart card, and there will be no data transmission security issues.

[0008] Furthermore, the method further includes: acquiring a unique identifier of the target program; correspondingly, storing the user key data includes: associating and saving the user key data and the unique identifier.

[0009] It should be understood that in actual application, there may be more than one target program in the smart card. In order to facilitate the differentiated management of different target programs, the user key data and the unique identifier are saved by association in the above implementation process, so that when the target program needs to obtain the corresponding user key data, it can only obtain its own user key data through the restriction of the unique identifier, thereby achieving the isolation of user key data between different target programs and improving the security of data in the smart card.

[0010] Furthermore, the unique identifier includes an application identifier of the target program and a custom parameter of the target program.

[0011] It should be understood that although the target program's application identifier is unique in theory, it can uniquely identify a target program. However, in actual application, since the target program's application identifier may be exposed to the outside, there may be a risk of being acquired by malicious applications. In the above implementation process, by using the target program's application identifier and custom parameters as the unique identifier, the security of the unique identifier is improved and the risk of the unique identifier being acquired by malicious applications is reduced.

[0012] Furthermore, the method also includes: obtaining a type identifier of the user key data of the target program; the type identifier is an identifier used to identify the type of the user key data when the target program obtains the user key data; correspondingly, associating and saving the user key data and the unique identifier, including: associating and saving the user key data, the type identifier and the unique identifier.

[0013] In actual application, user key data may have many types, such as keys, accounts, amounts, etc. In actual application, when the target program performs a task, it may only need some user key data to participate. In the above implementation process, by associating and saving user key data, type identifier and unique identifier, a more fine-grained classification storage of user key data is achieved, so that when the target program obtains user key data, it can obtain some user key data according to the type identifier.

[0014] Furthermore, the method also includes: when obtaining the data request of the target program, identifying whether the unique identifier in the data request is a unique identifier that already exists in the security management application; if so, sending the user key data associated with the unique identifier to the target program.

[0015] In the above implementation process, the unique identifier can be used to effectively determine whether the target program has the corresponding user key data access request authority, and the user key data of the target program can be returned to the target program. In this way, on the one hand, data isolation between different target programs is achieved to ensure data security; on the other hand, the target program can normally obtain its own user key data, so that it can normally execute the corresponding task, ensuring the normal operation of the target program.

[0016] Furthermore, the method also includes: when a data destruction request for the target program is obtained, identifying whether the unique identifier in the data destruction request is a unique identifier that already exists in the security management application; if so, destroying user key data associated with the unique identifier.

[0017] In the above implementation process, by identifying whether the unique identifier in the data destruction request is a unique identifier that already exists in the security management application, independent destruction control of user key data of different target programs is achieved.

[0018] An embodiment of the present application also provides a data management method, which is applied to the target program of a smart card. The method includes: when user key data is obtained, sending the user key data to a corresponding security management application to save the user key data in the security management application; wherein the security management application is an application installed in the smart card.

[0019] In the above implementation process, the user key data of the target program is saved through the security management application, so that when the target program is upgraded, the original version of the target program is deleted. After the new version of the target program is installed, the user key data is located in the security management application and will not be lost. It can still be called normally by the upgraded target program, which can effectively avoid the problem that the user key data in the smart card will be lost or need to be restored after the target program is upgraded. In addition, since the target program and the security management application are both located in the smart card, data interaction is completed in the smart card, and there will be no data transmission security issues.

[0020] Furthermore, the method further includes: sending its own unique identifier to the security management application, so that the security management application associates and saves the user key data and the unique identifier.

[0021] Furthermore, the method also includes: when the user key data is obtained, obtaining a type identifier of the user key data; the type identifier is an identifier used to identify the type of the user key data; sending the type identifier to the security management application so as to associate and save the user key data, the type identifier and the unique identifier in the security management application.

[0022] Furthermore, the method also includes: when executing a preset task, calling the data reading interface of the security management application, and reading the required user key data from the security management application through the data reading interface; the preset task is a task that requires user key data; and executing the preset task according to the user key data.

[0023] In the above implementation process, the target program can quickly call the required user key data from the security management application by calling the data reading interface of the security management application, thereby ensuring the normal operation of the target program.

[0024] An embodiment of the present application also provides a smart card, which is installed with a target program and a security management application corresponding to the target program; the target program is used to send the user key data to the security management application corresponding to the target program when the user key data is obtained; the security management application is used to store the user key data.

[0025] The above-mentioned smart card can save the user key data of the target program through the security management application. This means that when the target program is upgraded, the original version of the target program is deleted. After the new version of the target program is installed, the user key data is located in the security management application and will not be lost. It can still be called normally by the upgraded target program, which can effectively avoid the problem of user key data being lost or needing to be restored after the target program in the smart card is upgraded. In addition, since the target program and the security management application are both located in the smart card, data interaction is completed in the smart card, and there will be no data transmission security issues.

[0026] Furthermore, there are multiple target programs; and the multiple target programs correspond to the same security management application.

[0027] In the above implementation process, multiple target programs are managed through a security management application, which can effectively save valuable storage resources in the smart card and simplify the management logic.

[0028] Furthermore, a type identifier is stored in the target program in the form of constant data; the type identifier is used to identify the type of the user key data.

[0029] In actual application, constant data is usually not deleted when the program is upgraded. Therefore, saving the type identifier in the form of constant data in the target program can effectively avoid the loss of the type identifier when the target program is deleted.

[0030] A readable storage medium is also provided in an embodiment of the present application. The readable storage medium stores one or more programs. The one or more programs can be executed by one or more processors to implement any of the above-mentioned data management methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A schematic diagram of a corresponding situation of an application in a smart card provided in an embodiment of the present application;

[0033] Figure 2 A schematic diagram of another corresponding situation of applications in a smart card provided in an embodiment of the present application;

[0034] Figure 3A flowchart of a data management method provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of the interaction process between a managed application and a security management application provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0037] Embodiment 1:

[0038] In order to solve the problem in the prior art that key user data may be lost or need to be restored after the application or system is upgraded in the smart card, a smart card is provided in the embodiment of the present application. Figure 1 or Figure 2 As shown, the smart card in the embodiment of the present application has a target program and a security management application corresponding to the target program installed in it. Among them:

[0039] The target program is used to send the user key data to the security management application corresponding to the target program when the user key data is obtained;

[0040] Security management application used to store key user data.

[0041] It should be noted that in the embodiment of the present application, the target program may be an application or system in the smart card.

[0042] It should also be noted that in the embodiments of the present application, the user key data obtained by the target program may be data generated by the target program itself during the operation of the target program, or may be data input externally by the user, which is not limited in the embodiments of the present application.

[0043] It should also be noted that in the embodiments of the present application, only one security management application may be installed, for example Figure 1 As shown, a security management application is used to manage the user key data of all applications or systems in the smart card except the security management application.

[0044] In addition, in the embodiment of the present application, multiple security management applications may also be installed, such as Figure 2 As shown, each security management application can manage user key data of one or more different applications or systems in the smart card except the security management application.

[0045] It should be noted that the smart card described in the embodiments of the present application may refer to a general term for a card that has a microelectronic chip with data processing capabilities and a certain data storage capacity embedded therein, which may be a SIM card, an eSIM card, a financial card, etc.

[0046] It should be noted that, based on the above smart card, the present application embodiment also provides a data management method applied to the above smart card. Figure 3 As shown, Figure 3 The following is a flow chart of a data management method provided in an embodiment of the present application, including:

[0047] S301: When the target program obtains the user key data, it sends the user key data to the corresponding security management application.

[0048] It should be noted that user key data can be generated during the operation of the target program (for example, for amount data, new amount data can be generated as the application is running and the transaction is settled), or it can be data generated when the target program is personalized (such as the key of the target program). In the embodiment of the present application, when the target program obtains the user key data, it can send the user key data to the corresponding security management application.

[0049] It should be explained that personalization refers to converting a smart card from a factory state to a usable state. At this time, the smart card will be initialized with various applications and systems to generate various basic data that can meet the use of the smart card.

[0050] It should also be noted that in the embodiment of the present application, since the target program and the security management application are both installed programs in the smart card, they physically reuse the storage resources and computing resources in the smart card. Therefore, in order to send the user's key data to the corresponding security management application, the target program and the security management application can directly interact with each other by configuring objects and interfaces at the software level.

[0051] Exemplarily, the target program may request a data management object mData from the security management application, and the target program may call the data writing interface of the security management application through the mData to write the user key data in the security management application, thereby sending the user key data to the corresponding security management application.

[0052] It should be understood that the above is only an example that can be used in the embodiment of the present application. In the actual application process, the user key data can also be sent to the corresponding security management application through conventional message middleware, or by the security management application reading from the target program, etc., which is not limited in the embodiment of the present application.

[0053] S302: The key data of the user is saved in the security management application.

[0054] In an embodiment of the present application, after the security management application obtains the user's key data, the user's key data can be saved in a storage area of ​​the security management application itself, thereby achieving separation from the target program.

[0055] It is worth noting that if the target program writes user key data in the security management application by calling the data writing interface of the security management application, the data writing interface is directly connected to the storage area of ​​the security management application itself, so that after writing the user key data, the user key data can be saved in the security management application.

[0056] It should be understood that in the embodiment of the present application, although the user key data is stored in the security management application, the target program can obtain its own user key data from the security management application to ensure its normal operation.

[0057] In order to ensure that each target program does not mistakenly obtain the user key data of other target programs when obtaining its own user key data, in the embodiment of the present application, the security management application can obtain the unique identifier of the target program and associate and save the user key data and the unique identifier.

[0058] In the embodiment of the present application, the unique identifier of the target program can be passed to the security management application by the target program when requesting a data management object mData from the security management application, and written into the security management application. The data writing interface of the security management application can also be called through mData to write the unique identifier into the security management application when writing the user's key data for the first time.

[0059] Exemplarily, the target program may initially request a data management object mData from the security management application, and pass the unique identifier to the security management application when requesting mData. Thereafter, when writing user-critical data, the target program may call the data writing interface of the security management application through mData, thereby finding its own corresponding unique identifier in the security management application, and then write the user-critical data under the unique identifier, thereby realizing the association of the user-critical data with its own unique identifier and saving it in the security management application. If the unique identifier of the target program is not found in the security management application, the unique identifier of the target program may be created in the security management application, and the user-critical data may be written under the unique identifier.

[0060] In addition, in the embodiment of the present application, the unique identifier of the target program can also be given to the security management application through conventional message middleware, or by the security management application reading from the target program, etc. At this time, the security management application associates the user key data with the unique identifier and saves it.

[0061] It should be understood that in the embodiment of the present application, the unique identifier of the target program can be the AID (application identifier) ​​of the target program. However, in order to further improve data security, in the embodiment of the present application, the unique identifier of the target program can also include the application identifier of the target program and the custom parameters of the target program. It should be noted that the custom parameters can be fixed parameter data existing in the target program, and the specific parameter type is not limited in the embodiment of the present application.

[0062] In the embodiment of the present application, tasks that require user key data (hereinafter referred to as preset tasks) can be preset. When the target program is running, when it is necessary to execute the preset task, or before it is necessary to execute the preset task, the user key data required for the preset task can be obtained from the security management application, so that the preset task is executed according to the user key data to meet the task execution requirements.

[0063] In an embodiment of the present application, the target program can read the required user key data from the security management application through the data reading interface by calling the data reading interface of the security management application.

[0064] Exemplarily, the target program may call the data reading interface of the security management application through mData, search for the user key data under the unique identifier corresponding to itself in the security management application, and read it out.

[0065] In addition, in an embodiment of the present application, the target program may also send a data request to the security management application, and the security management application may return the user key data associated with the unique identifier to the target program based on the unique identifier in the data request.

[0066] Exemplarily, the target program may send a data request to the security management application through a message middleware or the like. When the security management application obtains the data request of the target program, it identifies whether the unique identifier in the data request is a unique identifier that already exists in the security management application. If so, the user key data associated with the unique identifier is sent to the target program. If not, an error prompt message may be returned at this time.

[0067] It is also worth noting that in actual application, user key data may have many types, such as keys, accounts, amounts, etc. In actual application, when the target program performs a task, it may only need to participate in some user key data.

[0068] To this end, in the embodiment of the present application, when the target program obtains the user key data, it can also obtain the type identification of the user key data, and then send the type identification to the security management application to associate and save the user key data, type identification and unique identification in the security management application.

[0069] It should be noted that, in the embodiment of the present application, the type identifier is an identifier used to identify the type of user key data.

[0070] In the embodiment of the present application, the type identifier may be in the form of a data name, a random number, etc., as long as it can uniquely identify a class of user key data.

[0071] It should also be noted that the type identification of the user key data can be generated and maintained by the target program itself, or can be pre-set by an engineer or the like.

[0072] It should be understood that, similar to the method of sending the unique identifier, the type identifier can also be sent to the security management application by directly writing through methods such as the target program calling the data writing interface of the security management application, or sending it through the message middleware, etc., and there is no limitation in the embodiments of the present application.

[0073] It should also be understood that when the user key data, type identifier and unique identifier are associated and saved in the security management application, the target program can obtain part of the user key data according to the category identifier when obtaining the user key data.

[0074] Exemplarily, the target program can call the data reading interface of the security management application through mData, search for the user key data under its corresponding unique identifier from the security management application, and then read the user key data corresponding to the required type identifier from the user key data under the unique identifier based on the type of user key data required for the preset task.

[0075] As another example, the target program may send a data request to the security management application through a message middleware or the like. The data request may include a type identifier and a unique identifier of the target program. When the security management application obtains the data request of the target program, it identifies whether the unique identifier in the data request is a unique identifier that already exists in the security management application. If so, the user key data corresponding to the type identifier is extracted from the user key data associated with the unique identifier and sent to the target program. If not, an error prompt message may be returned at this time.

[0076] It should be noted that in the embodiment of the present application, in order to prevent the type identification from being lost after the target program is upgraded, the type identification can be saved in the target program in the form of constant data. In this way, since in the actual application development process, the application program keeps the constant data unchanged or increases sequentially when the version is upgraded, the effect of retaining the type identification after the upgrade can be achieved.

[0077] It should also be noted that in the embodiment of the present application, the unique identifier of the target program can also be saved in the target program in the form of constant data. In this way, when the unique identifier of the target program after the upgrade changes from that of the target program before the upgrade in some special cases, all the user key data of the target program can be downloaded to the target program through the original unique identifier saved in the form of constant data, and then the user key data can be associated with the latest unique identifier in the security management application again. Alternatively, the original unique identifier and the latest unique identifier can be sent to the security management application to replace the original unique identifier with the latest unique identifier in the security management application.

[0078] In addition, in the embodiment of the present application, the security management application can also provide data destruction services, thereby saving valuable storage resources in the smart card.

[0079] Exemplarily, when the security management application obtains a data destruction request for a target program, it can identify whether the unique identifier in the data destruction request is a unique identifier that already exists in the security management application; if so, the user's key data associated with the unique identifier can be destroyed.

[0080] For example, when a user uninstalls an application, the user may be prompted whether to delete the user data in the application. If the user chooses to delete the user data, a data destruction request for the uninstalled application may be generated to destroy the data.

[0081] In an embodiment of the present application, when a security management application obtains a data destruction request for a target program, it can specifically mark the user key data associated with the unique identifier, thereby calling the destruction program at a set time to delete all specifically marked user key data.

[0082] In addition, when the security management application obtains a data destruction request for a target program, it can directly call the destruction program to delete the user's key data.

[0083] The smart card and data management method provided by the embodiment of the present application, by pre-installing a security management application in the smart card, receive and save the user key data of the target program in the smart card through the security management application. In this way, when the target program is upgraded, the original version of the target program is deleted. After the new version of the target program is installed, since the user key data is located in the security management application, it will not be lost, and can still be called normally by the upgraded target program, thereby effectively avoiding the problem that the user key data in the smart card will be lost or need to be restored after the target program is upgraded. In addition, since the target program and the security management application are both located in the smart card, the data interaction is completed in the smart card, and there will be no data transmission security issues. In addition, since the target program and the security management application are both located in the smart card, and since there are firewall restrictions between the applications in the smart card, the data in the security management application cannot be accessed by other applications at will, the data security is high, and the data can be unencrypted when the data is interacted.

[0084] Embodiment 2:

[0085] This embodiment is based on the first embodiment. Figure 1 The smart card shown is taken as an example to further illustrate this application.

[0086] See also Figure 4 As shown:

[0087] Step 1: The managed application applies for the data management object mData from the security management application through the shared interface.

[0088] Step 2: The security management application returns the data management object mData according to the AID and custom parameters of the managed application in the application.

[0089] It should be understood that the data management object mData is an object that the managed application applies to the security management application through a shared interface. Its data context is the security management application. All data applied for through this object belongs to the security management application, and the managed application can only access this data through the object calling interface.

[0090] Furthermore, since the data management object mData of each managed application is generated according to the AID and custom parameters of the managed application, each managed application corresponds to a different data management object mData.

[0091] Step 3: The managed application creates a data object through the mData calling interface and initializes the type identifier sID of the data object.

[0092] Step 4: The managed application returns the initialization result.

[0093] It should be noted that the callable interfaces include interfaces for creating, writing, reading, querying and destroying data.

[0094] In the embodiment of the present application, the type identifier sID of the data object can be input in each interface. The type identifier sID is allocated and managed by the managed application, saved in the form of a constant data table, and configured to be unchangeable.

[0095] Step 5: The managed application calls the data writing interface through mData to write the user's key data.

[0096] Step 6: The security management application returns the writing result.

[0097] In step 5, the managed application can first call the boolean check (short sID) interface through mData to query whether the data object corresponding to the sID of the key user data to be written has been created. If it has been created, enter process 12. If not, enter process 11 and then enter process 12. Among them, boolean check represents the data query interface, and boolean check (short sID) represents the query whether there is a data object corresponding to the sID in the brackets.

[0098] Process 11: The managed application calls the boolean buildElement (short sID, ...) interface through mData to create a data object corresponding to the sID. Here, boolean buildElement represents a data creation interface, and booleanbuildElement (short sID, ...) represents the creation of a data object corresponding to the sID in the brackets.

[0099] Process 12, the managed application calls the boolean writeElement(short sID, ...) interface through mData to write the user key data into the data object corresponding to the sID. Among them, boolean buildElement represents the data writing interface, and boolean buildElement(short sID, ...) represents writing data from the data writing interface corresponding to the sID in the brackets.

[0100] It should be noted that when the managed application needs to read data content, the process is similar to writing user key data:

[0101] The managed application can first call the boolean check(short sID) interface through mData to query whether the data object corresponding to the sID of the user key data to be read has been created.

[0102] If it has been created, the managed application calls the boolean readElement(short sID, ...) interface through mData to read the user key data in the data object corresponding to sID into the baBuffer object managed by the managed application. Among them, boolean readElement represents the data reading interface, and boolean readElement(short sID, ...) represents reading data from the data reading interface corresponding to the sID in the brackets.

[0103] If not created, read failure is returned.

[0104] It is also important to note that when the managed application needs to destroy data content, the process is similar to reading user key data:

[0105] First, you can call the boolean check(short sID) interface through mData to check whether the data object corresponding to the sID of the user key data to be destroyed has been created.

[0106] If it has been created, the user key data in the data object corresponding to sID is destroyed by calling the boolean delete(short sID) interface through mData. Among them, boolean delete represents the data destruction interface, and boolean delete(short sID) represents the destruction of data through the data destruction interface corresponding to the sID in the brackets.

[0107] If not created, returns destroyed if the object does not exist.

[0108] The above scheme, by establishing a security management application to provide data services such as data creation, query, write, read and destroy for other applications, makes it possible for the user key data of other applications to have no contextual relationship with the application. When the application needs to be upgraded, after deleting the old application, re-download and install the new application. If the application AID and type identification remain unchanged, the newly installed application can still access the user key data in the security management application, so that the user key data (such as keys, account data, etc.) of the application itself that cannot be leaked will not be lost due to the deletion of the application, which is convenient for the upgrade management of the application.

[0109] Embodiment three:

[0110] This embodiment provides a computer-readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash disk, an SD (Secure Digital Memory Card) card, an MMC (Multimedia Card) card, etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the data management method in the above embodiment 1 and / or embodiment 2. No further details will be given here.

[0111] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0112] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0113] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0114] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0115] As used herein, a plurality refers to two or more than two.

[0116] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data management method, characterized in that: Applied to a smart card, the smart card is installed with a security management application, and the user key data of all target programs in the smart card except the security management application are managed by the security management application; Or the smart card is installed with multiple security management applications, each of which corresponds to managing user key data of multiple different target programs in the smart card except the security management application; The user key data is generated during the operation of the target program or when the target program is personalized; The method comprises: The target program applies for the data management object mData from the security management application through the shared interface; The security management application returns the data management object mData according to the AID and custom parameters of the target program in the application, wherein the unique identifier of the target program includes the application identifier AID of the target program and the custom parameters of the target program; The data management object mData is generated according to the AID and custom parameters of the target program, and the data context of the data management object mData is the security management application. All data requested through the data management object mData belongs to the security management application. The target program calls the creation interface through the data management object mData to create a data object; The target program calls the query interface through the data management object mData to query whether the data object corresponding to the type identifier sID of the user key data to be written, read or deleted has been created; If it has been created, the target program calls the write interface, read interface and destroy interface through the data management object mData to write, read or destroy the user key data in the data object corresponding to the type identifier sID; And the user key data, type identifier and unique identifier are associated and saved; The type identifier is used to identify the type of user key data, and is generated and maintained by the target program itself or preset.

2. The data management method according to claim 1, characterized in that: The method further comprises: When obtaining a data request of the target program, identifying whether the unique identifier in the data request is a unique identifier that already exists in the security management application; If so, the user key data associated with the unique identifier is sent to the target program.

3. The data management method according to claim 1, characterized in that: The method further comprises: When a data destruction request for the target program is obtained, identifying whether the unique identifier in the data destruction request is a unique identifier that already exists in the security management application; If so, destroy the user key data associated with the unique identifier.

4. The data management method according to claim 1, characterized in that: The method further comprises: When executing a preset task, calling the data reading interface of the security management application, and reading the required user key data from the security management application through the data reading interface; the preset task is a task that requires the user key data; The preset task is executed according to the user key data.

5. A smart card, characterized in that: A plurality of target programs and a security management application are installed, and user key data of all target programs except the security management application in the smart card are correspondingly managed by the security management application; Or multiple security management applications are installed, each of which corresponds to managing user key data of multiple different target programs in the smart card except the security management application; The user key data is generated during the operation of the target program or when the target program is personalized; The target program applies for the data management object mData from the security management application through the shared interface; The security management application returns the data management object mData according to the AID and custom parameters of the target program in the application, wherein the unique identifier of the target program includes the application identifier AID of the target program and the custom parameters of the target program; The data management object mData is generated according to the AID and custom parameters of the target program, and the data context of the data management object mData is the security management application. All data requested through the data management object mData belongs to the security management application. The target program calls the creation interface through the data management object mData to create a data object; The target program calls the query interface through the data management object mData to query whether the data object corresponding to the type identifier sID of the user key data to be written, read or deleted has been created; If it has been created, the target program calls the write interface, read interface and destroy interface through the data management object mData to write, read or destroy the user key data in the data object corresponding to the type identifier sID; And the user key data, type identifier and unique identifier are associated and saved; The type identifier is used to identify the type of user key data, and is generated and maintained by the target program itself or preset.

6. The smart card according to claim 5, wherein: The target program stores a type identifier in the form of constant data; the type identifier is used to identify the type of the user key data.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the data management method according to any one of claims 1 to 4.