Application upgrading method and device in embedded smart card, equipment and storage medium

By writing the data to be retained into the array space and migrating it to the platform, the problem of large code volume and data management overhead during the upgrade process of embedded smart card applications is solved, and faster upgrade speed and higher efficiency are achieved.

CN119902785APending Publication Date: 2025-04-29BEIJING TONGFANG MICROELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411994907.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

During the upgrade process of embedded smart card application, the overhead of code volume and data management is large, and the number of hardware erases is large, resulting in slower upgrade speed and low efficiency.

Method used

Write the data to be retained by the target application into the array space and migrate it out to the platform. The new version of the application migrates from the platform into the array space and reads the data to complete the upgrade.

Benefits of technology

It reduces the amount of code and data management overhead during application upgrade process, and improves the speed and efficiency of upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902785A_ABST
    Figure CN119902785A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an application upgrading method and device in an embedded smart card, equipment and a storage medium. The method comprises the steps of writing to-be-reserved data of a target application into an array space and migrating the to-be-reserved data to a platform, wherein the target application is a to-be-upgraded application in the embedded smart card; and migrating the target application of the new version into the array space from the platform, and reading data in the array space into the target application of the new version to complete upgrading. On this basis, when the application is upgraded, the to-be-reserved data is written into the array space, the array space is migrated out of the platform, and after the new version application is installed, the array space is migrated in from the platform, and the to-be-reserved data is read back, so that complex operation on the to-be-reserved data in the prior art is omitted, and the efficiency of upgrading the to-be-reserved data is improved. The code quantity and the data management overhead in the application upgrading process are reduced, and the upgrading speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of embedded technology, and in particular to a method, device, equipment and storage medium for upgrading an application in an embedded smart card. Background Art

[0002] With the development of embedded technology, embedded smart cards are used in many fields. As core processing units, they perform various computing and control tasks. For example, embedded smart cards are used in industrial control, automation equipment, smart homes, security monitoring and other fields.

[0003] When the application in the embedded smart card is upgraded, it is usually upgraded according to the traditional smart card application management specification (GP Appendix H). Under this specification, there are more instruction interactions, the code volume and data management overhead are large, and the hardware erase and write times are also large, resulting in a slow upgrade speed and low upgrade efficiency. Summary of the invention

[0004] The embodiments of the present application provide an application upgrade method, device, equipment and storage medium in an embedded smart card to reduce the amount of code and data management overhead during the application upgrade process and increase the upgrade speed.

[0005] In a first aspect, an embodiment of the present application provides a method for upgrading an application in an embedded smart card, the method comprising:

[0006] Writing the data to be retained of the target application into the array space and migrating it to the platform, wherein the target application is the application to be upgraded in the embedded smart card;

[0007] The new version of the target application is migrated from the platform into the array space, and the data in the array space is read into the new version of the target application to complete the upgrade.

[0008] In a second aspect, an embodiment of the present application provides an application upgrade device in an embedded smart card, the device comprising:

[0009] A migration module, used for writing the to-be-retained data of the target application into the array space and migrating it out to the platform, wherein the target application is the application to be upgraded in the embedded smart card;

[0010] The migration module is used to migrate the target application of the new version from the platform into the array space, and read the data in the array space into the target application of the new version to complete the upgrade.

[0011] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0012] one or more processors;

[0013] a storage device for storing one or more programs,

[0014] When one or more programs are executed by one or more processors, the one or more processors implement the application upgrade method in the embedded smart card provided in any embodiment of the present application.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, an application upgrade method in an embedded smart card as provided in any embodiment of the present application is implemented.

[0016] The technical solution of the embodiment of the present application is to write the data to be retained of the target application into the array space and migrate it out to the platform. The target application is the application to be upgraded in the embedded smart card; the new version of the target application is migrated from the platform into the array space, and the data in the array space is read into the new version of the target application to complete the upgrade. Based on this, when the application is upgraded, the data to be retained is written into the array space and the array space is migrated out to the platform. After the new version of the application is installed, the array space is migrated from the platform and the data to be retained is read back, which eliminates the complex operations on the data to be retained in the prior art, reduces the amount of code and data management overhead during the application upgrade process, and improves the upgrade speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a flow chart of an application upgrade method in an embedded smart card provided in Embodiment 1 of the present application;

[0018] Figure 2 A schematic diagram of a flow chart of an application upgrade method in an embedded smart card provided in Embodiment 2 of the present application;

[0019] Figure 3 A schematic diagram of a process of creating an array space provided in Embodiment 2 of the present application;

[0020] Figure 4 A schematic diagram of a process for migrating data to be retained to a platform provided in Embodiment 2 of the present application;

[0021] Figure 5 A schematic diagram of a process of deleting a data space provided in Embodiment 2 of the present application;

[0022] Figure 6 A schematic diagram of the structure of an application upgrade device in an embedded smart card provided in Embodiment 3 of the present application;

[0023] Figure 7 A schematic diagram of the structure of an electronic device provided in Example 4 of the present application. DETAILED DESCRIPTION

[0024] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0025] Embodiment 1

[0026] Figure 1 A flow chart of an application upgrade method in an embedded smart card provided in Embodiment 1 of the present application is shown in FIG. Figure 1 As shown, the application upgrade method in the embedded smart card provided in this embodiment can be applied to the application upgrade platform in the embedded smart card mounted on a device with data processing capability such as a computer, and can be used in conjunction with some application software to achieve a better experience. Specifically, the method may include the following steps:

[0027] Step 101: write the data to be retained of the target application into the array space and migrate it to the platform, wherein the target application is the application to be upgraded in the embedded smart card.

[0028] In this step, when upgrading the target application, the target application itself first determines the data that needs to be retained, such as user data and other specific personalized data. Then, the data to be retained is first written into the array space, and then the array space is migrated out to the platform to prevent the data to be retained from being deleted synchronously when the old target application is deleted.

[0029] Specifically, the target application sends a space application request to the platform by calling a preset data space creation interface; the platform creates an array space corresponding to the target application according to the space application request; the target application writes the data to be retained into the array space, and migrates the array space out to the platform by calling a preset data space migration interface.

[0030] It should be noted that the platform refers to an embedded smart card platform, and in a specific example, it may be a JAVA platform, and the target application is installed in the platform. Usually, for some operations on data, the platform's authority is higher than the application's authority.

[0031] Since the platform usually has a firewall mechanism, this application can provide a way for applications to apply for and manage array space based on the firewall mechanism.

[0032] Specifically, the management of the array space corresponding to the application can be achieved by, but not limited to, setting a data space creation interface, a data space migration interface, a data space deletion interface, etc. In this step, a space application request is sent to the platform by calling the data space creation interface.

[0033] After receiving the space application request, the platform can create an array space corresponding to the target application. Specifically, the platform searches the data space management table for the target application to see if it has applied for space based on the target application's identification code; if not, it creates an array space corresponding to the target application and fills in the space record corresponding to the target application in the data space management table; if yes, it returns the space record corresponding to the target application in the data space management table.

[0034] It should be noted that, in order to save space in the platform, each application can only apply for one array space. Therefore, after receiving a space application request, the platform first searches the data space management table to see if the target application has previously applied for space.

[0035] Specifically, the space application request may include the identification code of the target application. In a specific example, the identification code may be the AID of the application. In the data space management table, the relevant information of all created array spaces is stored, such as the identification code of the corresponding application, the reference of the array space, the current number of array spaces, etc.

[0036] In a specific example, the data space management table can be referred to as the following Table 1.

[0037] Table 1

[0038] content Length (bytes) The number of array spaces n 1 Reference to the first array space 2 AID of the applicant for the first array space (L+V) 17 …… …… Reference to the nth array space 2 AID of the applicant for the nth array space (L+V) 17

[0039] The reference is used to find the specific address of the data space, which can be saved in the JAVA configuration area. The size of the data space management table is scalable, and when the current table cannot record the relevant information of the newly added array space, it can be expanded. For example, a table of a default size can be added, and then the newly added table can be merged with the current data space management table to achieve expansion.

[0040] Based on the AID recorded in the table, it can be determined whether the target application has created an array space before. If it has, the sort number of the array space corresponding to the AID can be found in the data space management table. For example, if it is the first one, the reference of the first array space is fed back to the target application, and the target application manages the data in the array space based on the reference.

[0041] If it has not been created, an array space is created in the platform. It should be noted that the space request may include the size of the required space, such as the number of bytes. The target application can determine the required space based on the amount of data to be retained and fill the required space size into the space request. When the platform creates an array space, it can create an array space corresponding to the required space size.

[0042] After the array space is created, relevant information about the created array space will be obtained, such as reference information that identifies its location. The AID of the target application and the reference information can be filled into the data space management table, and the array space can be numbered, such as the nth array space. At this time, the number of array spaces in the data space management table can be modified synchronously.

[0043] It should be noted that the context field of the newly created array space defaults to the second field content, and the second field reference is used to indicate that the array space belongs to the target application, so that the target application can manage the array space through the firewall.

[0044] Therefore, before migrating the array space to the platform, the target application directly performs a write operation on the array space to write the data to be retained into the array space; the target application calls a preset data space migration interface to enable the platform to modify the context field corresponding to the array space to the first field content; the first field content is used to indicate that the array space belongs to the platform.

[0045] It should be noted that since the context field of the newly created array space defaults to the second field content, the target application can directly manage the array space through the firewall mechanism. Therefore, the write operation can be performed directly to write the data to be retained into the array space.

[0046] When the array space is migrated out to the platform, it is sufficient to modify the content in its context field to the content of the first field. Therefore, the platform receives the call information of the target application through the data space migration interface, and the call information includes the AID of the target application and the relevant identifier for indicating the migration of data into the array. Specifically, the sort number of the array space corresponding to the target application AID can be found from the data space management table. For example, if it is the first one, the position of the corresponding array space can be found according to the reference of the first array space, so that the context field corresponding to the array space can be modified to the content of the first field.

[0047] Modifying the context field to the content of the first field can prevent the target application from being accidentally deleted when deleting the old application of the target application, and can also prevent other applications from breaking through the firewall to access the data in the array space.

[0048] Step 102: The target application of the new version is migrated from the platform into the array space, and the data in the array space is read into the target application of the new version to complete the upgrade.

[0049] In this step, when migrating into the array space, the new version of the target application sends a data migration request to the platform by calling a preset data space migration interface; the platform determines the array space corresponding to the new version of the target application according to the data migration request, and modifies the context field corresponding to the array space to the second field content, wherein the second field content is used to indicate that the array space belongs to the target application; the new version of the target application directly performs a read operation on the data space, and reads the data in the array space corresponding to the new version of the target application into the new version of the target application to complete the upgrade.

[0050] Specifically, the data migration request may include an identification code of the target application, such as an AID. The platform finds a reference to the corresponding array space from the data space management table based on the AID, thereby finding the corresponding array space, and then modifies the context of the array space to the second field content.

[0051] After being modified to the content of the second field, the target application can access the data in the array space, thereby reading the data into the new version of the application.

[0052] In addition, it should be noted that the present embodiment can also delete the array space. Specifically, the target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface.

[0053] Among them, the target application sends a space deletion request to the platform by calling the preset data space deletion interface; the platform searches the preset data space management table to see whether the target application has applied for space based on the space deletion request; if so, the corresponding array space is determined based on the space record corresponding to the target application in the data space management table; the space record corresponding to the target application in the data space management table is cleared, and the preset garbage collection instruction is started to delete the array space.

[0054] It should be noted that the space deletion request may include an identification code of the target application, such as an AID. Based on the AID, the relevant space record, that is, the reference to the array space, is obtained from the data space management table, and the corresponding array space is found based on the reference. This process can be referred to the previous description and will not be repeated here.

[0055] In addition, the execution process of the preset garbage collection instruction is a process of deleting the array space that is not marked as a useful object. Therefore, each time the preset garbage collection instruction is enabled, the array space will be marked according to the data space management table, and only the array space existing in the data space management table will be marked as a useful object.

[0056] Therefore, the space record corresponding to the target application in the data space management table may be cleared first, and then the preset garbage collection instruction may be started.

[0057] In this embodiment, the data to be retained of the target application is written into the array space and migrated out to the platform. The target application is the application to be upgraded in the embedded smart card. The new version of the target application is migrated into the array space from the platform, and the data in the array space is read into the new version of the target application to complete the upgrade. Based on this, when the application is upgraded, the data to be retained is written into the array space and the array space is migrated out to the platform. After the new version of the application is installed, the array space is migrated in from the platform and the data to be retained is read back, which eliminates the complex operations on the data to be retained in the prior art, reduces the amount of code and data management overhead in the application upgrade process, and improves the upgrade speed.

[0058] Embodiment 2

[0059] See also Figure 2 , Figure 2 A flowchart of an application upgrade method in an embedded smart card provided in Embodiment 2 of the present application.

[0060] like Figure 2 As shown, the application upgrade method in the embedded smart card in this embodiment may include:

[0061] Step 201: The target application sends a space application request to the platform by calling a preset data space creation interface.

[0062] Step 202: The platform creates an array space corresponding to the target application according to the application space request.

[0063] The detailed process of this step can be found in Figure 3 , Figure 3 A schematic diagram of a process for creating an array space is provided in the second embodiment of the present application. Figure 3 As shown, the process of creating an array space may include:

[0064] Step 301: The platform searches the data space management table for whether the target application has applied for space based on the identification code of the target application.

[0065] Step 302: If not, create an array space corresponding to the target application, and fill in the space record corresponding to the target application in the data space management table.

[0066] Step 303: If yes, return the space record corresponding to the target application in the data space management table.

[0067] Step 203: The target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface.

[0068] The detailed process of this step can be found in Figure 4 , Figure 4 A flow chart of migrating the data to be retained to the platform is provided in the second embodiment of the present application. Figure 4 As shown, the process of migrating the data to be retained to the platform may include:

[0069] Step 401: The target application directly performs a write operation on the array space to write the data to be retained into the array space.

[0070] Step 402: The target application calls a preset data space migration interface to enable the platform to modify the context field corresponding to the array space to the first field content, where the first field content is used to indicate that the array space belongs to the platform.

[0071] Step 204: The new version of the target application sends a data migration request to the platform by calling a preset data space migration interface.

[0072] Step 205: The platform determines the array space corresponding to the new version of the target application according to the data migration request, and modifies the context field corresponding to the array space to the second field content, where the second field content is used to indicate that the array space belongs to the target application.

[0073] Step 206: The new version of the target application directly performs a read operation on the data space, and reads the data in the array space corresponding to the new version of the target application into the new version of the target application to complete the upgrade.

[0074] Step 207: The target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface.

[0075] The detailed process of this step can be found in Figure 5 , Figure 5 A schematic diagram of a process of deleting a data space provided in the second embodiment of the present application. Figure 5 As shown, the process of deleting a data space may include:

[0076] Step 501: The target application sends a space deletion request to the platform by calling a preset data space deletion interface.

[0077] Step 502: The platform searches a preset data space management table to see whether the target application has applied for space according to the space deletion request.

[0078] Step 503: If yes, determine the corresponding array space according to the space record corresponding to the target application in the data space management table.

[0079] Step 504: Clear the space record corresponding to the target application in the data space management table, and start a preset garbage collection process to delete the array space.

[0080] For the detailed description of the above steps, please refer to the previous description, which will not be repeated here.

[0081] Embodiment 3

[0082] Figure 6 This is a schematic diagram of the structure of an application upgrade device in an embedded smart card provided in the third embodiment of the present application. The application upgrade device in an embedded smart card provided in the embodiment of the present application can execute the application upgrade method in an embedded smart card provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. The device can be implemented in software and / or hardware, such as Figure 6 As shown, the application upgrade device in the embedded smart card specifically includes: a migration module 601 and a migration-out module 602 .

[0083] The migration module is used to write the data to be retained of the target application into the array space and migrate it to the platform, wherein the target application is the application to be upgraded in the embedded smart card;

[0084] The migration module is used to migrate the target application of the new version from the platform into the array space, and read the data in the array space into the target application of the new version to complete the upgrade.

[0085] Furthermore, the migration module is specifically used to:

[0086] The target application sends a space application request to the platform by calling a preset data space creation interface;

[0087] The platform creates an array space corresponding to the target application according to the application space request;

[0088] The target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface.

[0089] The platform searches the data space management table for whether the target application has applied for space according to the identification code of the target application;

[0090] If not, create an array space corresponding to the target application, and fill in a space record corresponding to the target application in the data space management table;

[0091] If so, return the space record corresponding to the target application in the data space management table.

[0092] Furthermore, the migration module is specifically used to:

[0093] The target application directly performs a write operation on the array space to write the data to be retained into the array space;

[0094] The target application calls a preset data space migration interface so that the platform modifies the context field corresponding to the array space into the first field content;

[0095] The first field content is used to indicate that the array space belongs to the platform.

[0096] Furthermore, the migration module is specifically used for:

[0097] The target application of the new version sends a data migration request to the platform by calling a preset data space migration interface;

[0098] The platform determines the array space corresponding to the target application of the new version according to the data migration request, and modifies the context field corresponding to the array space to the second field content, where the second field content is used to indicate that the array space belongs to the target application;

[0099] The target application of the new version directly performs a read operation on the data space, and reads the data in the array space corresponding to the target application of the new version into the target application of the new version, so as to complete the upgrade.

[0100] Furthermore, the device is specifically used for:

[0101] The target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface.

[0102] Furthermore, the device is specifically used for:

[0103] The target application sends a space deletion request to the platform by calling the preset data space deletion interface;

[0104] Based on the space deletion request, the platform searches the preset data space management table to see whether the target application has applied for space.

[0105] If so, determine the corresponding array space according to the space record corresponding to the target application in the data space management table;

[0106] The space record corresponding to the target application in the data space management table is cleared, and the preset garbage collection instruction is started to delete the array space.

[0107] Embodiment 4

[0108] Figure 7 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present application is shown in FIG. Figure 7 As shown, the electronic device includes a processor 710, a memory 720, an input device 730, and an output device 740; the number of the processor 710 in the electronic device can be one or more. Figure 7 A processor 710 is taken as an example; the processor 710, the memory 720, the input device 730 and the output device 740 in the electronic device can be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0109] The memory 720 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the application upgrade method in the embedded smart card in the embodiment of the present invention. The processor 710 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 720, that is, to implement the above-mentioned application upgrade method in the embedded smart card:

[0110] Writing the data to be retained of the target application into the array space and migrating it to the platform, wherein the target application is the application to be upgraded in the embedded smart card;

[0111] The target application of the new version is migrated from the platform into the array space, and the data in the array space is read into the target application of the new version to complete the upgrade.

[0112] Furthermore, the step of writing the target application's to-be-retained data into the array space and migrating it to the platform includes:

[0113] The target application sends a space application request to the platform by calling a preset data space creation interface;

[0114] The platform creates an array space corresponding to the target application according to the application space request;

[0115] The target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface.

[0116] Further, the platform creates an array space corresponding to the target application according to the application space request, including:

[0117] The platform searches the data space management table for whether the target application has applied for space according to the identification code of the target application;

[0118] If not, create an array space corresponding to the target application, and fill in a space record corresponding to the target application in the data space management table;

[0119] If so, return the space record corresponding to the target application in the data space management table.

[0120] Furthermore, the target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface, including:

[0121] The target application directly performs a write operation on the array space to write the data to be retained into the array space;

[0122] The target application calls a preset data space migration interface so that the platform modifies the context field corresponding to the array space into the first field content;

[0123] The first field content is used to indicate that the array space belongs to the platform.

[0124] Furthermore, the new version of the target application is migrated from the platform into the array space, including:

[0125] The target application of the new version sends a data migration request to the platform by calling a preset data space migration interface;

[0126] The platform determines the array space corresponding to the target application of the new version according to the data migration request, and modifies the context field corresponding to the array space to the second field content, where the second field content is used to indicate that the array space belongs to the target application;

[0127] The target application of the new version directly performs a read operation on the data space, and reads the data in the array space corresponding to the target application of the new version into the target application of the new version, so as to complete the upgrade.

[0128] Furthermore, the method further comprises:

[0129] The target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface.

[0130] Further, the target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface, including:

[0131] The target application sends a space deletion request to the platform by calling a preset data space deletion interface;

[0132] The platform searches a preset data space management table for whether the target application has applied for space according to the space deletion request;

[0133] If so, determining the corresponding array space according to the space record corresponding to the target application in the data space management table;

[0134] The space record corresponding to the target application in the data space management table is cleared, and a preset garbage collection process is started to delete the array space.

[0135] The memory 720 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 720 may further include a memory remotely arranged relative to the processor 710, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0136] Embodiment 5

[0137] Embodiment 5 of the present application further provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute a method for upgrading an application in an embedded smart card. The method includes:

[0138] Writing the data to be retained of the target application into the array space and migrating it to the platform, wherein the target application is the application to be upgraded in the embedded smart card;

[0139] The target application of the new version is migrated from the platform into the array space, and the data in the array space is read into the target application of the new version to complete the upgrade.

[0140] Furthermore, the step of writing the target application's to-be-retained data into the array space and migrating it to the platform includes:

[0141] The target application sends a space application request to the platform by calling a preset data space creation interface;

[0142] The platform creates an array space corresponding to the target application according to the application space request;

[0143] The target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface.

[0144] Further, the platform creates an array space corresponding to the target application according to the application space request, including:

[0145] The platform searches the data space management table for whether the target application has applied for space according to the identification code of the target application;

[0146] If not, create an array space corresponding to the target application, and fill in a space record corresponding to the target application in the data space management table;

[0147] If so, return the space record corresponding to the target application in the data space management table.

[0148] Furthermore, the target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface, including:

[0149] The target application directly performs a write operation on the array space to write the data to be retained into the array space;

[0150] The target application calls a preset data space migration interface so that the platform modifies the context field corresponding to the array space into the first field content;

[0151] The first field content is used to indicate that the array space belongs to the platform.

[0152] Furthermore, the new version of the target application is migrated from the platform into the array space, including:

[0153] The target application of the new version sends a data migration request to the platform by calling a preset data space migration interface;

[0154] The platform determines the array space corresponding to the target application of the new version according to the data migration request, and modifies the context field corresponding to the array space to the second field content, where the second field content is used to indicate that the array space belongs to the target application;

[0155] The target application of the new version directly performs a read operation on the data space, and reads the data in the array space corresponding to the target application of the new version into the target application of the new version, so as to complete the upgrade.

[0156] Furthermore, the method further comprises:

[0157] The target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface.

[0158] Further, the target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface, including:

[0159] The target application sends a space deletion request to the platform by calling a preset data space deletion interface;

[0160] The platform searches a preset data space management table for whether the target application has applied for space according to the space deletion request;

[0161] If so, determining the corresponding array space according to the space record corresponding to the target application in the data space management table;

[0162] The space record corresponding to the target application in the data space management table is cleared, and a preset garbage collection process is started to delete the array space.

[0163] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present application are not limited to the above method operations, and can also execute related operations in the application upgrade method in the embedded smart card provided in any embodiment of the present application.

[0164] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0165] It is worth noting that in the embodiment of the above-mentioned search device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0166] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for upgrading an application in an embedded smart card, characterized in that: The method comprises: Writing the data to be retained of the target application into the array space and migrating it to the platform, wherein the target application is the application to be upgraded in the embedded smart card; The target application of the new version is migrated from the platform into the array space, and the data in the array space is read into the target application of the new version to complete the upgrade.

2. The method according to claim 1, characterized in that: The step of writing the target application's to-be-retained data into the array space and migrating the data out to the platform includes: The target application sends a space application request to the platform by calling a preset data space creation interface; The platform creates an array space corresponding to the target application according to the application space request; The target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface.

3. The method according to claim 2, characterized in that The platform creates an array space corresponding to the target application according to the application space request, including: The platform searches the data space management table for whether the target application has applied for space according to the identification code of the target application; If not, create an array space corresponding to the target application, and fill in a space record corresponding to the target application in the data space management table; If so, return the space record corresponding to the target application in the data space management table.

4. The method according to claim 2, characterized in that: The target application writes the data to be retained into the array space, and migrates the array space to the platform by calling a preset data space migration interface, including: The target application directly performs a write operation on the array space to write the data to be retained into the array space; The target application calls a preset data space migration interface so that the platform modifies the context field corresponding to the array space into the first field content; The first field content is used to indicate that the array space belongs to the platform.

5. The method according to claim 1, characterized in that The target application of the new version is migrated from the platform into the array space, and the data in the array space is read into the target application of the new version to complete the upgrade, including: The target application of the new version sends a data migration request to the platform by calling a preset data space migration interface; The platform determines the array space corresponding to the target application of the new version according to the data migration request, and modifies the context field corresponding to the array space to the second field content, where the second field content is used to indicate that the array space belongs to the target application; The target application of the new version directly performs a read operation on the data space, and reads the data in the array space corresponding to the target application of the new version into the target application of the new version, so as to complete the upgrade.

6. The method according to claim 1, characterized in that The method further comprises: The target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface.

7. The method according to claim 6, characterized in that The target application deletes the corresponding array space of the target application in the data space by calling a preset data space deletion interface, including: The target application sends a space deletion request to the platform by calling a preset data space deletion interface; The platform searches a preset data space management table for whether the target application has applied for space according to the space deletion request; If so, determining the corresponding array space according to the space record corresponding to the target application in the data space management table; The space record corresponding to the target application in the data space management table is cleared, and a preset garbage collection process is started to delete the array space.

8. An application upgrade device in an embedded smart card, characterized in that: The device comprises: A migration module, used for writing the data to be retained of the target application into the array space and migrating it out to the platform, wherein the target application is the application to be upgraded in the embedded smart card; The migration module is used to migrate the target application of the new version from the platform into the array space, and read the data in the array space into the target application of the new version to complete the upgrade.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the application upgrade method in the embedded smart card as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the application upgrade method in the embedded smart card as described in any one of claims 1 to 7 is implemented.