SE and esim storage space management method and device, equipment and storage medium
By dividing the user space into SE private space, eSIM private space, and public space, and isolating them with a firewall, the problem of incompatibility in storage space management after SE and eSIM integration is solved, enabling flexible storage space allocation and improving compatibility.
Patent Information
- Application Number
- CN202411973073.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In existing technologies, when SE and eSIM are integrated into the same security chip, the storage space management scheme is fixed, resulting in inconsistent storage space requirements for SE and eSIM in different products, which cannot be compatible with the usage needs of all products and users.
The user space is divided into SE private space, eSIM private space, and public space, which are isolated by a firewall. SE and eSIM each give priority to using the private space. When the private space is insufficient, the public space can be used to achieve flexible allocation and expansion of space.
It enables flexible management of SE and eSIM storage space, improves the compatibility of security chips in different usage scenarios, ensures the normal operation of SE and eSIM services, and avoids the waste of storage space.
Smart Images

Figure CN119759292B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of secure chip, and particularly relate to a SE and eSIM storage space management method and device, equipment and storage medium. BACKGROUND
[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 a secure element (SE) and an embedded subscriber identity module (eSIM) into the same secure chip.
[0003] For the case of integrating the SE and the eSIM into the same secure chip, the current solution is to fixedly allocate the storage space of the SE and the storage space of the eSIM. However, the SE and the eSIM have different requirements for the storage space in different products, which leads to poor compatibility with all products and user usage requirements. Therefore, there is an urgent need for a more flexible and more compatible storage space management method. SUMMARY
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present disclosure provide a SE and eSIM storage space management method, device, equipment and storage medium.
[0005] A first aspect of embodiments of the present disclosure provides a SE and eSIM storage space management method applied to an electronic device, the electronic device integrating a secure chip of SE and eSIM, the secure chip of SE and eSIM integrating including a physical space, the physical space including a mapping area, the mapping area being used to be mapped into a virtual space through a MAP mechanism, the virtual space including a user space, wherein the method comprises:
[0006] In response to a user space allocation instruction, the user space is divided into an 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 in the case that the SE private space is full of data, and to store eSIM user data in the case that the eSIM private space is full of data, and the space in the user space for storing SE user data 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 the embodiments of the present disclosure provides a storage space management apparatus of an SE and an eSIM, applied to an electronic device, the electronic device comprising a secure chip integrated with an SE and an eSIM, the secure chip integrated with the SE and the eSIM comprising a physical space, the physical space comprising a mapping area, the mapping area being used to be mapped into a virtual space through a MAP mechanism, the virtual space comprising a user space, wherein the apparatus comprises:
[0008] a user space division module, configured to divide the user space into an SE private space, an eSIM private space and a common 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, the common space is used to store SE user data in the case that the SE private space is full of data and to store eSIM user data in the case that the eSIM private space is full of data, and a space in the user space storing SE user data is correspondingly provided with a firewall and / or a space storing eSIM user data is correspondingly provided with a firewall to isolate the space storing SE user data and the space storing eSIM user data from each other.
[0009] A third aspect of the embodiments of the present disclosure provides an electronic device, the server comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method of the first aspect.
[0010] A fourth aspect of the embodiments of the present disclosure provides a computer readable storage medium, the storage medium storing a computer program, and when the computer program is executed by a processor, the method of the first aspect can be implemented.
[0011] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:
[0012] In the embodiment of the present disclosure, the user space can be divided into an SE private space, an eSIM private space and a public space in response to a user space allocation instruction, 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 in the case that the SE private space is full of data and to store eSIM user data in the case that the eSIM private space is full of data, and the space in the user space for storing SE user data is provided with a firewall and / or the space for storing eSIM user data is provided with a firewall to isolate the space for storing SE user data and the space for storing eSIM user data from each other. As can be seen, by using the above technical solution, the user space can be divided into three parts, i.e. the SE private space, the eSIM private space and the public space, the SE private space and the eSIM private space cannot access each other, the SE system and the eSIM system preferentially use their own private spaces, and when the private spaces are 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 secure chip in different use scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0013] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure.
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, brief introductions to the drawings needed to be used in the embodiments or the prior art description will be given below. Obviously, for those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
[0015] Figure 1 is a flowchart of an SE and eSIM storage space management method provided by the embodiment of the present disclosure;
[0016] Figure 2 is a schematic diagram of a physical space and a virtual space provided by the embodiment of the present disclosure;
[0017] Figure 3 is a schematic diagram of SE available user space and eSIM available user space provided by the embodiment of the present disclosure;
[0018] Figure 4 is a schematic diagram of private space invading public space provided by the embodiment of the present disclosure;
[0019] Figure 5 is a schematic diagram of an SE mapping table and an eSIM mapping table provided by the embodiment of the present disclosure;
[0020] Figure 6 is a schematic diagram of SE task and eSIM task cycle switching provided by an embodiment of the present disclosure;
[0021] Figure 7 is a schematic diagram of SE mapping table and eSIM mapping table switching provided by an embodiment of the present disclosure;
[0022] Figure 8 is a schematic diagram of context identification provided by an embodiment of the present disclosure;
[0023] Figure 9 is a structure schematic diagram of HE information provided by an embodiment of the present disclosure;
[0024] Figure 10 is a structure schematic diagram of HE information example provided by an embodiment of the present disclosure;
[0025] Figure 11 is a logical schematic diagram of writing to-be-written data into a buffer provided by an embodiment of the present disclosure;
[0026] Figure 12 is a logical schematic diagram of exchanging mapping physical pages provided by an embodiment of the present disclosure;
[0027] Figure 13 is a logical schematic diagram of submitting to-be-written data into a physical page provided by an embodiment of the present disclosure;
[0028] Figure 14 is a structure schematic diagram of a storage space management device of SE and ESIM provided by an embodiment of the present disclosure;
[0029] Figure 15 is a structure 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 purposes, features and advantages of the present disclosure, the schemes 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 in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some of the embodiments of the present disclosure, not all the embodiments.
[0032] The applicant finds through research that, for the case that the SE and the eSIM are integrated into the same secure chip, in storage space management, the current scheme is to fixedly allocate the storage space of the SE and the storage space of the eSIM, but the demand of the SE and the eSIM for the storage space is inconsistent in different products, some products only use the SE, some products only use the eSIM, and some products use both the SE and the eSIM but have different business focuses. The way of fixedly allocating the storage space of the SE and the storage space of the eSIM upon power-on will cause waste or deficiency in different products, and cannot well compatible all products and user use requirements, therefore, a more flexible and more compatible storage space management method is urgently needed. In view of this, the present disclosure provides a SE and eSIM storage space management method, device, equipment and storage medium. Next, the SE and eSIM storage space management method will be described in detail.
[0033] Figure 1 It is a flowchart of a SE and eSIM storage space management method provided by an embodiment of the present disclosure, which can be executed by an electronic device, wherein the electronic device includes a secure chip integrated with SE function and eSIM function, that is, the SE function and the eSIM function are integrated on the same secure chip, and the secure chip integrated with the SE function and the eSIM function includes a physical space, the physical space includes a mapping area, the mapping area is used to be mapped into 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 notebook computer, a desktop computer, etc. As shown in Figure 1 The method provided by the embodiment includes the following steps:
[0034] S110, in response to a user space allocation instruction, dividing the user space into an 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 in the case that the SE private space is full of data, and store eSIM user data in the case that the eSIM private space is full of data, and the space in the user space for storing the SE user data is correspondingly provided with a firewall and / or the space for storing the eSIM user data is correspondingly provided with a firewall to isolate the space for storing the SE user data and the space for storing the eSIM user data from each other.
[0035] Specifically, the physical space refers to a memory on the secure chip. Exemplarily, the physical space is a Flash on the secure chip, but is not limited thereto. The physical space includes a mapping area which can be mapped into a virtual space through a MAP mechanism, and the virtual space includes a user space which is used to store user data. Of course, in other embodiments, the physical space can also include a non-mapping area which is not mapped into a virtual space through a MAP mechanism, and the mapping area and the non-mapping area are isolated from each other by a firewall, and a security alarm is generated when a boundary is crossed. Of course, in still other embodiments, the virtual space can 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 can be any instruction capable of dividing the user space into an SE private space, an eSIM private space and a public space. The sizes of the SE private space, the eSIM private space and the 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, and 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, and 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. Furthermore, the space in the user space which stores SE user data is provided with a firewall corresponding thereto and / or the space which stores eSIM user data is provided with a firewall corresponding thereto to isolate the space which stores SE user data from the space which stores eSIM user data. In this way, the effect of both sharing and isolation of the SE and the eSIM is achieved.
[0039] Exemplarily, Figure 2 is a schematic diagram of a physical space and a virtual space provided by an embodiment of the present disclosure. As shown in Figure 2As shown, a Flash is arranged on the secure chip, the Flash includes a mapping area and a non-mapping area, 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, the virtual space includes a user space and a system space, the user space is divided into three parts of an SE private space, an eSIM private space and a public space, the public space = the user space - (the SE private space + the eSIM private space), an SE available user space = the user space - the eSIM private space, an SE remaining user space = the SE available user space - an SE used user space - (an eSIM used user space - the eSIM private space), an eSIM available user space = the user space - the SE private space, and an eSIM remaining user space = the eSIM available user space - the eSIM used user space - (an SE used user space - the SE private space). The system space includes an SE system space and an eSIM system space, the SE available user space and the SE system space are isolated by a firewall, and the eSIM available user space and the eSIM system space are isolated by a firewall.
[0040] As shown in FIG. 1, the user space is divided into three parts of an SE private space (600K), an eSIM private space (500K) and a public space (400K), and then the SE available user space is 1M and the eSIM available user space is 900K. Figure 3 As shown in FIG. 1, the user space is divided into three parts of an SE private space (600K), an eSIM private space (500K) and a public space (400K), and then the SE available user space is 1M and the eSIM available user space is 900K. Figure 3 As shown in FIG. 1, the user space is divided into three parts of an SE private space (600K), an eSIM private space (500K) and a public space (400K), and then the SE available user space is 1M and the eSIM available user space is 900K.
[0041] As shown in FIG. 1, the user space is divided into three parts of an SE private space (600K), an eSIM private space (500K) and a public space (400K), and then the SE available user space is 1M and the eSIM available user space is 900K. Figure 4 As shown in FIG. 1, the user space is divided into three parts of an SE private space (600K), an eSIM private space (500K) and a public space (400K), and then the SE available user space is 1M and the eSIM available user space is 900K. Figure 4As shown, in the case that 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, in the case that the SE private space is filled, the "space for storing SE user data" refers to the SE private space and the SE-occupied public space, at this time, the firewall is moved accordingly, so that the SE-occupied public space and the non-SE-occupied public space are isolated by the firewall, in this way, it can be ensured that the eSIM cannot access the space for storing SE user data. In the case that 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, in the case that the eSIM private space is filled, the firewall is moved accordingly, so that the eSIM-occupied public space and the non-eSIM-occupied public space 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 can be understood that if the storage space of the SE and the storage space of the eSIM are fixedly allocated, the SE cannot continue to process SE service after consuming the fixed storage space, and if the task amount of the eSIM is small, the fixed storage space allocated for the eSIM is wasted. However, the embodiments of the present disclosure support both SE function and eSIM function, and map the physical space to virtual space for management, and can demarcate the SE private space and the eSIM private space according to different products and user demands, so as to ensure the normal operation of the SE service and the eSIM service, and when the SE private space is insufficient due to the growth of the SE service, the public space can be used continuously, and similarly, when the eSIM private space is insufficient due to the growth of the eSIM service, the public space can be used continuously, until the public space is also used up, so that the user space of the secure chip is used as much as possible, and the SE service and the eSIM service will not affect each other.
[0043] The embodiments of the present disclosure can divide the user space into three parts through the firewall, which are the SE private space, the eSIM private space and the public space, the SE private space and the eSIM private space cannot access each other, the SE system and the eSIM system preferentially use their own private space, and 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 demands of different products and users on the SE and the eSIM, and greatly improve the compatibility of the secure chip in different use scenarios.
[0044] In another embodiment of the present disclosure, the method can also realize dynamic adjustment of the private space. Specifically, the method further comprises: in response to an SE private space adjustment instruction, adjusting the size of the SE private space and correspondingly adjusting the size of the public space;
[0045] and / or, in response to the eSIM private space adjustment instruction, adjusting the size of the eSIM private space and accordingly adjusting the size of the public space.
[0046] Specifically, the SE private space adjustment instruction can be any instruction capable of adjusting the size of the SE private space. The eSIM private space adjustment instruction can be any instruction capable of adjusting the size of the eSIM private space.
[0047] In the case of adjusting only the size of the SE private space, the "decrease 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 decrease the size of the SE private space, the decrease 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 decrease amount of the size of the public space.
[0048] In the case of adjusting only the size of the eSIM private space, the "decrease 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 decrease the size of the eSIM private space, the decrease 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 decrease amount of the size of the public space.
[0049] In the case of adjusting the size of the SE private space and the size of the eSIM private space, the "decrease amount of the size of the SE private space" is less than or equal to the current size of the SE private space, the "decrease 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 common space. If the SE private space adjustment instruction is to decrease the size of the SE private space and the eSIM private space adjustment instruction is to decrease the size of the eSIM private space, the decrease amount of the size of the SE private space + the decrease amount of the size of the eSIM private space = the increase amount of the size of the common 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, the increase amount of the size of the SE private space + the increase amount of the size of the eSIM private space = the decrease amount of the size of the common space. If the SE private space adjustment instruction is to decrease the size of the SE private space and the eSIM private space adjustment instruction is to increase the size of the eSIM private space, the decrease 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 common 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 decrease the size of the eSIM private space, the increase amount of the size of the SE private space - the decrease amount of the size of the eSIM private space = the decrease amount of the size of the common space.
[0050] For example, continuing to refer to Figure 3 When the SE requires the SE private space to be 700k, the SE private space adjustment instruction is sent to set it, at this time the SE private space is 700k, the eSIM private space is 500k, the common space is 300k, the SE available user space is the SE private space (700K) + the common space (300K) = 1M, and the eSIM available user space is the eSIM private space (500K) + the common space (300K) = 800K.
[0051] It can be understood that by dynamically adjusting the private space, when the demand for the SE private space used by the SE increases (decreases), the SE private space can be increased (decreased) by the SE private space adjustment instruction, and similarly, when the demand for the eSIM private space used by the eSIM increases (decreases), the eSIM private space can be increased (decreased) by the eSIM private space adjustment instruction, and thus the compatibility of each product can be further increased.
[0052] In yet some embodiments of the present disclosure, the method further comprises: enabling the SE mapping table and disabling the eSIM mapping table in the case of running the SE task; enabling the eSIM mapping table and disabling the SE mapping table in the case of running the eSIM task.
[0053] Specifically, the SE is correspondingly provided with an SE mapping table, which is used for accessing SE data (SE user data and / or SE system data), i.e., the SE mapping table records the mapping relationship between the physical address and the virtual address of the SE data; the eSIM is correspondingly provided with an eSIM mapping table, which is used for accessing eSIM data (eSIM user data and / or eSIM system data), i.e., the eSIM mapping table records the mapping relationship between the physical address and the virtual address of 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 accessed through the virtual address uniformly, and 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, and the reading and writing of the SE data and the eSIM data are realized.
[0055] Optionally, the same virtual address in the SE mapping table and the eSIM mapping table is mapped to different physical addresses.
[0056] Exemplarily, Figure 5 is a schematic diagram of an SE mapping table and an eSIM mapping table provided by an embodiment of the present disclosure. As shown in Figure 5 , the SE and the eSIM each have a mapping table, and the SE mapping table and the eSIM mapping table are independent of each other and the data is not visible to each other. Although the SE and the eSIM use the same virtual address VID0-VID3, the physical addresses they map are different, thereby realizing the isolation of the virtual addresses.
[0057] Exemplarily, Figure 6 is a schematic diagram of the cycle switching of an SE task and an eSIM task provided by an embodiment of the present disclosure. As shown in Figure 6 , in the case of running the SE task (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 only the SE data; in the case of running the eSIM task (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 only the eSIM data. In this way, the data switching of the SE and the eSIM is realized by switching the SE mapping table and the eSIM mapping table.
[0058] Exemplarily, Figure 7 is a schematic diagram of switching between an SE mapping table and an eSIM mapping table provided by an embodiment of the present disclosure. As shown in Figure 7 , only one mapping table is in an enabled state (i.e., an active state) and the other mapping table is in a disabled state (i.e., a backup state) at any time period. If the current task is an SE task and it is required to switch to an eSIM task, the SE mapping table is first copied to MAP TEMP, then the eSIM mapping table is copied to MAP IN USED, and finally the SE mapping table in MAP TEMP is copied to MAP NOT USE. After the switching is completed, the SE mapping table is in the disabled state and the eSIM mapping table is in the enabled state, and the current virtual address accesses the eSIM data. For the case that the current task is an eSIM task and it is required to switch to an SE task, the case is similar, which will not be described herein again.
[0059] Optionally, the physical space includes a plurality of physical pages, and each physical page is provided with HE information, wherein the HE information includes context identification, a virtual address page number, a physical address page number and page version number information of the corresponding physical page.
[0060] Specifically, the HE information corresponds to the physical page one by one, and the HE information is stored in the HE hardware and is used to identify and distinguish the data of the SE and the eSIM.
[0061] Specifically, the context identification is used to represent the state and / or the belonging environment of the physical page.
[0062] Exemplarily, Figure 8 is a schematic diagram of context identification provided by an embodiment of the present disclosure. As shown in Figure 8 , the context identification includes four types of 0X0, 0X1, 0X2 and 0X3, wherein 0X0 represents that the physical page has not been allocated to the SE and the eSIM, 0X1 represents that the physical page has been allocated to the SE, 0X2 represents that the physical page has been allocated to the eSIM, and 0X3 is a reserved item which can be used to extend the state and / or the belonging environment of the physical page in the future.
[0063] Specifically, the virtual address page number refers to the page number of the corresponding virtual page of 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 can include the page version number and / or the negation result of the page version number.
[0065] Exemplarily, Figure 9 is a structural schematic diagram of HE information provided by an embodiment of the present disclosure. Figure 10 is a structural schematic diagram of an HE information example provided by an embodiment of the present disclosure. As shown in Figure 9As shown, the HE information includes the context identifier, the physical address page number, the virtual address page number, the page version number, the negation result of the "context identifier, physical address page number and virtual address page number", and the negation result of the page version number of the corresponding physical page. Accordingly, in the process of generating the HE information, the page version number, the context identifier, the virtual address page number and the physical address page number of the physical page need to be obtained, and the page version number, the context identifier, the virtual address page number and the physical address page number are subjected to negation operation respectively, so as 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, the HE information as shown in the figure can be generated. Figure 10
[0066] It can be understood that by setting on the virtual address, even if the SE and the eSIM use the same virtual address, they are mapped to different physical addresses, and on the physical address, each physical page has HE information indicating whether the current page data belongs to the SE or the eSIM, so as to realize the isolation of virtual + physical address.
[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 in the user space to which the data to be written is to be written, wherein the first target virtual address page number is mapped with the first target physical address page number;
[0069] Obtaining a second target virtual address page number of a virtual page in the rotation area, wherein the second target virtual address page number is mapped with the second target physical address page number;
[0070] Establishing a mapping between the second target physical address page number and the target buffer;
[0071] Disestablishing the mapping between the first target virtual address page number and the first target physical address page number, and disestablishing the mapping between the second target virtual address page number and the second target physical address page number, and establishing the mapping between the first target virtual address page number and the second target physical address page number, and establishing the mapping between the second target virtual address page number and the first target physical address page number;
[0072] Writing 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, and 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 comprises at least one buffer area, and an idle buffer area can be selected from the at least one buffer area as a target buffer area. The size of the buffer area is equal to the size of a physical page in the physical space.
[0076] Optionally, the method further comprises: in the case that the target buffer area is filled with data, writing the data in the target buffer area into a physical page corresponding to the second target physical address page number;
[0077] erasing the data in the physical page corresponding to the first target physical address page number;
[0078] canceling the mapping between the second target virtual address page number and the first target physical address page number, and establishing the mapping between the second target virtual address page number and a 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] An exemplary, Figure 11 is a logical diagram provided by an embodiment of the present disclosure for writing data to be written into a buffer area. Figure 12 is a logical diagram provided by an embodiment of the present disclosure for exchanging mapping physical pages. Figure 13 is a logical diagram provided by an embodiment of the present disclosure for submitting data to be written into a physical page. As Figure 11-13As shown, the user accesses the virtual address using the rotation mechanism to write the flow of data to be written as follows: (1) assuming the current context is SE, VID0~VID3 is SE available user space, VID100 is the rotation area, at this time, want to write SE user data (i.e. data to be written) to VID0, need to write SE user data to VID100 first, then determine the mapping between VID0 and PID10, then determine the mapping between VID100 and PID11, then map PID11 and WB0 (i.e. target buffer) to each other, and write SE user data to WB0. Exchange the PID mapped by VID0 and VID100, i.e. VID0 maps PID11 and VID100 maps PID10, after exchange, SE user data can be accessed through VID0, as long as SE user data in WB0 is not written to PID11, subsequent read and write of VID0 are read and write of WB0, since read and write of WB0 do not occur Flash erase and write action, thus greatly improving the read and write speed. When it is necessary to really write SE user data in WB0 to PID11 (such as data has crossed page, etc.), submit SE user data in WB0 to PID11, at this time, only one erase and write occurs, then erase the PID10 mapped by the rotation area VID100, release PID10 as free state, then the rotation area VID100 maps the next free page PID12 under the flash space pool, after mapping, the state of PID12 is locked as non-free (i.e. busy), thus, one rotation is completed.
[0080] It can be understood 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 and one write, the rotation mechanism not only greatly improves the read and write performance, but also has a qualitative leap in service life. Although the user writes the same block of virtual address, the actual Flash address written is rotated, which ensures that the Flash address erased and written each time is different, so that the number of times each page of Flash is erased and written is average, if there is no cross page, write to the buffer, reduce the number of Flash erase and write, further prolong the service life of the chip.
[0081] In summary, in the embodiments of the present disclosure, the SE and the eSIM coexist in the secure chip, and they share a physical space. A mapping area in the physical space is mapped as a virtual space. In the virtual space, a user space is divided into three parts, which are an SE private space, an eSIM private space, and a public space. The SE private space and the eSIM private space cannot access each other. When the private space is insufficient, the public space can be used continuously, so as to achieve the purpose of space isolation and sharing. Moreover, the size of the private space can be dynamically adjusted. When the user initially has a small space demand and sets a small private space, if the private space is not sufficient for the system to run at the minimum requirement due to the surge of business in the later period, the private space can be increased by issuing a command, so as to ensure the basic business of the system and the normal operation of the system. If the traditional power-on fixed space effect is to be maintained, the public space can be configured as 0, so as to achieve the space allocation scheme. The space allocation scheme is isolated, shared, and flexible, and can meet the business demand of various scenes of different users. Moreover, in the aspects of SE and eSIM data isolation / switching / recognition, two mapping tables are established. The same virtual address of the two mapping tables is mapped to different physical addresses. Moreover, the context is added to identify the system to which the physical page belongs, so as to realize the isolation and recognition of data. The switching of the mapping table is used to realize the switching of data. Finally, the secure chip SE and the eSIM space are shared and isolated. The private space can be dynamically adjusted, and the effect of high compatibility is achieved. Moreover, the rotation mechanism is matched, so as to improve the data read / write speed, ensure the balanced use frequency of the physical page, and prolong the service life of the chip.
[0082] Figure 14 FIG. 1 is a structural schematic diagram of an SE and eSIM storage space management device provided by the embodiments of the present disclosure. The SE and eSIM storage space management device can be understood as the electronic device or part of the functional modules in the electronic device described above. The electronic device includes a secure chip integrated with an SE and an eSIM. The secure chip integrated with the SE and the eSIM includes a physical space. The physical space includes a mapping area. The mapping area is used to be mapped as a virtual space through a MAP mechanism. The virtual space includes a user space. Figure 14 As shown in FIG. 1, the SE and eSIM storage space management device includes:
[0083] The user space division module 1410 is configured to divide the user space into an SE private space, an eSIM private space and a common 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, the common space is used to store SE user data in the case that the SE private space is full of data and to store eSIM user data in the case that the eSIM private space is full of data, and the space in the user space used to store SE user data is provided with a firewall and / or the space used to store eSIM user data is provided with a firewall to isolate the space used to store SE user data from the space used to store eSIM user data.
[0084] Optionally, the apparatus further comprises a first adjustment module configured to adjust the size of the SE private space in response to an SE private space adjustment instruction and to adjust the size of the common space accordingly.
[0085] Optionally, the apparatus further comprises a second adjustment module configured to adjust the size of the eSIM private space in response to an eSIM private space adjustment instruction and to adjust the size of the common space accordingly.
[0086] Optionally, the apparatus further comprises a switching module configured to enable the SE mapping table and disable the eSIM mapping table in the case that an SE task is running.
[0087] Optionally, the apparatus further comprises a switching module configured to enable the eSIM mapping table and disable the SE mapping table in the case that an eSIM task is running.
[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 comprises a plurality of physical pages, and each of the physical pages is provided with HE information, wherein the HE information comprises context identification, virtual address page number, physical address page number and page version number information of the corresponding physical page.
[0090] Optionally, the virtual space further comprises a system space, and the system space comprises a rotation area.
[0091] The first determination module is configured to determine a first target virtual address page number of a virtual page to which data is to be written in the user space in response to a write instruction, wherein the first target virtual address page number is mapped to a first target physical address page number.
[0092] The first obtaining module is configured to obtain a second target virtual address page number of a virtual page where the rotation area is located, wherein the second target virtual address page number is mapped with a second target physical address page number.
[0093] The first establishing module is configured to establish a mapping between the second target physical address page number and a target buffer.
[0094] The first exchanging module is configured to cancel the mapping between the first target virtual address page number and the first target physical address page number, and cancel the mapping between the second target virtual address page number and the second target physical address page number, and establish the mapping between the first target virtual address page number and the second target physical address page number, and establish the mapping between the second target virtual address page number and the first target physical address page number.
[0095] The first writing module is configured to write the data to be written into the target buffer.
[0096] Optionally, the apparatus further includes 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 in a case where the target buffer is filled with data.
[0097] The first erasing module is configured to erase data in a physical page corresponding to the first target physical address page number.
[0098] The first rotation module is configured to cancel the mapping between the second target virtual address page number and the first target physical address page number, and establish a mapping between the second target virtual address page number and a third target physical address page number, wherein the physical page corresponding to the third target physical address page number is a next physical page of the physical page corresponding to the second target physical address page number.
[0099] The apparatus provided in the embodiment can execute the method of any of the above embodiments, and has similar execution modes and beneficial effects, which will not be described here again.
[0100] The disclosure also provides an electronic device, which includes a memory, and a processor. The memory stores a computer program. When the computer program is executed by the processor, the method of any of the above embodiments can be implemented.
[0101] An example of the method is shown in FIG. 8. Figure 15 FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the disclosure. The following specifically refers to the embodiment shown in FIG. 1. Figure 15The diagram illustrates a structural schematic suitable for implementing the electronic device 1500 in the embodiments of this disclosure. The electronic device 1500 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 15 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0102] like Figure 15 As shown, electronic device 1500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1502 or a program loaded from storage device 1508 into random access memory (RAM) 1503. The RAM 1503 also stores various programs and data required for the operation of electronic device 1500. The processing device 1501, ROM 1502, and RAM 1503 are interconnected via bus 1504. Input / output (I / O) interface 1505 is also connected to bus 1504.
[0103] Typically, the following devices can be connected to I / O interface 1505: input devices 1506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1509. Communication device 1509 allows electronic device 1500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 15 An electronic device 1500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0104] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1509, or installed from storage device 1508, or installed from ROM 1502. When the computer program is executed by processing device 1501, it performs the functions defined in the methods of embodiments of this disclosure.
[0105] Note that the computer readable medium described above in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium can be, for example and without limitation, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer readable program code is contained. Such a propagated data signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wire, cable, RF, etc., or any suitable combination thereof.
[0106] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0107] The computer readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device, and can be accessed via the electronic device.
[0108] The computer readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, cause the electronic device to: in response to a user space allocation instruction, divide the user space into an 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 in the case that the SE private space is full of data and store eSIM user data in the case that the eSIM private space is full of data, and the space in the user space corresponding to the space storing the SE user data is provided with a firewall and / or the space storing the eSIM user data is provided with a firewall to isolate the space storing the SE user data and the space storing the eSIM user data from each other.
[0109] Computer program code for carrying out operations of the present disclosure can be written in any of one or more programming languages, including object oriented programming languages such as Java, Smalltalk, C++, or conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can 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 the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0110] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0111] The units described in the embodiments of the present disclosure can be implemented by means of software, or by hardware. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0112] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0113] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0114] The embodiments of the present disclosure also provide a computer-readable storage medium, wherein the storage medium stores a computer program. When the computer program is executed by a processor, the method of any of the above-mentioned embodiments can be implemented, and the execution manner and beneficial effects are similar, which will not be described here again.
[0115] It should be noted that, in this document, relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a... " does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0116] The foregoing is merely illustrative of the various implementations of the present disclosure and the general principles thereof. Numerous modifications can be made to these illustrations, and equivalents can be substituted therefor, without departing from the scope of the present disclosure. The specific embodiments commensurate with the specific application are intended to be illustrative only and not limiting of the scope of the application as set forth in the following claims.
Claims
1. A method for managing storage space of SE and eSIM, characterized in that, The application is applied to an electronic device, the electronic device comprising a secure chip integrated with an SE and an eSIM, the secure chip integrated with the SE and the eSIM comprising a physical space, the physical space comprising a mapping area, the mapping area being used to be mapped into a virtual space through a MAP mechanism, the virtual space comprising a user space, wherein the method comprises: in response to a user space allocation instruction, dividing the user space into an 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 in the case that the SE private space is full of data and to store eSIM user data in the case that the eSIM private space is full of data, and the space in the user space storing the SE user data is provided with a firewall and / or the space storing the eSIM user data is provided with a firewall to isolate the space storing the SE user data from the space storing the eSIM user data.
2. The method of claim 1, wherein, The method further comprises: in response to an SE private space adjustment instruction, adjusting the size of the SE private space and correspondingly adjusting the size of the public space; and / or, in response to an eSIM private space adjustment instruction, adjusting the size of the eSIM private space and correspondingly adjusting the size of the public space.
3. The method of claim 1, wherein, The method further comprises: in the case that an SE task is running, enabling the SE mapping table and disabling the eSIM mapping table; in the case that an eSIM task is running, enabling the eSIM mapping table and disabling the SE mapping table.
4. The method of claim 3, wherein, The same virtual address in the SE mapping table and the eSIM mapping table is mapped with different physical addresses.
5. The method of claim 3, wherein, The physical space comprises a plurality of physical pages, each of the physical pages being provided with HE information, wherein the HE information comprises context identification, virtual address page number, physical address page number and page version number information of the corresponding physical page.
6. The method of claim 1, wherein, The virtual space further comprises a system space, the system space comprising a rotation area, wherein the method further comprises: in response to a write instruction, determining a first target virtual address page number of a virtual page in the user space to which data to be written is to be written, wherein the first target virtual address page number is mapped with a first target physical address page number; obtaining a second target virtual address page number of a virtual page in the rotation area, wherein the second target virtual address page number is mapped with a second target physical address page number; establishing a mapping between the second target physical address page number and a target buffer; canceling the mapping between the first target virtual address page number and the first target physical address page number and the mapping between the second target virtual address page number and the second target physical address page number, and establishing the mapping between the first target virtual address page number and the second target physical address page number and the mapping between the second target virtual address page number and the first target physical address page number; write the to-be-written data into the target buffer.
7. The method of claim 6, wherein, Further comprising: in the case that 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; erasing data in a physical page corresponding to the first target physical address page number; canceling the mapping between the second target virtual address page number and the first target physical address page number, and establishing a mapping between the second target virtual address page number and a 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. An SE and eSIM storage space management apparatus, characterized by, The electronic device comprises a security chip integrated with an SE and an eSIM, the security chip integrated with the SE and the eSIM comprises a physical space, the physical space comprises a mapping area, the mapping area is used to be mapped into a virtual space through a MAP mechanism, and the virtual space comprises a user space. The user space division module is configured to divide the user space into an SE private space, an eSIM private space, and a common 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, the common space is used to store SE user data in the case that the SE private space is filled with data and to store eSIM user data in the case that the eSIM private space is filled with data, and a space in the user space used to store the SE user data is provided with a firewall and / or a space used to store the eSIM user data is provided with a firewall to isolate the space used to store the SE user data from the space used to store the eSIM user data.
9. An electronic device, comprising: The electronic device comprises a security chip integrated with an SE and an eSIM, the security chip integrated with the SE and the eSIM comprises a physical space, the physical space comprises a mapping area, the mapping area is used to be mapped into a virtual space through a MAP mechanism, and the virtual space comprises a user space. The processor and the memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method in any one of claims 1-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 the processor, the method in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Method for forwarding data through wireless sensor network switch
CN102469526A
Methods and apparatus to manage inactive electronic subscriber identity modules
US20200288298A1