Data processing method, device and system and storage medium
By setting a preset request queue in the virtual machine and directly responding to data processing requests using embedded memory drivers, the problem of excessively long data processing request paths in the virtualized backend is solved, and the real-timeness of data processing is improved.
Patent Information
- Application Number
- CN202310967908.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-02-14
AI Technical Summary
The existing virtualized backend data processing request path is too long, making it difficult to guarantee the real-time nature of data processing.
By setting a preset request queue in the virtual machine, data processing requests are stored and read and respond to data processing requests through embedded memory drivers, and directly send them to embedded memory for processing.
Shorten the response path of data processing requests and improve the real-timeness of data processing.
Smart Images

Figure CN119440866A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, system and storage medium. Background Art
[0002] The existing virtualization implementation process is as follows:
[0003] (1) Virtualization front-end data processing flow: When the first virtual machine generates a data processing request for reading or writing a block device, the client operating system of the first virtual machine sends the corresponding data processing request to the virtual machine monitor;
[0004] (2) Virtualization backend data processing flow: The virtual machine monitor transmits the data processing request to the client operating system of the second virtual machine, and the operating system in the second virtual machine forwards it to the virtual machine management software corresponding to the second virtual machine for real data processing, and obtains the data processing result;
[0005] (3) Data return process: After obtaining the data processing result, the data processing result is returned to the first virtual machine along the original path.
[0006] Since the existing virtualization backend needs to send the request to the second virtual machine, and the second virtual machine processes the data and then returns the data processing result, the existing data processing request needs to go through a too long path, making it difficult to ensure the real-time performance of data processing.
[0007] Therefore, how to provide a data processing method to improve the real-time performance of virtualized backend data processing has become a technical problem that needs to be solved urgently. Summary of the invention
[0008] The present application provides a data processing method, device, system and storage medium for improving the real-time performance of virtualized back-end data processing.
[0009] The present application provides a data processing method, comprising:
[0010] When a data processing request corresponding to a preset program in the virtual machine is obtained, the data processing request is stored in a preset request queue of the virtual machine;
[0011] Reading a preset request queue of the virtual machine through an embedded memory driver to obtain the data processing request;
[0012] The data processing request is sent to the embedded memory, so that the embedded memory responds to the data processing request.
[0013] In one embodiment, the process of obtaining the data processing request is as follows:
[0014] When it is detected that the preset program running in the virtual machine has new data generated, a data processing request corresponding to the preset program in the virtual machine is generated, wherein the data processing request corresponding to the preset program in the virtual machine is used to request storage of the new data generated in the preset program;
[0015] or
[0016] A data processing request sent by a preset program running in the virtual machine is received.
[0017] In one embodiment, the data processing request sent by the preset program is used to request access to a block device, and storing the data processing request in a preset request queue of the virtual machine includes:
[0018] When receiving a data processing request sent by a preset program in the virtual machine, converting the type of the data processing request into a data processing request for accessing the embedded memory;
[0019] The converted data processing request is stored in a preset request queue of the virtual machine.
[0020] In one embodiment, the step of reading a preset request queue of the virtual machine through an embedded memory driver to obtain the data processing request includes:
[0021] When detecting that a data processing request is stored in a preset request queue of the virtual machine, obtaining a state of an embedded memory driver;
[0022] When the embedded memory driver is in an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue.
[0023] In one embodiment, the method further comprises:
[0024] When the embedded memory is driven to a busy state, monitoring the state of the embedded memory;
[0025] When it is monitored that the embedded memory changes from a busy state to an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue.
[0026] In one embodiment, the method further comprises:
[0027] When the embedded memory completes the response to the data processing request, controlling the embedded memory to feed back a response result to the embedded memory driver, wherein the response result includes a response success result or a response failure result;
[0028] The embedded memory driver is controlled to feed back the response result to a preset program in the virtual machine.
[0029] In one embodiment, controlling the embedded memory driver to feed back the storage result to a preset program in the virtual machine includes:
[0030] Sending the response result to a virtual block device driver through the embedded memory driver;
[0031] Sending the response result to the file system through the virtual block device driver;
[0032] The response result is fed back to a preset program in the virtual machine through the file system.
[0033] The present application also provides a data processing device, comprising:
[0034] A storage module, configured to store a data processing request corresponding to a preset program in a virtual machine in a preset request queue of the virtual machine when obtaining the data processing request;
[0035] An acquisition module, configured to read a preset request queue of the virtual machine through an embedded memory driver to acquire the data processing request;
[0036] The sending module is used to send the data processing request to the embedded memory, so that the embedded memory responds to the data processing request.
[0037] In one embodiment, the process of obtaining the data processing request is as follows:
[0038] When it is detected that the preset program running in the virtual machine has new data generated, a data processing request corresponding to the preset program in the virtual machine is generated, wherein the data processing request corresponding to the preset program in the virtual machine is used to request storage of the new data generated in the preset program;
[0039] or
[0040] A data processing request sent by a preset program running in the virtual machine is received.
[0041] In one embodiment, the data processing request sent by the preset program is used to request access to a block device, and the storage module includes:
[0042] a changing submodule, configured to convert the type of the data processing request into a data processing request for accessing the embedded memory when receiving a data processing request sent by a preset program in the virtual machine;
[0043] The storage submodule is used to store the converted data processing request in a preset request queue of the virtual machine.
[0044] In one embodiment, the acquisition module includes:
[0045] An acquisition submodule, configured to acquire the state of the embedded memory driver when detecting that a data processing request is stored in a preset request queue of the virtual machine;
[0046] The first reading submodule is used to read the preset request queue of the virtual machine through the embedded memory driver when monitoring that the embedded memory driver is in an idle state, so as to obtain the data processing request at the head of the preset request queue.
[0047] In one embodiment, the apparatus further comprises:
[0048] A monitoring module, used for monitoring the state of the embedded memory when the embedded memory is driven into a busy state;
[0049] The reading module is used to read the preset request queue of the virtual machine through the embedded memory driver when monitoring that the embedded memory changes from a busy state to an idle state, so as to obtain the data processing request at the head of the preset request queue.
[0050] In one embodiment, the apparatus further comprises:
[0051] A first control module, configured to control the embedded memory to feed back a response result to the embedded memory driver when the embedded memory completes responding to the data processing request, wherein the response result includes a response success result or a response failure result;
[0052] The second control module is used to control the embedded memory driver to feed back the response result to a preset program in the virtual machine.
[0053] In one embodiment, the second control module includes:
[0054] A first sending submodule, configured to send the response result to a virtual block device driver through the embedded memory driver;
[0055] A second sending submodule, used for sending the response result to a file system through the virtual block device driver;
[0056] A feedback submodule is used to feed back the response result to a preset program in the virtual machine through the file system.
[0057] The present application also provides a data processing system, comprising:
[0058] at least one processor; and,
[0059] a memory communicatively connected to the at least one processor; wherein,
[0060] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to implement the data processing method described in any of the above embodiments.
[0061] The present application also provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor corresponding to a data processing system, the data processing system can implement the data processing method recorded in any of the above embodiments.
[0062] The beneficial effects of the present application are: when a data processing request corresponding to a preset program in a virtual machine is obtained, the data processing request is stored in the preset request queue of the virtual machine; the preset request queue of the virtual machine is read by an embedded memory driver to obtain the data processing request; the data processing request is sent to the embedded memory so that the embedded memory responds to the data processing request. Since the data processing request does not need to be sent to other virtual machines for processing, the data processing request is directly stored by the embedded memory driver and then sent to the embedded memory to respond to the data processing request, that is, the data processing request response can be completed by processing it once by the embedded memory, which shortens the data processing request response path and improves the real-time performance of the data processing request.
[0063] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings.
[0064] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings:
[0066] Figure 1 This is a flow chart of a data processing method in one embodiment of the present application;
[0067] Figure 2 A flowchart of an existing virtualization implementation method;
[0068] Figure 3This is a flow chart of a data processing method in one embodiment of the present application;
[0069] Figure 4 This is a structural schematic diagram of a data processing device in an embodiment of the present application;
[0070] Figure 5 The figure is a schematic diagram of the hardware structure of a data processing system in one embodiment of the present application. DETAILED DESCRIPTION
[0071] The preferred embodiments of the present application are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application.
[0072] This application proposes a data processing method for a virtualized storage backend to shorten the path of data processing requests and improve the real-time performance of data processing.
[0073] Figure 1 Flow chart of a data processing method in one embodiment of the present application, applied to an embedded memory in a virtual machine, such as Figure 1 As shown, the method can be implemented as the following steps S101-S103:
[0074] In step S101, when a data processing request corresponding to a preset program in a virtual machine is obtained, the data processing request is stored in a preset request queue of the virtual machine;
[0075] Figure 2 A flowchart of an existing virtualization implementation method, such as Figure 2 As shown, when existing virtual machines access data, they need to go through the virtualization front-end processing process (steps ①, ②, ⑦, ⑧) and the virtualization back-end processing process (③, ④, ⑤, ⑥), a total of eight steps. The path that data processing requests need to go through is too long, and it is difficult to ensure the real-time performance of data processing. Figure 3 Flow chart of a data processing method in one embodiment of the present application. Figure 3 As shown, the data processing system includes at least a virtual machine monitor, an embedded memory driver and an embedded memory, which are used to shorten the processing path of the data processing request. In the present application, the acquisition of the data processing request can be active acquisition or passive acquisition.
[0076] The active acquisition method is as follows:
[0077] Detect whether new data is generated in the preset program running in the virtual machine, wherein the preset program may be application software installed on the virtual machine. For example, when the data processing request is a data write request, the preset program is the data source of the new data. After the preset program is started, detect whether new data is generated in the preset program, wherein the new data may be newly generated document data, video data, performance monitoring data, etc. When it is detected that the preset program running in the virtual machine has new data generated, generate a data processing request corresponding to the preset program in the virtual machine, wherein the data processing request corresponding to the preset program in the virtual machine is used to request storage of the new data generated in the preset program.
[0078] Passive acquisition methods are as follows:
[0079] Receive a data processing request sent by a preset program running in the virtual machine. That is, when a data processing request corresponding to a preset program in the virtual machine is received, a data processing request sent by the client operating system is received. For example, if the virtual machine needs to perform a read operation on a certain device, it sends a corresponding read request, and the corresponding client operating system sends the corresponding read request to the virtual machine operating system, and the corresponding read request can be obtained from the virtual machine operating system. Of course, a passive acquisition method can also be adopted for write requests. For example, Figure 3 As shown, the virtualization front-end processing flow in this embodiment is consistent with the existing method, and the difference is that the virtualization back-end processing flow is improved. It can be understood that since the received data processing request may be used to request access to a block device, after receiving the data processing request sent by the client operating system, the received data processing request is changed: when a data processing request sent by a preset program in the virtual machine is received, the type of the data processing request is changed to convert the data processing request for accessing the block device into a data processing request for accessing the embedded memory; in the present application, in order to effectively manage multiple data processing requests, a corresponding preset request queue is set for the virtual machine to store the data processing request sent by the virtual machine. Therefore, the generated data processing request, or the data processing request after the type is changed, is stored in the preset request queue of the virtual machine.
[0080] For example, the embedded memory in the present application may be an EMMC (Embedded Multi-Media Card). When the virtual machine monitor receives a data processing request, the data processing request is converted into an EMMC access request. After the conversion, the EMMC access request is placed in the EMMC access request queue of the virtual machine.
[0081] In step S102, a preset request queue of the virtual machine is read through an embedded memory driver to obtain the data processing request;
[0082] like Figure 3 As shown, in the present application, the data processing request is read from the preset queue of the virtual machine by the embedded memory driver. Specifically, when it is detected that the data processing request is stored in the preset request queue of the virtual machine, the state of the embedded memory driver is obtained to determine whether the current memory driver is in an idle state or a busy state:
[0083] When the embedded memory driver is in an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue. For example, when the embedded memory is EMMC, if it is found that the EMMC control driver is in an idle state, a current request in the preset request queue is pushed to the EMMC control driver for processing.
[0084] When the embedded memory driver is in a busy state, the state of the embedded memory is monitored, and the state of the memory can be obtained in real time; when the embedded memory is monitored to change from a busy state to an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue. For example, if the EMMC control driver is in a busy state, the monitoring continues until the EMMC control driver processes a request and is in an idle state again, then the EMMC control driver will actively take out a request from the queue and then process it.
[0085] In step S103, the data processing request is sent to the embedded memory, so that the embedded memory responds to the data processing request.
[0086] After the embedded memory driver reads the data processing request, it sends the data processing request to the embedded memory, and the embedded memory responds to the data processing request.
[0087] When the embedded memory completes the response to the data processing request, the embedded memory is controlled to feedback the response result to the embedded memory driver, wherein the response result includes the result of a successful response or the result of a failed response; for example, after the EMMC control driver sends a data processing request to the EMMC, the EMMC responds to the data processing request and sends the response result to the EMMC control driver after completing the response. Then the embedded memory driver is controlled to feedback the response result to the preset program in the virtual machine. Specifically, after the embedded memory driver receives the response result fed back by the embedded memory, the response result is returned to the virtual machine along the original path: the response result is sent to the virtual block device driver through the embedded memory driver; when sending, the embedded memory driver can directly send the response result to the virtual block device driver, or it can be as follows Figure 3 As shown, the embedded memory driver first sends the response result to the virtual machine monitor, and then the virtual machine monitor sends the response request to the virtual block device driver. Then, the virtual block device driver sends the response result to the file system, and then the file system feeds back the response result to the preset program in the virtual machine.
[0088] In addition, in the present application, when the embedded memory driver receives the response result fed back by the embedded memory, it triggers interrupt processing and prioritizes the current request. After returning the current response structure to the virtual machine, it is idle again, and the embedded memory driver checks the preset request queue to see if there are any requests to be processed.
[0089] The beneficial effects of the present application are: when a data processing request corresponding to a preset program in a virtual machine is obtained, the data processing request is stored in the preset request queue of the virtual machine; the preset request queue of the virtual machine is read through an embedded memory driver to obtain the data processing request; the data processing request is sent to the embedded memory so that the embedded memory responds to the data processing request. Since the data processing request does not need to be sent to other virtual machines for processing, but is directly stored through the embedded memory driver and sent to the embedded memory to respond to the data processing request, the data processing path is shortened and the real-time performance of data processing is improved.
[0090] In one embodiment, the process of generating the data processing request may be implemented as the following steps A1 or A2:
[0091] In step A1, when it is detected that the preset program running in the virtual machine has new data generated, a data processing request corresponding to the preset program in the virtual machine is generated, wherein the data processing request corresponding to the preset program in the virtual machine is used to request storage of the new data generated in the preset program;
[0092] In step A2, a data processing request sent by a preset program running in the virtual machine is received.
[0093] In this embodiment, the acquisition of the data processing request may be active acquisition or passive acquisition.
[0094] The active acquisition method is as follows:
[0095] Detect whether new data is generated in the preset program running in the virtual machine, wherein the preset program may be an application software installed on the virtual machine. For example, when the data processing request is a data write request, the preset program is the data source of the new data. After the preset program is started, detect whether new data is generated in the preset program, wherein the new data may be newly generated document data, video data, performance monitoring data, etc. When it is detected that new data is generated in the preset program running in the virtual machine, generate a data processing request corresponding to the preset program in the virtual machine, wherein the data processing request corresponding to the preset program in the virtual machine is used to request the storage of the new data generated in the preset program. In addition, the data processing path can be further shortened and the real-time performance of data processing can be improved.
[0096] Passive acquisition methods are as follows:
[0097] Receive a data processing request sent by a preset program running in the virtual machine. That is, when a data processing request corresponding to a preset program in the virtual machine is received, receive a data processing request sent by the client operating system. For example, if the virtual machine needs to perform a read operation on a certain device, it sends a corresponding read request, and the corresponding client operating system sends the corresponding read request to the virtual machine operating system, and the corresponding read request can be obtained from the virtual machine operating system. Of course, a passive acquisition method can also be adopted for write requests. In the passive acquisition method, it can better adapt to the existing virtualization implementation method and transmit information with the virtual machine.
[0098] In one embodiment, the data processing request sent by the preset program is used to request access to a block device, and the above step S101 can be implemented as the following steps B1-B2:
[0099] In step B1, when a data processing request sent by a preset program in the virtual machine is received, the type of the data processing request is converted into a data processing request for accessing the embedded memory;
[0100] In step B2, the converted data processing request is stored in a preset request queue of the virtual machine.
[0101] In this embodiment, when a data processing request sent by a preset program in the virtual machine is received, the type of the data processing request is changed to convert the data processing request for accessing the block device into a data processing request for accessing the embedded memory. Figure 2 In the existing virtualization implementation method shown, the virtualization front-end processing flow is usually not optimized for data processing. The virtualization back-end processing flow is controlled and implemented by a specific virtual machine monitor. Therefore, this application optimizes the implementation method of the virtual storage back-end. For the virtual storage back-end, since the received data processing request is used to request access to a block device, the embedded memory cannot be accessed. Therefore, it is necessary to change the data type of the data processing request to convert the data processing request for accessing the block device into a data processing request for accessing the embedded memory.
[0102] The data processing request after the type change is stored in the preset request queue of the virtual machine. In this embodiment, in order to effectively manage multiple data processing requests, a corresponding preset request queue is set for the virtual machine to store the data processing requests sent by the virtual machine, thereby freeing up the resources of the virtual machine and realizing good system protection. Even if there are multiple data processing requests in the queue, the complete processing of the data can still be guaranteed.
[0103] In one embodiment, the above step S102 may be implemented as the following steps C1-C2:
[0104] In step C1, when it is detected that a data processing request is stored in a preset request queue of the virtual machine, a state of an embedded memory driver is obtained;
[0105] In step C2, when the embedded memory driver is in an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue.
[0106] In this embodiment, when it is detected that a data processing request is stored in the preset request queue of the virtual machine, the state of the embedded memory driver is obtained. Figure 3 As shown, in the present application, the data processing request is read from the preset queue of the virtual machine through the embedded memory driver, and thus the state of the embedded memory driver is detected to determine whether the current memory driver is in an idle state or a busy state.
[0107] When the embedded memory driver is in an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue. For example, when the embedded memory is EMMC, if it is found that the EMMC control driver is in an idle state, a current request in the preset request queue is pushed to the EMMC control driver for processing.
[0108] In one embodiment, the method can also be implemented as the following steps C3-C4:
[0109] In step C3, when the embedded memory is driven to a busy state, the state of the embedded memory is monitored;
[0110] In step C4, when it is monitored that the embedded memory changes from a busy state to an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue.
[0111] In this embodiment, when the embedded memory is driven into a busy state, the state of the embedded memory is monitored, and the state of the memory can be acquired in real time.
[0112] When the embedded memory changes from a busy state to an idle state, the preset request queue of the virtual machine is read by the embedded memory driver to obtain the data processing request at the head of the preset request queue. For example, if the EMMC control driver is in a busy state, monitoring will continue until the EMMC control driver processes a request and is in an idle state again, then the EMMC control driver will actively take out a request from the queue and then process it.
[0113] In one embodiment, the method can also be implemented as the following steps D1-D2:
[0114] In step D1, when the embedded memory completes the response to the data processing request, the embedded memory is controlled to feedback a response result to the embedded memory driver, wherein the response result includes a response success result or a response failure result;
[0115] In step D2, the embedded memory driver is controlled to feed back the response result to a preset program in the virtual machine.
[0116] In this embodiment, when the embedded memory completes the response to the data processing request, the embedded memory is controlled to feedback the response result to the embedded memory driver, wherein the response result includes a successful response result or a failed response result; for example, after the EMMC control driver sends a data processing request to the EMMC, the EMMC responds to the data processing request and sends the response result to the EMMC control driver after completing the response.
[0117] The embedded memory driver is controlled to feed back the response result to the preset program in the virtual machine. After receiving the response result fed back by the embedded memory, the embedded memory driver is controlled to return the response result to the virtual machine along the original path. Specifically, the embedded memory driver sends the response result to the virtual block device driver. When sending, the embedded memory driver can directly send the response result to the virtual block device driver, or it can send the response result to the virtual block device driver as shown in the figure. Figure 3 As shown, the embedded memory driver first sends the response result to the virtual machine monitor, and then the virtual machine monitor sends the response request to the virtual block device driver. Then, the virtual block device driver sends the response result to the file system, and then the file system feeds back the response result to the preset program in the virtual machine.
[0118] It should be noted that in this embodiment, when the embedded memory driver receives the response result fed back by the embedded memory, it will trigger interrupt processing, give priority to processing the current request, and after returning the current response structure to the virtual machine, it will be in an idle state again, and the embedded memory driver will check the preset request queue to see if there are any requests to be processed. Furthermore, there is no active process or thread in the entire backend processing process, and the processing of the preset request queue is driven by interrupts.
[0119] In one embodiment, the above step D2 can be implemented as the following steps D21-D23:
[0120] In step D21, the response result is sent to the virtual block device driver through the embedded memory driver;
[0121] In step D22, the response result is sent to the file system through the virtual block device driver;
[0122] In step D23, the response result is fed back to the preset program in the virtual machine through the file system.
[0123] In this embodiment, after the embedded memory driver receives the response result fed back by the embedded memory driver, the response result is returned to the virtual machine along the original path.
[0124] The response result is sent to the virtual block device driver through the embedded memory driver; when sending, the response result can be directly sent to the virtual block device driver by the embedded memory driver, or it can be sent as follows Figure 3 As shown, the embedded memory driver first sends the response result to the virtual machine monitor, and then the virtual machine monitor sends the response request to the virtual block device driver. Then, the virtual block device driver sends the response result to the file system, and then the file system feeds back the response result to the preset program in the virtual machine.
[0125] Figure 4 FIG. 1 is a schematic diagram of the structure of a data processing device in an embodiment of the present application, which is applied to a data processing system interacting with a virtual machine, such as Figure 4 As shown, including:
[0126] The storage module 401 is used for storing the data processing request in a preset request queue of the virtual machine when obtaining the data processing request corresponding to the preset program in the virtual machine;
[0127] An acquisition module 402 is configured to read a preset request queue of the virtual machine through an embedded memory driver to acquire the data processing request;
[0128] The sending module 403 is used to send the data processing request to the embedded memory, so that the embedded memory responds to the data processing request.
[0129] In one embodiment, when the data processing request is a data writing request, the process of obtaining the data processing request is as follows:
[0130] Detecting whether new data is generated in a preset program running in the virtual machine;
[0131] When new data is generated by the preset program running in the virtual machine, a data processing request corresponding to the preset program in the virtual machine is generated, wherein the data processing request corresponding to the preset program in the virtual machine is used to request storage of the new data generated in the preset program.
[0132] In one embodiment, the data processing request sent by the preset program is used to request access to a block device, and the storage module includes:
[0133] a changing submodule, configured to convert the type of the data processing request into a data processing request for accessing the embedded memory when receiving a data processing request sent by a preset program in the virtual machine;
[0134] The storage submodule is used to store the converted data processing request in a preset request queue of the virtual machine.
[0135] In one embodiment, the acquisition module includes:
[0136] An acquisition submodule, configured to acquire the state of the embedded memory driver when detecting that a data processing request is stored in a preset request queue of the virtual machine;
[0137] The first reading submodule is used to read the preset request queue of the virtual machine through the embedded memory driver when the embedded memory driver is in an idle state, so as to obtain the data processing request at the head of the preset request queue.
[0138] In one embodiment, the apparatus further comprises:
[0139] A monitoring module, used for monitoring the state of the embedded memory when the embedded memory is driven into a busy state;
[0140] The reading module is used to read the preset request queue of the virtual machine through the embedded memory driver when the embedded memory changes from a busy state to an idle state, so as to obtain the data processing request at the head of the preset request queue.
[0141] In one embodiment, the apparatus further comprises:
[0142] A first control module, configured to control the embedded memory to feed back a response result to the embedded memory driver when the embedded memory completes responding to the data processing request, wherein the response result includes a response success result or a response failure result;
[0143] The second control module is used to control the embedded memory driver to feed back the response result to a preset program in the virtual machine.
[0144] In one embodiment, the second control module includes:
[0145] A first sending submodule, configured to send the response result to a virtual block device driver through the embedded memory driver;
[0146] A second sending submodule, used for sending the response result to a file system through the virtual block device driver;
[0147] A feedback submodule is used to feed back the response result to a preset program in the virtual machine through the file system.
[0148] Figure 5 FIG. 1 is a schematic diagram of the hardware structure of a data processing system in one embodiment of the present application. Figure 5 As shown, the data processing system comprises:
[0149] at least one processor 520; and,
[0150] A memory 504 in communication with the at least one processor 520; wherein,
[0151] The memory 504 stores instructions that can be executed by the at least one processor 520, and the instructions are executed by the at least one processor 520 to implement the data processing method described in any of the above embodiments.
[0152] Reference Figure 5 , the data processing system 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0153] The processing component 502 generally controls the overall operation of the data processing system 500. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0154] Memory 504 is configured to store various types of data to support the operation of data processing system 500. Examples of such data include instructions for any application or method operating on data processing system 500, such as text, pictures, videos, etc. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0155] Power component 506 provides power to various components of data processing system 500. Power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to onboard control system 500.
[0156] The multimedia component 508 includes a screen that provides an output interface between the data processing system 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 may also include a front camera and / or a rear camera. When the data processing system 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0157] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the data processing system 500 is in an operation mode, such as an alarm mode, a recording mode, a voice recognition mode, and a voice output mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0158] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0159] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the data processing system 500. For example, the sensor assembly 514 may include a sound sensor. In addition, the sensor assembly 514 may detect the open / closed state of the data processing system 500, the relative positioning of components, such as the display and keypad of the data processing system 500, and the sensor assembly 514 may also detect the operating state of the data processing system 500 or a component of the data processing system 500, such as the operating state of the air distribution plate, the structural state, the operating state of the discharge scraper, etc., the orientation or acceleration / deceleration of the data processing system 500 and the temperature change of the data processing system 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, a material stack thickness sensor or a temperature sensor.
[0160] The communication component 516 is configured to enable the data processing system 500 to provide the ability to communicate with other devices and cloud platforms in a wired or wireless manner. The data processing system 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0161] In an exemplary embodiment, the data processing system 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the data processing methods described in any of the above embodiments.
[0162] The present application also provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor corresponding to a data processing system, the data processing system can implement the data processing method recorded in any of the above embodiments.
[0163] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0164] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0165] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a manner such that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, the instruction device being implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0167] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data processing method, characterized in that: include: When a data processing request corresponding to a preset program in the virtual machine is obtained, the data processing request is stored in a preset request queue of the virtual machine; Reading a preset request queue of the virtual machine through an embedded memory driver to obtain the data processing request; The data processing request is sent to the embedded memory, so that the embedded memory responds to the data processing request.
2. The method according to claim 1, characterized in that The process of obtaining the data processing request is as follows: When it is detected that new data is generated by the preset program running in the virtual machine, a data processing request corresponding to the preset program is generated, wherein the data processing request corresponding to the preset program is used to request storage of the new data generated in the preset program; or A data processing request sent by a preset program running in the virtual machine is received.
3. The method according to claim 1, characterized in that The data processing request sent by the preset program is used to request access to a block device, and storing the data processing request in a preset request queue of the virtual machine includes: When receiving a data processing request sent by a preset program in the virtual machine, converting the type of the data processing request into a data processing request for accessing the embedded memory; The converted data processing request is stored in a preset request queue of the virtual machine.
4. The method according to claim 1, characterized in that The step of reading a preset request queue of the virtual machine through an embedded memory driver to obtain the data processing request includes: When detecting that a data processing request is stored in a preset request queue of the virtual machine, obtaining a state of an embedded memory driver; When the embedded memory driver is in an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue.
5. The method according to claim 4, characterized in that Also includes: When the embedded memory is driven to a busy state, monitoring the state of the embedded memory; When it is monitored that the embedded memory changes from a busy state to an idle state, the preset request queue of the virtual machine is read through the embedded memory driver to obtain the data processing request at the head of the preset request queue.
6. The method according to claim 1, characterized in that Also includes: When the embedded memory completes the response to the data processing request, controlling the embedded memory to feed back a response result to the embedded memory driver, wherein the response result includes a response success result or a response failure result; The embedded memory driver is controlled to feed back the response result to a preset program in the virtual machine.
7. The method according to claim 6, characterized in that The controlling the embedded memory driver to feed back the storage result to a preset program in the virtual machine includes: Sending the response result to a virtual block device driver through the embedded memory driver; Sending the response result to the file system through the virtual block device driver; The response result is fed back to a preset program in the virtual machine through the file system.
8. A data processing device, characterized in that: include: A storage module, configured to store a data processing request corresponding to a preset program in a virtual machine in a preset request queue of the virtual machine when obtaining the data processing request; An acquisition module, configured to read a preset request queue of the virtual machine through an embedded memory driver to acquire the data processing request; The sending module is used to send the data processing request to the embedded memory, so that the embedded memory responds to the data processing request.
9. A data processing system, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to implement the data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor corresponding to the data processing system, the data processing system can implement the data processing method as described in any one of claims 1 to 7.