CN102567078B - Method and device for virtualizing registry - Google Patents

Method and device for virtualizing registry Download PDF

Info

Publication number
CN102567078B
CN102567078B CN201110447814.6A CN201110447814A CN102567078B CN 102567078 B CN102567078 B CN 102567078B CN 201110447814 A CN201110447814 A CN 201110447814A CN 102567078 B CN102567078 B CN 102567078B
Authority
CN
China
Prior art keywords
registry
tree structure
virtual
value
key value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201110447814.6A
Other languages
Chinese (zh)
Other versions
CN102567078A (en
Inventor
任伟峰
王奇飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Digital Technologies Chengdu Co Ltd
Original Assignee
Huawei Symantec Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN201110447814.6A priority Critical patent/CN102567078B/en
Publication of CN102567078A publication Critical patent/CN102567078A/en
Application granted granted Critical
Publication of CN102567078B publication Critical patent/CN102567078B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method and a device for virtualizing a registry. The method comprises the following steps of: forming a private registry according to a virtual registry file of a virtual process, wherein the private registry comprises a system registry virtual branch which is established in a host system registry and corresponds to a pocket operating system (PKOS) and a memory tree structure which is constructed according to the virtual process in the PKOS; intercepting all operation of the virtual process on the system registry, and redirecting all operation to the system registry virtual branch and the memory tree structure; updating the redirected private registry to the virtual registry file; and deleting the private registry. By the embodiment of the invention, the technical problem that the PKOS is slowly started in the prior art is solved, and the operating performance of the PKOS is improved.

Description

Registry virtualization method and device
Technical Field
The invention relates to the technical field of computers, in particular to a registry virtualization method and device.
Background
With the development of technology, Pocket Operating systems (PKOS) are increasingly popular in developed countries abroad and large and medium-sized cities in China. The pocket operating system is a special application software placed on the removable disk, other application software can be installed, operated and uninstalled in the pocket operating system, and data generated by the application software are all contained in the pocket operating system, so that the mobility of the application software in different hosts is realized. Meanwhile, the pocket operating system has convenience and safety, and an application software process running in the PKOS is called a virtual process.
The core of the PKOS is a system Application Programming Interface (API) intercepting layer, which is used for intercepting the system API of the file and the registry, redirecting the modification operation of the system by the virtual process to the private file system and the private registry of the PKOS, and merging the private file system and the private registry in the PKOS with the file system and the registry on the local host to form the virtual file system and the virtual registry. The redirection operation performed by the interception layer is transparent to the virtual process, i.e., the virtual process is unaware of the existence of the interception layer.
In the course of research and practice on the prior art, the inventor of the present invention found that, in the existing implementation, when the number of virtual registries to be loaded is large (for example, greater than 2 MB), the loading time is long, so that the PKOS starts up slowly, and the running performance of the pocket operating system is affected.
Disclosure of Invention
The embodiment of the invention provides a registry virtualization method and device, which are used for solving the technical problem that a pocket operating system is slow to start in the prior art and improving the running performance of the pocket operating system.
To solve the foregoing technical problem, an embodiment of the present invention provides a virtual registry updating method applied to a pocket operating system, where the method includes:
forming a private registry, wherein the private registry comprises a system registry virtual branch which is established in a host system registry and corresponds to the pocket operating system, and a memory tree structure which is established according to a virtual process in the pocket operating system;
intercepting all operations of a virtual process in a pocket operating system on a registry of a host system, redirecting all the operations into a virtual branch of the registry of the system and a memory tree structure, modifying a key value or an item value corresponding to the operation in the virtual branch of the registry of the system according to the intercepted operations when the intercepted operations are modification operations on the registry of the system, and deleting the same key value or item value corresponding to the operation in the virtual branch of the registry of the system in the memory tree structure when the intercepted operations correspond to the same key value or item value in the tree structure of the memory;
updating the modified virtual branches of the system registry into the virtual registry file;
deleting the private registry.
Correspondingly, the invention also provides a virtual registry updating device, which is applied to the pocket operating system, and the device comprises:
the system comprises a composition unit, a processing unit and a processing unit, wherein the composition unit is used for composing a private registry, and the private registry comprises a system registry virtual branch which is established in a host system registry and corresponds to a pocket operating system, and a memory tree structure which is established according to a virtual process in the pocket operating system;
the intercepting redirection unit is used for intercepting all operations of a virtual process in a pocket operating system on a registry of a host system and redirecting all the operations to a virtual branch of the registry of the system and a memory tree structure, wherein when the intercepted operations are modification operations on the registry of the system, key values or item values corresponding to the operations in the virtual branch of the registry of the system are modified according to the intercepted operations, and when the intercepted operations correspond to the same key values or item values in the memory tree structure, the same key values or item values corresponding to the operations in the virtual branch of the registry of the system in the memory tree structure are deleted;
the updating unit is used for updating the modified virtual branches of the system registry into the virtual registry file;
a first deleting unit configured to delete the private registry.
According to the technical scheme, in the embodiment of the invention, when the pocket operating system is started, only 2 virtual branches of the system registry are created, when the virtual process is started, the memory tree structure corresponding to the virtual process is constructed, and when the virtual process in the pocket operating system runs, related functions in the virtual branches in the system registry are continuously modified, so that the contents such as modification of the virtual branches of the system registry are shared when each virtual process runs; if the related function to be modified exists in the memory tree structure during the running of the virtual process, the related function in the memory tree structure is deleted, so that the query quantity of the subsequent application program in the memory tree structure is reduced, and the processing speed is increased. The pocket operating system optimizes the starting speed of the pocket operating system by combining the virtual branch of the system registry with the memory space tree structure, improves the running performance of the pocket operating system and improves the experience of users.
Drawings
Fig. 1 is a flowchart of a virtual registry updating method according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart of a method for forming a private registry according to an embodiment of the present invention;
FIG. 3 is a flowchart of a virtual registry modification operation according to an embodiment of the present invention;
FIG. 4 is a flowchart of a virtual registry lookup operation according to an embodiment of the present invention;
FIG. 5 is a flowchart of an exit pocket operating system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a virtual registry updating apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical field of the invention better understand the scheme of the embodiment of the invention, the embodiment of the invention is further described in detail with reference to the drawings and the implementation mode.
Referring to fig. 1, a flowchart of a method for updating a virtual registry according to an embodiment of the present invention is shown, where the method includes:
step 101: forming a private registry, wherein the private registry comprises a system registry virtual branch which is established in a host system registry and corresponds to the pocket operating system, and a memory tree structure which is established according to a virtual process in the pocket operating system;
in this embodiment, the private registry includes: the virtual branch of the system registry is a branch created in the registry of the host system when the pocket operating system is started; when the virtual process is started, analyzing the file of the virtual registry to obtain the information of the virtual registry; and constructing a memory tree structure of the virtual process in the memory space according to the virtual registry information. The virtual process is an application software process running in a pocket operating system.
The process of forming the private registry comprises the following steps: when a pocket operating system is started, firstly creating a system registry virtual branch, when a virtual process in the pocket operating system is started, analyzing a virtual registry file to obtain virtual registry information, creating a memory tree structure of the virtual process according to the virtual registry file and the state of the virtual branch of the current system registry, traversing the system registry virtual branch, deleting a key or item value which is the same as that of the system registry virtual branch in the memory tree structure, wherein the system registry virtual branch is a system registry virtual branch which is created when the pocket operating system is started and is updated when any virtual process of the pocket operating system runs; the memory tree structure and the virtual branch of the system registry are combined to form a private registry. The method for forming the private registry in the embodiment of the present invention is not limited to the above method, and as long as the private registry is formed by the memory tree structure corresponding to the virtual process and the virtual branch of the system registry, the key or item value in the memory tree structure that is the same as the virtual branch of the system registry may not be deleted when the private registry is formed.
Step 102: intercepting all operations of a virtual process on a system registry, redirecting all the operations into a system registry virtual branch and a memory tree structure, modifying a key value or an item value corresponding to the operation in the system registry virtual branch according to the intercepted operations when the intercepted operations are modification operations on the system registry, and deleting the same key value or item value corresponding to the operation in the system registry virtual branch in the memory tree structure when the intercepted operations correspond to the same key value or item value in the memory tree structure;
in this step, all operations of the virtual process on the registry are redirected to the private registry (i.e., the system registry virtual branch and the memory tree structure), for example, modification operations of the virtual process on the system registry are intercepted and redirected to the system registry virtual branch, and so on.
In this embodiment, the operation performed by the virtual process on the information in the virtual branch of the system registry may include, but is not limited to, a modification operation on the virtual registry information, or an inquiry operation on the virtual registry information, where the modification includes changing existing data and creating missing data.
Step 103: updating the modified virtual branches of the system registry into the virtual registry file;
in this step, the virtual process updates the contents of the private registry to the virtual registry file; the virtual registry file may be stored in a local disk or a mobile hard disk, or may be stored in another mobile device, as long as the virtual registry file can be recognized by the windows operating system, which is not limited in this embodiment. Wherein, the virtual registry file stores the modification operation of the registry by the virtual process.
When the pocket operating system exits, the content in the modified virtual branch of the system registry needs to be updated into the virtual registry file corresponding to the pocket operating system, which can be realized by the following method: traversing the system registry virtual branch, creating a temporary memory tree structure, adding all information of the system registry virtual branch into the temporary memory tree structure, then storing all information in the temporary memory tree structure into the virtual registry file in a tree structure form, and emptying all information in the temporary memory tree structure.
Step 104: deleting the private registry.
And when the pocket operating system exits, deleting the system registry virtual branch.
The previously established memory tree structure is automatically deleted when the pocket operating system exits, so that the private registry is deleted in the embodiment of the invention, and only the virtual branch of the system registry can be deleted.
In this embodiment, step 102 takes two cases as an example, but is not limited to this, and one case is that when a virtual process modifies a certain key value or item value (the key value or item value, which refers to an item or key or value in the registry, and the value includes a name, a type, and data) K in the registry, the virtual process may query whether a key value or item value to be modified exists in a virtual branch of the system registry and in the memory tree structure, respectively, to improve query efficiency. If the key value or the item value exists, deleting the key value or the item value K, modifying the key value or the item value K, and returning a message of successful modification to the virtual process. And if the key value or the item value does not exist, modifying the key value or the item value K and returning a message of successful modification to the virtual process. If the virtual branch of the system registry does not have the key value or the item value K, but the key value or the item value K exists in the memory tree structure, the key value or the item value K existing in the memory tree structure is imported into the virtual branch of the system registry, then the key value or the item value K of the virtual branch of the system registry is modified, and a message of successful modification is returned.
The other situation is that: when a virtual process inquires a certain key value K of the registry, the virtual process firstly inquires whether the key value or item value K exists in the virtual branch of the registry of the system, and then inquires whether the key value or item value K exists in the tree structure of the memory, and if the key value or item value does not exist in the virtual branch of the registry of the system and the tree structure of the memory, the key value or item value does not exist. And if the key value or the item value exists in both the virtual branch of the system registry and the memory tree structure, deleting the key value or the item value K in the memory tree structure and returning the key value or the item value. And if the key value or the item value K exists in the virtual branch of the system registry but the key value or the item value K does not exist in the memory tree structure, returning to the virtual branch of the system registry and the key value or the item value K exists. And if the system registry virtual branch does not have the key value or the item value K, but the memory tree structure has the key value or the item value K, returning to the memory tree structure that the key value or the item value K exists.
There may be multiple virtual programs in the pocket operating system, and the query or modification operation of each virtual program to the registry is different. It may happen that at some time the key values or entry values in the memory tree structure and the system registry virtual branches are not identical.
The embodiment of the present invention is applied to a Pocket Operating System (PKOS), which is stored in a mobile storage device, such as a mobile hard disk, but is not limited thereto. When the pocket operating system performs information interaction with the host system, for example, a common application program, all functions may involve a large amount of registry information, but at the time of starting, most registry operations are query type operations; when the program runs, only a small amount of registry information is modified; for the registry operation function, the query speed of the class function is high, and the modification time of the class function is low; based on this, in the embodiment of the present invention, when the pocket operating system is started, only the system registry virtual branch is created, and when the virtual process is started, the memory tree structure is constructed, and when the virtual process runs in the pocket operating system, the related functions in the virtual branch in the system registry are continuously modified, so that the contents such as modification of the system registry virtual branch are shared when each virtual process runs; if the related function to be modified exists in the memory tree structure during the running of the virtual process, the related function in the memory tree structure is deleted, so that the query quantity of the subsequent application program in the memory tree structure is reduced, and the processing speed is increased. Therefore, the pocket operating system of the embodiment of the invention optimizes the starting speed of the pocket operating system by combining the mode of establishing the virtual branch of the system registry (VRegSubNode) and the mode of establishing the tree structure of the memory space (VRegMemTree), improves the running performance of the pocket operating system and improves the experience of users.
The respective steps in fig. 1 are described in detail below.
Referring to fig. 2, a specific flowchart of an operation of composing a private registry provided in an embodiment of the present invention is shown, in this embodiment, composing the private registry may be understood as initializing a file of a virtual registry, and may also be understood as a loading operation of the virtual registry, which specifically includes:
step 201: when the pocket operating system is started, a system registry virtual branch is created;
step 202: when the virtual process is started, analyzing the file of the virtual registry to obtain the information of the virtual registry;
step 203: constructing a memory tree structure in a memory space according to the virtual registry information;
step 204: and traversing the virtual branches of the system registry, and deleting the keys or item values in the memory tree structure, which are the same as the virtual branches of the system registry.
The traversal system registry virtual branch is a branch created in the host system registry when the traversal PKOS is started, and the modification operation of the virtual process on the registry is intercepted and redirected to the branch. The building of the memory tree structure is to analyze the virtual registry file, and then build the memory tree structure of the virtual registry in the memory space according to the analyzed data, that is, the memory tree structure is built on the memory space of the host.
Referring to fig. 3, a flowchart of a virtual registry modifying operation according to an embodiment of the present invention is shown, where the embodiment is a case of performing operation processing on virtual registry information in a private registry, and the embodiment takes modifying a key value in the registry as an example, and specifically includes:
step 301: intercepting operation of a certain key value K in a virtual process modification registry;
step 302: the pocket operating system searches whether a key value K1 exists in the virtual branch of the system registry; if not, go to step 303; if so, go to step 304;
step 303: the pocket operating system inquires whether a key value K2 exists in the memory tree structure; if not, go to step 305; if so, go to step 306;
step 304: the pocket operating system inquires whether a key value K2 exists in the memory tree structure; if so, go to step 307; if not, go to step 308;
step 305: the pocket operating system creates a key value K1 in a virtual branch of a system registry;
step 306: the pocket operating system leads the key value K2 in the memory tree structure into a system registry virtual branch K1;
step 307: the pocket operating system deletes the key value K2 in the memory tree structure;
step 308: the pocket operating system modifies a key value K1 in the virtual branch of the system registry;
step 309: the pocket operating system feeds back the key value K1.
In this embodiment, K-K1-K2.
That is to say, in this embodiment, when the virtual process modifies the key value or the item value K1, the pocket operating system first queries whether the virtual branch of the system registry has the key value or the item value K1, and then queries whether the tree structure of the memory has the key value or the item value K2, and if neither K1 nor K2 exists, directly creates K1 in the virtual branch of the system registry, and returns a creation success message. If both K1 and K2 exist, K2 is deleted, K1 is modified, and a message that the modification was successful is returned. If K1 exists but K2 does not exist, K1 is modified and a message is returned that the modification was successful. If K1 does not exist but K2 exists, K2 is imported into K1, K1 is modified, and a message that the modification was successful is returned.
Referring to fig. 4, a flowchart of a virtual registry query operation according to an embodiment of the present invention is shown, where another case of performing operation processing on virtual registry information in the private registry specifically includes:
step 401: intercepting a virtual process to inquire a virtual registry K;
step 402: the pocket operating system inquires whether the system registry branch has K1; if not, go to step 403; if yes, go to step 404;
step 403: the pocket operating system inquires whether the memory tree structure has K2, if not, step 405 is executed; otherwise, go to step 406;
step 404: the pocket operating system inquires whether the memory tree structure has K2, if not, step 407 is executed; otherwise, go to step 408;
step 405: the pocket operating system feeds back that no key value or item value K exists; the virtual program returns the inquired key value or item value K;
step 406: pocket operating system feedback K2;
step 407: pocket operating system feedback K1;
step 408: the pocket operating system deletes K2; the search redundancy is reduced.
In this embodiment, K-K1-K2.
That is to say, when querying a certain key value K of the registry, the virtual process queries whether a key value or an item value K1 exists in the virtual branch of the registry of the system, and then queries whether a key value or an item value K2 exists in the memory tree structure, and if neither K1 nor K2 exists, directly returns that K does not exist. If both K1 and K2 exist, then K2 is deleted and K1 is returned. If K1 is present but K2 is not present, then K1 is returned. If K1 is not present but K2 is present, K2 is returned.
Referring to fig. 5, a flowchart of an embodiment of the present invention is shown, in which a private registry is deleted, including:
step 501: the pocket operating system traverses the modified registry information in the system registry virtual branch;
step 502: analyzing a virtual registry file and constructing a temporary memory tree structure, and adding all information of the virtual branches of the system registry to the temporary memory tree structure;
step 503: all information in the temporary memory tree structure is stored in the virtual registry file in a tree structure form;
step 504: and clearing the temporary memory tree structure and deleting the system registry virtual branch.
That is to say, the pocket operating system firstly traverses the system registry virtual branch, analyzes the virtual registry file and constructs a temporary memory tree structure, adds all information of the system registry virtual branch into the temporary memory tree structure, then stores all information in the temporary memory tree structure into the virtual registry file in a tree structure form, and finally clears the temporary memory tree structure and deletes the system registry virtual branch to prevent user information leakage.
When the virtual program is started, the virtual registry of the memory space tree structure is constructed, so that the time is short, namely the private key value or item value is created by the PKOS when the registry information is modified, the starting speed of the PKOS is improved, the running performance of a pocket operating system is improved, and the user experience is enhanced. Furthermore, when the information of the virtual registry changes, the virtual branch of the system registry is updated in time, so that the information is conveniently shared and transmitted among the processes through the registry, and the information of key values in the registry can be modified and inquired to judge whether the technical scheme of the invention is used.
Based on the implementation process of the foregoing method, an embodiment of the present invention further provides a virtual registry updating apparatus, a schematic structural diagram of which is shown in fig. 6 in detail, where the apparatus includes: a composition unit, 61, an interception redirection unit 62, an update unit 63 and a first deletion unit 64. Wherein,
the composition unit 61 is configured to compose a private registry, where the private registry includes a system registry virtual branch corresponding to the pocket operating system and established in the host system registry, and a memory tree structure established according to a virtual process in the pocket operating system; the interception redirecting unit 62 is configured to intercept all operations of a virtual process in the pocket operating system on the registry of the host system, and redirect all the operations to the virtual branch of the registry of the system and the memory tree structure, where when an intercepted operation is a modification operation on the registry of the system, a key value or an item value corresponding to the operation in the virtual branch of the registry of the system is modified according to the intercepted operation, and when the intercepted operation corresponds to the same key value or item value in the memory tree structure, the same key value or item value in the memory tree structure and the virtual branch of the registry of the system corresponding to the operation is deleted; the updating unit 63 is configured to update the modified virtual branch of the system registry into the virtual registry file; the first deleting unit 64 is configured to delete the private registry, and specifically, delete the system registry virtual branch when the pocket operating system exits.
Wherein the constituent units include: the system comprises an analysis unit, a memory tree structure construction unit and a second deletion unit, wherein the first initialization unit is used for creating a system registry virtual branch when a pocket operating system is started; the analysis unit is used for analyzing the virtual registry file to obtain virtual registry information when a virtual program is started; the memory tree structure construction unit is used for constructing a memory tree structure in a memory space according to the virtual registry information; and the second deleting unit is used for traversing the system registry virtual branch and deleting the key values or item values which are the same as the system registry virtual branch in the memory tree structure.
Preferably, when the operation is a modify operation, the intercepting redirection unit includes: the system comprises a first query unit, a creation unit, a third deletion unit, a first feedback unit and an import unit, wherein the first query unit is used for respectively querying whether a key value or an item value exists in a virtual branch of a system registry and a memory tree structure when the key value or the item value is modified; the creating unit is configured to directly create the key value or the item value in the system registry virtual branch and return the key value or the item value when the first querying unit does not query from the system registry virtual branch and the memory tree structure; the third deleting unit is configured to delete the key value or the item value in the memory tree structure and modify the key value or the item value in the virtual branch of the system registry when the first querying unit queries both the virtual branch of the system registry and the memory tree structure; the first feedback unit is configured to modify the key value or the item value in the virtual branch of the system registry when the first query unit queries the key value or the item value from the virtual branch of the system registry and does not query the key value or the item value from the memory tree structure; the import unit is configured to import the key value or the item value in the memory tree structure into the system registry virtual branch when the first query unit does not query the key value or the item value from the system registry virtual branch and queries the key value or the item value from the memory tree structure, and modify the imported key value or the imported item value in the system registry virtual branch.
Preferably, the intercepting redirection unit is further configured to, when the operation is a query operation on a system registry, return a query result, and delete a same key value or item value corresponding to the operation in the memory tree structure when both the key value and item value corresponding to the operation exist in the memory tree structure and the virtual branch of the system registry.
Wherein, when the operation is a query operation, the intercepting redirection unit may further include: the system comprises a first query unit, a first feedback unit, a first deletion unit, a first feedback unit and a first feedback unit, wherein the first query unit is used for respectively querying whether a system registry virtual branch and a memory tree structure have key values or item values when querying the key values or the item values; the second feedback unit is configured to directly return that no key value or item value exists when the second query unit queries no key value or item value from both the system registry virtual branch and the memory tree structure; the fourth deleting unit is configured to delete the key value or the item value in the memory tree structure and return the key value or the item value in the system registry virtual branch when the second querying unit queries the key value or the item value from both the system registry virtual branch and the memory tree structure; the third feedback unit is configured to return the key value or the item value in the virtual branch of the system registry when the second query unit finds the key value or the item value from the virtual branch of the system registry and does not find the key value or the item value from the memory tree structure; the fourth feedback unit is configured to return that the key value or the item value exists in the memory tree structure when the second query unit does not find the key value or the item value from the system registry virtual branch and finds the key value or the item value from the memory tree structure.
Preferably, when the operation is a query operation, the interception re-determining unit may further include: a third searching unit, a fourth searching unit, a fifth feedback unit, a sixth feedback unit, a fifth searching unit, a fifth deleting unit and a seventh feedback unit, wherein the third searching unit is configured to search whether the key value or the item value exists in the virtual branch of the system registry first, the fourth searching unit is configured to continue to search whether the corresponding key value or the item value exists in the memory tree structure when the key value or the item value is not found by the third searching unit, the fifth feedback unit is configured to feed back the key value or the item value found in the memory tree structure when the key value or the item value is searched by the fourth searching unit from the memory tree structure, and the sixth feedback unit is configured to feed back the key value or the item value found in the memory tree structure when the key value or the item value is not found by the fourth searching unit from the memory tree structure, feeding back that the key value or item value is not found in the virtual branch of the system registry and the memory tree structure; the fifth searching unit is configured to continue to search whether the memory tree structure has the corresponding key value or item value when the third searching unit searches the key value or item value; the fifth deleting unit is configured to delete the key value or the item value in the memory tree structure if the key value or the item value is found from the memory tree structure by the fifth querying unit, and return the key value or the item value in the virtual branch of the system registry; the seventh feedback unit is configured to return the key value or the item value in the virtual branch of the system registry if the key value or the item value is not found in the memory tree structure by the fifth query unit.
Preferably, the update unit includes: the system comprises a traversing unit, an analyzing unit, an adding unit and a writing unit, wherein the traversing unit is used for traversing the modified registry information in the virtual branch of the system registry when the pocket operating system exits; the analysis unit is used for analyzing the virtual registry file and constructing a temporary memory tree structure; the adding unit is used for adding all information of the virtual branches of the system registry into the temporary memory tree structure, and the writing unit is used for writing all information in the temporary memory tree structure into the virtual registry file in a tree structure form and emptying all information in the temporary memory tree structure.
When the virtual program is started, the virtual registry of the memory space tree structure is constructed, so that the time is short, namely the private key value or item value is created by the PKOS when the registry information is modified, the starting speed of the PKOS is improved, the running performance of a pocket operating system is improved, and the user experience is enhanced.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be construed as the protection scope of the present invention.

Claims (12)

1. A virtual registry updating method is applied to a pocket operating system and is characterized by comprising the following steps:
forming a private registry, wherein the private registry comprises a system registry virtual branch which is established in a host system registry and corresponds to the pocket operating system, and a memory tree structure which is established according to a virtual process in the pocket operating system;
intercepting all operations of a virtual process in a pocket operating system on a registry of a host system, redirecting all the operations into a virtual branch of the registry of the system and a memory tree structure, modifying a key value or an item value corresponding to the operation in the virtual branch of the registry of the system according to the intercepted operations when the intercepted operations are modification operations on the registry of the host system, and deleting the key value or the item value corresponding to the operation in the memory tree structure when the intercepted operations correspond to the same key value or item value in the virtual branch of the registry in the memory tree structure;
updating the modified system registry virtual branch into a virtual registry file of the pocket operating system;
deleting the private registry;
wherein the composing the private registry comprises:
when the virtual process is started, analyzing the virtual registry file to obtain virtual registry information;
constructing a memory tree structure of the virtual process in a memory space according to the virtual registry information;
traversing the system registry virtual branch, and deleting the same key value or item value in the memory tree structure as the system registry virtual branch, wherein the system registry virtual branch is created when the pocket operating system is started and is updated when any virtual process of the pocket operating system runs;
the memory tree structure and the virtual branch of the system registry form a private registry.
2. The method of claim 1, wherein when the operation is a modify operation on the host system registry, updating an operation object in the system registry virtual branch, and when the intercepted operation corresponds to a same key value or item value in the memory tree structure as in the system registry virtual branch, deleting the key value or item value in the memory tree structure corresponding to the operation, comprises:
when the virtual process modifies a key value or an item value of the registry, respectively inquiring whether the key value or the item value exists in the virtual branch of the system registry and the memory tree structure;
if the key value or the item value does not exist in the system registry virtual branch and the memory tree structure, the key value or the item value is directly created in the system registry virtual branch and returned;
if the key value or the item value exists in the system registry virtual branch and the memory tree structure, deleting the key value or the item value in the memory tree structure, and modifying the key value or the item value in the system registry virtual branch;
if the key value or the item value exists in the virtual branch of the system registry but the key value or the item value does not exist in the memory tree structure, modifying the key value or the item value in the virtual branch of the system registry;
if the system registry virtual branch does not have the key value or the item value, but the memory tree structure has the key value or the item value, the key value or the item value in the memory tree structure is imported into the system registry virtual branch, and the key value or the item value in the imported system registry virtual branch is modified.
3. The method according to claim 1 or 2, further comprising, when the operation is a query operation on the host system registry, returning a query result, and when there is a key value or an item value corresponding to the operation in both the virtual branch of the system registry and the key value or the item value in the memory tree structure, deleting the key value or the item value corresponding to the operation.
4. The method according to claim 3, wherein the returning a query result when the operation is a query operation on the host system registry, and deleting a key value or an item value corresponding to the operation in the memory tree structure when the key value and the item value corresponding to the operation both exist in the memory tree structure and in the system registry virtual branch comprises:
when the virtual process queries a registry key value, respectively querying whether the key value or item value exists in the system registry virtual branch and the memory tree structure;
if the key value or the item value does not exist in the system registry virtual branch and the memory tree structure, directly returning that the key value or the item value does not exist;
if the key value or the item value exists in the system registry virtual branch and the memory tree structure, deleting the key value or the item value in the memory tree structure, and returning the key value or the item value in the system registry virtual branch;
if the system registry virtual branch has the key value or item value, and the memory tree structure does not have the key value or item value, returning the key value or item value in the system registry virtual branch;
if the system registry virtual branch does not have the key value or the item value, and the memory tree structure has the key value or the item value, returning that the key value or the item value exists in the memory tree structure.
5. The method according to claim 3, wherein the returning a query result when the operation is a query operation on the host system registry, and deleting a key value or an item value corresponding to the operation in the memory tree structure when the key value and the item value corresponding to the operation both exist in the memory tree structure and in the system registry virtual branch comprises:
searching whether the system registry virtual branch has the key value or the item value, if the system registry virtual branch does not have the key value or the item value, continuously searching whether the memory tree structure has the corresponding key value or the item value, if the memory tree structure has the key value or the item value, feeding back the key value or the item value searched in the memory tree structure, and if the system registry virtual branch does not have the memory tree structure, feeding back that the key value or the item value is not searched in both the system registry virtual branch and the memory tree structure;
if the key value or the item value exists in the virtual branch of the system registry, continuously searching whether the corresponding key value or the item value exists in the memory tree structure, if so, deleting the key value or the item value in the memory tree structure, and returning the key value or the item value in the virtual branch of the system registry; and if the memory tree structure does not exist, returning the key value or the item value in the virtual branch of the system registry.
6. The method of any of claims 1-2, wherein the updating the modified virtual branch of the system registry into the virtual registry file of the pocket operating system comprises:
when the pocket operating system exits, traversing the modified registry information in the system registry virtual branch, analyzing a virtual registry file and constructing a temporary memory tree structure, adding all information of the system registry virtual branch into the temporary memory tree structure, then storing all information in the temporary memory tree structure into the virtual registry file, and emptying all information in the temporary memory tree structure.
7. A virtual registry updating apparatus applied to a pocket operating system, the apparatus comprising:
the system comprises a composition unit, a processing unit and a processing unit, wherein the composition unit is used for composing a private registry, and the private registry comprises a system registry virtual branch which is established in a host system registry and corresponds to a pocket operating system, and a memory tree structure which is established according to a virtual process in the pocket operating system;
the intercepting redirection unit is used for intercepting all operations of a virtual process in a pocket operating system on a registry of a host system and redirecting all the operations to a virtual branch of the registry of the system and a memory tree structure, wherein when the intercepted operations are modification operations on the registry of the host system, key values or item values corresponding to the operations in the virtual branch of the registry of the system are modified according to the intercepted operations, and when the intercepted operations correspond to the same key values or item values in the virtual branch of the registry of the system in the memory tree structure, the key values or item values corresponding to the operations in the memory tree structure are deleted;
the updating unit is used for updating the modified virtual branch of the system registry into a virtual registry file of the pocket operating system;
a first deleting unit configured to delete the private registry;
wherein the constituent units include:
the analysis unit is used for analyzing the virtual registry file to obtain virtual registry information when the virtual program is started;
the memory tree structure construction unit is used for constructing a memory tree structure in a memory space according to the virtual registry information;
and the second deleting unit is used for traversing the system registry virtual branch and deleting the key values or item values which are identical to the system registry virtual branch in the memory tree structure, wherein the system registry virtual branch is created when the pocket operating system is started and is updated when any virtual process of the pocket operating system runs.
8. The apparatus of claim 7, wherein when the operation is a modify operation, the intercept redirection unit comprises:
the first query unit is used for respectively querying whether a key value or an item value exists in the virtual branch of the system registry and the memory tree structure when the key value or the item value is modified;
the creating unit is used for directly creating the key value or the item value in the system registry virtual branch and returning the key value or the item value when the first query unit does not query from the system registry virtual branch and the memory tree structure;
a third deleting unit, configured to delete the key value or the item value in the memory tree structure and modify the key value or the item value in the virtual branch of the system registry when the first querying unit queries both the virtual branch of the system registry and the memory tree structure;
a first feedback unit, configured to modify the key value or the item value in the virtual branch of the system registry when the first query unit queries the key value or the item value from the virtual branch of the system registry but does not query the key value or the item value from the memory tree structure;
and the importing unit is used for importing the key values or the item values in the memory tree structure into the system registry virtual branch and modifying the key values or the item values in the imported system registry virtual branch when the first querying unit does not query the key values or the item values from the system registry virtual branch but queries the key values or the item values from the memory tree structure.
9. The apparatus according to claim 7 or 8, wherein the interception redirection unit is further configured to, when the operation is a query operation on a host system registry, return a query result, and delete a key value or an item value corresponding to the operation in the memory tree structure when both the key value and the item value in the memory tree structure and the virtual branch of the system registry correspond to the operation.
10. The apparatus of claim 9, wherein when the operation is a query operation, the interception redirection unit further comprises:
the second query unit is used for respectively querying whether the key value or the item value exists in the virtual branch of the system registry and the memory tree structure when querying the key value or the item value;
the second feedback unit is used for directly returning that no key value or item value exists when the second query unit queries no key value or item value from the system registry virtual branch and the memory tree structure;
a fourth deleting unit, configured to delete the key value or the item value in the memory tree structure and return the key value or the item value in the system registry virtual branch when the second querying unit queries the key value or the item value from both the system registry virtual branch and the memory tree structure;
a third feedback unit, configured to return the key value or the item value in the virtual branch of the system registry when the second query unit finds the key value or the item value from the virtual branch of the system registry and does not find the key value or the item value from the memory tree structure;
a fourth feedback unit, configured to return that the key value or the item value exists in the memory tree structure when the key value or the item value is not found from the system registry virtual branch by the second query unit and the key value or the item value is found from the memory tree structure.
11. The apparatus of claim 9, wherein when the operation is a query operation, the intercept re-determination unit further comprises:
a third searching unit for searching whether the system registry virtual branch has the key value or item value,
a fourth searching unit, configured to continue to search whether the memory tree structure has the corresponding key value or item value when the third searching unit does not search the key value or item value,
a fifth feedback unit, configured to feed back the key value or the item value found in the memory tree structure when the fourth search unit searches for the key value or the item value from the memory tree structure,
a sixth feedback unit, configured to feed back that the key value or the item value is not found in both the virtual branch of the system registry and the memory tree structure when the key value or the item value is not found in the memory tree structure by the fourth search unit;
a fifth searching unit, configured to continue to search whether the memory tree structure has the corresponding key value or item value when the third searching unit searches the key value or item value;
a fifth deleting unit, configured to delete the key value or the item value in the memory tree structure if the key value or the item value is found from the memory tree structure by the fifth querying unit, and return the key value or the item value in the virtual branch of the system registry;
a seventh feedback unit, configured to return the key value or the item value in the virtual branch of the system registry if the key value or the item value is not found in the memory tree structure by the fifth query unit.
12. The apparatus according to any one of claims 7 to 8, wherein the updating unit comprises:
the traversal unit is used for traversing the modified registry information in the system registry virtual branch when the pocket operating system exits;
the analysis unit is used for analyzing the virtual registry file of the pocket operating system and constructing a temporary memory tree structure;
an adding unit, configured to add all information of the system registry virtual branches to the temporary memory tree structure,
and the writing unit is used for writing all the information in the temporary memory tree structure into the virtual registry file of the pocket operating system and emptying all the information in the temporary memory tree structure.
CN201110447814.6A 2011-12-28 2011-12-28 Method and device for virtualizing registry Expired - Fee Related CN102567078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110447814.6A CN102567078B (en) 2011-12-28 2011-12-28 Method and device for virtualizing registry

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110447814.6A CN102567078B (en) 2011-12-28 2011-12-28 Method and device for virtualizing registry

Publications (2)

Publication Number Publication Date
CN102567078A CN102567078A (en) 2012-07-11
CN102567078B true CN102567078B (en) 2014-12-24

Family

ID=46412576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110447814.6A Expired - Fee Related CN102567078B (en) 2011-12-28 2011-12-28 Method and device for virtualizing registry

Country Status (1)

Country Link
CN (1) CN102567078B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488515A (en) * 2012-12-05 2014-01-01 张维加 Equipment combining USB guide system and program virtual machine
CN107315602B (en) * 2017-05-12 2021-02-12 广东网金控股股份有限公司 Application program upgrading method and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101479721A (en) * 2006-06-30 2009-07-08 微软公司 Running applications from removable media
CN101535949A (en) * 2006-11-02 2009-09-16 微软公司 Virtual deletion in merged registry keys
CN101551756A (en) * 2009-03-31 2009-10-07 成都市华为赛门铁克科技有限公司 The virtual method and virtual device based on operating system layer
CN101689165A (en) * 2007-06-27 2010-03-31 微软公司 Running add-on components in virtual enviroments

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8489708B2 (en) * 2010-04-06 2013-07-16 Microsoft Corporation Virtual application extension points

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101479721A (en) * 2006-06-30 2009-07-08 微软公司 Running applications from removable media
CN101535949A (en) * 2006-11-02 2009-09-16 微软公司 Virtual deletion in merged registry keys
CN101689165A (en) * 2007-06-27 2010-03-31 微软公司 Running add-on components in virtual enviroments
CN101551756A (en) * 2009-03-31 2009-10-07 成都市华为赛门铁克科技有限公司 The virtual method and virtual device based on operating system layer

Also Published As

Publication number Publication date
CN102567078A (en) 2012-07-11

Similar Documents

Publication Publication Date Title
JP7221975B2 (en) Transaction processing in a multi-master distributed data management system
US10037340B2 (en) Tiered distributed storage policies
CN110275864B (en) Index establishing method, data query method and computing device
US11836112B2 (en) Path resolver for client access to distributed file systems
US8819587B1 (en) Methods of managing items in a shared workspace
US10235476B2 (en) Matching objects using match rules and lookup key
US20140317103A1 (en) Interface to navigate and search a concept hierarchy
CN104412266A (en) Method and apparatus for multidimensional data storage and file system with a dynamic ordered tree structure
US20150242474A1 (en) Inline and context aware query box
US8983908B2 (en) File link migration for decommisioning a storage server
CN114265639B (en) Leaving locally deleted content at a storage service
US20210209057A1 (en) File system quota versioning
EP2435933A1 (en) Method and system of splitting and merging information spaces
CN102567078B (en) Method and device for virtualizing registry
CN112272137A (en) Mass data management in communication applications through multiple mailboxes
US9507783B1 (en) Migration of large data from on-line content management to archival content management
US12007997B2 (en) Metadata search via N-gram index
CN117032870A (en) Page jump processing method and device
US8745144B2 (en) Persisting contact information in mailbox
CN104462104A (en) Filter method and server
CA2885244C (en) Leapfrog tree-join
KR101620782B1 (en) Method and System for Storing Data Block Using Previous Stored Data Block
Corbellini et al. An evaluation of distributed processing models for random walk-based link prediction algorithms over social big data
US12001481B2 (en) Graph-organized file system
Husain et al. A seven tier architecture of cloud database management system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Applicant after: Huawei Symantec Technologies Co., Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Applicant before: Chengdu Huawei Symantec Technologies Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: CHENGDU HUAWEI SYMANTEC TECHNOLOGY CO., LTD. TO: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141224

Termination date: 20181228