SE and eSIM storage space management method and device, equipment and storage medium

By dividing SE private space, eSIM private space and public space on the security chip, and using firewalls to isolate it, the problem of inflexible storage space management after SE and eSIM is solved, and flexible space allocation and high compatibility are achieved.

CN119759292AActive Publication Date: 2025-04-04BEIJING TSINGTENG MICROSYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411973073.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the case where SE and eSIM are integrated into the same security chip, the storage space management is inflexible and cannot be compatible with the usage needs of different products and users, resulting in waste or insufficient storage space.

Method used

By responding to user space allocation instructions, the user space is divided into SE private space, eSIM private space and public space, and the firewall is used to isolate these spaces from each other, ensuring that SE and eSIM each use their private space first, and use public space to expand the storage space when private space is insufficient.

Benefits of technology

It realizes flexible space allocation of SE and eSIM, meets the usage needs of different products and users, and improves the compatibility of security chips in different usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759292A_ABST
    Figure CN119759292A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to an SE and eSIM storage space management method and device, equipment and a storage medium, and the method comprises the steps that in response to a user space distribution instruction, a user space is divided into an SE private space, an eSIM private space and a public space, the SE private space is used for storing SE user data, the eSIM private space is used for storing eSIM user data, and the public space is used for storing eSIM user data; the public space is used for storing SE user data under the condition that the SE private space is full of data and storing eSIM user data under the condition that the eSIM private space is full of data; the space for storing the SE user data in the user space is correspondingly provided with a firewall and / or the space for storing the eSIM user data is correspondingly provided with a firewall, so that the space for storing the SE user data and the space for storing the eSIM user data are mutually isolated. According to the embodiment of the invention, flexible space distribution can meet the use requirements of different products and users on the SE and the eSIM, and the compatibility of the security chip in different use scenes is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of security chip technology, and in particular to a storage space management method, device, equipment and storage medium for SE and eSIM. Background Art

[0002] At present, in order to meet the strong demand for higher integration, smaller size, lower cost, lower energy consumption, etc., it is a general trend to integrate the secure element (SE) and the embedded user identity module (eSIM) into the same security chip.

[0003] In the case where SE and eSIM are integrated into the same security chip, the current solution for storage space management is to allocate SE storage space and eSIM storage space in a fixed manner. However, the storage space requirements of SE and eSIM in different products are inconsistent, resulting in poor compatibility with all products and user requirements. Therefore, a more flexible and more compatible storage space management method is urgently needed. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a storage space management method, apparatus, device and storage medium for SE and eSIM.

[0005] A first aspect of an embodiment of the present disclosure provides a storage space management method of an SE and an eSIM, which is applied to an electronic device, wherein the electronic device is integrated with a security chip of an SE and an eSIM, wherein the security chip integrated with the SE and the eSIM includes a physical space, wherein the physical space includes a mapping area, wherein the mapping area is used to map to a virtual space through a MAP mechanism, wherein the virtual space includes a user space, wherein the method includes:

[0006] In response to a user space allocation instruction, the user space is divided into a SE private space, an eSIM private space and a public space, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, and the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data, and the space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other.

[0007] A second aspect of an embodiment of the present disclosure provides a storage space management device for SE and eSIM, which is applied to an electronic device, wherein the electronic device includes a security chip integrated with SE and eSIM, the security chip integrated with SE and eSIM includes a physical space, the physical space includes a mapping area, the mapping area is used to map to a virtual space through a MAP mechanism, the virtual space includes a user space, wherein the device includes:

[0008] A user space division module is used to divide the user space into a SE private space, an eSIM private space and a public space in response to a user space allocation instruction, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, and the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data, and the space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other.

[0009] A third aspect of an embodiment of the present disclosure provides an electronic device, the server comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method of the first aspect above.

[0010] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above can be implemented.

[0011] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0012] In the embodiment of the present disclosure, in response to the user space allocation instruction, the user space can be divided into SE private space, eSIM private space and public space, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, and the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data. The space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall so that the space for storing SE user data and the space for storing eSIM user data are isolated from each other. It can be seen that by adopting the above technical solution, the user space can be divided into three parts through the firewall, namely, SE private space, eSIM private space and public space, and the SE private space and the eSIM private space cannot access each other. The SE system and the eSIM system both give priority to using their own private space. When the private space is insufficient, the public space can be used to achieve the purpose of expanding the storage space. In this way, the flexible space allocation can meet the use requirements of different products and users for SE and eSIM, and greatly improve the compatibility of the security chip in different usage scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 is a flow chart of a storage space management method of SE and eSIM provided by an embodiment of the present disclosure;

[0016] Figure 2 is a schematic diagram of a physical space and a virtual space provided by an embodiment of the present disclosure;

[0017] Figure 3 is a schematic diagram of an SE available user space and an eSIM available user space provided in an embodiment of the present disclosure;

[0018] Figure 4 It is a schematic diagram of a private space encroaching on a public space provided by an embodiment of the present disclosure;

[0019] Figure 5 is a schematic diagram of an SE mapping table and an eSIM mapping table provided in an embodiment of the present disclosure;

[0020] Figure 6 is a schematic diagram of cyclic switching between an SE task and an eSIM task provided by an embodiment of the present disclosure;

[0021] Figure 7 It is a schematic diagram of switching between an SE mapping table and an eSIM mapping table provided in an embodiment of the present disclosure;

[0022] Figure 8 is a schematic diagram of a context identifier provided by an embodiment of the present disclosure;

[0023] Fig. 9 is a schematic diagram of the structure of HE information provided by an embodiment of the present disclosure;

[0024] Fig.10 is a structural diagram of an example of HE information provided by an embodiment of the present disclosure;

[0025] Fig.11 It is a logical schematic diagram of writing data to be written into a buffer provided by an embodiment of the present disclosure;

[0026] Fig.12 It is a logical schematic diagram of a swap mapping physical page provided by an embodiment of the present disclosure;

[0027] Fig.13 It is a logical schematic diagram of submitting data to be written to a physical page provided by an embodiment of the present disclosure;

[0028] Fig.14 It is a structural diagram of a storage space management device for SE and ESIM provided by an embodiment of the present disclosure;

[0029] Fig.15 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0032] After research, the applicant found that in the case where SE and eSIM are integrated into the same security chip, the current solution for storage space management is to fixedly allocate SE storage space and eSIM storage space. However, the storage space requirements of SE and eSIM in different products are inconsistent. Some products only use SE, some products only use eSIM, and some products use SE and eSIM but have different business focuses. The method of fixedly allocating SE storage space and eSIM storage space upon power-on will cause waste or insufficiency in different products, and cannot be well compatible with all products and user usage requirements. Therefore, a more flexible and more compatible storage space management method is urgently needed. In view of this, the present disclosure provides a storage space management method, device, equipment and storage medium for SE and eSIM. Below, the storage space management method of SE and eSIM is first described in detail.

[0033] Figure 1 This is a flowchart of a storage space management method for SE and eSIM provided by an embodiment of the present disclosure. The method can be executed by an electronic device, wherein the electronic device includes a security chip integrated with SE functions and eSIM functions, that is, the SE function and the eSIM function are integrated on the same security chip, and the security chip integrated with SE functions and eSIM functions includes a physical space, and the physical space includes a mapping area, and the mapping area is used to map to a virtual space through a MAP mechanism, and the virtual space includes a user space. The electronic device can be exemplarily understood as a device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc. Figure 1 As shown, the method provided in this embodiment includes the following steps:

[0034] S110. In response to the user space allocation instruction, the user space is divided into a SE private space, an eSIM private space and a public space, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data, and a firewall is correspondingly set up in the user space for storing SE user data and / or a firewall is correspondingly set up in the space for storing eSIM user data so as to isolate the space for storing SE user data and the space for storing eSIM user data from each other.

[0035] Specifically, the physical space refers to a memory on the security chip. Exemplarily, the physical space is a Flash on the security chip, but it is not limited to this. The physical space includes a mapping area, which can be mapped to a virtual space through a MAP mechanism. The virtual space includes a user space, and the user space is used to store user data. Of course, in other embodiments, the physical space may also include a non-mapping area, which is not mapped to a virtual space through a MAP mechanism. The mapping area and the non-mapping area are isolated from each other by a firewall, and a security alarm is generated when the boundary is crossed. Of course, in some other embodiments, the virtual space may also include a system space, which is used to store system data, and the user space and the system space are isolated from each other by a firewall.

[0036] Specifically, the user space allocation instruction may be any instruction that can divide the user space into three parts: SE private space, eSIM private space and public space. The sizes of the SE private space, eSIM private space and public space are determined by the user space allocation instruction.

[0037] Specifically, the SE private space is a space dedicated to storing SE user data, the eSIM private space is a space dedicated to storing eSIM user data, the eSIM cannot access the SE private space, and the SE cannot access the eSIM private space.

[0038] Specifically, when the SE private space is filled with SE user data, the SE can continue to use the public space to store SE user data, and when the eSIM private space is filled with eSIM user data, the eSIM can continue to use the public space to store eSIM user data. The public space belongs to whoever occupies it first. Therefore, the SE available user space of the SE can be regarded as the sum of the SE private space and the public space, and the eSIM available user space of the eSIM can be regarded as the sum of the eSIM private space and the public space. In addition, the space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other. In this way, the effect of both sharing and isolating the SE and the eSIM is achieved.

[0039] For example, Figure 2 Schematic diagram of a physical space and a virtual space provided by an embodiment of the present disclosure. Figure 2As shown, a Flash is provided on the security chip, and the Flash includes a mapping area and a non-mapping area, and the mapping area and the non-mapping area are isolated by a firewall. The mapping area is mapped to a virtual space through a MAP mechanism, and the virtual space includes a user space and a system space. The user space is divided into three parts: SE private space, eSIM private space and public space. Public space = user space - (SE private space + eSIM private space), SE available user space = user space - eSIM private space, SE remaining user space = SE available user space - SE used user space - (eSIM used user space - eSIM private space), eSIM available user space = user space - SE private space, and eSIM remaining user space = eSIM available user space - eSIM used user space - (SE used user space - SE private space). The system space includes SE system space and eSIM system space, and the SE available user space and SE system space are isolated from each other by a firewall, and the eSIM available user space and eSIM system space are isolated from each other by a firewall.

[0040] For example, Figure 3 FIG. 1 is a schematic diagram of an SE available user space and an eSIM available user space provided by an embodiment of the present disclosure. Figure 3 As shown, the size of the user space is 1.5M, and the user space is divided into three parts: SE private space (600K), eSIM private space (500K) and public space (400K). The SE available user space is SE private space (600K) + public space (400K) = 1M, and the eSIM available user space is eSIM private space (500K) + public space (400K) = 900K. If SE continues to use 100K of public space after filling up the SE private space, and eSIM continues to use 200K of public space after filling up the eSIM private space, then the SE used user space is 700K and the SE remaining user space = SE available user space (1M) - SE used user space (700K) - (eSIM used user space (700K) - eSIM private space (500K)) = 100K, the SE used user space is 700K and the eSIM remaining user space = eSIM available user space (900K) - eSIM used user space (700K) - (SE used user space (700K) - SE private space (600K)) = 100K.

[0041] For example, Figure 4 Schematic diagram of a private space encroaching on a public space provided by an embodiment of the present disclosure. Figure 4As shown, when the SE private space is not filled, the "space for storing SE user data" refers to the SE private space. At this time, the SE private space and the public space are isolated by a firewall. When the SE private space is filled, the "space for storing SE user data" refers to the SE private space and the public space occupied by SE. At this time, the firewall moves accordingly, so that the public space occupied by SE and the public space not occupied by SE are isolated by the firewall. In this way, it can be ensured that the eSIM cannot access the space for storing SE user data. When the eSIM private space is not filled, the "space for storing eSIM user data" refers to the eSIM private space. At this time, the eSIM private space and the public space are isolated by a firewall. When the eSIM private space is filled, the firewall moves accordingly, so that the public space occupied by eSIM and the public space not occupied by eSIM are isolated by the firewall. In this way, it can be ensured that the SE cannot access the space for storing eSIM user data.

[0042] It is understandable that if the storage space of SE and the storage space of eSIM are fixedly allocated, SE cannot continue to process SE services after consuming the fixed storage space. If the eSIM task volume is small, this part of the fixed storage space allocated for eSIM is wasted. However, in the disclosed embodiment, the security chip supports both SE functions and eSIM functions, and manages by mapping the physical space into virtual space. SE private space and eSIM private space can be demarcated according to different products and user needs to ensure the normal operation of SE services and eSIM services. As SE services grow and SE private space is insufficient, public space can continue to be used. Similarly, as eSIM services grow and eSIM private space is insufficient, public space can continue to be used until the public space is also used up. This ensures that the user space of the security chip is utilized as much as possible, and SE services and eSIM services will not affect each other.

[0043] In the disclosed embodiment, the user space can be divided into three parts through a firewall, namely, SE private space, eSIM private space and public space. SE private space and eSIM private space cannot access each other. Both the SE system and the eSIM system give priority to using their own private space. When the private space is insufficient, the public space can be used to achieve the purpose of expanding the storage space. In this way, flexible space allocation can meet the usage requirements of different products and users for SE and eSIM, and greatly improve the compatibility of the security chip in different usage scenarios.

[0044] In another embodiment of the present disclosure, the method can also realize dynamic adjustment of the private space. Specifically, the method further includes: in response to the SE private space adjustment instruction, adjusting the size of the SE private space, and adjusting the size of the public space accordingly;

[0045] And / or, in response to the eSIM private space adjustment instruction, adjusting the size of the eSIM private space and adjusting the size of the public space accordingly.

[0046] Specifically, the SE private space adjustment instruction may be any instruction capable of adjusting the size of the SE private space. The eSIM private space adjustment instruction may be any instruction capable of adjusting the size of the eSIM private space.

[0047] When only the size of the SE private space is adjusted, the "reduction amount of the size of the SE private space" is less than or equal to the current size of the SE private space, and the "increase amount of the size of the SE private space" is less than or equal to the current size of the public space. If the SE private space adjustment instruction is to reduce the size of the SE private space, the reduction amount of the size of the SE private space = the increase amount of the size of the public space. If the SE private space adjustment instruction is to increase the size of the SE private space, the increase amount of the size of the SE private space = the reduction amount of the size of the public space.

[0048] In the case of adjusting only the size of the eSIM private space, the "reduction amount of the size of the eSIM private space" is less than or equal to the current size of the eSIM private space, and the "increase amount of the size of the eSIM private space" is less than or equal to the current size of the public space. If the eSIM private space adjustment instruction is to reduce the size of the eSIM private space, the reduction amount of the size of the eSIM private space = the increase amount of the size of the public space. If the eSIM private space adjustment instruction is to increase the size of the eSIM private space, the increase amount of the size of the eSIM private space = the reduction amount of the size of the public space.

[0049] In the case of adjusting both the size of the SE private space and the size of the eSIM private space, the "reduction amount of the size of the SE private space" is less than or equal to the current size of the SE private space, the "reduction amount of the size of the eSIM private space" is less than or equal to the current size of the eSIM private space, and the "increase amount of the size of the SE private space + the increase amount of the size of the eSIM private space" is less than or equal to the current size of the public space. If the SE private space adjustment instruction is to reduce the size of the SE private space, and the eSIM private space adjustment instruction is to reduce the size of the eSIM private space, then the reduction amount of the size of the SE private space + the reduction amount of the size of the eSIM private space = the increase amount of the size of the public space. If the SE private space adjustment instruction is to increase the size of the SE private space, and the eSIM private space adjustment instruction is to increase the size of the eSIM private space, then the increase amount of the size of the SE private space + the increase amount of the size of the eSIM private space = the reduction amount of the size of the public space. If the SE private space adjustment instruction is to reduce the size of the SE private space, and the eSIM private space adjustment instruction is to increase the size of the eSIM private space, then the reduction amount of the size of the SE private space - the increase amount of the size of the eSIM private space = the increase amount of the size of the public space. If the SE private space adjustment instruction is to increase the size of the SE private space, and the eSIM private space adjustment instruction is to reduce the size of the eSIM private space, then the increase in the size of the SE private space-the decrease in the size of the eSIM private space=the decrease in the size of the public space.

[0050] For example, see Figure 3 When SE requires the SE private space to be 700k, just send the SE private space adjustment instruction to set it. At this time, the SE private space is 700k, the eSIM private space is 500k, the public space is 300k, the SE available user space is SE private space (700K) + public space (300K) = 1M, and the eSIM available user space is eSIM private space (500K) + public space (300K) = 800K.

[0051] It can be understood that by dynamically adjusting the private space, when the demand for SE private space used by SE increases (decreases), the SE private space can be increased (decreased) through the SE private space adjustment instruction. Similarly, when the demand for eSIM private space used by eSIM increases (decreases), the eSIM private space can be increased (decreased) through the eSIM private space adjustment instruction. In this way, the compatibility with various products can be further increased.

[0052] In some further embodiments of the present disclosure, the method further includes: when the SE task is running, enabling the SE mapping table and disabling the eSIM mapping table; when the eSIM task is running, enabling the eSIM mapping table and disabling the SE mapping table.

[0053] Specifically, the SE is provided with an SE mapping table, which is used to access SE data (SE user data and / or SE system data), that is, the SE mapping table records the mapping relationship between the physical address and the virtual address for storing the SE data; the eSIM is provided with an eSIM mapping table, which is used to access eSIM data (eSIM user data and / or eSIM system data), that is, the eSIM mapping table records the mapping relationship between the physical address and the virtual address for storing the eSIM data.

[0054] Specifically, since the mapping area can be mapped to the virtual space through the MAP mechanism, the physical address can be uniformly accessed through the virtual address. The addressing relationship between the virtual address and the physical address is determined by the mapping table (i.e., mapTable). The SE mapping table records the mapping relationship between the virtual address and the physical address corresponding to the SE, and the eSIM mapping table records the mapping relationship between the virtual address and the physical address corresponding to the eSIM. Therefore, the physical address can be quickly found from the virtual address through the mapping table to realize the reading and writing of SE data and eSIM data.

[0055] Optionally, the same virtual address in the SE mapping table and the eSIM mapping table is mapped to different physical addresses.

[0056] For example, Figure 5 Schematic diagram of an SE mapping table and an eSIM mapping table provided in an embodiment of the present disclosure. Figure 5 As shown in the figure, SE and eSIM each have a mapping table, which are independent of each other and their data are invisible to each other. Although SE and eSIM use the same virtual addresses VID0-VID3, they map different physical addresses, thus achieving virtual address isolation.

[0057] For example, Figure 6 Schematic diagram of cyclic switching between SE tasks and eSIM tasks provided by an embodiment of the present disclosure. Figure 6 As shown, when the SE task is running (i.e., in the SE environment), the SE mapping table is enabled and the eSIM mapping table is disabled, so that the current virtual address accesses all SE data; when the eSIM task is running (i.e., in the eSIM environment), the eSIM mapping table is enabled and the SE mapping table is disabled, so that the current virtual address accesses all eSIM data. In this way, data switching between SE and eSIM is achieved by switching the SE mapping table and the eSIM mapping table.

[0058] For example, Figure 7 Schematic diagram of switching between an SE mapping table and an eSIM mapping table provided by an embodiment of the present disclosure. Figure 7 As shown, only one mapping table is enabled (i.e., activated) in any time period, and the other mapping table is disabled (i.e., backup). If the current task is an SE task and you want to switch to an eSIM task, first copy the SE mapping table to MAP_TEMP, then copy the eSIM mapping table to MAP_IN_USED, and finally copy the SE mapping table in MAP_TEMP to MAP_NOT_USE. After the switch is completed, the SE mapping table is in a disabled state, and the eSIM mapping table is in an enabled state. The current virtual address accesses all eSIM data. For the case where the current task is an eSIM task and you want to switch to an SE task, the situation is similar and will not be repeated here.

[0059] Optionally, the physical space includes multiple physical pages, each of which is provided with HE information, wherein the HE information includes a context identifier, a virtual address page number, a physical address page number and a page version number information of the corresponding physical page.

[0060] Specifically, HE information corresponds to a physical page one by one, and HE information is stored in HE hardware and is used to identify and distinguish data between SE and eSIM.

[0061] Specifically, the context identifier is used to characterize the state and / or environment to which the physical page belongs.

[0062] For example, Figure 8 is a schematic diagram of a context identifier provided by an embodiment of the present disclosure. Figure 8 As shown, the context identifiers include four types: 0X0, 0X1, 0X2 and 0X3, among which 0X0 indicates that the physical page has not been allocated to SE and eSIM, 0X1 indicates that the physical page has been allocated to SE, 0X2 indicates that the physical page has been allocated to eSIM, and 0X3 is a reserved item, which can be used to expand the status of the physical page and / or the environment to which it belongs.

[0063] Specifically, the virtual address page number refers to the page number of the virtual page corresponding to the physical page, and the physical address page number refers to the page number of the physical page.

[0064] Specifically, the page version number information may include the page version number and / or the negated result of the page version number.

[0065] For example, Fig. 9 It is a schematic diagram of the structure of HE information provided by an embodiment of the present disclosure. Fig.10 is a schematic diagram of a HE information example provided by an embodiment of the present disclosure. Fig. 9As shown, the HE information includes the context identifier of the corresponding physical page, the physical address page number, the virtual address page number, the page version number, the inverted result of "context identifier, physical address page number and virtual address page number", and the inverted result of the page version number. Accordingly, in the process of generating HE information, it is necessary to obtain the page version number, context identifier, virtual address page number and physical address page number of the physical page, and invert the page version number, context identifier, virtual address page number and physical address page number respectively to obtain the HE information of the physical page. If the page version number of the physical page is 0X00000001, the context identifier is 0x1, the virtual address page number is 0x01, and the physical address page number is 0x2A0, then the following can be generated. Fig.10 HE information shown.

[0066] It can be understood that by setting it on the virtual address, even if SE and eSIM use the same virtual address, they are mapped to different physical addresses. On the physical address, each physical page has HE information, indicating whether the current page data belongs to SE or eSIM, thereby achieving isolation of virtual + physical addresses.

[0067] In another embodiment of the present disclosure, the virtual space further includes a system space, and the system space includes a rotation area, wherein the method further includes:

[0068] In response to the write instruction, determining a first target virtual address page number of a virtual page to which the to-be-written data is to be written in the user space, wherein the first target virtual address page number is mapped to a first target physical address page number;

[0069] Obtaining a second target virtual address page number of the virtual page where the rotation area is located, wherein the second target virtual address page number is mapped to the second target physical address page number;

[0070] Establishing a mapping between the second target physical address page number and the target buffer;

[0071] Unmapping the first target virtual address page number from the first target physical address page number, and unmapping the second target virtual address page number from the second target physical address page number, and establishing a mapping between the first target virtual address page number and the second target physical address page number, and establishing a mapping between the second target virtual address page number and the first target physical address page number;

[0072] Write the data to be written into the target buffer.

[0073] Specifically, the first target physical address page number corresponding to the first target virtual address page number can be determined by querying the mapping table. When the data to be written is SE data, the SE mapping table can be queried, and when the data to be written is eSIM data, the eSIM mapping table can be queried.

[0074] Specifically, the rotation area can be located in the system space, and the second target physical address page number corresponding to the second target virtual address page number can be determined by querying the mapping table. When the data to be written is SE data, the rotation area is located in the SE system space, and the SE mapping table can be queried. When the data to be written is eSIM data, the rotation area is located in the eSIM system space, and the eSIM mapping table can be queried.

[0075] Specifically, the electronic device further includes at least one buffer, and an idle buffer can be selected from the at least one buffer as the target buffer, wherein the size of the buffer is equal to the size of a physical page in the physical space.

[0076] Optionally, the method further comprises: when the target buffer is filled with data, writing the data in the target buffer into a physical page corresponding to the second target physical address page number;

[0077] Erasing data in a physical page corresponding to the first target physical address page number;

[0078] Unmap the second target virtual address page number from the first target physical address page number, and establish a mapping between the second target virtual address page number and the third target physical address page number, wherein the physical page corresponding to the third target physical address page number is the next physical page of the physical page corresponding to the second target physical address page number.

[0079] For example, Fig.11 It is a logical schematic diagram of writing data to be written into a buffer provided by an embodiment of the present disclosure. Fig.12 It is a logical schematic diagram of a swap mapping physical page provided by an embodiment of the present disclosure. Fig.13 FIG. 1 is a logical schematic diagram of submitting data to be written to a physical page provided by an embodiment of the present disclosure. Figure 11-13As shown, the process of a user accessing a virtual address and using a rotation mechanism to write the data to be written is as follows: (1) Assuming that the current context is SE, VID0 to VID3 are SE available user spaces, and VID100 is a rotation area. At this time, if you want to write SE user data (i.e., data to be written) into VID0, you need to first write the SE user data into VID100. Then, first determine the mapping between VID0 and PID10, then determine the mapping between VID100 and PID11, then map PID11 and WB0 (i.e., the target buffer) to each other, and write the SE user data into WB0. Exchange the PIDs mapped by VID0 and VID100, i.e., VID0 maps PID11, and VID100 maps PID10. After the exchange, the written SE user data can be accessed through VID0. As long as the SE user data in WB0 is not written into PID11, subsequent reads and writes to VID0 are all reads and writes to WB0. Since reading and writing WB0 does not cause the Flash to be erased or written, the read and write speed will be greatly improved. When it is necessary to actually write the SE user data in WB0 to PID11 (such as when the data has crossed pages, etc.), the SE user data in WB0 is submitted to PID11. At this time, only one erase occurs, and then PID10 mapped by the rotation area VID100 is erased, PID10 is released to the free state, and then the rotation area VID100 maps the next free page PID12 in the flash space pool. After mapping, the state of PID12 is locked as non-idle (i.e. busy), thus completing a rotation.

[0080] It is understandable that, through the above rotation mechanism, no matter how many times the data in a page is changed, only one Flash erase and write actually occurs. Compared with the traditional one-erase-one-write, the rotation mechanism not only greatly improves the read and write performance, but also has a qualitative leap in life. Although the user writes to the same virtual address, the actual written Flash address is rotated to ensure that the Flash address is different each time it is erased and written, so that each page of Flash is erased and written evenly. If there is no cross-page, it is written to the buffer, reducing the number of Flash erases and writes, and further extending the service life of the chip.

[0081] In summary, in the disclosed embodiment, SE and eSIM coexist in the security chip, and they share a physical space. The mapping area in the physical space is mapped to virtual space management. In the allocation of virtual space, the user space is divided into three parts, namely SE private space, eSIM private space and public space. SE private space and eSIM private space cannot access each other. When the private space is insufficient, the public space can continue to be used to achieve the purpose of both isolation and sharing of space. In addition, the size of the private space can be adjusted dynamically. When the user's initial demand for space is not large and a smaller private space is set, and the business surges in the later stage and the private space does not meet the minimum requirements for system operation, the private space can be increased by issuing instructions to ensure the basic business of the system and the normal operation of the system. If you want to maintain the effect of the traditional fixed space when powered on, you can configure the public space to 0 to achieve it. This space allocation scheme is isolated, shared, and flexible, and can meet the business needs of different users in various scenarios. In terms of SE and eSIM data isolation / switching / identification, two mapping tables are established, the same virtual addresses of the two mapping tables are mapped to different physical addresses, and the context is added to identify the system to which the physical page belongs, so as to achieve data isolation and identification, and data switching is achieved by switching mapping tables, and finally the security chip SE and eSIM space are shared and isolated, and the private space can be dynamically adjusted, with high compatibility. In addition, with the rotation mechanism, the data reading and writing speed can be improved, the frequency of physical page use is guaranteed to be balanced, and the chip service life can be extended.

[0082] Fig.14 1 is a structural diagram of a storage space management device for SE and eSIM provided by an embodiment of the present disclosure. The storage space management device for SE and eSIM can be understood as the above-mentioned electronic device or a part of the functional modules in the above-mentioned electronic device. The electronic device includes a security chip integrated with SE and eSIM. The security chip integrated with SE and eSIM includes a physical space. The physical space includes a mapping area. The mapping area is used to map to a virtual space through a MAP mechanism. The virtual space includes a user space. Fig.14 As shown, the storage space management device of the SE and eSIM includes:

[0083] The user space division module 1410 is used to divide the user space into a SE private space, an eSIM private space and a public space in response to a user space allocation instruction, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, and the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data, and the space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other.

[0084] Optionally, the device further includes: a first adjustment module, configured to adjust the size of the SE private space in response to the SE private space adjustment instruction, and to adjust the size of the public space accordingly;

[0085] And / or, a second adjustment module, configured to adjust the size of the eSIM private space in response to the eSIM private space adjustment instruction, and adjust the size of the public space accordingly.

[0086] Optionally, the device further includes: a switching module, configured to enable the SE mapping table and disable the eSIM mapping table when the SE task is running;

[0087] When the eSIM task is running, the eSIM mapping table is enabled and the SE mapping table is disabled.

[0088] Optionally, the same virtual address in the SE mapping table and the eSIM mapping table is mapped to different physical addresses.

[0089] Optionally, the physical space includes multiple physical pages, each of which is provided with HE information, wherein the HE information includes the context identifier, virtual address page number, physical address page number and page version number information of the corresponding physical page.

[0090] Optionally, the virtual space further includes a system space, and the system space includes a rotation area, wherein the device further includes:

[0091] A first determination module, configured to determine, in response to a write instruction, a first target virtual address page number of a virtual page to which the data to be written is to be written in the user space, wherein the first target virtual address page number is mapped to a first target physical address page number;

[0092] A first acquisition module is used to acquire a second target virtual address page number of the virtual page where the rotation area is located, wherein the second target virtual address page number is mapped to a second target physical address page number;

[0093] A first establishing module, used for establishing a mapping between the second target physical address page number and the target buffer;

[0094] a first exchange module, configured to unmap the first target virtual address page number from the first target physical address page number, unmap the second target virtual address page number from the second target physical address page number, and establish a mapping between the first target virtual address page number and the second target physical address page number, and establish a mapping between the second target virtual address page number and the first target physical address page number;

[0095] The first writing module is used to write the data to be written into the target buffer.

[0096] Optionally, the device further comprises: a second writing module, configured to write the data in the target buffer into a physical page corresponding to the second target physical address page number when the target buffer is full of data;

[0097] A first erasing module, used for erasing data in a physical page corresponding to the first target physical address page number;

[0098] The first rotation module is used to release the mapping of the second target virtual address page number and the first target physical address page number, and establish a mapping of the second target virtual address page number and the third target physical address page number, wherein the physical page corresponding to the third target physical address page number is the next physical page of the physical page corresponding to the second target physical address page number.

[0099] The device provided in this embodiment can execute the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.

[0100] An embodiment of the present disclosure further provides an electronic device, which includes: a memory, in which a computer program is stored; and a processor, for executing the computer program. When the computer program is executed by the processor, the method of any of the above embodiments can be implemented.

[0101] For example, Fig.15 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig.15, which shows a schematic diagram of the structure of an electronic device 1500 suitable for implementing the embodiment of the present disclosure. The electronic device 1500 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.15 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0102] like Fig.15 As shown, the electronic device 1500 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1502 or a program loaded from a storage device 1508 into a random access memory (RAM) 1503. In the RAM 1503, various programs and data required for the operation of the electronic device 1500 are also stored. The processing device 1501, the ROM 1502, and the RAM 1503 are connected to each other via a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.

[0103] Typically, the following devices may be connected to the I / O interface 1505: an input device 1506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1509. The communication device 1509 may allow the electronic device 1500 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.15 The electronic device 1500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0104] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1509, or installed from a storage device 1508, or installed from a ROM 1502. When the computer program is executed by the processing device 1501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0105] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0106] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0107] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0108] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to the user space allocation instruction, divides the user space into SE private space, eSIM private space and public space, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, and the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data, and the space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other.

[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, constitute a limitation on the unit itself.

[0112] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0113] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] The embodiments of the present disclosure further provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.

[0115] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0116] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for managing storage space of SE and eSIM, characterized in that: Applied to an electronic device, the electronic device includes a security chip integrated with a SE and an eSIM, the security chip integrated with a SE and an eSIM includes a physical space, the physical space includes a mapping area, the mapping area is used to map to a virtual space through a MAP mechanism, the virtual space includes a user space, wherein the method includes: In response to a user space allocation instruction, the user space is divided into a SE private space, an eSIM private space and a public space, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, and the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data, and the space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other.

2. The method according to claim 1, characterized in that The method further comprises: In response to the SE private space adjustment instruction, adjust the size of the SE private space, and adjust the size of the public space accordingly; And / or, in response to the eSIM private space adjustment instruction, adjusting the size of the eSIM private space, and adjusting the size of the public space accordingly.

3. The method according to claim 1, characterized in that The method further comprises: When the SE task is running, the SE mapping table is enabled and the eSIM mapping table is disabled; When the eSIM task is running, the eSIM mapping table is enabled and the SE mapping table is disabled.

4. The method according to claim 3, characterized in that The same virtual address in the SE mapping table and the eSIM mapping table is mapped to different physical addresses.

5. The method according to claim 3, characterized in that: The physical space includes a plurality of physical pages, each of which is provided with HE information, wherein the HE information includes a context identifier, a virtual address page number, a physical address page number and a page version number information of the corresponding physical page.

6. The method according to claim 1, characterized in that The virtual space also includes a system space, and the system space includes a rotation area, wherein the method further includes: In response to a write instruction, determining a first target virtual address page number of a virtual page to which the to-be-written data is to be written in the user space, wherein the first target virtual address page number is mapped to a first target physical address page number; Obtaining a second target virtual address page number of the virtual page where the rotation area is located, wherein the second target virtual address page number is mapped to a second target physical address page number; Establishing a mapping between the second target physical address page number and the target buffer; Unmapping the first target virtual address page number from the first target physical address page number, and unmapping the second target virtual address page number from the second target physical address page number, and establishing a mapping between the first target virtual address page number and the second target physical address page number, and establishing a mapping between the second target virtual address page number and the first target physical address page number; The data to be written is written into the target buffer.

7. The method according to claim 6, characterized in that Also includes: When the target buffer is full of data, writing the data in the target buffer into the physical page corresponding to the second target physical address page number; Erasing data in the physical page corresponding to the first target physical address page number; Unmap the second target virtual address page number from the first target physical address page number, and establish a mapping between the second target virtual address page number and the third target physical address page number, wherein the physical page corresponding to the third target physical address page number is the next physical page of the physical page corresponding to the second target physical address page number.

8. A storage space management device for SE and eSIM, characterized in that: Applied to an electronic device, the electronic device includes a security chip integrated with a SE and an eSIM, the security chip integrated with a SE and an eSIM includes a physical space, the physical space includes a mapping area, the mapping area is used to map to a virtual space through a MAP mechanism, the virtual space includes a user space, wherein the device includes: A user space division module is used to divide the user space into a SE private space, an eSIM private space and a public space in response to a user space allocation instruction, wherein the SE private space is used to store SE user data, the eSIM private space is used to store eSIM user data, and the public space is used to store SE user data when the SE private space is full of data, and to store eSIM user data when the eSIM private space is full of data, and the space for storing SE user data in the user space is correspondingly provided with a firewall and / or the space for storing eSIM user data is correspondingly provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other.

9. An electronic device, characterized in that: include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.