Isolation method, terminal equipment and storage medium
By isolating the storage space of the terminal device into two independent sub-storage spaces and running under different operating systems, the problems of high cost and poor user experience of hardware-level isolation are solved, and high security and low cost are achieved. Terminal device solution.
Patent Information
- Application Number
- CN202311005474.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, hardware-level isolation method requires customized hardware, resulting in high equipment costs, long development cycles and poor user experience, and cannot effectively meet the security needs of terminal equipment in dual working modes.
By isolating the storage space of the terminal device into two independent sub-storage spaces and running under different operating systems, either operating system cannot access the storage space under the other party's operating system, and hardware-level isolation is achieved.
While meeting the security needs of terminal devices in dual-working mode, it reduces the cost of equipment, improves the isolation security between systems, and avoids the risks of data leakage and system attacks.
Smart Images

Figure CN119475320A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent terminals, and in particular to an isolation method, terminal equipment and storage medium. Background Art
[0002] With the continuous development of electronic technology, the functions of terminal devices (for example, mobile phones) are becoming more and more powerful. As the application scenarios of terminal devices expand, people also put forward more requirements for terminals. For example, one device can be used for two purposes.
[0003] One device for two purposes means that a terminal device can meet the needs of two scenarios at the same time, for example, life scenarios and work scenarios. In work scenarios, terminal devices are usually required to have higher security. For example, scenarios such as government offices, police work, and law enforcement require terminal devices to have higher security. However, life scenarios usually do not require higher security for terminal devices. Therefore, the current common practice is to divide a terminal device into two working modes, and isolate the data between the two working modes to ensure security.
[0004] Currently, the above isolation methods include application-level isolation, system-level isolation and hardware-level isolation. For hardware-level isolation, it is usually necessary to design through customized hardware, which has high equipment cost, long development cycle and poor user experience. Summary of the invention
[0005] This article provides an isolation method, a terminal device, and a storage medium, which can reduce the cost of the device while meeting the security of the terminal device in a dual working mode.
[0006] In a first aspect, the present invention provides an isolation method, which is applied to a terminal device, wherein the terminal device has a first operating system and a second operating system, and comprises: isolating the storage space of the terminal device into a first sub-storage space and a second sub-storage space; the first sub-storage space operates in the first operating system, and the second sub-storage space operates in the second operating system, wherein the first operating system cannot access the content of the second sub-storage space, and the second operating system cannot access the content of the first sub-storage space; using a first storage partition table to manage the first sub-storage space, and using a second storage partition table to manage the second sub-storage space.
[0007] In this article, by isolating the physical storage in the terminal device into two independent storage spaces and running them under different operating systems, neither operating system can access the storage space under the other operating system, thereby achieving hardware-level isolation and meeting different levels of security requirements in the dual systems.
[0008] In one possible implementation manner, the storage space is a Flash storage space.
[0009] In one possible implementation, the first operating system and the second operating system run in a time-sharing manner.
[0010] In this article, by time-sharing the two operating systems, the corresponding physical memory can only work under the current operating system, thereby achieving physical-level isolation while meeting the security level requirements under different operating systems.
[0011] In one possible implementation, the first storage partition table has a first shared partition, and / or the second storage partition table has a second shared partition, and the first shared partition and the second shared partition jointly point to the first sub-storage space or the second sub-storage space.
[0012] In this article, for shared partitions, two storage partition tables can point to the same physical storage area, thereby saving physical space.
[0013] In one possible implementation manner, the first storage partition table has a first extended partition, and or the second storage partition table has a second extended partition.
[0014] In this article, by expanding the partitions of different storage partition tables, user-specific data or sensitive data can be stored, thereby meeting different business needs and improving user experience.
[0015] In one possible implementation, the use of the first storage partition table to manage the first sub-storage space and the use of the second storage partition table to manage the second sub-storage space include: obtaining a system type, wherein the system type is used to characterize the current operating system; determining a storage partition table to be burned according to the system type; and burning the storage partition table to be burned to the sub-storage space corresponding to the current operating system.
[0016] In this article, different operating systems are distinguished by system type, and the storage partition table is burned into the storage space under the corresponding system operation, so that the storage partition table can effectively manage the corresponding storage space.
[0017] In one possible implementation manner, the system type is set in a storage partition table file.
[0018] In this article, by setting the system type in the storage partition table file, the system type can be quickly obtained, thereby improving the burning efficiency.
[0019] In one possible implementation, the management of the first sub-storage space using the first storage partition table and the management of the second sub-storage space using the second storage partition table include: in response to the power-on of the terminal device, loading a default storage partition table, wherein the default storage partition table is the first storage partition table or the second storage partition table; reading a system type, wherein the system type is used to characterize the current operating system; and starting a corresponding operating system according to the system type.
[0020] In this article, entering the corresponding operating system through the system type can facilitate users to enter the required operating system and meet the different security needs of users.
[0021] In one possible implementation manner, the system type is set in a miscellaneous partition, and the miscellaneous partition is a partition shared by the first sub-storage space and the second sub-storage space.
[0022] In this article, by setting the system type in the miscellaneous partition, the system type can be quickly obtained, thereby improving the startup efficiency of the operating system.
[0023] In one possible implementation, the method further includes: in response to a request for setting a security service, virtualizing a user identifier according to a current operating system to obtain a virtual user identifier corresponding to the current operating system; and binding the virtual user identifier to security data set by the user and storing the resultant.
[0024] In this article, by virtualizing the user's identity, different security services can be set under different operating systems, thereby solving the conflict problem for the same security service under different operating systems.
[0025] In one possible implementation, the method further includes: in response to a verification request for a security service, virtualizing a user identifier according to a current operating system to obtain a virtual user identifier corresponding to the current operating system; obtaining corresponding target security data according to a query based on the virtual user identifier; and verifying the security data input by the user based on the target security data.
[0026] In this article, by virtualizing the user's identity, the security service can be verified through the virtual user identity under different operating systems, thereby solving the conflict problem for the same security service under different operating systems.
[0027] In one possible implementation manner, the terminal device is a mobile phone or a tablet computer.
[0028] In one possible implementation, the first operating system is one of Windows, Hongmeng or Android, and the second operating system is one of Windows, Hongmeng or Android.
[0029] In one possible implementation manner, the first operating system and the second operating system have different security isolation levels.
[0030] In this article, by setting different security levels for different operating systems, different security needs of users can be met.
[0031] In one possible implementation, the method further includes: in response to a first password entered by a user in the first operating system, logging into the first operating system; or, in response to a second password entered by a user in the second operating system, logging into the second operating system.
[0032] In this article, by setting different security keys under different operating systems, the flexibility of key setting can be improved and the user experience can be improved.
[0033] In one possible implementation manner, the first password is the same as the second password; or, the first password is different from the second password.
[0034] In a second aspect, this document provides an isolation device, comprising one or more functional modules, wherein the one or more functional modules are used to implement the isolation method as described in the first aspect.
[0035] In a third aspect, this document provides a terminal device, comprising: a processor and a memory, wherein the memory is used to store a computer program; the processor is used to run the computer program to implement the isolation method described in the first aspect.
[0036] In a fourth aspect, this document provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer implements the isolation method described in the first aspect.
[0037] In a fifth aspect, this document provides a computer program, which, when executed on a processor of a terminal device, enables the terminal device to execute the isolation method as described in the first aspect.
[0038] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1A schematic diagram of the structure of a terminal device provided in an embodiment of this invention;
[0040] Figure 2 A schematic diagram of the system architecture provided in the embodiments of this article;
[0041] Figure 3 A schematic diagram of a flow chart of an embodiment of the isolation method provided herein;
[0042] Figure 4 A schematic diagram of the format of an embodiment of a storage partition table provided in this article;
[0043] Figure 5 A schematic diagram for comparing storage partition tables provided in the embodiments of this article;
[0044] Figure 6 A schematic diagram of another embodiment of the isolation method provided herein;
[0045] Figure 7 A schematic diagram of the format of another embodiment of the storage partition table provided in this article;
[0046] Figure 8 A schematic flow chart of another embodiment of the isolation method provided herein;
[0047] Fig. 9 A schematic flow chart of another embodiment of the isolation method provided herein;
[0048] Fig.10 A schematic flow chart of another embodiment of the isolation method provided herein;
[0049] Fig.11 A schematic structural diagram of an embodiment of the isolation device provided in this article. DETAILED DESCRIPTION
[0050] In the embodiments of this document, unless otherwise specified, the character " / " indicates that the objects before and after the association are in an or relationship. For example, A / B can represent A or B. "And / or" describes the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.
[0051] It should be pointed out that the words "first", "second", etc. involved in the embodiments of this article are only used to distinguish the description purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated, nor can they be understood as indicating or implying order.
[0052] In the embodiments herein, "at least one" refers to one or more, and "plurality" refers to two or more. In addition, "at least one of the following" or similar expressions refers to any combination of these items, which may include any combination of single items or plural items. For example, at least one of A, B, or C may represent: A, B, C, A and B, A and C, B and C, or A, B and C. Among them, each of A, B, and C may be an element itself, or a set containing one or more elements.
[0053] In the embodiments herein, "exemplary", "in some embodiments", "in another embodiment", etc. are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" herein should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0054] In the embodiments of this document, "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. In the embodiments of this document, communication and transmission can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. For example, transmission can include sending and / or receiving, and can be a noun or a verb.
[0055] The equal to involved in the embodiments of this article can be used in conjunction with greater than, and is applicable to the technical solution adopted when greater than, and can also be used in conjunction with less than, and is applicable to the technical solution adopted when less than. It should be noted that when equal to is used in conjunction with greater than, it cannot be used in conjunction with less than; when equal to is used in conjunction with less than, it cannot be used in conjunction with greater than.
[0056] With the continuous development of electronic technology, the functions of terminal devices (for example, mobile phones) are becoming more and more powerful. As the application scenarios of terminal devices expand, people also put forward more requirements for terminals. For example, one device can be used for two purposes.
[0057] One device for two purposes means that a terminal device can meet the needs of two scenarios at the same time, for example, life scenarios and work scenarios. In work scenarios, terminal devices usually require higher security. For example, scenarios such as government offices, police work, and law enforcement require higher security for terminal devices. However, life scenarios usually do not require higher security for terminal devices. Therefore, the current common practice is to divide a terminal device into two working modes, and isolate the data between the two working modes to ensure security.
[0058] Currently, the above isolation methods include application-level isolation, system-level isolation and hardware-level isolation. For hardware-level isolation, it is usually necessary to design through customized hardware, which has high equipment cost, long development cycle and poor user experience.
[0059] Traditional multi-mode mobile office terminals generally have two technical systems, for example, isolation technology based on lightweight Linux container (Linux Container, LXC) and isolation technology based on multi-user framework. In the above two existing technical solutions, the same kernel program of the same operating system and the same system program are dynamically virtualized.
[0060] Among them, application-level isolation generally adopts Android multi-user technology dual-domain isolation and application sandbox technology dual-domain isolation. Application-level isolation technology is mature and easy to develop, and is usually used in ordinary personal mobile office fields. Work and personal spaces share a Linux kernel, system services and framework layer, and the isolation level is low.
[0061] System-level isolation is generally performed using the LXC container technology. LXC isolates system resources at runtime based on namespace and cgroup technologies. The two systems run simultaneously, sharing the same Linux kernel and hardware peripherals. The isolation level is moderate, and is suitable for mobile office use in government and enterprise settings that require high security and dual-active and dual-online systems.
[0062] Existing system isolation solutions based on lightweight LXC technology have inherent system architecture and application scenarios, especially when personal systems are directly connected to the Internet, and weak control mechanisms are used in application installation, peripheral use, network connection, etc., which poses a greater security risk and is difficult to meet the security requirements of users with high isolation security demands. Among them, security risks mainly come from the following aspects:
[0063] First, the Android systems installed in the two containers run at the same time, and there are communication channels and business interaction scenarios on the control plane between the containers. For example, the two containers can dynamically share the system status, including the system mobile network related status, application communication reminders of the background system, etc. The existence of the control communication channel between containers may cause the leakage of user data of different systems between containers.
[0064] Second, the Android systems installed in the two containers can access the intranet and mobile Internet at the same time. There are data anchors on the business side of the communication channel between the container and the outside world, which may pose a security risk that the mobile network communication of the working container may be attacked by a network attack from the Internet.
[0065] Third, the Android systems installed in the two containers share the same user data partition, and the data of the two containers is isolated only by mounting different directories of the data partition. When there are vulnerabilities in the file system or it is attacked, there is a risk of user data leakage between different systems between containers.
[0066] Fourth, the two container operating systems share the same Linux kernel image, system image, and configuration image. When the system is tampered with or the underlying system vulnerability is attacked, the different systems of the two containers are subject to the security risk of such attacks.
[0067] Based on the above problems, the embodiments of this document propose an isolation method, which is applied to a terminal device and can reduce the cost of the device while meeting the security of the terminal device in a dual working mode.
[0068] The terminal device may be a mobile terminal, for example, a mobile phone, a tablet computer, etc. A mobile terminal may also be referred to as a user equipment (UE), an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user device. The mobile terminal can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set top box (STB), a customer premise equipment (CPE) and / or other devices used to communicate on a wireless system and a next-generation communication system, for example, a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network, etc.
[0069] This paper aims to address the shortcomings of application-level isolation, system-level isolation, and hardware-level isolation, and mainly solves the inherent security risks caused by the simultaneous operation of two systems and the sharing of system resources. Based on application-level isolation and system-level isolation, this paper isolates the system's storage resources, computing resources, and hardware peripherals to achieve hardware-level security isolation between the two systems, ensuring that if one system is attacked or destroyed, it will not affect the normal operation of the other system and the security of user data.
[0070] This article mainly uses the method of physical isolation of storage space to build two systems of terminal devices to run in time-sharing mode. By sacrificing a certain degree of convenience, the isolation security between systems is greatly improved. Its security is mainly reflected in the following aspects:
[0071] First, only one of the two systems in the terminal device can run at a time, and there is no control-plane or business-plane interaction channel or business scenario between the two systems, which completely solves the problem of user data leakage between the two systems when the systems are running.
[0072] Second, the two systems have different user data storage partitions. When one system is running, the other system is shut down. When one system is running, it cannot access the user data storage partition of the other system. When one system is running, the user data partition of the other system is encrypted, which completely solves the problem that when the file system of one system has vulnerabilities or is hacked, the user data of the other system will not be stolen or destroyed.
[0073] Third, the two systems have different kernel images, system images, and configuration images. When one system is running, it cannot access the kernel image, system image, and configuration image that exist in isolation on the other system. This completely solves the problem that when one system image is tampered with or hacked, the program of the other system can still run normally, and user data will not be stolen or damaged.
[0074] This article uses a technology based on physical isolation of storage space to isolate the kernel images, system images, configuration images, and user data of the two systems. On the basis of commercial terminal hardware not being customized, two different mobile operating systems can be installed, which is called a dual-ROM terminal, which has the following advantages:
[0075] First, the overall architecture design of the physical isolation of the dual ROM terminal storage space divides the original storage device into two storage spaces. The two storage spaces are bound to two operating systems respectively and cannot access each other.
[0076] Secondly, the design is based on the dual partition table isolation method. The dual ROM terminal has two independent storage partition tables, which manage the two storage spaces respectively. The two systems burn and load their own partition tables in complete isolation without affecting each other.
[0077] Thirdly, a security service isolation method based on hardware abstraction layer (HAL) virtual user identity adaptation is designed to solve the security storage conflict problem of similar security services in two systems of dual ROM terminals. Programs above the system framework layer are unaware of the differences introduced by the virtual user identity, and the system has good portability.
[0078] Fourthly, two typical application scenarios of dual-ROM terminals, single system + single system or single system + dual system, can be designed to meet the hardware-level physical isolation security requirements in the field of high-security mobile office.
[0079] The dual ROM terminal described in this article is a secure terminal based on physical isolation of storage. It is a dual-mode mobile office terminal that can be customized based on commercial terminal hardware through underlying software. For example, the terminal device can isolate the storage device into two spaces, carrying two completely independent systems, the work system and the personal system, and supporting cold start and restart switching of the system. The two operating systems of the dual ROM terminal support independent flashing, upgrading, and factory recovery operations. The dual ROM terminal is suitable for high-security mobile office segments that have strong demands for security isolation of programs, configurations, and data of the two systems (modes).
[0080] The dual-ROM terminal has two independent storage spaces on the storage device, with the work system and the personal system installed respectively. The two independent operating systems can install applications independently, have independent storage space, independent CPU / memory computing resources, and independent network connections. The two systems are used to access the work intranet for secure mobile office and access the mobile Internet for personal use.
[0081] Figure 1 First, a schematic structural diagram of the terminal device 100 is shown as an example.
[0082] The terminal device 100 may include: at least one processor; and at least one memory communicatively connected to the processor, wherein the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method provided in the embodiment shown in this document.
[0083] Figure 1 A block diagram of an exemplary terminal device 100 suitable for implementing the embodiments of this document is shown. Figure 1 The terminal device 100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of this document.
[0084] like Figure 1As shown, the components of the terminal device 100 may include but are not limited to: one or more processors 110, a memory 120, a communication bus 140 connecting different system components (including the memory 120 and the processor 110), and a communication interface 130.
[0085] The communication bus 140 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.
[0086] The terminal device 100 typically includes a variety of computer system readable media, which can be any available media that can be accessed by the device, including volatile and non-volatile media, removable and non-removable media.
[0087] The memory 120 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Figure 1 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the communication bus 140 via one or more data medium interfaces. The memory 120 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments herein.
[0088] A program / utility having a set (at least one) of program modules may be stored in memory 120, such program modules including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.
[0089] The terminal device 100 may also communicate with one or more external devices (e.g., keyboard, pointing device, display, etc.), one or more devices that enable a user to interact with the device, and / or any device that enables the device to communicate with one or more other devices (e.g., network card, modem, etc.). Such communication may be performed via the communication interface 130. Furthermore, the terminal device 100 may also communicate with the network adapter ( Figure 1 The network adapter can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the communication bus 140. It should be understood that although Figure 1 Not shown, other hardware and / or software modules may be used in conjunction with the terminal device 100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Drives; hereinafter referred to as: RAID) systems, tape drives, and data backup storage systems.
[0090] The processor 110 executes various functional applications and data processing by running the programs stored in the memory 120, such as implementing the methods provided in the embodiments of this document.
[0091] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of this document is only for illustrative purposes and does not constitute a structural limitation on the terminal device 100. In other embodiments of this document, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0092] Now combined Figure 2-Figure 10 The isolation method provided in the embodiments of this article is described.
[0093] Figure 2 This is a system architecture diagram of the terminal device provided in the embodiments of this article. Figure 2The terminal device has two independent operating systems. For example, operating system 1 and operating system 2. The two operating systems correspond to independent read-only memories (ROMs). For example, operating system 1 is equipped with ROM1, and operating system 2 is equipped with ROM2. ROM1 and ROM2 are isolated from each other, that is, operating system 1 cannot access the content in ROM2, and operating system 2 cannot access the content in ROM1.
[0094] It is understandable that the ROM1 and ROM2 of the terminal device can be Flash storage space, or the ROM1 and ROM2 of the terminal device can also be other types of storage space, and this document does not specifically limit the type of storage space of the terminal device. Operating system 1 can be one of Windows system, Hongmeng system or Android system, and operating system 2 can be one of Windows system, Hongmeng system or Android system, and this document does not specifically limit the type of operating system in the terminal device.
[0095] The operating system 1 and the operating system 2 can independently install application programs and have independent central processing units (CPUs), memory computing resources, and network connections.
[0096] For example, operating system 1 can be used for office work, for example, operating system 1 can be used to access the enterprise intranet for mobile office work, which requires high security; operating system 2 can be used for personal life, for example, operating system 2 can be used to access the mobile Internet for personal use, which does not require high security. In other words, operating system 1 and operating system 2 can have different security isolation levels.
[0097] It can be understood that the above examples only show how the single-system ROM1 and the single-system ROM2 are used in their respective application scenarios, but do not constitute a limitation to the embodiments of this document. In some embodiments, the application scenarios can also be constituted by the single-system ROM1 and the dual-system ROM2. For example, ROM1 can be applied to high-security law enforcement / duty / confidential office scenarios, and ROM2 can be applied to low-security office scenarios, or low-security personal use scenarios.
[0098] The operating system 1 and the operating system 2 are operated in a time-sharing manner, that is, when the operating system 1 is operated, the operating system 2 is stopped; or when the operating system 2 is operated, the operating system 1 is stopped.
[0099] Operating system 1 and operating system 2 can be switched according to user needs. For example, the user can perform a switching operation on the terminal device. In response to the user's switching operation, the terminal device can switch from operating system 1 to operating system 2, or the terminal device can switch from operating system 2 to operating system 1.
[0100] In some optional embodiments, switching between operating systems can also be triggered by events, for example, it can be triggered by access control card swiping, or by geo-fence sensing, etc. The above triggering methods are not specifically limited in the embodiments of this article.
[0101] In addition, the two operating systems have different kernel images, system images, configuration images, and user data. For example, operating system 1 may have kernel image 1, system image 1, configuration image 1, and user data 1, and operating system 2 may have kernel image 2, system image 2, configuration image 2, and user data 2. When operating system 1 is running, it cannot access kernel image 2, system image 2, configuration image 2, and user data 2 in operating system 2, or, when operating system 2 is running, it cannot access kernel image 1, system image 1, configuration image 1, and user data 1 in operating system 1. This can prevent the system image in one operating system from being tampered with while the other operating system can operate normally and user data will not be stolen or damaged.
[0102] The terminal device has two independent storage partition tables, for example, storage partition table 1 and storage partition table 2, which manage two ROMs respectively. The two operating systems can burn and load the storage partition tables respectively, and the burning and loading are completely isolated between the two ROMs without affecting each other.
[0103] like Figure 3 FIG. 1 is a flow chart of an embodiment of the isolation method provided in this article. Figure 3 In the illustrated embodiment, the terminal device manages two ROMs respectively through two storage partition tables, specifically including the following steps:
[0104] Step 301, isolating a storage space into two sub-storage spaces.
[0105] Specifically, the terminal device may isolate its storage space into two sub-storage spaces. For example, the two sub-storage spaces may be ROM1 and ROM2 respectively.
[0106] For example, if the terminal device has 256GB storage space, the storage space of ROM1 can be isolated as 64GB, and the storage space of ROM2 can be isolated as 192GB. The address range of ROM1 can be 0-64GB, and the address range of ROM2 can be 64GB-256GB, or the address range of ROM2 can be 0-192GB, and the address range of ROM1 can be 192GB-256GB.
[0107] It is understandable that the above storage space allocation ratio is only an example description and does not constitute a limitation on the embodiments of this document. In some embodiments, other allocation ratios may be used.
[0108] Among them, ROM1 can work under operating system 1, and ROM2 can work under operating system 2. Operating system 1 and operating system 2 are two operating systems that run in time sharing. That is, at a time, only one operating system can run, for example, operating system 1 or operating system 2.
[0109] It is understandable that when operating system 1 is running, the user can manually switch to operating system 2, or switch from operating system 1 to operating system 2 by event triggering. Or,
[0110] When operating system 2 is running, the user can manually switch to operating system 1, or switch from operating system 2 to operating system 1 through event triggering.
[0111] The embodiments of this document do not specifically limit the above switching method.
[0112] For the above two operating systems, they have independent kernel images, system images, configuration images and user data. Exemplarily, operating system 1 has kernel image 1, system image 1, configuration image 1 and user data 1, and operating system 2 has kernel image 2, system image 2, configuration image 2 and user data partition 1. Among them, kernel image 1, system image 1, configuration image 1 and user data 1 are isolated from kernel image 2, system image 2, configuration image 2 and user data 2, and cannot access each other.
[0113] Step 302: manage the two sub-storage spaces respectively through two storage partition tables.
[0114] Specifically, after the storage space is isolated, the two isolated sub-storage spaces can be managed separately through two storage partition tables. For example, the two storage partition tables can be storage partition table 1 and storage partition table 2 respectively.
[0115] The storage partition table may be a GPT type partition table or other types of partition tables. The embodiments of this document do not specifically limit the type of the partition table.
[0116] The storage partition table 1 and the storage partition table 2 may be located in the head and tail physical areas of the two sub-storage spaces respectively.
[0117] In some optional embodiments, the storage partition table can be used to manage two partitions, for example, a first partition and a second partition, wherein the first partition can be a physical area corresponding to any sub-storage space, and the second partition can be a physical area corresponding to two sub-storages.
[0118] Exemplarily, taking storage partition table 1 as an example, storage partition table 1 may include a first partition and a second partition. The first partition of storage partition table 1 may be a physical area corresponding to ROM1, and the second partition of storage partition table 1 may be a physical area corresponding to ROM1 and ROM2. That is to say, the physical area managed by the second partition of storage partition table 1 is a physical area shared between ROM1 and ROM2, while the physical area managed by the first partition of storage partition table 1 is a physical area exclusively for ROM1.
[0119] Similarly, the storage partition table 2 may also include a first partition and a second partition. The first partition of the storage partition table 2 may be the physical area corresponding to ROM2, and the second partition of the storage partition table 2 may be the physical area corresponding to ROM1 and ROM2. That is to say, the physical area managed by the second partition of the storage partition table 2 is the physical area shared between ROM1 and ROM2, while the physical area managed by the first partition of the storage partition table 2 is the physical area exclusively used by ROM2.
[0120] For example, the physical area managed by the first partition of the storage partition table 1 can store data related to ROM1. Assuming that ROM1 is a working system, the physical area corresponding to ROM1 can store working data, or, assuming that ROM1 is a personal system, the physical area corresponding to ROM1 can store personal life data. The physical area managed by the second partition of the storage partition table 1 can store data shared by ROM1 and ROM2. For example, the data shared by ROM1 and ROM2 can include but are not limited to: calibration parameters of related devices such as cameras, speakers, microphones, device certificates, device identification, device root keys and other data.
[0121] In some optional embodiments, the storage partition table may further include an extended partition, wherein the extended partition may be used to store specific data, for example, the extended partition may store sensitive data of a user, and the sensitive data may be encrypted and stored in the extended partition.
[0122] Next, the storage partition table 1 is taken as an example for exemplary description. Figure 4 A schematic diagram of a storage partition table 1 is shown as an example.
[0123] refer to Figure 4 , the storage partition table 1 can be used to manage the physical area corresponding to ROM1, and the storage partition table 1 can include a shared partition, a kernel image partition, a configuration image partition, an extended partition, a user data partition and backup data. Among them, the shared partition can include a boot program image partition, and / or a shared device-level firmware partition, and / or a shared device-level parameter partition.
[0124] The form of the storage partition table 2 may specifically refer to the form of the storage partition table 1 in the above embodiment, which will not be described in detail here.
[0125] Since the traditional storage partition table is an independent partition table, in order to achieve hardware-level isolation, the traditional method is to expand the partition through the storage partition table. However, this method of expanding the partition table requires upgrading both the original partition and the extended partition at the same time during the upgrade, and it is impossible to upgrade the original partition or the extended partition independently, causing inconvenience in upgrading. In addition, this method of expanding the partition table is also less secure. For example, when the system is powered on and unlocked, both the original partition and the extended partition are in a decrypted state. When one partition is running, the security of the other partition cannot be guaranteed.
[0126] Figure 5 The difference between the traditional storage partition table and the storage partition table in this article is shown by way of example.
[0127] refer to Figure 5 , the traditional storage partition table has only one independent partition table, which includes a program / configuration partition, an extended partition, a user data partition, and a backup partition table. The storage partition table in the embodiment of this article may include two independent partition tables, for example, storage partition table 1 and storage partition table 2. Among them, the size of the physical area managed by storage partition table 1 and storage partition table 2 is the same as the size of the physical area managed by the traditional storage partition table. Taking the physical area managed by the traditional storage partition table as 256GB as an example, storage partition table 1 can manage a physical area of 64GB, and storage partition table 2 can manage a physical area of 192GB.
[0128] It can be seen that the embodiment of the present invention isolates the original storage space in the terminal device into two independent sub-storage spaces, and manages the two independent sub-storage spaces respectively through two independent storage partition tables. This allows the user to ensure the security of data in another system mode when operating in one system mode, without the need to improve the hardware in the existing terminal device, thereby reducing the cost of the device.
[0129] The above Figure 3-Figure 5The management of storage space is illustrated. As mentioned above, the storage space in this article is managed by two independent storage partition tables. The core of the management of the storage partition table is the burning of the partition table. Among them, the purpose of burning the partition table is to match the content managed by the storage partition table 1 and the storage partition table 2 with the capacity and address of ROM1 and ROM2, and burn the storage partition table 1 and the storage partition table 2 to the corresponding ROM space location.
[0130] It is understandable that the burning of the partition table can be applied to two scenarios: flashing or upgrading, but it does not constitute a limitation on the embodiments of this document. In some embodiments, it can also be applied to other scenarios.
[0131] Next, the following Figure 6 and Figure 7 The burning of the storage partition table is illustrated by way of example.
[0132] Figure 6 This is a flow chart of another embodiment of the isolation method provided herein, which specifically includes the following steps:
[0133] Step 601, obtaining the system type, and determining the storage partition table to be burned according to the system type.
[0134] Specifically, the system type may be read from a partition table file, wherein the partition table file may include the contents of the storage partition table 1 and the storage partition table 2.
[0135] For example, taking the storage partition table as a GPT type partition table, the format of the storage partition table is as follows: Figure 7 Reference Figure 7 The storage partition table may include a main table master boot record, a main table header, multiple main table partition entries, multiple partitions, a backup table header, and a backup table partition entry.
[0136] It can be understood that each of the main table master boot record, main table header, main table partition entry, partition, backup table header and backup table partition entry can be considered to be composed of one or more logical blocks (LB), among which the main table master boot record, main table header, main table partition entry, backup table header and backup table partition entry can be a single LB.
[0137] Each LB has its corresponding logical block address (Logical Block Address, LBA). Exemplarily, logical block address LBA0 may correspond to the master boot record of the main table, logical block address LBA1 may correspond to the main table header, logical block address LBA2 may correspond to partition entry 1, logical block address LBA3 may correspond to partition entry 2, logical block address LBA_N-1 may correspond to the backup table header, logical block address LBA_N-2 may correspond to the backup table partition entry 4, and so on, where N is the total number of logical blocks corresponding to the storage space.
[0138] It can be understood that, in the storage partition table, the main table header is located in the second logical block of the corresponding storage space, and the backup table header is located in the last logical block of the corresponding storage space.
[0139] Each partition entry records the partition name, logical block start address, logical block end address and other information of a partition. The physical area of each partition can be found through the partition entry. Among them, the logical block start address is used to represent the starting logical block corresponding to the partition, and the logical block end address is used to represent the ending logical block corresponding to the partition.
[0140] The partition table file may pre-set a system type, which is used to indicate different operating systems. For example, if the system type is 1, it may indicate that the current operating system is operating system 1; or, if the system type is 1, it may indicate that the current operating system is operating system 2.
[0141] The above system type values are only for illustrative purposes and do not constitute a limitation on the embodiments of this document. In some embodiments, the system type may also be represented by other numerical values.
[0142] It can be understood that, under operating system 1, operating system 1 is equipped with ROM1, therefore, when burning the storage partition table, storage partition table 1 can be burned to the corresponding ROM space location, for example, burned to ROM1; or, under operating system 2, operating system 2 is equipped with ROM2, therefore, when burning the storage partition table, storage partition table 2 can be burned to the corresponding ROM space location, for example, burned to ROM2.
[0143] In some optional embodiments, the system type may be preset in the burning script. When the burning script is started, the corresponding system type may be read, and the storage partition table to be burned may be determined according to the corresponding system type.
[0144] Step 602, burning the storage partition table to be burned into the corresponding storage space location.
[0145] Specifically, after the storage partition table to be burned is determined, the content in the partition table file can be written into the storage partition table to be burned, and the storage partition table to be burned can be burned to the corresponding storage space location.
[0146] Exemplarily, if the storage partition table to be burned is storage partition table 1, the content of storage partition table 1 can be found in the partition table file, the content of storage partition table 1 is updated to storage partition table 1, and the updated storage partition table 1 is burned to ROM 1. Alternatively, if the storage partition table to be burned is storage partition table 2, the content of storage partition table 2 can be found in the partition table file, the content of storage partition table 2 is updated to storage partition table 2, and the updated storage partition table 2 is burned to ROM 2.
[0147] Among them, the update of the content in the storage partition table may include a header update and a partition entry update, the header update includes a main table header update and a backup table header update, and the partition entry update may include a main table partition entry update and a backup table partition entry update. The main table header update is used to write the corresponding logical block address in the main table header of the storage partition table, and the backup table header update is used to write the corresponding logical block address in the backup table header of the storage partition table. The main table partition entry update is used to write the logical block start address and end address of the corresponding partition in the main table partition entry of the storage partition table, and the backup table partition entry update is used to write the logical block start address and end address of the corresponding partition in the backup table partition entry of the storage partition table.
[0148] For example, Figure 7 For example, assuming that the storage space of the terminal device is 256GB, which is divided into ROM1 and ROM2, the storage space of ROM1 is 64GB, and the storage partition table 1 manages the ROM1 storage space; the storage space of ROM2 is 192GB, and the storage partition table 2 manages the ROM2 storage space.
[0149] Among them, the value of the logical block corresponding to the master boot record of the main table of the storage partition table 1 is 0 (for example, LBA0), which is used to indicate that the master boot record of the main table occupies the first logical block of ROM1, the value of the logical block corresponding to the main table header of the storage partition table 1 can be 1 (for example, LBA1), which is used to indicate that the main table header of the storage partition table 1 occupies the second logical block of ROM1, and the value of the logical block corresponding to the main table partition entry 1 of the storage partition table 1 is 2, which is used to indicate that the main table partition entry 1 occupies the third logical block of ROM1 (for example, LBA2), and the values of the logical blocks corresponding to the remaining main table partition entries 1 can be specifically referred to the main table partition entry 1, which will not be repeated here. The value of the logical block corresponding to the backup table header of the storage partition table 1 can be 0+first offset-1 (for example, LBA_N-1), where LBA_N is the first offset, and N is the total number of logical blocks corresponding to ROM1, that is, the first offset can correspond to the storage space of ROM1, and the logical block corresponding to the backup table header can be the last logical block in ROM1.
[0150] The format of storage partition table 2 can be referred to Figure 7 The master table master boot record of the storage partition table 2 may be the first logical block occupied in ROM2, the main table header of the storage partition table 2 may be the second logical block occupied in ROM2, and the backup table header of the storage partition table 2 may be the last logical block occupied in ROM2. The method for determining the logical block corresponding to the content in the storage partition table 2 may specifically refer to the method for determining the logical block corresponding to the content in the storage partition table 1 in the above embodiment, which will not be repeated here.
[0151] If the storage partition table to be burned is storage partition table 1, the LBA of the last partition in storage partition table 1 indicates the end position of the physical area of ROM1. Or,
[0152] If the storage partition table to be burned is storage partition table 2, the logical block start address and end address of the shared partition in storage partition table 2 can point to ROM1, that is, the logical block addresses corresponding to the shared partitions in storage partition table 1 and storage partition table 2 can point to the same physical area, for example, the same physical area can be ROM1.
[0153] It can be understood that the same physical area as ROM1 is an exemplary description. In some embodiments, the logical block address corresponding to the shared partition in the storage partition table 1 and the storage partition table 2 can also be pointed to ROM2. The embodiments of this document do not specifically limit this.
[0154] For the isolated partitions in the storage partition table 2, the logical block start address and end address of each isolated partition can be added with a second offset, and each isolated partition can point to ROM 2. The amount of the second offset can be the amount of storage space of ROM 1, for example, 64 GB.
[0155] For the last partition in the storage partition table 2, the logical block start address of the last partition in the storage partition table 2 can be added with a second offset, and the logical block end address of the last partition in the storage partition table 2 can be the physical area end position of ROM2.
[0156] The above Figure 6 and Figure 7 The burning of the storage partition table is explained exemplarily. Figure 8 An exemplary description is given of the booting of the storage partition table.
[0157] Figure 8 This is a flow chart of another embodiment of the isolation method provided in this article, which specifically includes the following steps:
[0158] Step 801, in response to the terminal device being turned on, a default storage partition table is loaded.
[0159] Specifically, when the terminal device is powered on, any one storage partition table may be loaded by default, for example, storage partition table 1 or storage partition table 2 may be loaded by default.
[0160] Exemplarily, taking the default loading of storage partition table 1 as an example, after the terminal device is powered on, the boot program may load storage partition table 1 from ROM1 to the memory by default, and may create a corresponding memory partition table.
[0161] The method of loading the storage partition table 2 by default may specifically refer to the method of loading the storage partition table 1 by default, which will not be described in detail here.
[0162] Step 802, read the system type, and start the corresponding operating system according to the system type.
[0163] Specifically, after the storage partition table is loaded into the memory, the miscellaneous partition (misc partition) can be accessed. The miscellaneous partition is a special partition for information exchange between the main program, the boot program, and the recovery program.
[0164] It can be understood that the miscellaneous partition is a partition shared by ROM1 and ROM2.
[0165] In the miscellaneous partition, the system type may be preset, wherein the definition of the system type may be specifically referred to the relevant description in the above embodiment, which will not be repeated here.
[0166] Exemplarily, if the system type is determined to be operating system 1, step 803 may be executed; or,
[0167] If it is determined that the system type is operating system 2, storage partition table 2 may be loaded from ROM 2 to the memory to update the memory partition table, and then step 803 is executed.
[0168] Step 803, read the boot mode, and enter different modes under the current operating system according to the boot mode.
[0169] Specifically, after the memory partition table is determined, the boot mode can be read from the miscellaneous partition, where the boot mode may include a recovery mode and a normal mode.
[0170] It is understandable that the above modes are merely exemplary and do not constitute a limitation on the embodiments of this document. In some embodiments, other modes are also possible.
[0171] For example, taking the recovery mode and the normal mode as an example, if the boot mode read in the miscellaneous partition is the recovery mode, you can boot into the recovery mode of the current operating system. In this recovery mode, you can load the recovery mode-related image for security verification, and you can enter the system in the recovery mode after the security verification passes. Or,
[0172] If the boot mode read in the miscellaneous partition is normal mode, you can boot into the normal mode of the current operating system. In this normal mode, you can load the normal mode-related image for security verification, and you can enter the system in normal mode after the security verification passes.
[0173] The above Figure 8 The booting of the storage partition table is described in an exemplary manner. Next, the secure storage of the terminal device is described in an exemplary manner.
[0174] The security service of the terminal device uses secure storage to protect security data. For example, security data may include fingerprint data, face data, lock screen password and other security-related data. The above security data can be used in the security services of both operating system 1 and operating system 2, and the reset of a single system will not affect the security data already entered in the opposite system.
[0175] However, the two operating systems (e.g., operating system 1 and operating system 2) of the dual-ROM terminal device of the embodiment of this article share the Trusted Execution Environment (TEE) and its physical secure storage facilities, so some security services of the two operating systems will conflict. For example, when any operating system is running, the user lock screen password can be set, and different TEE encryption keys can be used for encryption. However, inside the TEE, it is impossible to distinguish which operating system the secure data belongs to.
[0176] Therefore, in order to solve the above security issues, it is also necessary to isolate the security data (for example, keys) under the two operating systems.
[0177] Fig. 9 A schematic diagram of a flow chart of another embodiment of the isolation method provided herein, Fig. 9 In the embodiment shown, the user identification of the same user in different operating systems is virtualized through the security service HAL to obtain different virtual user identifications corresponding to different operating systems, and corresponding security services are performed for different virtual user identifications of different operating systems, thereby solving the problem of security data conflict of the same user in different operating systems, which specifically includes the following steps:
[0178] Step 901, in response to a setting request for a security service, virtualize a user ID according to the current operating system to obtain a corresponding virtual user ID.
[0179] Specifically, the user may perform operations on the terminal device to set up security services on the terminal device.
[0180] Among them, the security services may include multiple types, for example, lock screen password, face recognition, fingerprint recognition and other security services. The above is only an exemplary description and does not constitute a limitation of the embodiments of this document. In some embodiments, other types of security services may also be included.
[0181] For example, the user's setting for security services may be setting a lock screen password, entering a face, entering a fingerprint, deleting a password, deleting a face, or deleting a fingerprint. The above is only an exemplary description and does not constitute a limitation on the embodiments of this document. In some embodiments, other types of operations may also be included.
[0182] It is understandable that different HAL layers may correspond to different security services.
[0183] For example, if the security service is a face recognition service, the corresponding HAL layer is a face recognition HAL layer. Or,
[0184] If the security service is a fingerprint recognition service, the corresponding HAL layer is the fingerprint recognition HAL layer.
[0185] For any security service, when the setting request of the security service is detected, the client agent (CA) deployed in the rich execution environment (REE) can initiate a call to the trusted application (TA) deployed in the TEE. The HAL layer of the security service can virtualize the user ID according to the current operating system to obtain a virtual user ID corresponding to the current operating system.
[0186] For example, if the operating system currently in which the user is running is operating system 1, a virtual user identifier corresponding to operating system 1 can be obtained through virtualization. Or,
[0187] If the operating system currently in which the user is located is operating system 2, a virtual user identifier corresponding to operating system 2 may be obtained through virtualization.
[0188] It is understandable that the user identifier can be used to identify the identity of the current user, and the virtual user identifier obtained after virtualization can be used to distinguish the identities of the same user under different operating systems.
[0189] It is understandable that the user identification may be a user ID or other types of identifications, and the embodiments of this document do not specifically limit the type of user identification.
[0190] There are two ways to obtain a virtual user ID:
[0191] In a first approach, the user ID under one of the operating systems is not virtualized, and the user ID under the other operating system is virtualized.
[0192] When virtualizing the current user ID, if the current operating system is determined to be operating system 1, no processing may be performed on the user ID of the current user; if the current operating system is determined to be operating system 2, the user ID of the current user under operating system 2 may be virtualized, for example, an offset may be added to the user ID of the current user to achieve virtualization of the user ID. Or,
[0193] If it is determined that the current operating system is operating system 2, no processing is performed on the user ID of the current user; if it is determined that the current operating system is operating system 1, the user ID of the current user under operating system 1 can be virtualized, for example, an offset can be added to the user ID of the current user to achieve virtualization of the user ID.
[0194] The method of adding the offset is merely an exemplary description and does not constitute a limitation on the embodiments of this document. In some embodiments, the user identifier may be virtualized by, for example, adding a prefix or a suffix.
[0195] It can be understood that the user identification with the offset added and the user identification without the offset added can distinguish users in different operating systems, thereby avoiding security service conflict problems.
[0196] Method 2: virtualize the user IDs of both operating systems.
[0197] When the current user ID is virtualized, if the current operating system is determined to be operating system 1, the user ID of the current user can be virtualized, for example, an offset can be added to the user ID of the current user, and the offset can be offset 1; if the current operating system is determined to be operating system 2, the user ID of the current user under operating system 2 can be virtualized, for example, another offset can be added to the user ID of the current user, and the offset can be offset 2, wherein offset 1 and offset 2 are different, thereby realizing the virtualization of the user ID.
[0198] Step 902: Bind the virtual user ID to the current security data and store them.
[0199] Specifically, after the virtual user identifier is obtained, the virtual user identifier may be bound to the security data set by the user and stored in a secure storage.
[0200] Among them, the security data set by the user is related to the current security business.
[0201] Exemplarily, if the current security service is to set a lock screen password, the security data set by the user is the lock screen password; or,
[0202] If the current security service is face entry, the security data set by the user is the face image; or,
[0203] If the current security service is fingerprint entry, the security data set by the user is the user's fingerprint.
[0204] It can be seen that by binding the security data set by the user with the virtual user ID corresponding to the current operating system, the security data under different operating systems can be distinguished, thereby avoiding conflicts in security services of the same user under different operating systems.
[0205] Fig.10 A schematic diagram of a flow chart of another embodiment of the isolation method provided herein, Fig.10In the embodiment shown, when a user verifies a security service, the user IDs of the same user in different operating systems are virtualized through the security service hardware abstraction layer (HAL) to obtain different virtual user IDs corresponding to different operating systems, and the security service is verified through the current virtual user ID, thereby solving the problem of security data conflict of the same user in different operating systems, which specifically includes the following steps:
[0206] Step 1001, in response to a security service authentication request, virtualize a user ID according to the current operating system to obtain a corresponding virtual user ID.
[0207] Specifically, users can perform security business-related operations on terminal devices, such as turning on the computer, logging into the system, accessing encrypted folders, etc.
[0208] When the terminal device detects the user's security service related operation, it can initiate a security service verification request to perform related verification work on the security service.
[0209] For example, taking power on as an example, when the user turns on the computer, the user can enter the corresponding lock screen password, at which time the lock screen password can be verified.
[0210] In response to the authentication request of the security service, the user identification can be virtualized according to the current operating system to obtain a corresponding virtual user identification.
[0211] Exemplarily, if the current operating system is operating system 1, the user identification can be virtualized based on operating system 1; or if the current operating system is operating system 2, the user identification can be virtualized based on operating system 2.
[0212] The specific method of virtualizing the user identification may refer to the relevant description in the above embodiment, which will not be repeated here.
[0213] Step 1002, obtaining corresponding target security data according to the virtual user identifier.
[0214] Specifically, after the virtual user identifier is obtained, the target security data corresponding to the virtual user identifier may be queried and obtained.
[0215] As mentioned above, the virtual user identification and the security data have a binding relationship and are stored in the terminal device. Therefore, the corresponding target security data can be queried in the terminal device through the virtual user identification.
[0216] Among them, the target security data may be related to the current security business.
[0217] Exemplarily, if the security service is fingerprint recognition, the target security data is the user's fingerprint.
[0218] Step 1003: Verify the security data input by the user.
[0219] Specifically, after the target security data is acquired, the security data input by the user may be verified based on the target security data.
[0220] The verification method may be: comparing the target security data with the security data input by the user this time, and if the two are consistent, the verification is considered successful; or
[0221] If the two are consistent, the verification can be considered to have failed.
[0222] For example, taking the verification of the lock screen password as an example, the target security data is the lock screen password stored in the terminal device and bound to the virtual user identifier, and the security data entered by the user is the lock screen password entered by the user this time. If the lock screen password entered by the user this time under the current operating system is consistent with the lock screen password stored in the terminal device, then the verification can be considered successful; if the lock screen password entered by the user this time under the current operating system is inconsistent with the lock screen password stored in the terminal device, then the verification can be considered failed.
[0223] In an optional embodiment, when logging into different operating systems, the user may enter the password corresponding to the operating system.
[0224] For example, when logging into the operating system 1, the user may enter password 1, and after the password 1 is verified, the user may log into the operating system 1, wherein password 1 is the user login password pre-set by the user in the operating system 1; or,
[0225] When the user logs into the operating system 2, the user can enter the password 2. After the password 2 is verified, the user can log into the operating system 2, wherein the password 2 is the user login password pre-set by the user in the operating system 2.
[0226] It is understandable that password 1 and password 2 may be the same, or password 1 and password 2 may be different, and the embodiments of this document do not specifically limit this.
[0227] Fig.11 Schematic diagram of the structure of an embodiment of the isolation device of this invention, as shown in FIG. Fig.11 As shown, the isolation device 1100 is applied to a terminal device, the terminal device has a first operating system and a second operating system, and the isolation device 1100 may include: wherein,
[0228] The isolation module 1110 is used to isolate the storage space of the terminal device into a first sub-storage space and a second sub-storage space; the first sub-storage space operates in the first operating system, and the second sub-storage space operates in the second operating system, wherein the first operating system cannot access the content of the second sub-storage space, and the second operating system cannot access the content of the first sub-storage space;
[0229] The management module 1120 is configured to manage the first sub-storage space using a first storage partition table, and manage the second sub-storage space using a second storage partition table.
[0230] In one possible implementation manner, the storage space is a Flash storage space.
[0231] In one possible implementation, the first operating system and the second operating system run in a time-sharing manner.
[0232] In one possible implementation, the first storage partition table has a first shared partition, and / or the second storage partition table has a second shared partition, and the first shared partition and the second shared partition jointly point to the first sub-storage space or the second sub-storage space.
[0233] In one possible implementation manner, the first storage partition table has a first extended partition, and or the second storage partition table has a second extended partition.
[0234] In one possible implementation, the management module 1120 is further used to obtain a system type, wherein the system type is used to characterize a current operating system;
[0235] Determine the storage partition table to be burned according to the system type;
[0236] The storage partition table to be burned is burned into the sub-storage space corresponding to the current operating system.
[0237] In one possible implementation manner, the system type is set in a storage partition table file.
[0238] In one possible implementation, the management module 1120 is further configured to load a default storage partition table in response to the terminal device being powered on, wherein the default storage partition table is the first storage partition table or the second storage partition table;
[0239] Reading the system type, wherein the system type is used to characterize the current operating system;
[0240] The corresponding operating system is started according to the system type.
[0241] In one possible implementation manner, the system type is set in a miscellaneous partition, and the miscellaneous partition is a partition shared by the first sub-storage space and the second sub-storage space.
[0242] In one possible implementation, the isolation device 1100 further includes:
[0243] A setting module, used to respond to a setting request of a security service, virtualize a user identifier according to a current operating system, and obtain a virtual user identifier corresponding to the current operating system;
[0244] The virtual user identification is bound to the security data set by the user and then stored.
[0245] In one possible implementation, the isolation device 1100 further includes:
[0246] A verification module, used to respond to a verification request of a security service, virtualize a user identifier according to a current operating system, and obtain a virtual user identifier corresponding to the current operating system;
[0247] Obtain corresponding target security data according to the virtual user identifier;
[0248] The user-input security data is verified based on the target security data.
[0249] In one possible implementation manner, the terminal device is a mobile phone or a tablet computer.
[0250] In one possible implementation, the first operating system is one of Windows, Hongmeng or Android, and the second operating system is one of Windows, Hongmeng or Android.
[0251] In one possible implementation manner, the first operating system and the second operating system have different security isolation levels.
[0252] In one possible implementation, the isolation device 1100 further includes:
[0253] a login module, configured to log into the first operating system in response to a first password input by a user in the first operating system; or,
[0254] In response to a second password input by a user in the second operating system, the second operating system is logged in.
[0255] In one possible implementation manner, the first password is the same as the second password; or, the first password is different from the second password.
[0256] Fig.11 The isolation device 1100 provided in the illustrated embodiment may be used to implement the technical solution of the method embodiment illustrated in this document, and its implementation principle and technical effects may be further referred to the relevant description in the method embodiment.
[0257] It should be understood that the above Fig.11 The division of the various modules of the isolation device 1100 shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of the terminal device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0258] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0259] In the above embodiments, the processor involved may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and an image signal processor (Image Signal Processing; hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of this article. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.
[0260] The embodiments of this document also provide a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the method provided by the embodiments shown in this document.
[0261] The embodiments of this document also provide a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute the method provided by the embodiments shown in this document.
[0262] In the embodiments of this document, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0263] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this document.
[0264] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0265] In the several embodiments provided herein, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, etc. Various media that can store program codes.
[0266] The above is only a specific implementation of this article. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this article, which should be included in the protection scope of this article. The protection scope of this article should be based on the protection scope of the claims.
Claims
1. An isolation method, characterized in that: Applied to a terminal device, the terminal device has a first operating system and a second operating system, the method comprising: Isolate the storage space of the terminal device into a first sub-storage space and a second sub-storage space; the first sub-storage space operates in the first operating system, and the second sub-storage space operates in the second operating system, wherein the first operating system cannot access the content of the second sub-storage space, and the second operating system cannot access the content of the first sub-storage space; The first sub-storage space is managed using a first storage partition table, and the second sub-storage space is managed using a second storage partition table.
2. The method according to claim 1, characterized in that: The storage space is a Flash storage space.
3. The method according to claim 1 or 2, characterized in that: The first operating system and the second operating system run in time-sharing mode.
4. The method according to any one of claims 1 to 3, characterized in that: The first storage partition table has a first shared partition, and / or the second storage partition table has a second shared partition, and the first shared partition and the second shared partition both point to the first sub-storage space or the second sub-storage space.
5. The method according to any one of claims 1 to 3, characterized in that: The first storage partition table has a first extended partition, and or the second storage partition table has a second extended partition.
6. The method according to any one of claims 1 to 5, characterized in that: The using the first storage partition table to manage the first sub-storage space, and the using the second storage partition table to manage the second sub-storage space includes: Obtaining a system type, wherein the system type is used to characterize the current operating system; Determine the storage partition table to be burned according to the system type; The storage partition table to be burned is burned into the sub-storage space corresponding to the current operating system.
7. The method according to claim 6, characterized in that The system type is set in the storage partition table file.
8. The method according to any one of claims 1 to 7, characterized in that: The using the first storage partition table to manage the first sub-storage space, and the using the second storage partition table to manage the second sub-storage space includes: In response to the terminal device being powered on, loading a default storage partition table, wherein the default storage partition table is the first storage partition table or the second storage partition table; Reading the system type, wherein the system type is used to characterize the current operating system; The corresponding operating system is started according to the system type.
9. The method according to claim 8, characterized in that The system type is set in a miscellaneous partition, and the miscellaneous partition is a partition shared by the first sub-storage space and the second sub-storage space.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: In response to a setting request for a security service, virtualizing a user identifier according to a current operating system to obtain a virtual user identifier corresponding to the current operating system; The virtual user identification is bound to the security data set by the user and then stored.
11. The method according to claim 10, characterized in that The method further comprises: In response to a security service authentication request, virtualizing a user identifier according to a current operating system to obtain a virtual user identifier corresponding to the current operating system; Obtain corresponding target security data according to the virtual user identifier; The user-input security data is verified based on the target security data.
12. The method according to any one of claims 1 to 11, characterized in that: The terminal device is a mobile phone or a tablet computer.
13. The method according to any one of claims 1 to 11, characterized in that: The first operating system is one of Windows, Hongmeng or Android, and the second operating system is one of Windows, Hongmeng or Android.
14. The method according to any one of claims 1 to 11, characterized in that: The first operating system and the second operating system have different security isolation levels.
15. The method according to any one of claims 1 to 14, characterized in that: The method further comprises: In response to a first password input by a user in the first operating system, logging into the first operating system; or, In response to a second password input by a user in the second operating system, the second operating system is logged in.
16. The method according to claim 15, characterized in that The first password is the same as the second password; or, the first password is different from the second password.
17. A terminal device, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program; and the processor is used to run the computer program to implement the isolation method as described in any one of claims 1 to 16.
18. The method according to claim 17, characterized in that The storage space is a Flash storage space.
19. The method according to claim 17, characterized in that The terminal device is a mobile phone or a tablet computer.
20. The method according to claim 17, characterized in that The first operating system is one of Windows, Hongmeng or Android, and the second operating system is one of Windows, Hongmeng or Android.
21. The method according to claim 17, characterized in that The first operating system and the second operating system have different security isolation levels.
22. A readable storage medium, characterized in that: The readable storage medium stores a program, and when the program is executed on a terminal device, the isolation method as described in any one of claims 1 to 16 is implemented.
Citation Information
Patent Citations
Managing access to an address range in a storage device
CN102257483A
Dual-system security intelligent terminal architecture based on access partition physical isolation
CN112069535A
Interaction method and device, mobile terminal and computer readable storage medium
CN114924870A
File system storage and mounting method and device, equipment and storage medium
CN116166205A