Data processing method and computer device

By adding target identification information and self-feedback window judgment to IO requests, the problem of IO request continuity judgment in virtualization scenarios is solved, thereby improving data reading speed.

WO2026237644A1PCT designated stage Publication Date: 2026-11-19HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/091070
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-15
Filing Date
2026-04-16
Publication Date
2026-11-19

AI Technical Summary

Technical Problem

Existing technologies cannot accurately determine whether virtual machine I/O requests are continuous in virtualization scenarios, which prevents prefetching from taking effect and affects data reading speed.

Method used

By adding target identification information to IO requests, the distribution of index data in the image file is determined, and the continuity of IO requests is judged by combining the self-feedback window, thus actively triggering asynchronous pre-reading of subsequent data.

Benefits of technology

It improves data reading speed, especially in virtualization scenarios, enhancing the startup speed of applications and file access within virtual machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026091070_19112026_PF_FP_ABST
    Figure CN2026091070_19112026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a data processing method and a computer device, which can be applied to the technical field of computers. The method comprises: acquiring a target IO request generated by a virtual machine and comprising target identification information, wherein the target identification information is added to the target IO request by the virtual machine; and when the target IO request is a read IO request and an image file records the target identification information, on the basis of the state of a self-feedback window, determining whether to readahead, from a disk of a host, subsequent data of first data corresponding to the target IO request, wherein the target identification information is associated with data distribution information, the data distribution information is distribution information of the first data in the image file, and different states of the self-feedback window are used for reflecting whether there is continuity between a plurality of IO requests. In the present application, the distribution of data that a virtual machine needs to read in an image file on a host side is recorded, and whether there is continuity between a plurality of IO requests is accurately determined on the basis of the state of a self-feedback window, thereby actively triggering readahead of subsequent data, and improving the reading speed.
Need to check novelty before this filing date? Find Prior Art

Description

A data processing method and a computer device

[0001] This application claims priority to Chinese Patent Application No. 202510632316.0, filed on May 15, 2025, entitled "A Data Processing Method and Computer Equipment", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and more particularly to a data processing method and a computer device. Background Technology

[0003] In computer devices, reading data from a file mainly involves two steps: (1) reading data from the physical disk into the operating system cache; and (2) reading the data from the cache. Since the read performance of the physical disk is worse than that of memory, the main time spent reading data is in step (1). To improve the data reading speed, prefetching technology is currently mainly used, which involves reading the data needed in the future (i.e., subsequent data) into the operating system cache in advance, and then directly reading the subsequent data from the cache, thereby reducing the time spent in step (1). However, whether prefetching is effective depends on whether the read I / O requests are continuous; prefetching will only be effective in continuous scenarios.

[0004] The commonly used method in the industry is to determine whether the most recent read I / O requests for a file are consecutive in position; if so, pre-reading of subsequent data is triggered. The advantage of this method is that read I / O requests read data directly from the operating system cache, reducing the time spent reading data from the physical disk to the operating system cache. However, the above method still has many shortcomings: 1. It cannot determine the continuity of random read I / O requests; 2. It cannot accurately identify continuity in concurrent read scenarios. The reasons are as follows: 1. Random read I / O requests read from random positions, making it impossible to determine continuity; 2. In concurrent read scenarios, the issued read I / O requests are concurrent, and their execution order cannot be guaranteed, making it impossible to determine their continuity.

[0005] Specifically, in virtualization scenarios (including cloud and terminal scenarios), when some virtual machine guest operating systems (including but not limited to Windows operating systems) start applications and read files, the corresponding data may not be continuous in the image file on the host side. During the reading process, the host side cannot effectively determine its continuity, which causes the existing pre-reading to fail. All data needs to be read from the physical disk, resulting in very slow reading speed and affecting the speed of application startup and file access inside the virtual machine. Summary of the Invention

[0006] This application provides a data processing method and a computer device for indexing the actual distribution of corresponding data in an image file by adding target identification information to IO requests. In this way, the distribution information of the data corresponding to each IO request in the image file can be determined. Even if the data corresponding to the IO request is not continuous in the image file on the host side, it can accurately identify whether the IO requests issued by the virtual machine are continuous. Specifically, based on the self-feedback window, it can accurately determine whether there is continuity between multiple IO requests, thereby actively triggering asynchronous pre-reading of subsequent data (subsequent data is determined based on data distribution information) and improving the reading speed.

[0007] Based on this, the embodiments of this application provide the following technical solutions:

[0008] Firstly, this application provides a data processing method, which specifically includes: First, obtaining a target I / O request generated by a virtual machine, including but not limited to read I / O requests or write I / O requests generated during the virtual machine's internal processes such as starting an application, creating a file, and reading a file. The target I / O request contains target identification information, which is added by the virtual machine when generating the target I / O request. After receiving the target I / O request, the host machine further determines whether the target identification information contained in the target I / O request is recorded in the host machine. If the target I / O request is a read I / O request and the target identification information is recorded in the host machine, the host machine determines whether to pre-read subsequent data of the first data from the host machine's disk based on the state of the self-feedback window. The target identification information is associated with data distribution information so as to serve as an index for the data distribution information. The data distribution information is the distribution information of the first data in the image file. For example, the data distribution information can be the offset and length of the target I / O request. The first data is the data corresponding to the target I / O request, and subsequent data is determined based on the data distribution information. Different states of the self-feedback window are used to reflect whether there is continuity between multiple I / O requests.

[0009] In the above embodiments of this application, by adding target identification information to the IO request, the actual distribution of the corresponding data in the image file is indexed. In this way, the distribution information of the data corresponding to each IO request in the image file can be determined. Even if the data corresponding to the IO request is not continuous in the image file on the host side, it can accurately identify whether the IO requests issued by the virtual machine are continuous. Specifically, based on the self-feedback window, it can accurately determine whether there is continuity between multiple IO requests, thereby actively triggering asynchronous pre-reading of subsequent data (subsequent data is determined based on data distribution information) and improving the reading speed.

[0010] In one possible implementation of the first aspect, the method may further include: if the target identification information is not recorded in the host machine, the host machine records the target identification information and data distribution information therein, and associates the target identification information with the data distribution information so that the data distribution information can be indexed subsequently using the target identification information. It should be noted that if the target IO request is a write IO request, the first data corresponding to the IO request is written to the disk; and / or, if the target IO request is a read IO request, the first data corresponding to the IO request is read from the disk.

[0011] In the above embodiments of this application, if the target identification information is not recorded in the host machine beforehand, it means that the target IO request has not been issued before. At this time, it is necessary to record the target identification information (used as an index), data distribution information (used to identify the location of the required data corresponding to the target IO request in the image file) and the relationship between the two (index relationship) in the host machine. In this way, the data corresponding to multiple consecutive IO requests can form a logically continuous distribution on the image file side, thereby accurately determining the continuity of the corresponding read IO request.

[0012] In one possible implementation of the first aspect, the data distribution information includes at least: the offset and length of the target I / O request, wherein the offset is used to characterize the starting position of the data operation, specifying from which position in the file or device data should be read or written. For example, an offset of 1024 indicates that the operation starts 1024 bytes backward from the beginning of the file. The length is used to characterize the amount of data to be operated on, determining how many bytes of data to operate on consecutively starting from the offset position. For example, a length of 512 indicates that 512 bytes of data should be read or written starting from the offset position.

[0013] In the above embodiments of this application, it is specifically explained that the host machine identifies the specific location of the data in the image file by recording the offset and length of the data corresponding to the target IO request on the host machine side image file. In this way, it can accurately identify whether the IO requests issued inside the virtual machine are continuous.

[0014] In one possible implementation of the first aspect, when the target IO request is a first read IO request, the target identification information includes application identification information, which is used to identify the corresponding application. In this embodiment, the first read IO request is a read IO request generated by an application within the virtual machine during the startup phase. And / or, when the target IO request is a write IO request or a second read IO request, the target identification information includes file identification information, which is used to identify the corresponding file. In this embodiment, the write IO request can be a write IO request when creating a file, or a write IO request for adding, modifying, or deleting data in an already created file; this application does not limit this. The second read IO request is any read IO request other than the first read request mentioned above; for example, it can be a read IO request generated during the application runtime phase.

[0015] Existing solutions for file read I / O requests issued by virtual machines cannot recognize continuous file reads because the file content seen by the virtual machine may be discretely distributed throughout the image file. Furthermore, for random read I / O requests triggered by application startup within the virtual machine, the data read by the host machine is randomly distributed across various disk locations, and is therefore considered non-continuous, making it impossible to use techniques such as prefetching for acceleration. The implementation method described in this application adds different types of target identifier information based on the type of the target I / O request, thereby enabling flexible determination of the continuity of read I / O requests in different scenarios.

[0016] In one possible implementation of the first aspect, the target identification information, data distribution information, and the association between the target identification information and the data distribution information can be stored in a data distribution record file. The data distribution record file can be contained in the image file (for example, a separate space is allocated in the image file to store the data distribution record file). The data distribution record file can also exist independently of the image file on the host machine. Specifically, this application does not limit the form in which the data distribution record file exists on the host machine.

[0017] In the above embodiments of this application, a new file can be added to the image file, or a separate file can be added to the host machine to record the data distribution information and file data distribution information during the application startup phase, which provides flexibility.

[0018] In one possible implementation of the first aspect, a specific way to determine whether to pre-read subsequent data of the first data from the host disk based on the state of the self-feedback window could be as follows: if the state of the self-feedback window is determined to be continuous, the self-feedback window can be updated according to a preset rule. The continuous state of the self-feedback window indicates that the self-feedback window is filled with the first information of multiple read I / O requests, or that the target I / O request is the first read I / O request generated by the application on the virtual machine during the startup phase (i.e., the first first read I / O request), and the target I / O request is included in these multiple read I / O requests. Then, the subsequent data corresponding to the first information of the read I / O requests included in the updated self-feedback window is pre-read from the host disk (i.e., asynchronous pre-read is triggered).

[0019] In the above embodiments of this application, the continuous state of the self-feedback window means that the self-feedback window is filled with the relevant information of multiple IO requests (i.e., the first information, such as the offset of the read IO request, the length of the read IO request, the offset and length of the read IO request; this application does not limit the specifics, and the following will use the offset of the read IO request as the first information as an example for illustration, and will not be elaborated further). Or, it means that the target IO request is the first read IO request issued by the application on the virtual machine during the startup phase (read IO requests issued during the startup phase of the same application are directly considered to be continuous, because the read IO requests during the startup phase are fixed). These multiple read IO requests are logically continuous, which can enable the pre-read mechanism and improve the reading speed.

[0020] In one possible implementation of the first aspect, the method of updating the self-feedback window according to preset rules includes, but is not limited to: a) sliding the self-feedback window with a preset step size so that the slidable self-feedback window can easily receive the first information of new read IO requests (e.g., the offset and length of the read IO request); b) adjusting the size of the self-feedback window according to a preset ratio so that the adjusted self-feedback window is adapted to the amount of the first information of new read IO requests. The value of the preset ratio can be determined based on the number of concurrent read IO requests or can be customized based on empirical values, and this application does not limit it in this regard. For example, when multiple read IO requests are concurrently occurring in a short period of time, the size of the self-feedback window can be adaptively increased to facilitate the pre-reading of subsequent data; when there are no more concurrent read IO requests for a long period of time, the size of the feedback window can be adaptively decreased to improve the accuracy of subsequent data pre-reading.

[0021] In the above embodiments of this application, several methods for updating the self-feedback window are specifically described, which are flexible.

[0022] In one possible implementation of the first aspect, the first information includes: the offset and / or length of the read IO request, whereby the offset is used to characterize the starting position of the data operation and the length is used to characterize the amount of data to be operated on.

[0023] In the above embodiments of this application, it is specifically described that the data filled into the self-feedback window is the first information of the read IO request, such as offset and / or length. This can ensure that the self-feedback window is continuously filled with consecutive read IO requests, making it easier to judge consecutive read IO requests.

[0024] In one possible implementation of the first aspect, a specific way to determine whether to pre-read subsequent data of the first data from the host disk based on the state of the self-feedback window could be: if it is determined that the state of the self-feedback window is discontinuous and the target first information of the target IO request is located in the self-feedback window, then the target first information (e.g., the offset of the target IO request) is filled into the self-feedback window. The discontinuous state of the self-feedback window is used to indicate that the self-feedback window is not filled with the first information of the read IO request, or to indicate that the target IO request is the first read IO request generated by an application on a non-virtual machine during the startup phase.

[0025] In the above embodiments of this application, when the self-feedback window is in a discontinuous state, it means that the self-feedback window has not yet been filled, or it means that the target IO request is the first read IO request in the non-application startup phase. At this time, it is not enough to determine whether the target IO request is continuous with the IO requests before and after it, and further judgment is required. Therefore, the target first information of the target IO request can be filled into the window first.

[0026] In one possible implementation of the first aspect, the method may further include: updating the starting position of the self-feedback window based on the first information of the target IO request if the target first information of the target IO request is not located in the self-feedback window.

[0027] In the above embodiments of this application, if the target first information of the target IO request is not located in the self-feedback window, it indicates that the target IO request is not continuous with the previously issued IO request. The current self-feedback window ends, and the starting position of the self-feedback window is updated based on the first information of the target IO request (i.e., a new self-feedback window is started).

[0028] A second aspect of this application provides a computer device that serves as a host machine and has the functionality to implement the method described in the first aspect or any possible implementation of the first aspect. This functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the described functionality.

[0029] A third aspect of this application provides a computer device that may include a memory, a processor, and a bus system. The memory is used to store a computer program (also referred to as a program or computer-readable instructions), and the processor is used to invoke the program stored in the memory to execute the method of the first aspect of the embodiments of this application or any possible implementation of the first aspect.

[0030] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, enable the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0031] The fifth aspect of this application provides a computer program or a computer program product containing instructions that, when the computer program or computer program product is run on a computer, causes the computer to perform the method described in the first aspect or any possible implementation of the first aspect.

[0032] A sixth aspect of this application provides a chip including at least one processor and at least one interface circuit coupled to the processor. The interface circuit performs transceiver functions and sends instructions to the at least one processor. The at least one processor runs a computer program or instructions, having the functionality to implement the methods described in the first aspect or any possible implementation of the first aspect. This functionality can be implemented in hardware, software, or a combination of hardware and software, including one or more modules corresponding to the described functions. Furthermore, the interface circuit is used to communicate with other modules outside the chip.

[0033] In some implementations of this application, some of the one or more processors may implement some steps of the above method through dedicated hardware. For example, the processing involving neural network models may be implemented by a dedicated neural network processor or graphics processor.

[0034] The method provided in this application embodiment can be implemented by a single chip or by multiple chips working together. Attached Figure Description

[0035] Figure 1 is a schematic diagram of the system architecture provided in an embodiment of this application;

[0036] Figure 2 is a schematic diagram of a read I / O continuity judgment system provided in an embodiment of this application;

[0037] Figure 3 is a flowchart illustrating a data processing method provided in an embodiment of this application.

[0038] Figure 4 is a schematic diagram of a file data distribution record provided in an embodiment of this application;

[0039] Figure 5 is a schematic diagram showing the distribution of file data provided in an embodiment of this application;

[0040] Figure 6 is a flowchart illustrating the application data distribution record provided in an embodiment of this application.

[0041] Figure 7 is a schematic diagram showing the distribution of application data provided in an embodiment of this application;

[0042] Figure 8 is a schematic diagram of an example provided in this application embodiment;

[0043] Figure 9 is a flowchart illustrating the read I / O continuity determination provided in an embodiment of this application.

[0044] Figure 10 is a schematic diagram of a working example of the self-feedback window provided in the embodiments of this application;

[0045] Figure 11 is a schematic diagram of a computer device provided in an embodiment of this application;

[0046] Figure 12 is a schematic diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0047] This application provides a data processing method and a computer device for indexing the actual distribution of corresponding data in an image file by adding target identification information to IO requests. In this way, the distribution information of the data corresponding to each IO request in the image file can be determined. Even if the data corresponding to the IO request is not continuous in the image file on the host side, it can accurately identify whether the IO requests issued by the virtual machine are continuous. Specifically, based on the self-feedback window, it can accurately determine whether there is continuity between multiple IO requests, thereby actively triggering asynchronous pre-reading of subsequent data (subsequent data is determined based on data distribution information) and improving the reading speed.

[0048] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0049] To better understand the solutions of the embodiments of this application, the relevant terms and concepts that may be involved in the embodiments of this application will be introduced below. It should be understood that the explanation of the relevant concepts may be limited due to the specific circumstances of the embodiments of this application, but it does not mean that this application can only be limited to that specific situation. The specific circumstances of different embodiments may also differ, and no specific limitation is made here.

[0050] (1) Host Machine

[0051] A host machine refers to the physical hardware host that directly runs an operating system (such as Windows or Linux) and virtualization software (such as VMware). It provides hardware resources (such as Central Processing Units (CPU), memory, disk, and network), and can create and manage one or more virtual machines through virtualization software. The host machine and virtual machines can interact through virtual networks, shared folders, or the clipboard.

[0052] (2) Virtual Machine

[0053] A virtual machine is a virtual computer simulated on a host machine using virtualization technology. It runs an independent operating system (e.g., a Linux virtual machine running on a Windows host machine) and can perform tasks like a regular computer (e.g., developing, testing, and deploying applications).

[0054] Virtual machines rely on a host machine and virtualization software to operate, and the necessary resources (such as CPU and memory) are allocated by the host machine. Since a host machine can create one or more virtual machines, these virtual machines are isolated from each other and share the host machine's resources. When a virtual machine crashes or is attacked, it typically does not affect the host machine.

[0055] (3) Image file

[0056] An image file is a "static template" or "snapshot" of a virtual machine, storing the complete state of the virtual machine. This includes the operating system, installed software or applications, configuration files, disk data (such as virtual hard disk files), etc. The virtual machine, on the other hand, is a dynamically running instance created from an image file, consuming host machine resources and running in real time.

[0057] Each virtual machine has a corresponding image file on the host machine. The operating system of the virtual machine is loaded through the image file, and virtual machines with the same environment can be quickly copied based on the image file. In other words, multiple independent virtual machines can be generated from the same image file.

[0058] (4) Virtual Machine Monitor (VMM)

[0059] A virtual machine supervisor, also known as a virtual machine monitor or VMM, is a middleware layer that sits between a physical server and an operating system. It allows multiple operating systems and applications to share a single set of underlying physical hardware resources.

[0060] (5) Input / Output (I / O) requests

[0061] I / O requests, also known as IO requests, are data transfer operations between a virtual machine and the host machine or between a virtual machine and external devices (such as disks or networks) in a virtualization environment. They generally include read IO requests and write IO requests.

[0062] When a virtual machine initiates an I / O request, it typically follows the following path:

[0063] a. Inside the virtual machine, the application or guest operating system (GuestOS) issues I / O requests (such as application startup, file creation, etc.).

[0064] b. The virtual driver within the virtual machine (e.g., virtual network card, virtual disk driver, etc.) receives the I / O request.

[0065] c. The request is passed to the host machine's VMM, which then maps the virtual device's operation to the host machine's physical device.

[0066] d. The host operating system or VMM forwards the I / O request to the physical hardware for execution.

[0067] e. The execution result is returned to the application inside the virtual machine along the original path.

[0068] (6) Offset and length of the IO request

[0069] The offset in an I / O request indicates the starting position of the data operation, usually in bytes. Its purpose is to specify where in a file or device data should be read or written. For example, an offset of 1024 means starting the operation 1024 bytes from the beginning of the file.

[0070] The length of an I / O request indicates the amount of data to be operated on (e.g., the number of bytes to read or write). Its purpose is to determine how many bytes of data to operate on consecutively starting from the offset position. For example, a length of 512 indicates that 512 bytes of data will be read or written starting from the offset position.

[0071] (7) Pre-reading

[0072] Prefetching refers to reading the data needed in the future (i.e., subsequent data) from the physical disk into a cache in advance for later use. When the data is read again, it is read directly from the cache, which can improve the speed of data reading.

[0073] (8) Self-feedback window

[0074] In this embodiment of the application, the self-feedback window is a custom window, that is, the size of the self-feedback window can be customized. When the virtual machine sends the first read IO request to the host machine, its starting position is updated to the first information of the read IO request (e.g., the offset 1 of the read IO request). At this time, the window is [offset 1, offset 1 + size].

[0075] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0076] First, the system architecture and overall process applied to the method of the embodiments of this application will be described. For details, please refer to Figure 1. Figure 1 is a schematic diagram of the system architecture provided by the embodiments of this application. The system architecture may include GuestOS and VMM in user mode and mm subsystem in kernel mode.

[0077] The GuestOS includes a new file identification module 101 and an application identification module 102. Specifically, when creating a new file and issuing one or more write I / O requests, the file identification module 101 adds file identification information to the write I / O requests to identify the new file. Similarly, when reading a file and issuing one or more read I / O requests, the file identification module 101 adds file identification information to the read I / O requests to identify the file to be read. During the application startup phase, when issuing one or more read I / O requests, the application identification module 102 adds application identification information to the read I / O requests to identify the application.

[0078] The VMM adds a file recording module 103, an application recording module 104, and a continuity judgment module 105. Specifically, the file recording module 103 works with the file identification module 101 to record the distribution of newly generated files in the image file (e.g., offsets and lengths in write IO requests); the application recording module 104 works with the application identification module 102 to record the distribution of data read by the application during the startup phase in the image file (e.g., offsets and lengths in read IO requests); and the continuity judgment module 105 uses a self-feedback window and combines the data recorded by the file recording module 103 and the application recording module 104 to judge the continuity of read IO requests. If the data is continuous, it triggers the pre-reading of subsequent data.

[0079] It should be noted that, in this embodiment, the modules included in the system architecture of Figure 1 are merely illustrative, and this application does not limit the deployment method, quantity, or function of each module. As an example, the system architecture may include fewer modules. For instance, in GuestOS, it may only include an identification module, which implements the functions of the aforementioned file identification module 101 and application identification module 102; similarly, in VMM, it may only include a recording module, which implements the functions of the aforementioned file recording module 103 and application recording module 104. This application does not impose any specific limitations on this.

[0080] Based on the above system architecture, the read I / O continuity judgment system provided in this application embodiment will be described below. Referring to Figure 2, the read I / O continuity judgment system may include a file data distribution recording device 201, an application startup data distribution recording device 202, and a read I / O continuity judgment device 203. The following describes each device:

[0081] (1) File data distribution and recording device 201

[0082] Since files viewed within a virtual machine may be discretely distributed on the host machine, in this embodiment, during file generation, a file identification module marks write I / O requests with corresponding file identification information, and a file recording module records the offset and length of the data constituting the entire file on the disk. Subsequently, the continuity of the file data can be accurately determined based on the self-feedback window, thereby accelerating the data reading speed.

[0083] (2) Application Start-up Data Distribution Recording Device 202

[0084] Since the data accessed by the application during startup is essentially fixed, in this embodiment, the application identification module marks read I / O requests with corresponding application identification information during the application startup phase, and the application recording module is responsible for recording the offset and length of all read I / O requests during the application startup process. Subsequently, based on this record, the required data can be pre-read, thereby accelerating the data reading speed during application startup.

[0085] (3) Read IO continuity judgment device 203

[0086] The continuity of read I / O requests is determined based on their origin. For example, read I / O requests belonging to the application startup phase are directly considered continuous. However, for file read I / O requests, continuity is determined using a self-feedback window; when all read I / O requests hit this window, they are considered continuous. In some implementations, this self-feedback window can automatically adjust its size based on the number of concurrent I / O requests in continuous scenarios. Therefore, the continuity of read I / O requests in both concurrent and non-concurrent scenarios can be accurately determined based on this self-feedback window.

[0087] It should also be noted that, in the embodiments of this application, the devices / modules included in the read IO continuity judgment system of Figure 2 are merely illustrative. This application does not limit the deployment method, quantity, or function of each device / module. As an example, the read IO continuity judgment system may include fewer devices; for example, it may only include a data distribution recording device, which implements the functions of the aforementioned file data distribution recording device 201 and application startup data distribution recording device 202. As another example, the read IO continuity judgment system may include fewer modules; for example, it may only include an identification module, which implements the functions of the aforementioned file identification module and application identification module; similarly, it may only include a recording module, which implements the functions of the aforementioned file recording module and application recording module. This application does not impose any specific limitations on these aspects.

[0088] Based on the above system architecture and read IO continuity judgment system, the data processing method provided by the embodiments of this application is described below. Please refer to Figure 3 for details. Figure 3 is a flowchart of the data processing method provided by the embodiments of this application, which may include the following steps:

[0089] 301. The virtual machine adds target identification information to the generated target I / O request.

[0090] First, the virtual machine generates I / O requests internally, including but not limited to read I / O requests or write I / O requests generated during application startup, file creation, and file reading. Then, the virtual machine adds target identification information to the generated target I / O request.

[0091] It should be noted that in some embodiments of this application, the type of the target IO request is different, and the type of target identification information added is also different, which will be described below:

[0092] A. The target I / O request is the first read I / O request.

[0093] When the target I / O request is the first read I / O request, the target identification information includes application identification information, which is used to identify the corresponding application. In this embodiment, the first read I / O request is a read I / O request generated by an application within the virtual machine during the startup phase.

[0094] It should be noted that in this embodiment, each application has a unique application identifier. This identifier can be the application's name; for example, if application A's name is "English Corner," then "English Corner" can be used as the application identifier for application A. Alternatively, the identifier can be the application's ID (a unique ID can be predefined for each application); for example, if application A's ID is "APP_A," then "APP_A" can be used as the application identifier for application A. Specifically, this application does not limit the specific form of the application identifier, as long as the corresponding application can be uniquely identified based on the identifier.

[0095] B. The target I / O request is a write I / O request or a second read I / O request.

[0096] When the target IO request is a write IO request or a second read IO request, the target identification information includes file identification information, which is used to identify the corresponding file. In this embodiment, the write IO request can be a write IO request when creating a file, or a write IO request for adding, modifying, or deleting data in an already created file; this application does not limit this. The second read IO request is any read IO request other than the first read request mentioned above, for example, it can be a read IO request generated during application runtime.

[0097] 302. The host machine obtains the target IO request.

[0098] Then, the host machine receives the target I / O request issued by the virtual machine, which includes the target identifier information.

[0099] 303. The host machine determines whether the target identification information is recorded in the host machine. If not, proceed to step 304; if yes, proceed to step 305.

[0100] After receiving the target IO request, the host machine further determines whether the target identification information contained in the target IO request is recorded in the host machine. If the target identification information is not recorded in the host machine, step 304 is executed. If the target identification information is recorded in the host machine and the target IO request is a read IO request, step 305 is executed.

[0101] 304. The host machine records the target identification information and data distribution information, and associates the target identification information with the data distribution information.

[0102] If the target identifier information is not recorded in the host machine, the host machine records the target identifier information and data distribution information within itself, and associates the target identifier information with the data distribution information so that the data distribution information can be indexed later using the target identifier information. It is important to note that if the target IO request is a write IO request, the first data corresponding to the IO request is written to the disk; if the target IO request is a read IO request, the first data corresponding to the IO request is read from the disk.

[0103] It should be noted that, in some embodiments of this application, target identification information, data distribution information, and the association between target identification information and data distribution information can be stored in a data distribution record file. This data distribution record file can be included within an image file (for example, a separate space can be allocated within the image file to store the data distribution record file). Alternatively, the data distribution record file can exist independently of the image file on the host machine. Specifically, this application does not limit the form in which the data distribution record file exists on the host machine. For ease of explanation, subsequent embodiments will use the example of target identification information being included in an image file for illustration, and will not be elaborated upon further.

[0104] To further understand the implementation process of the above data distribution information recording, the following explanation uses file identifier information and application identifier information as examples:

[0105] A. The implementation process of file data distribution records

[0106] When the target IO request is a write IO request, the file data distribution is recorded, as shown in Figures 4 and 5. Figure 4 is a flowchart illustrating a file data distribution recording process provided in this embodiment, and Figure 5 is a schematic diagram illustrating a file data distribution situation provided in this embodiment. In Figure 4, the file data distribution recording process may specifically include the following steps:

[0107] Step 1: When creating a new file inside the virtual machine, a write I / O request is issued.

[0108] When a user creates a new file and writes content inside the virtual machine (the new file is also created in the image file), the virtual machine will send a write I / O request to the host machine. This write I / O request can be one (e.g., if the file being created is small) or multiple, and this application does not limit this.

[0109] Step 2: Add file identification information to the write I / O request in the virtual machine.

[0110] The virtual machine further adds file identification information to the generated write IO request. For example, the write IO request can be identified by the file identification module 101 in the embodiment corresponding to Figure 1, and the file identification information of the newly created file can be added to the write IO request. In Figure 5, it is assumed that the file identification information is INODE_A.

[0111] Step 3: The host machine parses the file identification information in the write I / O request.

[0112] After receiving a write I / O request from the virtual machine, the host machine parses the file identification information carried in the write I / O request.

[0113] Step 4: The host machine determines whether the write IO request has been recorded. If yes, proceed to step 6; otherwise, proceed to step 5.

[0114] The host machine will further determine whether the write IO request (e.g., the offset and length of the write IO request) has been recorded. If it has been recorded, step 6 will be executed; if it has not been recorded, step 5 will be executed.

[0115] Step 5: The host machine records the information in the write I / O request.

[0116] The host records information in the write IO request, such as the offset and length of the write IO request (i.e., data distribution information), and associates them with file identification information, as shown in Figure 5. The offset and length of each write IO request are associated with the corresponding file identification information INODE_A, and the offset and length of the write IO request and the corresponding file identification information can be further saved in a newly added data distribution record file.

[0117] Step 6: The host machine issues a write I / O request to the disk.

[0118] Finally, the host machine sends the write I / O request to the physical disk to write the first data corresponding to the write I / O request to the disk.

[0119] It is important to note that Figure 5 illustrates the N write IO requests issued when creating a new file. Each of these N write IO requests is treated as a target IO request to execute the steps in the corresponding embodiment of Figure 4. This allows the offsets and lengths of each of the N write IO requests to be recorded under the file identifier information INODE_A. For example, in Figure 5, the offsets and lengths corresponding to the first write IO request are offset_1 and length_1, the second write IO request is offset_2 and length_2, ..., and the Nth write IO request is offset_N and length_N. Furthermore, offset_1, length_1, offset_2, length_2, ..., offset_N, and length_N are all associated with the file identifier information INODE_A and recorded in the data distribution record file. The distribution of the data corresponding to each write IO request (i.e., the first data) in the image file is shown as a gray square in the image file of Figure 5 (for illustration only).

[0120] It is also important to note that Figures 4 and 5 illustrate the case of creating a new file. If the write IO request issued by the virtual machine is to add data to an existing file, the offset and length (let's say offset_N+1, length_N+1) corresponding to the write IO request can be added under offset_N and length_N. If the write IO request is to delete or modify data in an existing file, then it is only necessary to find the specific location of the first data corresponding to the write IO request in the image file according to the data distribution record, and directly modify or delete the data at that location.

[0121] B. The process of enabling data distribution recording in applications

[0122] When the target IO request is a read IO request issued during the application startup phase (i.e., the first read IO request mentioned above), the data distribution of the startup application is recorded. See Figures 6 and 7 for details. Figure 6 is a flowchart illustrating the application data distribution recording process provided in this embodiment, and Figure 7 is a schematic diagram illustrating the application data distribution provided in this embodiment. In Figure 6, the application data distribution recording process may specifically include the following steps:

[0123] Step 1: When the application inside the virtual machine starts, it sends out a read I / O request.

[0124] When a user starts an application inside the virtual machine, the virtual machine sends a read I / O request to the host machine. This read I / O request can be one or multiple, and this application does not limit it.

[0125] Step 2: The virtual machine determines whether the read I / O request is a read I / O request during the application startup phase. If yes, proceed to step 3; otherwise, proceed to step 4.

[0126] Since applications within a virtual machine issue read I / O requests during both the startup and runtime phases, and the number of read I / O requests issued by a specific application during the startup phase is fixed, it is assumed that the read I / O requests issued by an application during startup are continuous. Therefore, in this step, the virtual machine needs to determine whether the currently issued read I / O request is a read I / O request from the application's startup phase. If yes, proceed to step 3; otherwise, proceed to step 4.

[0127] It should be noted that in some embodiments of this application, read I / O requests issued within a preset time period after the application starts can be regarded as read I / O requests during the startup phase. The preset time period can be taken as an empirical value based on different applications, and this application does not limit it.

[0128] Step 3: Add application identification information to the read IO request in the virtual machine, and then proceed to step 5.

[0129] The virtual machine further adds application identification information to the read I / O request generated during the application startup phase and then proceeds to step 5. For example, the read I / O request can be identified by the application identification module 102 in the embodiment corresponding to Figure 1, and application identification information can be added to the read I / O request. In Figure 7, it is assumed that the application identification information is APPLICATION_A.

[0130] Step 4: The virtual machine adds file identification information to the read I / O request and proceeds to step 5.

[0131] Similarly, the virtual machine further adds file identification information to the read I / O requests generated during the application's non-startup phase (e.g., runtime phase) and proceeds to step 5. For example, the read I / O request can be identified by the file identification module 101 in the embodiment corresponding to Figure 1, and file identification information can be added to the read I / O request (not shown in Figure 6).

[0132] Step 5: The host machine parses the target identifier information in the read IO request.

[0133] After receiving a read I / O request from the virtual machine, the host machine parses out the target identification information carried in the read I / O request. Specifically, if the read I / O request is issued during the application startup phase, the parsed target identification information is the application identification information; if the read I / O request is issued during the application runtime phase, the parsed target identification information is the file identification information.

[0134] Step 6: The host machine determines whether the target identification information in the read IO request is the application identification information. If yes, proceed to step 7; otherwise, proceed to step 9.

[0135] After parsing the issued read I / O request, the host machine can determine whether the target identification information carried in it is application identification information or file identification information. If it is determined that the target identification information in the read I / O request is application identification information, then step 7 is executed; if it is determined that the target identification information in the read I / O request is file identification information, then step 9 is executed.

[0136] Step 7: The host machine determines whether the read IO request has been recorded. If yes, proceed to step 9; otherwise, proceed to step 8.

[0137] The host machine will further determine whether the read IO request (e.g., the offset and length of the read IO request) has been recorded. If it has been recorded, step 9 will be executed; if it has not been recorded, step 8 will be executed.

[0138] Step 8: The host machine records the information in the read IO request.

[0139] The host records the information in the read IO request, such as the offset and length of the read IO request (i.e., data distribution information), and associates it with the application identification information. As shown in Figure 7, the offset and length of each read IO request issued during the application startup phase are associated with the corresponding application identification information APPLICATION_A. Furthermore, the offset and length of each read IO request and the corresponding application identification information can be saved in a newly added data distribution record file.

[0140] Step 9: The host machine sends a read I / O request to the disk.

[0141] Finally, the host machine sends the read I / O request to the physical disk to read the first data corresponding to the read I / O request from the physical disk.

[0142] It is important to note that Figure 7 illustrates the M read I / O requests issued during the application startup phase. Each of these M read I / O requests is treated as a target I / O request to execute the steps in Figure 6. This allows the offsets and lengths corresponding to each of the M read I / O requests to be recorded under the application identifier information APPLICATION_A. For example, in Figure 7, the offsets and lengths corresponding to the first read I / O request are offset_1 and length_1, the second read I / O request is offset_2 and length_2, and so on, until the Mth read I / O request is offset_M and length_M. Furthermore, offset_1, length_1, offset_2, length_2, ..., offset_M, and length_M are all associated with the application identifier information APPLICATION_A and recorded in the data distribution record file. The distribution of the data corresponding to each read I / O request during the application startup phase (i.e., the first data) in the image file is shown as a gray square in the image file of Figure 7 (for illustration only).

[0143] 305. The host machine determines whether to pre-read subsequent data from the host machine's disk based on the status of the self-feedback window.

[0144] Since the target identification information is recorded in the host machine, the host machine can determine whether to pre-read subsequent data of the first data from the host machine's disk based on the state of the self-feedback window. The target identification information is associated with data distribution information, serving as an index for the data distribution information, which is the distribution information of the first data in the image file. For example, the data distribution information can be the offset and length of the target IO request, where the offset represents the starting position of the data operation and the length represents the amount of data to be operated on. The first data is the data corresponding to the target IO request, and the subsequent data is determined based on the data distribution information. Different states of the self-feedback window reflect whether there is continuity between multiple IO requests. Specifically, in some embodiments of this application, the state of the self-feedback window can include a continuous state and a non-continuous state. A continuous state of the self-feedback window indicates that the self-feedback window is filled with the first information of multiple read IO requests, or indicates that the target IO request is the first read IO request generated by the application on the virtual machine during the startup phase (i.e., the first first read IO request), and the target IO request is included in the multiple read IO requests. Conversely, the discontinuous state of the self-feedback window is used to indicate that the self-feedback window has not been filled by the first information of the read I / O request, or to indicate that the target I / O request is the first read I / O request generated by the application on the non-virtual machine during the startup phase. It is important to note that this first information can refer to the offset and / or length of the read I / O request. The offset represents the starting position of the data operation, and the length represents the amount of data to be operated on, thus ensuring that each read I / O request corresponds to a specific position in the self-feedback window.

[0145] To further understand the relationship between the target IO request, target identification information, first data, and data distribution information, a specific example is used below. Please refer to Figure 8. In Figure 8, assume that the target identification information contained in the target IO request is the file identification information INODE_B (the case of application identification information is similar). Also assume that the target IO request obtained by the host is a read IO request with an offset of offset_21 and a length of length_21. Then offset_21 and length_21 are the data distribution information of the target IO request, used to indicate the starting position and size of the first data in the image file. The first gray square in the image file in Figure 8 is the first data corresponding to the target IO request.

[0146] The following explains how the host machine determines whether to pre-read subsequent data from the host machine's disk based on the status of the self-feedback window:

[0147] A. When the self-feedback window is in a continuous state

[0148] If the self-feedback window is determined to be in a continuous state, it can be updated according to preset rules. Then, from the host machine's disk, subsequent data corresponding to the first information of the read I / O request included in the updated self-feedback window is pre-read (i.e., asynchronous pre-read is triggered). This is because: a continuous state of the self-feedback window means that the window is filled with information related to multiple I / O requests (i.e., the first information, such as the offset of the read I / O request), or it means that the target I / O request is the first read I / O request issued by the application on the virtual machine during the startup phase (read I / O requests issued during the startup phase of the same application are directly considered continuous because the read I / O requests during the startup phase are fixed). These multiple read I / O requests are logically continuous, allowing the pre-read mechanism to be enabled.

[0149] It should be noted that, in some embodiments of this application, the methods for updating the self-feedback window may include, but are not limited to:

[0150] a. Slide the self-feedback window backward by a preset step size so that the slid-down self-feedback window can easily receive the first information of a new read IO request (e.g., the offset and length of the read IO request).

[0151] b. Adjust the size of the self-feedback window according to a preset ratio so that the adjusted self-feedback window is adapted to the amount of information in the first information of a new read IO request. For example, when multiple read IO requests occur concurrently in a short period of time, the size of the self-feedback window can be adaptively increased to facilitate the pre-reading of subsequent data; when there are no more concurrent read IO requests for a long period of time, the size of the feedback window can be adaptively decreased to improve the accuracy of the pre-reading of subsequent data.

[0152] B. The case where the self-feedback window is in a discontinuous state and the first information of the target I / O request is located in the self-feedback window.

[0153] If the self-feedback window is determined to be in a discontinuous state and the target first information of the target IO request is located within the self-feedback window, then the target first information (e.g., the offset of the target IO request) is filled into the self-feedback window. This is because: when the self-feedback window is in a discontinuous state, it means that the self-feedback window has not yet been filled, or it means that the target IO request is the first read IO request outside the application startup phase. At this time, it is insufficient to determine whether the target IO request is continuous with the IO requests before and after it, and further judgment is required. Therefore, the target first information of the target IO request can be filled into the window first.

[0154] It should also be noted that in some other embodiments of this application, if the target first information of the target IO request is not located in the self-feedback window, it indicates that the target IO request is not continuous with the previously issued IO request. The current self-feedback window ends, and the starting position of the self-feedback window is updated based on the first information of the target IO request (i.e., a new self-feedback window is started). It should be noted that another situation in which the current self-feedback window ends is when the current file has been read.

[0155] To further understand the implementation process of determining the continuity of read I / O requests based on the self-feedback window, a specific example is used below for illustration. Please refer to Figure 9 for details. Figure 9 is a flowchart illustrating the read I / O continuity determination provided in this embodiment. In this embodiment, it is assumed that the default size of the self-feedback window is size (in bytes). When the first read I / O request is received, its starting position is updated to the offset of the read I / O request (assumed to be offset1). At this time, the self-feedback window is [offset1, offset1+size]. This flowchart may specifically include the following steps:

[0156] Step 1: The virtual machine issues a read I / O request.

[0157] First, the virtual machine sends a read I / O request to the host machine. The virtual machine has added target identification information to the read I / O request in advance.

[0158] Step 2: The host machine parses the target identifier information in the read IO request.

[0159] After receiving a read I / O request from the virtual machine, the host machine further parses the target identification information carried in the read I / O request.

[0160] Step 3: Determine whether the target identification information is application identification information. If yes, proceed to step 4; otherwise, proceed to step 7.

[0161] Since all read I / O requests are marked with either application identification information or file identification information, in this step, the host machine determines whether the target identification information is application identification information. If it is, step 4 is executed; if not, it means that the read I / O request carries file identification information, and the process jumps to step 7.

[0162] Step 4: Determine if the read IO request is the first read IO request during the application startup phase. If yes, proceed to step 5; otherwise, proceed to step 6.

[0163] The host machine further determines whether the first information (e.g., offset) carried by the read IO request is the same as the first information of the first read IO request recorded during the application startup phase. If yes, step 5 is executed; otherwise, step 6 is executed.

[0164] Step 5: The state of the self-feedback window changes to a continuous state.

[0165] The self-feedback window changes from a discontinuous state to a continuous state. In this embodiment, the self-feedback window has two states: continuous and discontinuous. Initially, the self-feedback window is in a discontinuous state by default, but pre-reading is only triggered in the continuous state.

[0166] Step 6: Update the self-feedback window information.

[0167] The first information of the read IO request is filled into the self-feedback window, and the information of the self-feedback window is updated simultaneously. For example, the self-feedback window slides backward in budget steps (e.g., one size), preparing to receive the first information of subsequent read IO requests. For example, the self-feedback window can slide forward one position each time the first position is filled; or it can slide forward n positions each time n consecutive positions starting from the first position are filled; or it can slide forward one size each time the self-feedback window is completely filled. This application does not limit the specific implementation method of the self-feedback window sliding.

[0168] Step 7: Determine if the read I / O request is in the self-feedback window. If yes, proceed to step 8; otherwise, proceed to step 11.

[0169] The host machine determines whether the read I / O request is within the self-feedback window. If yes, it proceeds to step 8; otherwise, it proceeds to step 11.

[0170] Step 8: Determine if the self-feedback window is in a discontinuous state. If yes, proceed to step 9; otherwise, proceed to step 6.

[0171] The host machine further determines whether the self-feedback window state is discontinuous. If yes, it executes step 9; otherwise, it executes step 6.

[0172] Step 9: Record the first information of the read IO request into the self-feedback window.

[0173] Record the first information (e.g., offset) of the read I / O request into the current self-feedback window.

[0174] Step 10: Determine if the self-feedback window is full. If yes, proceed to step 5; otherwise, proceed to step 14.

[0175] Determine whether the current self-feedback window (assumed to be [offset1, offset1+size]) is filled with the first information of the read IO request. If yes, proceed to step 5; otherwise, proceed to step 14.

[0176] Step 11: Update the start position of the self-feedback window.

[0177] Update the starting position of the new self-feedback window based on the first information (e.g., offset) of the current read I / O request. For example, assuming the first information of the current read I / O request is offset2, and the size of the self-feedback window is size by default, the updated self-feedback window becomes [offset2, offset2+size].

[0178] Step 12: Automatically adjust the size of the self-feedback window based on the number of read IO requests within a preset time period.

[0179] The size of the self-feedback window is automatically adjusted based on the number of read I / O requests arriving within a preset time period. As an example, the size of the self-feedback window can be increased by a preset ratio (e.g., 2*size). For instance, if m positions (m≥2) in the self-feedback window are filled with the first information from m concurrent read I / O requests, the window increases in size by a preset ratio and slides backward by a preset step size. It should be noted that in some embodiments of this application, when no more concurrent read I / O requests arrive within a certain time period, the size of the self-feedback window can revert to its original size.

[0180] Step 13: Based on application startup and file data distribution, asynchronously trigger the pre-reading of subsequent data.

[0181] Based on application startup and file data distribution, asynchronously pre-read subsequent data.

[0182] Step 14: Send a read I / O request to the disk.

[0183] Send the current read I / O request to the physical disk.

[0184] It should be noted that in some embodiments of this application, after receiving the read I / O request from the virtual machine, the host machine directly proceeds to step 7 after parsing it (i.e., deleting the original steps 3 and 4). That is, if the first information of the read I / O request received by the host machine at application startup is the same as the first information (e.g., offset) of the first read I / O request already recorded during the application startup phase, the self-feedback window state is not directly changed to a continuous state. Instead, like other read I / O requests, it only becomes a continuous state when the entire self-feedback window [offset1, offset 1+size] is filled.

[0185] To facilitate understanding, a specific example is used below to illustrate the state changes of the self-feedback window. Please refer to Figure 10 for details. Figure 10 is a schematic diagram of a self-feedback window working example provided in the embodiments of this application. In Figure 10, it is assumed that the size of the self-feedback window is size = 4, and the distribution of the file A to be read in the virtual machine within the image file is random as shown in Figure 10. Based on the method of the above embodiments of this application, the information recorded by the data distribution of file A can be used to convert file A into a continuous distribution from a logical perspective. When the host machine receives the first read IO request issued by the virtual machine (referred to as read IO in Figure 10), the first information corresponding to the first read IO request is located at the first position of the self-feedback window, and the data to be read is shown in Figure 10. Similarly, the host machine will receive read IO requests issued by the virtual machine successively, and can fill the corresponding first information into the self-feedback window based on each read IO request. When the self-feedback window is full, the state becomes continuous. At this time, the window moves backward to pre-read subsequent data. In the embodiments of this application, it is shown that the amount of data to be pre-read is the same as the window size. When three concurrent read I / O requests are received, the self-feedback window will automatically increase in size, for example, to 1.5 times its initial size. At the same time, the self-feedback window will continue to move forward to pre-read subsequent data, thereby realizing asynchronous reading.

[0186] Based on the above embodiments, in order to better implement the above solutions of the embodiments of this application, related devices for implementing the above solutions are also provided below. Specifically, refer to Figure 11, which is a schematic diagram of a computer device provided in an embodiment of this application. The computer device 1100 serves as a host machine and may specifically include: an acquisition module 1101 and a judgment module 1102. The acquisition module 1101 is used to acquire a target IO request generated by a virtual machine. The target IO request contains target identification information, which is added to the target IO request by the virtual machine. The judgment module 1102 is used to determine, based on the state of the self-feedback window, whether to pre-read subsequent data of the first data from the disk of the host machine when the target IO request is a read IO request and the target identification information is recorded in the host machine. The target identification information is associated with data distribution information, which is the distribution information of the first data in the image file. The first data is the data corresponding to the target IO request, and the subsequent data is determined based on the data distribution information. Different states of the self-feedback window are used to reflect whether there is continuity between multiple IO requests.

[0187] In one possible design, the computer device 1100 further includes a recording module 1103, configured to: record the target identification information and the data distribution information in the host machine when the target identification information is not recorded in the host machine, and associate the target identification information with the data distribution information; write the first data to the disk when the target IO request is a write IO request; or read the first data from the disk when the target IO request is a read IO request.

[0188] In one possible design, the data distribution information includes at least: the offset and length of the target IO request, whereby the offset is used to characterize the starting position of the data operation and the length is used to characterize the amount of data to be operated on.

[0189] In one possible design, if the target IO request is a first read IO request, the target identification information includes application identification information used to identify the application, and the first read IO request is a read IO request generated by the application during the startup phase; and / or, if the target IO request is a write IO request or a second read IO request, the target identification information includes file identification information used to identify the file, and the write IO request includes at least one of the following: a write IO request to create a file, a write IO request to add data, modify data, or delete data in an already created file, and the second read IO request is any other read IO request besides the first read request.

[0190] In one possible design, the image file includes a data distribution record file, or the data distribution record file exists independently of the image file on the host machine, and the data distribution record file is used to record the target identification information, the data distribution information, and the association between the target identification information and the data distribution information.

[0191] In one possible design, the judgment module 1102 is specifically used to: when it is determined that the state of the self-feedback window is a continuous state, update the self-feedback window according to a preset rule, and pre-read the subsequent data corresponding to the first information of the read IO request included in the updated self-feedback window from the disk of the host machine. The continuous state is used to indicate that the self-feedback window is filled with the first information of multiple read IO requests, or the continuous state is used to indicate that the target IO request is the first read IO request generated by the application on the virtual machine during the startup phase, and the target IO request is included in the multiple read IO requests.

[0192] In one possible design, the judgment module 1102 is further configured to: slide the self-feedback window with a preset step size so that the slid-out self-feedback window can easily receive the first information of a new read IO request; and / or adjust the size of the self-feedback window according to a preset ratio so that the adjusted self-feedback window is adapted to the number of first information of a new read IO request.

[0193] In one possible design, the first information includes: the offset and / or length of the read IO request, the offset being used to characterize the starting position of the data operation, and the length being used to characterize the amount of data to be operated on.

[0194] In one possible design, the judgment module 1102 is further configured to: fill the first target information of the target IO request into the self-feedback window when it is determined that the first target information of the target IO request is located in the self-feedback window and the state of the self-feedback window is discontinuous. The discontinuous state is used to indicate that the self-feedback window is not filled with the first information of the read IO request, or the discontinuous state is used to indicate that the target IO request is not the first read IO request generated by the application on the virtual machine during the startup phase.

[0195] In one possible design, the judgment module 1102 is further configured to: update the starting position of the self-feedback window based on the first information of the target IO request if the target first information of the target IO request is not located in the self-feedback window.

[0196] It should be noted that the information interaction and execution process between the modules / units in the computer device 1100 are based on the same concept as the method embodiments described above in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0197] Next, we will introduce another computer device provided in the embodiments of this application. Please refer to Figure 12. Figure 12 is a schematic diagram of the structure of a computer device provided in the embodiments of this application. The computer device 1200 serves as a host machine and can deploy the modules described in the embodiment corresponding to Figure 11 to implement the functions of the computer device 1100 in the embodiment corresponding to Figure 11. Specifically, the computer device 1200 is implemented by one or more servers. The computer device 1200 can vary significantly due to different configurations or performance. It may include one or more central processing units 1222 and memory 1232, and one or more storage media 1230 (e.g., one or more mass storage devices) for storing application programs 1242 or data 1244. The memory 1232 and storage media 1230 may be temporary or persistent storage. The program stored in the storage media 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the computer device 1200. Furthermore, the central processing unit 1222 can be configured to communicate with the storage medium 1230 and execute a series of instruction operations in the storage medium 1230 on the computer device 1200.

[0198] Computer device 1200 may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input / output interfaces 1258, and / or one or more operating systems 1241, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0199] In this embodiment, the central processing unit 1222 is used to execute the steps performed by the computer device as a host in the embodiment corresponding to FIG3. For example, the central processing unit 1222 can be used to: first, obtain a target IO request generated by a virtual machine containing target identification information, the target identification information being added to the target IO request by the virtual machine; if the target IO request is a read IO request and the target identification information is recorded on the host, determine whether to read subsequent data of the first data corresponding to the target IO request from the host disk based on the self-feedback window state; the target identification information is associated with data distribution information, the data distribution information being the distribution information of the first data in the image file; different states of the self-feedback window are used to reflect whether there is continuity between multiple IO requests.

[0200] It should be noted that the specific way in which the central processing unit 1222 executes the above steps is based on the same concept as the method embodiment corresponding to Figure 3 in this application, and the resulting technical effects are also the same as those in the above embodiments of this application. For details, please refer to the description in the method embodiment shown above in this application, which will not be repeated here.

[0201] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0202] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0203] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0204] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method of data processing, characterized by, Applied to the host machine, including: Obtain the target I / O request generated by the virtual machine, wherein the target I / O request contains target identification information, which is added to the target I / O request by the virtual machine; When the target IO request is a read IO request and the target identification information is recorded in the host machine, the status of the self-feedback window determines whether to pre-read subsequent data of the first data from the disk of the host machine. The target identification information is associated with data distribution information, which is the distribution information of the first data in the image file. The first data is the data corresponding to the target IO request. The subsequent data is determined based on the data distribution information. The different states of the self-feedback window are used to reflect whether there is continuity between multiple IO requests.

2. The method of claim 1, wherein, The method further includes: If the target identification information is not recorded in the host machine, the target identification information and the data distribution information are recorded in the host machine, and the target identification information and the data distribution information are associated. If the target I / O request is a write I / O request, the first data is written to the disk; or, If the target I / O request is a read I / O request, the first data is read from the disk.

3. The method according to any one of claims 1-2, characterized in that, The data distribution information includes at least: The offset and length of the target I / O request, wherein the offset is used to characterize the starting position of the data operation and the length is used to characterize the amount of data to be operated.

4. The method according to any one of claims 1-3, characterized in that, When the target IO request is a first read IO request, the target identification information includes application identification information, which is used to identify the application, and the first read IO request is a read IO request generated by the application during the startup phase; And / or, When the target IO request is a write IO request or a second read IO request, the target identification information includes file identification information, which is used to identify the file. The write IO request includes at least one of the following: a write IO request to create a file, a write IO request to add data, modify data, or delete data in an already created file, and the second read IO request is any other read IO request besides the first read request.

5. The method according to any one of claims 1-4, characterized in that, The image file includes a data distribution record file, or the data distribution record file exists independently of the image file on the host machine, and the data distribution record file is used to record the target identification information, the data distribution information, and the association between the target identification information and the data distribution information.

6. The method according to any one of claims 1-5, characterized in that, The step of determining whether to pre-read subsequent data of the first data from the host machine's disk based on the state of the self-feedback window includes: If the self-feedback window is determined to be in a continuous state, the self-feedback window is updated according to a preset rule, and the subsequent data corresponding to the first information of the read IO request included in the updated self-feedback window is pre-read from the host disk. The continuous state is used to indicate that the self-feedback window is filled with the first information of multiple read IO requests, or the continuous state is used to indicate that the target IO request is the first read IO request generated by the application on the virtual machine during the startup phase, and the target IO request is included in the multiple read IO requests.

7. The method of claim 6, wherein, The step of updating the self-feedback window according to preset rules includes: The self-feedback window is slid with a preset step size so that the slid-out self-feedback window can easily receive the first information of a new read IO request; And / or, The size of the self-feedback window is adjusted according to a preset ratio so that the adjusted self-feedback window is adapted to the amount of the first information of the new read IO request.

8. The method according to any one of claims 6-7, characterized in that, The first information includes: The offset and / or length of the read IO request, wherein the offset is used to characterize the starting position of the data operation and the length is used to characterize the amount of data to be operated on.

9. The method according to any one of claims 1-5, characterized in that, The step of determining whether to pre-read subsequent data of the first data from the host machine's disk based on the state of the self-feedback window includes: If it is determined that the target first information of the target IO request is located in the self-feedback window and the state of the self-feedback window is discontinuous, the target first information is filled into the self-feedback window. The discontinuous state is used to indicate that the self-feedback window is not filled with the first information of the read IO request, or the discontinuous state is used to indicate that the target IO request is not the first read IO request generated by the application on the virtual machine during the startup phase.

10. The method according to any one of claims 1-9, characterized in that, The method further includes: If the target first information of the target IO request is not located in the self-feedback window, the starting position of the self-feedback window is updated based on the target IO request first information.

11. A computer device, comprising: The computer device serves as the host machine and includes: The acquisition module is used to acquire a target I / O request generated by the virtual machine. The target I / O request contains target identification information, which is added to the target I / O request by the virtual machine. The judgment module is used to determine, based on the state of the self-feedback window, whether to pre-read subsequent data of the first data from the disk of the host machine when the target IO request is a read IO request and the target identification information is recorded in the host machine. The target identification information is associated with data distribution information, which is the distribution information of the first data in the image file. The first data is the data corresponding to the target IO request. The subsequent data is determined based on the data distribution information. The different states of the self-feedback window are used to reflect whether there is continuity between multiple IO requests.

12. The apparatus of claim 11, wherein, The computer device further includes a recording module for: If the target identification information is not recorded in the host machine, the target identification information and the data distribution information are recorded in the host machine, and the target identification information and the data distribution information are associated. If the target I / O request is a write I / O request, the first data is written to the disk; or, If the target I / O request is a read I / O request, the first data is read from the disk.

13. The apparatus of any one of claims 11-12, wherein, The data distribution information includes at least: The offset and length of the target I / O request, wherein the offset is used to characterize the starting position of the data operation and the length is used to characterize the amount of data to be operated.

14. The device according to any one of claims 11-13, characterized in that, When the target IO request is a first read IO request, the target identification information includes application identification information, which is used to identify the application, and the first read IO request is a read IO request generated by the application during the startup phase; And / or, When the target IO request is a write IO request or a second read IO request, the target identification information includes file identification information, which is used to identify the file. The write IO request includes at least one of the following: a write IO request to create a file, a write IO request to add data, modify data, or delete data in an already created file, and the second read IO request is any other read IO request besides the first read request.

15. The device according to any one of claims 11-14, characterized in that, The image file includes a data distribution record file, or the data distribution record file exists independently of the image file on the host machine, and the data distribution record file is used to record the target identification information, the data distribution information, and the association between the target identification information and the data distribution information.

16. The apparatus of any one of claims 11-15, wherein, The judgment module is specifically used for: If the self-feedback window is determined to be in a continuous state, the self-feedback window is updated according to a preset rule, and the subsequent data corresponding to the first information of the read IO request included in the updated self-feedback window is pre-read from the host disk. The continuous state is used to indicate that the self-feedback window is filled with the first information of multiple read IO requests, or the continuous state is used to indicate that the target IO request is the first read IO request generated by the application on the virtual machine during the startup phase, and the target IO request is included in the multiple read IO requests.

17. The apparatus of claim 16, wherein, The judgment module is further used for: The self-feedback window is slid with a preset step size so that the slid-out self-feedback window can easily receive the first information of a new read IO request; And / or, The size of the self-feedback window is adjusted according to a preset ratio so that the adjusted self-feedback window is adapted to the amount of the first information of the new read IO request.

18. The apparatus of any one of claims 16-17, wherein, The first information includes: The offset and / or length of the read IO request, wherein the offset is used to characterize the starting position of the data operation and the length is used to characterize the amount of data to be operated on.

19. The apparatus of any one of claims 11-15, wherein, The judgment module is further used for: If it is determined that the target first information of the target IO request is located in the self-feedback window and the state of the self-feedback window is discontinuous, the target first information is filled into the self-feedback window. The discontinuous state is used to indicate that the self-feedback window is not filled with the first information of the read IO request, or the discontinuous state is used to indicate that the target IO request is not the first read IO request generated by the application on the virtual machine during the startup phase.

20. The apparatus of any one of claims 11-19, wherein, The judgment module is also used for: If the target first information of the target IO request is not located in the self-feedback window, the starting position of the self-feedback window is updated based on the target IO request first information.

21. A computer device comprising a processor and a memory, the processor being coupled to the memory, characterized in that, The memory is used to store programs; The processor is configured to execute a program in the memory, causing the computer device to perform the method as described in any one of claims 1-10.

22. A computer storage medium, comprising, The device stores computer-readable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-10.

23. A computer program product, characterised in that, The computer program product includes computer-readable instructions that, when executed by a processor, implement the method as described in any one of claims 1-10.

24. A chip comprising a processor and a data interface, characterized in that The processor reads instructions stored in the memory through the data interface and executes the method as described in any one of claims 1-10.