Resource calling method and device

By creating a user sandbox for each user and recording the address information of their callable resources, the data isolation problem when multiple users log in is solved, ensuring that users can only access their own callable resources, thereby improving data security.

CN116467704BActive Publication Date: 2025-09-23ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310319483.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2025-09-23
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

When multiple users log in to the same computer, existing technologies cannot achieve data isolation, resulting in users' personal data being visible to each other and low data security.

Method used

Create an independent user sandbox for each user, record the address information of their callable resources, and query the address information of the target resource in the user sandbox through the operating system to make calls, ensuring that the user can only access the resources he can call.

Benefits of technology

It achieves the isolation of personal resources of different users, avoids data security risks, and improves the security of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116467704B_ABST
    Figure CN116467704B_ABST
Patent Text Reader

Abstract

This specification provides a resource calling method and device. The method includes: responding to a resource calling request initiated by a first user for a target resource, determining the first user sandbox corresponding to the first user; wherein different users correspond to different user sandboxes, and any user sandbox records the address information of the corresponding user's callable resources; according to the resource description information of the target resource, querying the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox, and calling the resource according to the target address information. This method can isolate the personal resources of different users, avoid security risks caused by the mutual visibility of personal data of different users, and improve the security of resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of computers, and more particularly, to a method and apparatus for invoking resources. Background Art

[0002] Computers such as local physical machines and virtual machines (VMs) can usually implement multi-user logins, that is, multiple users can log in to a computer at the same time and operate the computer separately to implement corresponding functions.

[0003] In related technologies, multiple users logging into the same computer typically have independent access to all of that computer's resources, potentially posing a data security risk. For example, with virtual machines, when multiple users log into the same virtual machine simultaneously, the personal data generated by each user typically belongs to that virtual machine. In addition to accessing their own personal data, any one user may also access the personal data of other users. In other words, the personal data of multiple users is visible to each other, making data isolation impossible and resulting in low data security. Summary of the Invention

[0004] In view of this, one or more embodiments of this specification provide a method for calling a resource.

[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a resource calling method is proposed, including:

[0007] In response to a resource call request initiated by a first user for a target resource, determining a first user sandbox corresponding to the first user; wherein different users correspond to different user sandboxes, and any user sandbox records address information of a callable resource of the corresponding user;

[0008] According to the resource description information of the target resource, the target address information of the target resource is searched in the address information of the first callable resource recorded in the first user sandbox, and the resource is called according to the target address information.

[0009] According to a second aspect of one or more embodiments of this specification, a resource calling device is provided, including:

[0010] A user sandbox determination unit is configured to determine a first user sandbox corresponding to a first user in response to a resource call request initiated by a first user for a target resource; wherein different users correspond to different user sandboxes, and any user sandbox records the address information of the callable resources of the corresponding user.

[0011] The target resource calling unit is used to query the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox according to the resource description information of the target resource, and perform resource calling according to the target address information.

[0012] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0013] processor;

[0014] a memory for storing processor-executable instructions;

[0015] The processor implements the method as described in any one of the first aspects by running the executable instructions.

[0016] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0017] In this solution, the computer's operating system creates a corresponding user sandbox for each user who logs into the computer, wherein the user sandbox corresponding to any user records the address information of the user's callable resources, thereby isolating the various resources that the user can call (i.e., the callable resources) in the user sandbox. Based on this, the operating system can respond to a resource call request initiated by a first user (any of the multiple users who log into the computer at the same time) for a target resource, determine the first user sandbox corresponding to the first user; then, based on the resource description information of the target resource, query the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox - this address is the call address of the target resource required by the first user, so that the target resource can be called according to the address.

[0018] It is understandable that the user sandbox corresponding to any user records the address information of the user's callable resources. Therefore, after the target address information is found in the first user sandbox, the target resource called according to the address must belong to the first user's callable resources. In addition, the first user can call the first user's callable resources pointed to by the address information recorded in the first user sandbox, but cannot call other users' callable resources pointed to by the address information recorded in other user sandboxes. It can be seen that this solution isolates the resources that can be called by different users (such as personal data, personal applications, etc.) through different user sandboxes, so that any user can only see his or her own personal resources, avoiding the security risks caused by the mutual visibility of personal resources of different users, and improving the security of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a schematic diagram of the architecture of a cloud desktop system provided by an exemplary embodiment.

[0020] Figure 2 This is a schematic diagram of a resource calling method provided by an exemplary embodiment.

[0021] Figure 3 It is a schematic diagram of the internal structure of a computer provided by an exemplary embodiment.

[0022] Figure 4 It is a structural diagram of a device provided by an exemplary embodiment.

[0023] Figure 5 This is a block diagram of a resource calling device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0024] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.

[0025] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0026] As mentioned above, computers generally enable multi-user login, that is, multiple users can log in to a computer at the same time and respectively operate the computer to perform corresponding functions.

[0027] In related technologies, multiple users logging into the same computer typically have independent access to all of that computer's resources, potentially posing a data security risk. For example, with virtual machines, when multiple users log into the same virtual machine simultaneously, the personal data generated by each user typically belongs to that virtual machine. In addition to accessing their own personal data, any one user may also access the personal data of other users. In other words, the personal data of multiple users is visible to each other, making data isolation impossible and resulting in low data security.

[0028] To address the aforementioned issues in related technologies, this specification proposes a resource invocation method. By setting up a corresponding user sandbox for each user, each user's available resources are pre-isolated. This allows the operating system to search the address information recorded in the first user's sandbox for the target resource requested by the user, thereby preventing the user from accessing other users' available resources and achieving isolation between different users' personal resources. This method is described in detail below with reference to the accompanying figures.

[0029] The resource calling method described in the embodiments of this specification can be applied to a computer, specifically to the computer's operating system. The computer can be a local computer or a virtual machine. Taking a virtual machine as an example, any virtual machine can run independently in a terminal device, or it can run together with other virtual machines in a server. If multiple virtual machines can run simultaneously in any server, each virtual machine is controlled by a corresponding operating system, and the server's hardware and software resources can be reasonably allocated to each virtual machine for use.

[0030] The computer can have multiple users logged in at any one time. In other words, multiple users can log in to the computer at the same time as users of the computer. Specifically, the user account used by any user can be an account pre-registered in the computer's operating system, or an account pre-registered on another platform associated with the operating system, etc., which will not be described in detail here. After logging in to the computer, these users can be managed by the computer's operating system.

[0031] For each logged-in user, the computer's operating system may create a corresponding user sandbox for each of these users. For example, after any user completes logging in, the operating system may create a corresponding user sandbox for the user, and determine the address information of the user's callable resources and record it in the user sandbox.

[0032] In addition, any user sandbox can also run applications designated by the user to provide the user with the corresponding functions. This disclosure does not limit the specific functions that can be implemented by applications running in any user sandbox. For example, applications can include office applications, shopping applications, payment applications, instant messaging applications, and / or music applications, which will not be detailed here.

[0033] Figure 1The following is a schematic diagram of the architecture of a cloud desktop system provided by an exemplary embodiment. The system may include a server 11, a storage device 12, and several electronic devices, such as mobile phones 13, 14, and 15. The application server 11 may be deployed with at least one virtual machine (not shown). Each virtual machine can function as an application server by running applications locally and provide corresponding application services to application clients.

[0034] Cloud desktop, also known as desktop virtualization, cloud computer, etc., is a computing model that replaces traditional local computers: users do not need to purchase a computer host, and the CPU, memory, hard disk and other components required for the host to run can be implemented and provided by the resources of the cloud desktop server through virtualization technology. Users can use any form of terminal device as a cloud desktop client, connect to the cloud desktop server through the network, and the two work together to form a complete computer in the cloud desktop scenario. When a cloud desktop instance is deployed in any virtual machine, based on the application running in the instance, the virtual machine can provide cloud desktop services for electronic devices such as mobile phones 13 to 15. In this scenario, any virtual machine is implemented as a cloud desktop server, and the mobile phone used by the user is equivalent to a cloud desktop client. It can be understood that the electronic device used as an application client may include hardware such as a control module, a communication module, a display, a keyboard, a mouse, etc., so that the user can interact with the application server through the above hardware.

[0035] For any application running in any virtual machine, the data required for its operation (programs, codes, etc.) or the data generated during the operation (intermediate data, data processing results, operation records, etc.) can be stored locally in the virtual machine or in the storage device 12. The virtual machine can use virtual hard disk (VHD) technology to mount the data stored in the storage device 12 locally as a VHD, so that remote read and write operations can be performed on the VHD data during the application operation, thereby eliminating the need to install the application locally in the virtual machine, simplifying the application maintenance operations of the virtual machine and saving the local storage space of the virtual machine.

[0036] In addition, any of the mobile phones 13 to 15 can be running a client program, thereby realizing the mobile phone as a cloud desktop client in the cloud desktop system. The client can essentially be an application program that can be pre-installed on the mobile phone so that the client can be started and run on the terminal device; of course, when using an online "client" such as HTML5 technology, there is no need to install the corresponding application program on the mobile phone to obtain and run the client. Accordingly, the cloud desktop instance running in the server 11 can be regarded as a server program, and any virtual machine can realize itself as a server in the cloud desktop system by running the program, which will not be described in detail.

[0037] Any of the above-mentioned mobile phones can correspond to a corresponding user, such as any user can use his or her own user account to log in to the client running in the mobile phone 13. After the login is completed, the user can be regarded as the user corresponding to the mobile phone 13. Among them, the mobile phone 13 can interact with the server 11 during the login process, so that the user can log in to any virtual machine in the server 11. In addition, mobile phones 13 to 15 are just one type of electronic device that users can use. Users can also use electronic devices such as tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), VR (Virtual Reality) devices, AR (Augmented Reality) devices, etc. By running the client program of the cloud desktop on these devices, these devices can be implemented as cloud desktop clients. Of course, to implement any of the above-mentioned electronic devices as a cloud desktop client, it may be necessary to install the client program in the device or access the client program in online form. In fact, users can also use cloud desktop dedicated devices, such as devices that can be pre-installed with a cloud desktop client. Users only need to connect the device to the corresponding input / output devices, and then they can use the cloud desktop client to access the applications running on the corresponding cloud desktop server by performing corresponding operations and enjoy the cloud desktop services provided by the device.

[0038] In addition, the server 11 may be a physical server including an independent host, or a virtual server hosted by a host cluster, a cloud server, etc. The storage device 12 may be in any form, such as a structured or unstructured database, or a network attached storage (NAS) device, and one or more embodiments of this specification are not limited thereto.

[0039] See Figure 2 , Figure 2 This is a flow chart of a resource calling method provided by an exemplary embodiment. Figure 2 As shown, the method is applied to a computer, specifically to an operating system of the computer, and may include the following steps 202-204.

[0040] Step 202: In response to a resource call request initiated by a first user for a target resource, determine a first user sandbox corresponding to the first user; different users correspond to different user sandboxes, and any user sandbox records the address information of the callable resources of the corresponding user.

[0041] The operating system of the computer described in this specification can be Windows, or it can also be iOS, Linux, Unix, etc., and Windows will be used as an example for explanation below. The computer described in this specification can log in multiple users at the same time. For the multiple users, the operating system of the computer can create corresponding user sandboxes for each user, wherein the multiple users correspond to different user sandboxes respectively. In other words, the multiple users who have completed the login correspond one to one with the multiple user sandboxes created by the operating system. Among them, the user sandbox corresponding to any user described in this specification is a program, rule or environment for isolating / managing the permissions of the relevant data or resources of the user, which can be used to record the address information of the user's callable resources (that is, the software / hardware resources that the user can call). Specifically, the resource description information of these resources and their address information in the computer can be recorded accordingly, so that the subsequent operating system can query its address information according to the resource description information of any resource and then call it.

[0042] In addition, the callable resources of any user (i.e., the resources that the user can call) may include system resources provided by the operating system, such as hardware resources such as memory and CPU, and / or software resources such as SDK and file management; it may also include non-system resources, such as the user's personal data, underlying libraries, third-party toolkits, etc. The address information of any resource is used to indicate the access address of the resource, through which the resource can be accessed (i.e., called). The address information may be an index corresponding to the storage address of the data, or may be a calling interface or parameter of hardware and software resources, etc. This specification does not limit its specific form. For example, for an SDK provided by the operating system, its address information may be a path specified by the operating system for the SDK (through which the SDK can be called). In this way, the operating system can record the address information of the callable resources of different users in different user sandboxes, which is equivalent to maintaining the callable resources of different users in different user sandboxes, thereby isolating the personal resources of different users and facilitating subsequent targeted access to personal resources by each user.

[0043] The first user in this specification can be any one of the multiple users who log in to the computer, and the computer's operating system can create a corresponding first user sandbox for the first user when the first user logs in to the computer. After the login is completed, the first user can process transactions in the first user sandbox, such as querying data, editing files, running applications, etc. In the process of processing the above transactions, it is necessary to control the operating system of the virtual machine to call the user's callable resources. This specification uses the process model of the first user requesting the operating system to call the target resource to illustrate, and the target resource can be at least one resource among the first user's callable resources.

[0044] When the first user needs to call the target resource, he can initiate a resource call request for the resource to the operating system to trigger the latter to make a resource call in response to the request. In one embodiment, the resource call method can be applied to a virtual machine deployed with a cloud desktop instance. At this time, the first user sandbox can be created and maintained by the operating system of the virtual machine, and the resource call request can be initiated to the operating system through the cloud desktop instance. In this scenario, the virtual machine is equivalent to the cloud desktop server, and the terminal device used by the user (which may include a communication module, display, keyboard, mouse, etc.) can constitute the cloud desktop client.

[0045] In which, the cloud desktop instance can run a first application, which can be pre-published to the cloud application platform. In this case, the virtual machine provides the cloud desktop client with an application browsing page of the cloud application platform. The page can include a display of the first application, such as the first application's startup control, introduction content, detailed information, operation guide, user rating, etc. In this regard, the first user can perform a trigger operation on the above-mentioned display of the first application, and the cloud desktop client can initiate the startup instruction for the first application in response to the trigger operation, so as to trigger the virtual machine to start the first application. In this way, the first application can be provided to the first user in the form of a cloud application without actually installing the first application in the virtual machine, thereby not only helping to simplify the first user's deployment and maintenance of the first application, but also helping to save the local storage space of the computer and improve the application operation efficiency of the computer. It is understandable that the first application sandbox also belongs to the cloud desktop instance, and the resource call request can be initiated by the application to the operating system during the first user's use of the first application (in this case, the request can still be considered initiated by the first user).

[0046] In one embodiment, since the computer creates a corresponding user sandbox for each user, in order to accurately distinguish the user sandboxes corresponding to each user and avoid confusion during the use phase, the operating system can maintain multiple mapping relationships. Accordingly, in response to the resource call request, the operating system can determine the first user sandbox corresponding to the first user in multiple ways based on the above mapping relationship.

[0047] For example, the operating system can maintain a first type of user mapping relationship between the user identifier of the user and the sandbox identifier of the user sandbox. Based on this, the operating system can determine the sandbox identifier corresponding to the user identifier of the first user according to the mapping relationship, and determine the user sandbox represented by the sandbox identifier as the first user sandbox. In this way, the operating system can accurately determine the first user sandbox based on the user identifier of the first user. Alternatively, in some scenarios, different users can connect to the virtual machine through different sessions, that is, the virtual machine is in a multi-session state. The multiple users correspond one-to-one to the multiple sessions, and any user can be considered to belong to a session, and each session has its corresponding session identifier. At this time, the operating system can maintain a second type of user mapping relationship between the session identifier of the session to which the user belongs and the sandbox identifier of the user sandbox. Based on this, the operating system can determine the sandbox identifier corresponding to the first session identifier of the session to which the first user belongs according to the mapping relationship, and determine the user sandbox represented by the sandbox identifier as the first user sandbox. In this way, the operating system can accurately determine the first user sandbox based on the session identifier of the session to which the first user belongs.

[0048] It is understood that the determined first user sandbox records the address information of the first user's callable resources, and since the target resource is at least one callable resource, the target address information of the target resource is naturally also recorded in the callable resource. Therefore, the operating system can further query the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox.

[0049] Step 204 : According to the resource description information of the target resource, query the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox, and call the resource according to the target address information.

[0050] Among them, the resource description information of the target resource described in this specification is information used to describe the characteristics of the target resource, and the target address information of the target resource can be uniquely determined in the address information of the callable resource record through this information. Exemplarily, the resource description information of the target resource may include at least one of the following: the resource identifier of the target resource, the resource name, such as the file name, SDK (Software Development Kit, software development kit) name, etc.; version number, v1.0, v2.1, etc.; creation time, index of the save location, etc. In addition, the target address information can be specified by the first user or the first user and included in the resource call request, or can be further determined by the operating system in response to the resource call request, which will not be repeated. It can be understood that resource calling is performed according to the target address information, that is, calling the corresponding target resource according to the information, that is, calling the target resource pointed to by the target access address represented by the target address information.

[0051] In this solution, the computer's operating system creates a corresponding user sandbox for each user who logs into the computer, wherein the user sandbox corresponding to any user records the address information of the user's callable resources, thereby isolating the various resources that the user can call (i.e., the callable resources) in the user sandbox. Based on this, the operating system can respond to a resource call request initiated by a first user (any of the multiple users who log into the computer at the same time) for a target resource, determine the first user sandbox corresponding to the first user; then, based on the resource description information of the target resource, query the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox - this address is the call address of the target resource required by the first user, so that the target resource can be called according to the address.

[0052] It is understandable that the user sandbox corresponding to any user records the address information of the user's callable resources. Therefore, after the target address information is found in the first user sandbox, the target resource called according to the address must belong to the first user's callable resources. In addition, the first user can call the first user's callable resources pointed to by the address information recorded in the first user sandbox, but cannot call other users' callable resources pointed to by the address information recorded in other user sandboxes. It can be seen that this solution isolates the resources that can be called by different users (such as personal data, personal applications, etc.) through different user sandboxes, so that any user can only see his or her own personal resources, avoiding the security risks caused by the mutual visibility of personal resources of different users, and improving the security of resources.

[0053] In one embodiment, the operating system can create corresponding user storage spaces for the corresponding users in each user sandbox. The user storage space of any user is used to store the personal data of the user (such as the personal account information of the user, the history of the use of applications in the user sandbox, etc.). The user storage space in any user sandbox can be the local storage space of the computer, or other storage space accessible to the computer, such as a database or a VHD added to the user sandbox after being mounted to the operating system of the computer. Figure 3 As shown, there are three users logged in to the computer, namely User1, User2 and User3; each user has a corresponding user sandbox, that is, User1 corresponds to Userbox1, User2 corresponds to Userbox2, and User3 corresponds to Userbox3. Each user sandbox contains a corresponding user storage space, that is, Userbox1 contains Write Layer1, Userbox2 contains WriteLayer2, and Userbox3 contains Write Layer3. Each user sandbox can also run the same or different applications, and the operating system can create corresponding application sandboxes for the applications running in each user sandbox, such as creating corresponding Appbox1, Appbox2 and Appbox3 for APP1, APP2 and APP3 running in Userbox1, creating Appbox1 for APP1 running in Userbox2, and creating corresponding Appbox1 and Appbox4 for APP1 and APP4 running in Userbox3, etc. As mentioned above, the same or different APPs can be run in different user sandboxes: for example, APP1 can be run in Userbox1, Userbox2 and Userbox3 (corresponding to the Appbox1 contained in the three respectively), APP2~3 can be run in Userbox1 (corresponding to the Appbox2~3 contained in Userbox1), and APP4 can be run in Userbox3 (corresponding to the Appbox4 running in it), etc.

[0054] Furthermore, the OS Layer is drawn separately to represent the ability of each user to share all system resources provided by the computer's operating system (e.g., evenly splitting memory resources, occupying CPU resources based on load, and calling the SDK versions required by each user according to the resource information set). This should not be interpreted as system resources existing independently of the user sandbox. In fact, the corresponding versions of system resources (e.g., SDK1 and SDK2) that each app running in each user sandbox relies on are all part of the OS Layer.

[0055] It is understandable that the user storage space of any user is equivalent to the callable resource of the user, so the process of the operating system calling the target resource according to the target address information may include the process of reading / writing the user storage space. For example, the operating system may determine the available storage space represented by the target address information in the user storage space of the first user, and write the data to be stored specified by the resource call request into the available storage space - in this way, the write operation to the user storage space can be achieved. The available storage space may be empty (of course, no data is written), or it may not be empty, but the data currently stored at this location has been cancelled, and the data to be stored may be directly written to achieve overwriting of the data. Alternatively, the occupied storage space represented by the target address information may be determined in the user storage space of the first user, and the current data in the occupied storage space may be read. The current data read may be the data to be read as indicated by the resource call request - in this way, the read operation of the existing data in the user storage space may be achieved. Of course, the resource call request can specify multiple data. In response to the request, the operating system can perform the above-mentioned write operation on these (all) data; it can also perform the above-mentioned read operation on these (all) data; it can also perform the above-mentioned write operation on part of the data and perform the above-mentioned read operation on another part of the data, which will not be repeated here.

[0056] As previously mentioned, a computer's operating system can provide system resources that can be shared by all users logged into the computer. Taking a first user as an example, the first user's sandbox records the address information of a first callable resource. The first callable resource can include the system resource. That is, during login, the first user can call the system resource represented by the address information recorded in the first user's sandbox. The operating system may provide multiple system resources, and the first user's sandbox may record the address information of all or some of these types of system resources.

[0057] As mentioned above, at least one application can be deployed in the first user sandbox. Based on this, the first user can generate and initiate the resource call request through the first application running in the first user sandbox during the operation of the first application to trigger the operating system to call the target resource required by the application. Therefore, when the target address information is determined, the operating system can call the target resource that the first application depends on according to the target address information for the first application running in the first user sandbox. Figure 3In this embodiment, if the first user and the first user sandbox are User1 and Userbox1 respectively, if the first application APP1 needs to call a certain SDK (i.e., target resource) during operation, it can initiate a resource call request to the operating system, so that the latter can call the SDK for it according to the target address information. In this way, the operating system can call the corresponding target resource for the applications running in each user sandbox, thereby ensuring the normal operation of each application and avoiding the adverse impact of the user sandbox setting on the operation process of the user's application. Therefore, the data isolation effect between different users is achieved on the basis of ensuring the normal function of the application.

[0058] In one embodiment, the first application can be any application deployed in the first user sandbox, and the operating system can create a corresponding first application sandbox for the first application in the first user sandbox. The first application sandbox can record the address information of the system resources that the first application depends on, and the address information is used to call the system resources that the first application depends on. For example, the first application sandbox can maintain a resource list of the first application, and the resource list is used to record the resource identifier (such as resource name, etc.), address information, etc. of each resource in the resource information set of the first application (that is, the system resources and / or non-system resources that the first application depends on) in the first application. The operating system can query the address information of any resource that the first application depends on according to the list. In this way, the address information of each resource that the first application depends on can be recorded in the first application sandbox, thereby achieving application-level isolation for these resources, making it easier for the first application to call the resources it depends on.

[0059] In the case where multiple applications are deployed in the first user sandbox, the resource information sets corresponding to these applications are usually loaded into the operating system in sequence according to a fixed query order. The loaded resource information sets form a one-way data structure (such as a linked list), so that the operating system can only query any system resource requested by any application in each resource information set according to the above query order. Since the loaded resource information sets usually record each resource in the form of resource name and address information, for any application requesting a certain resource name and a certain version of the system resource, when the operating system queries according to the resource name in the above query order, it will usually use the first resource that matches the queried name as the query result. However, the actual version of the resource may not be the version requested by the application, but other versions that other applications rely on, that is, the query result is wrong, which may cause the application to run abnormally.

[0060] In response to the problem that conflicts may arise when multiple applications call different versions of system resources, this specification proposes to solve it by further creating applications in the user sandbox. Specifically, the operating system can create different application sandboxes for each application in the first user sandbox, that is, the multiple applications correspond one-to-one to multiple application sandboxes. At this time, each application sandbox records the address information of the system resources that the corresponding application depends on. The first callable resources corresponding to the first user sandbox include the system resources that the multiple applications depend on respectively. The resource call request can be generated for the first application. For example, the operating system itself can generate the request in response to the startup instruction for the first application, so as to call the corresponding target system resources and rely on these resources to start the first application; or in response to the resource call request generated by the first application in the running state (that is, after the startup is completed), call the corresponding target system resources to perform the processing operation indicated by the application.

[0061] The resource description information of the target resource may include the resource name of the target system resource included in the resource call request. The target system resource may have multiple versions and different versions of the target system resource are respectively relied upon by different applications. It is understandable that the first application depends on a certain version of the target system resource, while at least one application that depends on other versions of the target system resource may not have been started, is starting, or has been started (i.e., is already in a running state). This specification does not limit this. In this scenario, the operating system can query the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox in the following manner: first determine the first application sandbox corresponding to the first application; then, based on the resource name of the target system resource, query the target address information of the target system resource corresponding to the resource name in the address information of the system resource recorded in the first application sandbox.

[0062] Similar to the aforementioned user sandbox, the application sandbox corresponding to any application described in this specification is a program, rule, or environment used to isolate / manage the permissions of the application's related data or resources. It can be used to record the various resources that the application depends on (i.e., the resources that the application may need during operation). Specifically, the resource names of these resources and their address information in the computer can be recorded accordingly, so that the operating system can subsequently query the address information of any resource based on its resource name and call it.

[0063] In one embodiment, a first application sandbox corresponding to the first application can be pre-created, for example, when the first application is installed. The application can then run in the application sandbox, and data generated by the running application is also stored in the application sandbox, thereby fully isolating the first application from other applications and preventing interference between the applications.

[0064] In another embodiment, the first application sandbox corresponding to the first application can also be temporarily created by the operating system when the first application is started. For example, the operating system can create the first application sandbox for the application in response to the startup instruction for the first application; then execute the executable file of the first application in the memory space corresponding to the first application sandbox to start the first application, wherein the resource call request can be initiated by the first application after the startup is completed. The startup instruction can be initiated by the first user. After receiving the startup instruction, the operating system can create the first application sandbox in the computer's memory space to speed up the data processing speed related to the first application. The executable file is the main program for starting the first application, that is, after the file is executed, the first application can be started in the computer's memory space. The embodiments of this specification do not limit the format of the executable file. For example, the executable file can be a .exe file, a .sys file, a .com file, a .dll file, etc., which will not be repeated.

[0065] Among them, the executable file of the first application belongs to the source file of the first application (the file is used to record the main program, code and other basic data required for the operation of the application). The source file can be pre-stored in the NAS device. At this time, the operating system can mount the executable file locally in the form of VHD through virtual disk technology, and then add it to the first application sandbox so that the file can be read later by remote access. When the first application sandbox has been created, the operating system can record the address information of the source file in the first application sandbox, and then read the executable file by remotely accessing the source file. Alternatively, the address information of the executable file can be determined from the source file first, and then the address information can be recorded in the first application sandbox, and then the executable file can be obtained from the address information of the NAS by remote access.

[0066] Of course, since the source files of the first application may be generated based on a preset index, the operating system can redirect the source files to ensure that they can run normally after being mounted. If the source files are generated based on the "C:\Program Files" folder, when the source files are mounted to any folder under any drive letter on the computer, the operating system can redirect the folder's address information to "C:\Program Files" to ensure that each file in the source file can be accessed and run normally according to the redirected index.

[0067] In this way, the operating system is allowed to mount the source files of the first application locally through virtual disk technology and then add them to the first application sandbox. It is understandable that the source files can be generated by the publisher or manager of the application through pre-execution. At this time, the operating system only needs to remotely access the above source files to start and run the first application, without the need to "install" the first application locally on the computer. This allows the first application to achieve the operating effect of a cloud application, greatly simplifying the user's deployment and maintenance workload for the first application; and helps save the local storage space of the computer, allowing the computer to run more applications simultaneously, thereby improving the overall resource utilization of the computer.

[0068] In another embodiment, a corresponding first application sandbox can also be created for the first application during its operation after the first application is launched. For example, the operation of the first application may involve resource calls and data operations. The operating system can examine each request issued by the application to identify sensitive requests. If the data processed by a request is sensitive data or the resource it requests is a sensitive resource, the request can be determined to be a sensitive request. The sensitive data can be resources occupied or potentially occupied by other applications, and the sensitive resources can be resources called or potentially called by other applications. In this case, the first application sandbox can be created directly for the first application, or a prompt instruction can be returned to the first application so that the first application displays a prompt information regarding the sensitive data and / or sensitive resources to the current user, who can then decide whether to create a first application sandbox for the first application. After the first application sandbox is created, relevant data generated during the first application's startup can be transferred to the sandbox, and the sandbox can then respond to the sensitive requests and complete the processing of sensitive data or the call of sensitive resources. In this way, a corresponding first application sandbox can be created for the first application when necessary, and not created when it is not needed. Although the response time of the first sensitive request is prolonged, the stricter application sandbox creation threshold can save more resources for the computer (because the creation and maintenance of the application sandbox also requires computing, storage and other resources). In particular, when the running process of the first application does not involve sensitive data or sensitive resources, the resource saving effect is more significant.

[0069] Successor Figure 3 In the illustrated embodiment, if the first user and the first user sandbox are User1 and Userbox1 respectively, it can be seen that three applications APP1, APP2 and APP3 are running in Userbox1, and the three correspond to corresponding application sandboxes, such as APP1 running in Appbox1, APP2 running in Appbox2, and APP3 running in Appbox3.

[0070] Furthermore, each application sandbox may contain the source files (User Layer 1, User Layer 2, and User Layer 3) and resource information collections (Collection 1, Collection 2, and Collection 3) of the corresponding application. Figure 3It is not shown in the figure. The source file can be mounted locally to the operating system through VHD technology and added to the corresponding application sandbox; the resource information collection records the system resources that the corresponding application depends on, such as Collection1 records SDK1 (v1.0) (the resource name is "SDK1", the resource version is 1.0, the same below), SDK2 (v1.0) and SDK3 (v1.0) that User1 depends on; Collection2 records SDK2 (v2.0) and SDK2 (v1.0) that User2 depends on; Collection3 records SDK1 (v3.0) and SDK2 (v3.0) that User3 depends on. It should be noted that although Figure 2 The corresponding resource version is marked for each SDK, but since the resource query process does not require the SDK version information, in order to minimize the data volume of the resource information set and save the available storage space of the application sandbox, the resource information may not record the resource version, but only record its resource name and address information.

[0071] Any of the above SDKs can be system resources or non-system resources. For example, for the SDKs that APP1 depends on: SDK1 (v1.0) and SDK2 (v1.0) are system resources, while SDK3 (v1.0) is a non-system resource. Any version of a system resource that an application depends on may have other applications depend on the corresponding version of that resource. For example, APP1 depends on version 1.0 of SDK1, APP2 depends on version 2.0, and APP3 depends on version 3.0. Of course, any version of a system resource that an application depends on may also be depended on by other applications. For example, both APP1 and APP2 depend on version 1.0 of SDK2. Furthermore, any non-system resource that an application depends on is typically provided by the application's publisher or administrator (not the computer's operating system) and is exclusively used by that application. Therefore, such resources are only depended on by that application. For example, SDK3 only has version 1.0 and is only depended on by APP1. In practice, non-system resources can be excluded from the application sandbox to minimize the burden of sandbox permission management.

[0072] At this time, if the operating system receives a resource call request from any application, it can determine the user sandbox where the application is located based on the session identifier contained in the request (and the user corresponding to the user sandbox can be determined at the same time). Furthermore, the sandbox identifier corresponding to the application identifier of the first application can be determined based on the first type of application mapping relationship between the application identifier of the maintained application and the sandbox identifier of the application sandbox, and the application sandbox represented by the sandbox identifier is determined as the first application sandbox; or, in the case where different applications are running in different processes respectively, the sandbox identifier corresponding to the first process identifier of the process where the first application is located can be determined based on the second type of application mapping relationship between the process identifier of the process where the maintained application is located and the sandbox identifier of the application sandbox, and the application sandbox represented by the sandbox identifier is determined as the first application sandbox. Assuming that the first user sandbox is determined to be Userbox1 and the first application is APP1 running therein through the above method, the target address information of the corresponding target resource can be queried from Collection1 of Appbox1 according to the resource name contained in the resource call request. For example, when the resource name is "SDK1", the address information of SDK1 (v1.0) recorded in Collection1 can be determined as the target address information, and SDK1 (v1.0) is naturally the corresponding target resource.

[0073] In one embodiment, after the first application completes execution, the operating system may close the first application in response to a close instruction issued to the first application. The close instruction may be initiated by the first user, in which case the first application may be closed according to the user's will; or the close instruction may be initiated by the operating system according to a preset plan, in which case the application may be closed according to the preset plan. The specific closing process can be found in related art and will not be described in detail here.

[0074] In this scenario, in addition to shutting down the first application, the operating system can also store the results generated during the first application's execution to the first storage device for reuse in subsequent executions of the first application. For example, the next time the first application is launched, the stored results can be read from the NAS device, allowing the user to view the previous results upon restarting the first application. This facilitates the user's work and avoids the inconvenience of data loss. Furthermore, the first application sandbox can be deleted after the first application is shut down to reclaim the resources occupied by the first application, thereby improving resource utilization.

[0075] In one embodiment, the second operating system may display the first user sandbox in response to an exit instruction initiated for the first user. Alternatively, the personal data generated by the first user during this login may be stored in a second storage device in response to the exit instruction, to be reused in the subsequent login process of the first user, and the first user sandbox may be deleted after the storage is completed. Of course, before deleting the first user sandbox, the first user may be controlled to log out (or log out). In this way, the first user sandbox created for the first user may be deleted in time after the first user logs out, so as to realize the recycling of computer resources and improve resource utilization. In addition, the exit instruction may be initiated by the first user, in which case the first user may be logged out according to the will of the user; or the exit instruction may be initiated by the operating system according to a preset plan, in which case the first user may be forced to log out according to the preset plan. The preset plan may be reasonably set according to actual conditions such as time, fees, and permissions, and this specification does not limit this.

[0076] Among them, any storage device among the above-mentioned first storage device and second storage device can be the local storage space of the computer, or it can also be other storage space accessible to the computer, such as a database or a VHD added to the user sandbox after being mounted to the operating system of the computer, etc., which can be set according to actual needs.

[0077] Figure 4 This is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 4 At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410. Of course, it may also include hardware required for other applications. One or more embodiments of this specification can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0078] Please refer to Figure 5 In a software implementation, the resource calling device may include:

[0079] The user sandbox determination unit 501 is used to determine the first user sandbox corresponding to the first user in response to the resource call request initiated by the first user for the target resource; wherein different users correspond to different user sandboxes, and any user sandbox records the address information of the callable resources of the corresponding user

[0080] The target resource calling unit 502 is used to query the target address information of the target resource in the address information of the first callable resource recorded in the first user sandbox according to the resource description information of the target resource, and perform resource calling according to the target address information.

[0081] Optionally, the user sandbox determining unit 501 is specifically configured to:

[0082] Determine the sandbox identifier corresponding to the user identifier of the first user according to a first type of user mapping relationship between the user identifier of the maintained user and the sandbox identifier of the user sandbox, and determine the user sandbox represented by the sandbox identifier as the first user sandbox; or

[0083] According to the second type of user mapping relationship between the session identifier of the maintained user session and the sandbox identifier of the user sandbox, the sandbox identifier corresponding to the first session identifier of the session to which the first user belongs is determined, and the user sandbox represented by the sandbox identifier is determined as the first user sandbox.

[0084] Optionally, the callable resources of each user include a user storage space for storing personal data of the corresponding user, and the target resource calling unit 502 is specifically configured to:

[0085] Determining an available storage space represented by the target address information in the user storage space of the first user, and writing the to-be-stored data specified by the resource call request into the available storage space; and / or,

[0086] An occupied storage space represented by the target address information is determined in the user storage space of the first user, and current data in the occupied storage space is read.

[0087] Optionally, the target resource calling unit 502 is specifically configured to:

[0088] For the first application running in the first user sandbox, the target resource on which the first application depends is called according to the target address information.

[0089] Optionally, a first application sandbox corresponding to the first application is deployed in the first user sandbox, and the first application sandbox records address information of system resources that the first application depends on, and the address information is used to call the system resources that the first application depends on.

[0090] Optionally, the resource description information of the target resource includes a resource name of the target system resource included in the resource call request, and the target system resource has multiple versions, and different versions of the target system resources are respectively relied upon by different applications; the target resource calling unit 502 is specifically configured to:

[0091] Determining a first application sandbox corresponding to the first application;

[0092] According to the resource name of the target system resource, the target address information of the target system resource corresponding to the resource name is searched in the address information of the system resources recorded in the first application sandbox.

[0093] Optionally, also include:

[0094] an application closing unit 503, configured to close the first application in response to a closing instruction for the first application;

[0095] The storage and deletion unit 504 is used to store the operation results generated during the operation of the first application to a first storage device for reuse in subsequent operation processes of the first application; and / or to delete the first application sandbox after the first application is closed.

[0096] Optionally, also include:

[0097] A first user exit unit 505 is configured to delete the first user sandbox in response to an exit instruction initiated by the first user; and / or

[0098] The second user logout unit 506 is used to store the personal data generated by the first user during this login to a second storage device in response to the logout instruction initiated by the first user, so as to be reused in the subsequent login process of the first user, and to delete the first user sandbox after the storage is completed.

[0099] Optionally, the device is applied to a virtual machine deployed with a cloud desktop instance, wherein:

[0100] The first user sandbox is created and maintained by the operating system of the virtual machine, and the resource call request is initiated to the operating system through the cloud desktop instance.

[0101] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.

[0102] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0103] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0104] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0105] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0106] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0107] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0108] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."

[0109] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.

Claims

1. A resource calling method, comprising: In response to a resource call request initiated by a first user, determining a first user sandbox corresponding to the first user; wherein the resource call request includes a resource name of a target system resource, the target system resource has multiple versions, and different versions of the target system resources are respectively relied upon by different applications; different users correspond to different user sandboxes, and any user sandbox records address information of callable resources of the corresponding user; a first application sandbox corresponding to a first application is deployed in the first user sandbox, and the first application sandbox records address information of system resources that the first application depends on; According to the resource name of the target system resource, the target address information of the target system resource is searched in the address information of the system resources recorded in the first application sandbox, and the target system resource that the first application depends on is called according to the target address information.

2. The method according to claim 1, wherein determining the first user sandbox corresponding to the first user comprises: Determine, according to a first type of user mapping relationship between a user identifier of a maintained user and a sandbox identifier of a user sandbox, a sandbox identifier corresponding to the user identifier of the first user, and determine the user sandbox represented by the sandbox identifier as the first user sandbox; or, According to the second type of user mapping relationship between the session identifier of the maintained user session and the sandbox identifier of the user sandbox, the sandbox identifier corresponding to the first session identifier of the session to which the first user belongs is determined, and the user sandbox represented by the sandbox identifier is determined as the first user sandbox.

3. The method according to claim 1, wherein the callable resources of each user include a user storage space for storing personal data of the corresponding user, and calling the target system resource on which the first application depends according to the target address information comprises: Determining an available storage space represented by the target address information in the user storage space of the first user, and writing the to-be-stored data specified by the resource call request into the available storage space; and / or, An occupied storage space represented by the target address information is determined in the user storage space of the first user, and current data in the occupied storage space is read.

4. The method according to claim 1, further comprising: In response to a closing instruction for the first application, closing the first application; storing the operation results generated during the operation of the first application in a first storage device for reuse in subsequent operation processes of the first application; And / or, deleting the first application sandbox after the first application is closed.

5. The method according to claim 1, further comprising: In response to a logout instruction initiated by the first user, deleting the first user sandbox; and / or, In response to the logout instruction initiated by the first user, the personal data generated by the first user during this login is stored in the second storage device to be reused in the subsequent login process of the first user, and the first user sandbox is deleted after the storage is completed.

6. The method according to claim 1, wherein the method is applied to a virtual machine with a cloud desktop instance deployed thereon, The first user sandbox is created and maintained by the operating system of the virtual machine, and the resource call request is initiated to the operating system through the cloud desktop instance.

7. A resource calling device, comprising: A user sandbox determination unit is configured to determine, in response to a resource call request initiated by a first user, a first user sandbox corresponding to the first user; wherein the resource call request includes a resource name of a target system resource, and there are multiple versions of the target system resource, and different versions of the target system resource are respectively relied upon by different applications; different users correspond to different user sandboxes, and any user sandbox records address information of callable resources of the corresponding user; a first application sandbox corresponding to a first application is deployed in the first user sandbox, and the first application sandbox records address information of system resources that the first application depends on; A target resource calling unit is used to query the target address information of the target system resource in the address information of the system resources recorded in the first application sandbox according to the resource name of the target system resource, and call the target system resource that the first application depends on according to the target address information.

8. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 6 by running the executable instructions.

9. A computer-readable storage medium having computer instructions stored thereon, wherein when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Provisioning service requests in a computer system

    US20160379125A1

  • Usage checks for code running within a secure sub-environment of a virtual machine

    US20200210216A1