CN-122019049-A - Task processing method, computing device, task processing system and storage medium
Abstract
The embodiment of the specification provides a task processing method, which can support a computing device carrying any first operating system and any architecture to realize the call and control of a target peripheral through the interaction of a terminal program and an agent program by utilizing a software architecture comprising the terminal program and the agent program. The complexity of the underlying heterogeneous environment (such as different processor architectures and operating systems) is shielded through the software architectures of the terminal program and the agent program, so that a user can use the target peripheral through the agent program in any processor architecture and any computing device of the first operating system.
Inventors
- TANG TAO
- YU ZHIYONG
- DU YANRONG
- LI ZHIWEI
- LI GEN
Assignees
- 飞腾信息技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251230
Claims (12)
- 1. The task processing method is characterized by being applied to a computing device, wherein the computing device is in communication connection with a target peripheral, the computing device comprises a first operating system and a virtual machine, a terminal program is deployed in the first operating system, the virtual machine comprises a second operating system, an agent program deployed in the second operating system and a driver of the target peripheral, and the virtual machine has control authority of the target peripheral, and the task processing method comprises the following steps: the agent program responds to the task processing request and calls the driving program of the target peripheral equipment so as to execute the target task; Peripheral data corresponding to the target task are transmitted between the agent program and the terminal program through a buffer zone, wherein the buffer zone is a storage space established by the agent program in a virtual address space, and the virtual address space is an address space of a virtual machine manager process of the virtual machine.
- 2. The method of claim 1, wherein the task processing request comprises a first task request, the task processing method further comprising: The terminal program detects a first task operation, writes first peripheral data corresponding to the first task operation into the buffer area, and sends the first task request to the agent program; the agent program calling a driver of the target peripheral device in response to a task processing request to execute a target task includes: The agent program responds to the first task request and executes a first operation, wherein the first operation comprises the steps of reading the first peripheral data from the buffer area, and calling a driver of the target peripheral to instruct the target peripheral to execute the first task according to the first peripheral data.
- 3. The method of claim 2, wherein the computing device further comprises a destination register; The terminal program sending the first task request to the agent program includes: The terminal program writes metadata of the first task request into the target register, and requests the virtual machine manager to inject first target instructions into the agent program, wherein the first target instructions comprise instructions which do not change the state of a processor of the computing device after being executed; the agent performing a first operation in response to the first task request includes: The agent, in response to the first target instruction, performs the first operation based on metadata of a first task request in the target register.
- 4. The method of claim 1, wherein the task processing request comprises a second task request, the task processing method further comprising: The agent program detects a second task operation and invokes a driver of the target peripheral to receive second external data corresponding to the second task operation; the agent program writes the second external data into the buffer area and sends a second task request to the terminal program through the virtual machine manager; And the terminal program responds to the second task request and executes a second operation, wherein the second operation comprises the steps of reading the second external data from the buffer area and obtaining a file corresponding to the second task request based on the second external data.
- 5. The method of claim 4, wherein the computing device further comprises a destination register, wherein the agent sending a second task request to the terminal program through the virtual machine manager comprises: the agent program writes metadata of the second task request into the target register and executes a second target instruction; The virtual machine manager detects that the second target instruction is executed and sends the second task request to the terminal program; The terminal program responding to the second task request, and executing the second operation comprises the following steps: the terminal program performs the second operation based on metadata of the second task request in the target register in response to the second task request.
- 6. The method according to any one of claims 1 to 5, wherein the task processing method further comprises: the agent program receives state information returned by a driver of the target peripheral, wherein the state information is used for representing at least one of the current state of the target peripheral and the execution state information of the target task; the agent program returns the state information to the terminal program through the virtual machine manager; and updating information displayed in a target interface by the terminal program based on the state information, wherein the target interface comprises a man-machine interaction interface provided by the first operating system.
- 7. The method of claim 6, wherein the computing device further comprises a destination register, wherein the agent returning the status information to the terminal program via the virtual machine manager comprises: The agent writing metadata of a status update request and the status information to the target register, executing a third target instruction, the third target instruction comprising instructions that, when executed, do not change a processor state of the computing device; The virtual machine manager detects that the third target instruction is executed and notifies the terminal program to execute the state update request; The terminal program updating information displayed in the target interface based on the state information includes: And the terminal program responds to the state update request, reads the state information from the target register based on metadata of the state update request, and updates information displayed in a target interface according to the state information.
- 8. The method of any of claims 1-5, wherein the target peripheral device comprises at least one of a print function and a scan function, and the target task comprises at least one of a print task and a scan task.
- 9. The computing device is characterized in that the computing device establishes communication connection with a target peripheral, the computing device comprises a first operating system and a virtual machine, a terminal program is deployed in the first operating system, the virtual machine comprises a second operating system, an agent program deployed in the second operating system and a driver of the target peripheral, and the virtual machine has control authority of the target peripheral, wherein: The agent is configured to call a driver of the target peripheral device to execute a target task in response to a task processing request; Peripheral data corresponding to the target task are transmitted between the agent program and the terminal program through a buffer zone, wherein the buffer zone is a storage space established by the agent program in a virtual address space, and the virtual address space is an address space of a virtual machine manager process of the virtual machine.
- 10. A task processing system comprising a computing device and a target peripheral, the computing device being the computing device of claim 9.
- 11. A storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the task processing method according to any one of claims 1 to 8.
- 12. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, implements the task processing method according to any one of claims 1 to 8.
Description
Task processing method, computing device, task processing system and storage medium Technical Field The present disclosure relates to the field of computer applications, and more particularly, to a task processing method, a computing device, a task processing system, and a storage medium. Background To implement additional functionality, a computing device may typically connect to a peripheral device to extend text processing and related functionality. Taking a printer, a scanner or a multifunctional integrated machine (Multifunction Printer, MFP) integrating functions of printing, copying, scanning, faxing and the like as an example, the normal operation of these peripheral devices is not separated from the close fit of the driver. Currently, manufacturers of these peripheral devices still mainly develop drivers adapted to Windows systems under the x86 architecture, which results in very limited use scenarios of these peripheral devices. Disclosure of Invention The embodiment of the specification provides a task processing method, a computing device, a task processing system and a storage medium, so as to realize the purpose of meeting the requirement of using peripheral equipment in any processor architecture and any operating system computing device, and further realize the purpose of expanding the use scene of the peripheral equipment. In order to achieve the technical purpose, the embodiment of the specification provides the following technical scheme: In a first aspect, an embodiment of the present disclosure provides a task processing method, applied to a computing device, where the computing device establishes a communication connection with a target peripheral, the computing device includes a first operating system and a virtual machine, a terminal program is deployed in the first operating system, the virtual machine includes a second operating system, and an agent program deployed in the second operating system and a driver of the target peripheral, and the virtual machine has control authority of the target peripheral, where the task processing method includes: the agent program responds to the task processing request and calls the driving program of the target peripheral equipment so as to execute the target task; Peripheral data corresponding to the target task are transmitted between the agent program and the terminal program through a buffer zone, wherein the buffer zone is a storage space established by the agent program in a virtual address space, and the virtual address space is an address space of a virtual machine manager process of the virtual machine. In a second aspect, an embodiment of the present specification further provides a computing device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the task processing method as described above when executing the computer program. In a third aspect, one embodiment of the present specification further provides a task processing system, including a computing device and a target peripheral, where the computing device is any one of the above computing devices. In a fourth aspect, an embodiment of the present specification further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the task processing method as described above. In a fifth aspect, embodiments of the present disclosure provide a computer program product or a computer program, where the computer program product includes a computer program stored in a computer readable storage medium, and a processor of the computer device reads the computer program from the computer readable storage medium, and the processor implements the steps of the task processing method when executing the computer program. Alternatively, the computer program may be stored on a readable storage medium or a cloud of a computer device, from which the processor of the computer device reads the computer program. As can be seen from the above technical solutions, the task processing method provided in the embodiments of the present application is applied to a computing device that establishes a communication connection with a target device, where the computing device includes a first operating system and a virtual machine, where a terminal program is disposed in the first operating system, and the virtual machine includes a second operating system, an agent program disposed in the second operating system, and a driver program of the target peripheral device, where the first operating system may be different from the second operating system, and the virtual machine has control authority of the target peripheral device, and when the task processing method is implemented, the agent program responds to a task processing request by using the agent program to call the driver program of the target peripheral device to execute a target task, and periphera