Storage space management method, device, system and electronic equipment
By implementing the storage space management method in the vehicle computer system, one virtual machine allows to manage the storage space of other virtual machines, solving the problem of excessive time-consuming caused by independence between virtual machines and improving processing efficiency.
Patent Information
- Application Number
- CN202210609224.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-05-31
AI Technical Summary
Different virtual machines in existing vehicle computer systems are independent of each other, and users cannot issue control instructions to other virtual machines through one virtual machine, which results in too long processing of the operating state of multiple virtual machines and is prone to omissions.
A storage space management method is provided, by receiving storage space management instructions sent by the first target virtual machine, determining storage space information corresponding to the second target virtual machine, and sending these information to the first target virtual machine, thereby realizing storage space management of one virtual machine for other virtual machines.
Managing the storage space of other virtual machines through one virtual machine solves the problem of too long time-consuming in related technologies that cannot issue control instructions to other virtual machines through one virtual machine, and improves the efficiency of handling the operating state of multiple virtual machines.
Smart Images

Figure CN114911624B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle computer systems, and in particular to a storage space management method, device, system and electronic equipment. Background Art
[0002] In an existing vehicle computer system, different virtual machines are usually running. However, in the related technology, different virtual machines are independent of each other. Users cannot control other virtual machines through the application in a certain virtual machine. As a result, when users want to process the operating status of multiple virtual machines, they need to issue corresponding operation instructions to each of the multiple virtual machines in turn. The whole process takes too long and is prone to omissions when there are a large number of virtual machines.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] Embodiments of the present invention provide a storage space management method, device, system and electronic device to at least solve the technical problem in the related art that it takes too long to process the operating status of multiple virtual machines due to the inability to issue control instructions to other virtual machines through one virtual machine.
[0005] According to one aspect of an embodiment of the present invention, there is provided a storage space management method applicable to an electronic device running multiple virtual machines, comprising: receiving a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines; determining storage space information corresponding to a second target virtual machine based on the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; and sending the storage space information to the first target virtual machine.
[0006] Optionally, the storage space management instruction includes a storage space query instruction, wherein determining the storage space information corresponding to the second target virtual machine based on the storage space management instruction includes: in the case where the storage space management instruction is a storage space query instruction, generating a target storage space query instruction, wherein the target storage space query instruction is a query instruction for querying the storage space information corresponding to the second target virtual machine, and the storage space information includes at least the current available storage space size corresponding to the second target virtual machine; sending the target storage space management instruction to the second target virtual machine; and obtaining the storage space information sent by the second target virtual machine.
[0007] Optionally, the storage space management instruction includes a storage space cleaning instruction, wherein determining the storage space information corresponding to the second target virtual machine based on the storage space management instruction includes: generating a target storage space cleaning instruction when the storage space management instruction is a storage space cleaning instruction, wherein the target storage space cleaning instruction is used to instruct the second target virtual machine to clean up target data in the storage space corresponding to the second target virtual machine; cleaning up the target data based on the target storage space cleaning instruction; receiving storage space information sent by the second target virtual machine, wherein the storage space information includes first storage space information generated by the second target virtual machine based on the current available storage space size after cleaning up the target data, and target storage space information generated by the second target virtual machine based on the current available storage space size before cleaning up the target data.
[0008] Optionally, according to the target storage space cleaning instruction, cleaning the target data includes: sending the target storage space cleaning instruction to the second target virtual machine; obtaining a data cleaning service calling instruction sent by the second target virtual machine, wherein the data cleaning service calling instruction is an instruction generated after the second target virtual machine receives the target storage space cleaning instruction; according to the data cleaning service calling instruction, calling a corresponding data cleaning module to clean the target data;
[0009] Optionally, based on the data cleaning service calling instruction, calling the corresponding data cleaning module to clean the target data includes: determining the system information indicated by the data cleaning service calling instruction, wherein the system information includes system type information of the system running in the second target virtual machine; calling the data cleaning service corresponding to the system information to clean the target data.
[0010] Optionally, sending storage space information to the first target virtual machine includes: determining identification information of the second target virtual machine, and determining that the storage space information corresponding to the second target virtual machine is the storage space information associated with the identification information; sending the identification information and the storage space information to the first target virtual machine, and displaying the identification information and the storage space information associated with the identification information to the target object through the first target virtual machine.
[0011] Optionally, the first target virtual machine is a virtual machine with an interactive interface, and the second target virtual machine is a virtual machine without an interactive interface.
[0012] According to another aspect of an embodiment of the present invention, a storage space management method is also provided, which is applicable to an electronic device running multiple virtual machines, and includes: a first target virtual machine responds to operation information of a target object, and generates a storage space management instruction corresponding to the operation information, wherein the first target virtual machine is any one of the multiple virtual machines; sending the storage space management instruction to a storage space management module, wherein the storage space management module runs in the electronic device and is used to manage the storage space corresponding to each of the multiple virtual machines; receiving storage space information corresponding to a second target virtual machine determined by the storage space management module based on the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine.
[0013] According to another aspect of an embodiment of the present invention, a storage space management method is also provided, which is applicable to an electronic device running multiple virtual machines, including: a second target virtual machine receives a target storage space management instruction sent by a storage space management module, wherein the target storage space management instruction is an instruction generated by the storage space management module based on the storage space management instruction sent by the first target virtual machine, the first target virtual machine is any one of the multiple virtual machines, and the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; based on the target storage space management instruction, determining storage space information corresponding to the second target virtual machine; sending the storage space information to the storage space management module, wherein the storage space management module is used to send the storage space information to the first target virtual machine after receiving the storage space information.
[0014] According to another aspect of an embodiment of the present invention, a storage space management system is also provided, which is suitable for an electronic device running multiple virtual machines, including a first target virtual machine, a second target virtual machine, and a storage space management module, wherein the first target virtual machine is used to generate and send storage space management instructions to the storage space management module; the storage space management module is used to receive the storage space management instructions sent by the first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines; determine the storage space information corresponding to the second target virtual machine based on the storage space management instructions, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; and send the storage space information to the first target virtual machine.
[0015] According to another aspect of an embodiment of the present invention, a storage space management device is also provided, which is suitable for an electronic device running multiple virtual machines, including: a first processing module, used to receive a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines; a second processing module, used to determine the storage space information corresponding to the second target virtual machine based on the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; and a third processing module, used to send the storage space information to the first target virtual machine.
[0016] According to another aspect of an embodiment of the present invention, a nonvolatile storage medium is provided. The nonvolatile storage medium includes a stored program. When the program is running, a device where the nonvolatile storage medium is located is controlled to execute a storage space management method.
[0017] According to another aspect of an embodiment of the present invention, an electronic device is provided. The electronic device includes a processor, and the processor is used to run a program. When the program is run, the storage space management method is executed.
[0018] In an embodiment of the present invention, a storage space management instruction sent by a first target virtual machine is received, wherein the first target virtual machine is any one of a plurality of virtual machines; storage space information corresponding to a second target virtual machine is determined according to the storage space management instruction, wherein the second target virtual machine is any one of the plurality of virtual machines except the first target virtual machine; and storage space information is sent to the first target virtual machine. By determining the storage space information corresponding to the second target virtual machine according to the storage space management instruction sent by the first target virtual machine, the purpose of obtaining the storage space information corresponding to the second target virtual machine through the first target virtual machine is achieved, thereby realizing the technical effect of managing the storage space of other virtual machines through one virtual machine, and further solving the technical problem in the related art that it takes too long to process the operating status of multiple virtual machines due to the inability to issue control instructions to other virtual machines through one virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 is a flowchart of a storage space management method provided according to an embodiment of the present invention;
[0021] Figure 2 is a schematic diagram of the architecture of a storage space management system provided according to an embodiment of the present invention;
[0022] Figure 3 is a flowchart of a storage space query process provided according to an embodiment of the present invention;
[0023] Figure 4 is a flowchart of a storage space cleaning process provided according to an embodiment of the present invention;
[0024] Figure 5 is a flowchart of another storage space management method provided according to an embodiment of the present invention;
[0025] Figure 6 is a flowchart of another storage space management method provided according to an embodiment of the present invention;
[0026] Figure 7 is a schematic diagram of the structure of a storage space management system provided according to an embodiment of the present invention;
[0027] Figure 8 It is a structural schematic diagram of a storage space management device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] First, some nouns or terms that appear in the process of describing the embodiments of the present disclosure are subject to the following explanations:
[0031] Hypervisor: Also known as a virtual machine monitor (English: virtual machine monitor, abbreviated as VMM), is the software, firmware or hardware used to create and execute virtual machines.
[0032] The computer used by the hypervisor to execute one or more virtual machines is called the host machine, and these virtual machines are called guest machines. The hypervisor provides a virtual operating platform to execute guest operating systems and is responsible for managing the execution phase of other guest operating systems; these guest operating systems share virtualized hardware resources.
[0033] Hypervisor is the core of all virtualization technologies.
[0034] virtio: virtio is an I / O paravirtualization solution, a set of general I / O device virtualization programs, and an abstraction of a set of general I / O devices in the paravirtualized Hypervisor. It provides a communication framework and programming interface between upper-layer applications and various Hypervisor virtualization devices (KVM, Xen, VMware, etc.), reduces cross-platform compatibility issues, and greatly improves driver development efficiency.
[0035] QEMU: QEMU is a set of processor simulation software that distributes source code under the GPL license and is widely used on the GNU / Linux platform.
[0036] Example 1
[0037] According to an embodiment of the present application, a method embodiment of a storage space management method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] The car system in the related technology is usually composed of multiple systems, and each system in the multiple systems runs separately in a virtual machine. Taking the multi-system car system with Hypervisor architecture as an example, the Hypervisor architecture refers to running multiple virtual machines on an underlying operating system (such as Linux), and each virtual machine runs its own operating system, such as Android or AGL. The effect in the actual car can be understood as having multiple screens. During operation, the car system projects the AGL virtual machine display part to the instrument, and displays the virtual machine running the operating system with specific functions on the screen in the middle of the car, etc. However, these are actually running on an underlying operating system (such as the underlying Linux operating system), and each virtual machine can only display to the user through the interactive interface The storage space information of the storage space allocated by the virtual machine itself, that is, only the storage space of the system operating system with specific functions of the virtual machine itself can be controlled. However, sometimes users need to know the total size of the storage space actually available in the current vehicle, as well as the current size of the available storage space of each running virtual machine, or need to clean up the storage space corresponding to multiple virtual machines. At this time, since each virtual machine in the relevant technology can only control its own corresponding storage space, the user needs to manually issue corresponding control instructions to each virtual machine through the interactive interface corresponding to each virtual machine, which takes a long time. In addition, the operating systems running in some virtual machines do not have corresponding interactive interfaces displayed to users. At this time, users cannot control the storage space corresponding to these virtual machines, such as querying the size of available storage space or cleaning up storage space.
[0039] The examples provided in the present application are as follows Figure 1 The storage space management method shown can solve the above problem and achieve the management and control of the storage space corresponding to other virtual machines through one virtual machine.
[0040] Figure 1 A storage space management method according to an embodiment of the present invention is applicable to an electronic device running multiple virtual machines, such as Figure 1 As shown, the method comprises the following steps:
[0041] Step S102, receiving a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines;
[0042] In the technical solution provided in step S102, the first target virtual machine may be a virtual machine having an interactive interface that can interact with the user, such as a virtual machine running a vehicle central control system, or may be a virtual machine without an interactive interface with the user. When the first target virtual machine is a virtual machine with an interactive interface, the storage space management instruction may be an instruction generated by the first target virtual machine based on the operation information input by the user through the interactive interface. When the first target virtual machine is a virtual machine with an interactive interface or without an interactive interface, the storage space management instruction may be an instruction generated by the operation rules that are expected to be pre-set by the target virtual machine.
[0043] Specifically, when the first target virtual machine generates a storage space management instruction based on the operation information input by the user through the interactive interface, the storage space management program in the first target virtual machine determines the operation that the user wants to perform based on the operation information and generates a corresponding space management instruction. For example, when the user wants to query the current available storage space of each virtual machine, the generated space management instruction is a storage space query instruction. When the user wants to clean up the storage space corresponding to each virtual machine, the generated space management instruction is a storage space cleanup instruction.
[0044] When the first target virtual machine generates a storage space instruction according to a preset operation rule, the storage space management program in the first target virtual machine will determine the generation time point and instruction type of the storage space instruction according to the operation rule. For example, the available storage space corresponding to each virtual machine can be obtained at regular intervals or at each fixed time point according to the operation rule, or the storage space corresponding to each virtual machine can be cleared.
[0045] In addition, as an optional implementation, when the first target virtual machine generates storage space instructions according to the operation rules, it can generate multiple different types of storage space instructions. For example, when the operation rules are to periodically obtain the available storage space size corresponding to each virtual machine, and clean up the data in the storage space when the available storage space is less than a preset threshold, then the first target virtual machine can first generate a storage space query instruction, and then determine the virtual machines that need to clean up the storage space according to the available storage space size fed back by each virtual machine, and send storage space cleanup instructions to these virtual machines.
[0046] Step S104, determining storage space information corresponding to a second target virtual machine according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine;
[0047] In the technical solution provided in step S104, when the storage space management instruction is a storage space query instruction, the storage space information corresponding to the second target virtual machine determined according to the storage space management instruction is the size of the currently remaining available storage space of the second target virtual machine. When the storage space management instruction is a storage space cleanup instruction, the storage space information determined according to the storage space management instruction is the size of the available storage space of the second target virtual machine before and after the storage space is cleaned up.
[0048] In addition, in some embodiments of the present application, the second target virtual machine may be a virtual machine without a corresponding interactive interface.
[0049] Step S106: sending storage space information to the first target virtual machine.
[0050] By receiving a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of a plurality of virtual machines; determining storage space information corresponding to a second target virtual machine according to the storage space management instruction, wherein the second target virtual machine is any one of the plurality of virtual machines except the first target virtual machine; and sending storage space information to the first target virtual machine, by determining the storage space information corresponding to the second target virtual machine according to the storage space management instruction sent by the first target virtual machine, the purpose of obtaining the storage space information corresponding to the second target virtual machine through the first target virtual machine is achieved, thereby realizing the technical effect of managing the storage space of other virtual machines through one virtual machine, and further solving the technical problem in the related art that it takes too long to process the operating status of multiple virtual machines due to the inability to issue control instructions to other virtual machines through one virtual machine.
[0051] In some embodiments of the present application, in order to solve the technical problem that different virtual machines cannot communicate directly, the present application provides a storage space management system as shown. Figure 2 This is the architecture diagram of the storage space management system. Figure 2 It can be seen that the storage space management system includes multiple qemu-type virtual machines, each of which runs a corresponding operating system, and the type of the operating system can be Android or AGL instrument, etc. In addition, each virtual machine also includes a virtio interface, so that the storage space control service module running in the underlying operating system in the storage space management system can communicate with each virtual machine through the virtio interface, wherein the system kernel of the underlying operating system can be the linux kernel.
[0052] In addition, from Figure 2It can be seen that the storage space management module is also connected to the memory in the electronic device, so that each virtual machine can manage its corresponding storage space through the storage space management module.
[0053] pass Figure 2 The storage space management system and Figure 1 The storage space management method provided in solves the problem that applications in virtual machines cannot obtain the correct total space size and available space size through the Android native interface under the Hypervisor architecture. It can manage and control the storage space of a single virtual machine, as well as the storage space of all virtual machines as a whole, and enable applications in a certain virtual machine to understand and manage the space size of other virtual machines, preventing programs in electronic devices from running abnormally due to insufficient storage space.
[0054] In the technical solution provided in the above step S104, when the storage space management instruction is a storage space query instruction, determining the storage space information corresponding to the second target virtual machine based on the storage space management instruction includes: when the storage space management instruction is a storage space query instruction, generating a target storage space query instruction, wherein the target storage space query instruction is a query instruction for querying the storage space information corresponding to the second target virtual machine, and the storage space information includes at least the current available storage space size corresponding to the second target virtual machine; sending the target storage space management instruction to the second target virtual machine; and obtaining the storage space information sent by the second target virtual machine.
[0055] Specifically, when querying the available storage space size corresponding to each virtual machine in the electronic device, the actions performed by each virtual machine and the storage space management module in the electronic device are as follows: Figure 3 As shown, the following steps are included:
[0056] Step S302, the application in the first target virtual machine generates a storage space query instruction;
[0057] Step S304, the first target virtual machine sends a storage space query instruction to the storage space management module;
[0058] Step S306: the storage space management module sends a query request to the second target virtual machine according to the storage space query instruction to obtain the current actual available storage space size of each virtual machine;
[0059] Step S308, the storage space management module summarizes the current actual available storage space sizes corresponding to each second target virtual machine and sends the sum to the first target virtual machine;
[0060] Step S310: The first target virtual machine displays the current actual available storage space size corresponding to the first target virtual machine and the current actual available storage space size corresponding to each second target virtual machine to the user.
[0061] When the storage space management instruction is a storage space cleaning instruction, determining the storage space information corresponding to the second target virtual machine based on the storage space management instruction includes: when the storage space management instruction is a storage space cleaning instruction, generating a target storage space cleaning instruction, wherein the target storage space cleaning instruction is used to instruct the second target virtual machine to clean up target data in the storage space corresponding to the second target virtual machine; cleaning up the target data according to the target storage space cleaning instruction; receiving the storage space information sent by the second target virtual machine, wherein the storage space information includes first storage space information generated by the second target virtual machine based on the current available storage space size after cleaning up the target data, and target storage space information generated by the second target virtual machine based on the current available storage space size before cleaning up the target data.
[0062] As an optional implementation, when cleaning target data according to a target storage space cleaning instruction, the following steps are included: sending the target storage space cleaning instruction to the second target virtual machine; obtaining a data cleaning service call instruction sent by the second target virtual machine, wherein the data cleaning service call instruction is an instruction generated after the second target virtual machine receives the target storage space cleaning instruction; and based on the data cleaning service call instruction, calling a corresponding data cleaning module to clean the target data.
[0063] In addition, since different virtual machines run different system types, the storage space cleaning tools used when cleaning storage space are also different. Therefore, based on the data cleaning service calling instruction, calling the corresponding data cleaning module to clean the target data includes: determining the system information indicated by the data cleaning service calling instruction, wherein the system information includes the system type information of the system running in the second target virtual machine; calling the data cleaning service corresponding to the system information to clean the target data.
[0064] Specifically, when cleaning up the storage space corresponding to each virtual machine in the electronic device, the actions performed by each virtual machine and the storage space management module in the electronic device are as follows: Figure 4 As shown, the following steps are included:
[0065] Step S402, the application in the first target virtual machine generates a storage space cleanup instruction;
[0066] Step S404, the first target virtual machine sends a storage space cleanup instruction to the storage space management module;
[0067] Step S406, the storage space management module sends a cleanup request to the second target virtual machine according to the storage space cleanup instruction;
[0068] Step S408, after receiving the cleanup request, the second target virtual machine calls a space cleanup program corresponding to the system type in the virtual machine to clean up the storage space, and sends the cleanup result to the storage space management module, wherein the cleanup result includes the available storage space size of each second target virtual machine before and after the cleanup;
[0069] Step S410, the storage space management module summarizes the cleaning results corresponding to each second target virtual machine and sends them to the first target virtual machine;
[0070] Step S412: The first target virtual machine displays the current actual available storage space size corresponding to the first target virtual machine and the current actual available storage space size corresponding to each second target virtual machine to the user.
[0071] According to an embodiment of the present application, another method embodiment of a storage space management method is provided. Figure 5 A storage space management method according to an embodiment of the present invention is applicable to an electronic device running multiple virtual machines, such as Figure 5 As shown, the method comprises the following steps:
[0072] Step S502: The first target virtual machine responds to the operation information of the target object and generates a storage space management instruction corresponding to the operation information, wherein the first target virtual machine is any one of the multiple virtual machines;
[0073] Step S504, sending a storage space management instruction to a storage space management module, wherein the storage space management module runs in the electronic device and is used to manage the storage space corresponding to each virtual machine in the multiple virtual machines;
[0074] Step S506: receiving storage space information corresponding to a second target virtual machine determined by the storage space management module according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine.
[0075] According to an embodiment of the present application, another method embodiment of a storage space management method is provided. Figure 6 A storage space management method according to an embodiment of the present invention is applicable to an electronic device running multiple virtual machines, such as Figure 6 As shown, the method comprises the following steps:
[0076] Step S602, the second target virtual machine receives a target storage space management instruction sent by the storage space management module, wherein the target storage space management instruction is an instruction generated by the storage space management module according to the storage space management instruction sent by the first target virtual machine, the first target virtual machine is any one of the multiple virtual machines, and the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine;
[0077] Step S604, determining storage space information corresponding to the second target virtual machine according to the target storage space management instruction;
[0078] Step S606: sending the storage space information to the storage space management module, wherein the storage space management module is used to send the storage space information to the first target virtual machine after receiving the storage space information.
[0079] Example 2
[0080] According to an embodiment of the present application, a storage space management system is provided. Figure 7 is a schematic diagram of the structure of a storage space management system provided according to an embodiment of the present application, such as Figure 7 As shown, the system is suitable for an electronic device running multiple virtual machines, including a first target virtual machine 70, a second target virtual machine 72, and a storage space management module 74, wherein the first target virtual machine 70 is used to generate and send a storage space management instruction to the storage space management module 74; the storage space management module 74 is used to receive the storage space management instruction sent by the first target virtual machine 70, wherein the first target virtual machine 70 is any one of the multiple virtual machines; determine the storage space information corresponding to the second target virtual machine 72 according to the storage space management instruction, wherein the second target virtual machine 72 is any one of the multiple virtual machines except the first target virtual machine 70; and send the storage space information to the first target virtual machine 70.
[0081] It should be noted that the storage space management system provided in this embodiment can be used to execute the storage space management method described in Example 1, so the relevant explanations of the storage space management method in Example 1 are also applicable to this embodiment and will not be repeated here.
[0082] Example 3
[0083] According to an embodiment of the present application, a storage space management device is provided. Figure 8 is a schematic diagram of the structure of a storage space management device provided according to an embodiment of the present application, such as Figure 8As shown, the device is suitable for an electronic device running multiple virtual machines, including: a first processing module 80, used to receive a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines; a second processing module 82, used to determine the storage space information corresponding to the second target virtual machine based on the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; a third processing module 84, used to send the storage space information to the first target virtual machine.
[0084] It should be noted that the storage space management device provided in this embodiment can be used to execute the storage space management method described in Example 1, so the relevant explanations and descriptions of the storage space management method in Example 1 are also applicable to this embodiment and will not be repeated here.
[0085] Example 4
[0086] According to an embodiment of the present application, a non-volatile storage medium is provided. The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following storage space management method: receiving a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of multiple virtual machines; determining storage space information corresponding to a second target virtual machine according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; and sending the storage space information to the first target virtual machine.
[0087] In some embodiments of the present application, the above-mentioned non-volatile storage medium can also control the device where the non-volatile storage medium is located to execute the following storage space management method when the program is running: the first target virtual machine responds to the operation information of the target object, and generates a storage space management instruction corresponding to the operation information, wherein the first target virtual machine is any one of the multiple virtual machines; the storage space management instruction is sent to the storage space management module, wherein the storage space management module runs in the electronic device and is used to manage the storage space corresponding to each of the multiple virtual machines; and the storage space information corresponding to the second target virtual machine determined by the storage space management module according to the storage space management instruction is received, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine.
[0088] In some other embodiments of the present application, the above-mentioned non-volatile storage medium can also control the device where the non-volatile storage medium is located to execute the following storage space management method when the program is running: the second target virtual machine receives the target storage space management instruction sent by the storage space management module, wherein the target storage space management instruction is an instruction generated by the storage space management module based on the storage space management instruction sent by the first target virtual machine, the first target virtual machine is any one of the multiple virtual machines, and the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; based on the target storage space management instruction, determine the storage space information corresponding to the second target virtual machine; send the storage space information to the storage space management module, wherein the storage space management module is used to send the storage space information to the first target virtual machine after receiving the storage space information.
[0089] According to an embodiment of the present application, an electronic device is provided. The electronic device includes a processor, the processor is used to run a program, wherein when the program is run, the following storage space management method is executed: receiving a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of multiple virtual machines; determining storage space information corresponding to a second target virtual machine according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; and sending the storage space information to the first target virtual machine.
[0090] In some embodiments of the present application, the above-mentioned program can also execute the following storage space management method when running: the first target virtual machine responds to the operation information of the target object and generates a storage space management instruction corresponding to the operation information, wherein the first target virtual machine is any one of the multiple virtual machines; the storage space management instruction is sent to the storage space management module, wherein the storage space management module runs in the electronic device and is used to manage the storage space corresponding to each of the multiple virtual machines; and the storage space information corresponding to the second target virtual machine determined by the storage space management module based on the storage space management instruction is received, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine.
[0091] In some other embodiments of the present application, the above-mentioned program can also execute the following storage space management method when running: the second target virtual machine receives the target storage space management instruction sent by the storage space management module, wherein the target storage space management instruction is an instruction generated by the storage space management module based on the storage space management instruction sent by the first target virtual machine, the first target virtual machine is any one of the multiple virtual machines, and the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; based on the target storage space management instruction, determine the storage space information corresponding to the second target virtual machine; send the storage space information to the storage space management module, wherein the storage space management module is used to send the storage space information to the first target virtual machine after receiving the storage space information.
[0092] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0093] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0094] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0096] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0097] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0098] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A storage space management method, applicable to an electronic device running multiple virtual machines, It is characterized in that include: Receiving a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines, and the storage space management instruction includes a storage space query instruction and a storage space cleanup instruction; Determining storage space information corresponding to a second target virtual machine according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; Determining storage space information corresponding to the second target virtual machine according to the storage space management instruction includes: In the case where the storage space management instruction is a storage space query instruction, generating a target storage space query instruction, wherein the target storage space query instruction is a query instruction for querying storage space information corresponding to the second target virtual machine; sending the target storage space management instruction to the second target virtual machine; obtaining the storage space information sent by the second target virtual machine; In the case where the storage space management instruction is a storage space cleaning instruction, generating a target storage space cleaning instruction, wherein the target storage space cleaning instruction is used to instruct the second target virtual machine to clean up target data in the storage space corresponding to the second target virtual machine; cleaning up the target data according to the target storage space cleaning instruction; and receiving the storage space information sent by the second target virtual machine; The storage space information is sent to the first target virtual machine.
2. The storage space management method according to claim 1, It is characterized in that In the case where the storage space management instruction is a storage space query instruction, the storage space information at least includes a current available storage space size corresponding to the second target virtual machine.
3. The storage space management method according to claim 1, It is characterized in that In the case where the storage space management instruction is a storage space cleaning instruction, The storage space information includes first storage space information generated by the second target virtual machine according to the current available storage space size after cleaning the target data, and target storage space information generated by the second target virtual machine according to the current available storage space size before cleaning the target data.
4. The storage space management method according to claim 1, It is characterized in that According to the target storage space cleaning instruction, cleaning the target data includes: Sending the target storage space cleanup instruction to the second target virtual machine; Obtaining a data cleaning service calling instruction sent by the second target virtual machine, wherein the data cleaning service calling instruction is an instruction generated by the second target virtual machine after receiving the target storage space cleaning instruction; According to the data cleaning service calling instruction, a corresponding data cleaning module is called to clean the target data.
5. The storage space management method according to claim 4, It is characterized in that According to the data cleaning service calling instruction, calling the corresponding data cleaning module to clean the target data includes: Determine the system information indicated by the data cleaning service calling instruction, wherein the system information includes system type information of the system running in the second target virtual machine; A data cleaning service corresponding to the system information is called to clean up the target data.
6. The storage space management method according to claim 1, It is characterized in that Sending the storage space information to the first target virtual machine includes: Determine identification information of the second target virtual machine, and determine that the storage space information corresponding to the second target virtual machine is the storage space information associated with the identification information; The identification information and the storage space information are sent to the first target virtual machine, and the identification information and the storage space information associated with the identification information are displayed to the target object through the first target virtual machine.
7. The storage space management method according to claim 1, It is characterized in that The first target virtual machine is a virtual machine with an interactive interface, and the second target virtual machine is a virtual machine without an interactive interface.
8. A storage space management method, applicable to an electronic device running multiple virtual machines, It is characterized in that include: The first target virtual machine responds to the operation information of the target object and generates a storage space management instruction corresponding to the operation information, wherein the first target virtual machine is any one of the multiple virtual machines, and the storage space management instruction includes a storage space query instruction and a storage space cleanup instruction; Sending the storage space management instruction to a storage space management module, wherein the storage space management module runs in the electronic device and is used to manage the storage space corresponding to each virtual machine in the multiple virtual machines; The storage space management module is also used for: generating a target storage space query instruction when the storage space management instruction is a storage space query instruction, wherein the target storage space query instruction is a query instruction for querying the storage space information corresponding to the second target virtual machine; sending the target storage space management instruction to the second target virtual machine; obtaining the storage space information sent by the second target virtual machine; generating a target storage space cleanup instruction when the storage space management instruction is a storage space cleanup instruction, wherein the target storage space cleanup instruction is used to instruct the second target virtual machine to clean up the target data in the storage space corresponding to the second target virtual machine; clean up the target data according to the target storage space cleanup instruction; receiving the storage space information sent by the second target virtual machine; Receive storage space information corresponding to a second target virtual machine determined by the storage space management module according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine.
9. A storage space management method, applicable to an electronic device running multiple virtual machines, It is characterized in that include: The second target virtual machine receives a target storage space management instruction sent by the storage space management module, wherein the target storage space management instruction is an instruction generated by the storage space management module according to the storage space management instruction sent by the first target virtual machine, the first target virtual machine is any one of the multiple virtual machines, the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine, and the storage space management instruction includes a storage space query instruction and a storage space cleanup instruction; Determining storage space information corresponding to the second target virtual machine according to the target storage space management instruction; Determining storage space information corresponding to the second target virtual machine according to the storage space management instruction includes: In the case where the storage space management instruction is a storage space query instruction, receiving a target storage space query instruction sent by the storage space management module, wherein the target storage space query instruction is a query instruction for querying storage space information corresponding to the second target virtual machine; In the case where the storage space management instruction is a storage space cleaning instruction, receiving a target storage space cleaning instruction sent by the storage space management module, wherein the target storage space cleaning instruction is used to instruct the second target virtual machine to clean up target data in the storage space corresponding to the second target virtual machine; cleaning up the target data according to the target storage space cleaning instruction; The storage space information is sent to the storage space management module, wherein the storage space management module is used to send the storage space information to the first target virtual machine after receiving the storage space information.
10. A storage space management system, suitable for an electronic device running multiple virtual machines, It is characterized in that It includes a first target virtual machine, a second target virtual machine, and a storage space management module, wherein: The first target virtual machine is used to generate and send a storage space management instruction to the storage space management module, wherein the storage space management instruction includes a storage space query instruction and a storage space cleanup instruction; The storage space management module is configured to receive a storage space management instruction sent by the first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines; determine storage space information corresponding to a second target virtual machine according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; and send the storage space information to the first target virtual machine; Determining storage space information corresponding to the second target virtual machine according to the storage space management instruction includes: In the case where the storage space management instruction is a storage space query instruction, generating a target storage space query instruction, wherein the target storage space query instruction is a query instruction for querying storage space information corresponding to the second target virtual machine; sending the target storage space management instruction to the second target virtual machine; obtaining the storage space information sent by the second target virtual machine; In the case where the storage space management instruction is a storage space cleaning instruction, a target storage space cleaning instruction is generated, wherein the target storage space cleaning instruction is used to instruct the second target virtual machine to clean up target data in the storage space corresponding to the second target virtual machine; clean up the target data according to the target storage space cleaning instruction; and receive the storage space information sent by the second target virtual machine.
11. A storage space management device, suitable for an electronic device running multiple virtual machines, It is characterized in that include: A first processing module, configured to receive a storage space management instruction sent by a first target virtual machine, wherein the first target virtual machine is any one of the multiple virtual machines, and the storage space management instruction includes a storage space query instruction and a storage space cleanup instruction; a second processing module, configured to determine storage space information corresponding to a second target virtual machine according to the storage space management instruction, wherein the second target virtual machine is any one of the multiple virtual machines except the first target virtual machine; Determining storage space information corresponding to the second target virtual machine according to the storage space management instruction includes: In the case where the storage space management instruction is a storage space query instruction, generating a target storage space query instruction, wherein the target storage space query instruction is a query instruction for querying storage space information corresponding to the second target virtual machine; sending the target storage space management instruction to the second target virtual machine; obtaining the storage space information sent by the second target virtual machine; In the case where the storage space management instruction is a storage space cleaning instruction, generating a target storage space cleaning instruction, wherein the target storage space cleaning instruction is used to instruct the second target virtual machine to clean up target data in the storage space corresponding to the second target virtual machine; cleaning up the target data according to the target storage space cleaning instruction; and receiving the storage space information sent by the second target virtual machine; The third processing module is configured to send the storage space information to the first target virtual machine.
12. A non-volatile storage medium, It is characterized in that The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the storage space management method according to any one of claims 1 to 7.
13. An electronic device, comprising a processor, It is characterized in that The processor is used to run a program, wherein the program executes the storage space management method described in any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Virtual machine storage space management method, system and physical host
CN101986285A
Virtualized resource management method, device, server, system and medium
CN114138483A