Program processing method and device, equipment and storage medium
By using ARM64 chips and Qemu technology for instruction set conversion in the cloud desktop system, the problem that the cloud desktop system cannot directly support Windows applications has been solved. This enables the running of x86 architecture Windows applications on an ARM64 architecture Linux system, thus expanding the application ecosystem.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2022-01-07
- Publication Date
- 2026-06-05
AI Technical Summary
Existing cloud desktop systems cannot directly support Windows applications, especially since the chip architecture of the backend servers cannot directly support the x86 instruction set, which limits the application ecosystem.
The backend server is built using an ARM64 chip and ARM64 instruction set. It combines Wine technology to simulate a Windows operating system environment and uses Qemu technology for instruction set conversion to achieve the conversion from x86 instruction set to ARM64 instruction set, enabling Windows applications to run on Linux systems with ARM64 architecture.
It enables Windows applications to run on heterogeneous frameworks, expands the application ecosystem of cloud desktop systems, and supports access to more types of applications on mobile devices and mobile office.
Smart Images

Figure CN114416179B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to operating environment simulation technology and cloud service technology. Background Technology
[0002] With the development of cloud service technology, a cloud desktop service model has emerged. Also known as desktop virtualization or cloud PCs, cloud desktops are a new alternative to traditional computers. By adopting a cloud desktop, users no longer need to purchase a physical computer. The CPU, memory, hard drive, and other components of the physical computer are all virtualized on a backend server. After installing the cloud desktop client, users access the virtual machine on the backend server through a unique communication protocol to achieve interactive operation, achieving the same experience as using a physical computer. Furthermore, cloud desktops not only replace traditional computers but also support access via the internet from other smart devices such as mobile phones and tablets, making them the latest solution for mobile office work.
[0003] Currently, the most commonly used operating system is Windows, and a large number of applications are also Windows programs. However, the chip architecture of backend servers may not directly support Windows applications, or may even use a different chip architecture instruction set.
[0004] Therefore, a solution is needed to optimize the application ecosystem of cloud desktop systems and support more types of applications. Summary of the Invention
[0005] This disclosure provides a program processing method, apparatus, device, and storage medium to enable the execution of applications based on heterogeneous frameworks.
[0006] According to one aspect of this disclosure, a process processing method is provided, comprising:
[0007] The slave component program obtains and processes the application component call request of the application, and generates a slave component call request; wherein the application and application component are implemented based on a first operating system supported by a first architecture instruction set;
[0008] The instruction translation engine obtains the slave component call request and converts it into a master component call request; wherein the master component is implemented based on a first operating system supported by the second architecture instruction set;
[0009] The host component program obtains and processes the host component call request, and generates a first instruction execution request of the first operating system;
[0010] The operating system virtual program obtains the first instruction execution request, converts it into a second instruction execution request of the second operating system supported by the second architecture instruction set, and processes it.
[0011] According to another aspect of this disclosure, a program processing apparatus is also provided, comprising:
[0012] The first call request generation module is used to obtain and process application component call requests from the application program and generate slave component call requests; wherein the application program and application components are implemented based on a first operating system supported by a first architecture instruction set;
[0013] The call request conversion module is used by the instruction conversion engine to obtain the slave component call request and convert the slave component call request into a host component call request; wherein, the host component is implemented based on a first operating system supported by the second architecture instruction set;
[0014] The request processing module is used by the host component program to obtain and process the host component call request, and to generate a first instruction execution request of the first operating system.
[0015] The execution request acquisition module is used to acquire the first instruction execution request from the operating system virtual program, convert it into a second instruction execution request of the second operating system supported by the second architecture instruction set, and process it.
[0016] According to another aspect of this disclosure, an electronic device is also provided, comprising:
[0017] At least one processor; and
[0018] A memory that is communicatively connected to at least one processor; wherein,
[0019] The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform any of the program processing methods provided in the embodiments of this disclosure.
[0020] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause a computer to execute any of the program processing methods provided in the embodiments of this disclosure.
[0021] According to another aspect of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements any of the program processing methods provided in the embodiments of this disclosure.
[0022] According to the technology disclosed herein, application execution on a heterogeneous framework is achieved through instruction conversion of component call requests.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0024] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0025] Figure 1A This is a schematic diagram of the software architecture of the backend server applicable to the embodiments of this disclosure;
[0026] Figure 1B This is a schematic diagram of a program processing method provided according to an embodiment of the present disclosure;
[0027] Figure 2 This is a schematic diagram of a program processing method provided according to an embodiment of the present disclosure;
[0028] Figure 3 This is a schematic diagram of a program processing apparatus provided according to an embodiment of the present disclosure;
[0029] Figure 4 This is a block diagram of an electronic device used to implement the program processing method of the embodiments of this disclosure. Detailed Implementation
[0030] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0031] In this embodiment, an ARM64 chip can be used to implement the backend server, correspondingly employing the ARM64 instruction set, and a Linux desktop system can be loaded. When the cloud desktop supports applications developed based on the Windows system, these can be called Windows applications, and Wine technology can be used to simulate the Windows operating system environment to support Windows applications. Many Windows applications are developed based on the x86 instruction set. To enable x86 instruction-supported Windows applications to run on a Linux system supported by the ARM instruction set, this embodiment further employs Qemu technology for instruction set conversion. Figure 1AThe diagram illustrates the software architecture of the backend server applicable to embodiments of this disclosure. The backend server's software architecture comprises two parts: an x86 support component and an ARM support component. ARM support is typically achieved using an ARM64 chip and its corresponding instruction set.
[0032] like Figure 1A As shown, x86 support includes applications (exe files) developed based on the x86 instruction set, and further includes application component programs, non-core slave component programs, and core slave component programs. Components can be dynamic link libraries (DLLs). Application component programs, also known as application DLLs, include the DLLs called by the application and support processing of these DLLs; non-core slave component programs, also known as guest DLLs, include all non-core Windows DLLs and support processing of these DLLs; core slave component programs, also known as guest QEMU DLLs, include all core Windows DLLs and support processing of these core DLLs. Core DLLs generally consist of the most commonly used and basic functional DLLs in the Windows system, while the remaining DLLs are non-core DLLs. Application-included DLLs are DLLs developed by the application developers based on the Windows system. The scope of core DLLs and non-core DLLs can be defined based on requirements.
[0033] like Figure 1A As shown, the ARM64 support components include the QEMU userspace program, the Wine host component program (host Wine DLLs), the QEMU host component program (host QEMU DLLs), and the Wine host loader. The QEMU userspace program is the instruction translation engine, primarily used for instruction translation. The QEMU host component program calls the Wine host component program, and the QEMU host component program corresponds to the core slave component program (guest QEMU DLLs). The Wine host loader is used to virtualize an ARM64-based Windows system environment on an ARM64-based Linux system, thereby supporting the calling and execution of other instruction-translated DLLs.
[0034] The program processing methods and apparatuses provided in this disclosure are typically applicable to application scenarios where x86-based Windows applications run on an ARM64-based Linux system. The program processing methods provided in this disclosure can be executed by a program processing apparatus, which can be implemented in software and / or hardware and specifically configured in an electronic device. This electronic device can be a program processing device or other computing devices associated with the program processing device.
[0035] For ease of understanding, the following will first provide a detailed description of the procedure processing method provided in this disclosure.
[0036] See Figure 1B The program processing method shown includes:
[0037] S110. The slave component program obtains and processes the application component call request of the application, and generates a slave component call request.
[0038] The applications and application components are implemented based on a first operating system supported by a first architecture instruction set.
[0039] The operation of an application includes the main program's execution, which involves code execution and the invocation of pre-defined components. Components can be provided by the operating system or typically developed and configured by the application's developers. Therefore, the operation of an application usually generates a series of requests for calls to application components.
[0040] The slave component program can include application components, and it can process application component call requests from the application; specifically, the slave component program can intercept, invoke, and transform application component call requests. After intercepting, invoking, and transforming the application component call requests, the slave component program generates a slave component call request.
[0041] An application component invocation request can be a request initiated by an application to invoke an application component. Both the application and the application component can be implemented on a first operating system supported by a first architecture instruction set. The first architecture instruction set can be the x86 instruction set, and the first operating system can be a Windows system. For example, the application can be any Windows application developed and implemented based on the x86 instruction set; the application component can be at least one DLL corresponding to the application, for example, an application component can be a DLL corresponding to a Windows application supported by the x86 instruction set.
[0042] S120: The instruction conversion engine obtains the slave component call request and converts the slave component call request into the master component call request.
[0043] The host component is implemented based on a first operating system supported by a second architecture instruction set.
[0044] The instruction translation engine can be a program capable of converting between different instruction sets. For example, the instruction translation engine can be implemented based on QEMU technology.
[0045] For example, the instruction translation engine can convert the acquired slave component call request into a master component call request. The master component is implemented based on a first operating system supported by a second architecture instruction set. For example, the second architecture instruction set could be the ARM64 instruction set, and the first operating system could be a Windows system. The slave component is implemented based on a first operating system supported by the first architecture instruction set. For example, the first architecture instruction set could be the x86 instruction set. Accordingly, the instruction translation engine can be a translation engine capable of converting the x86 instruction set to the ARM64 instruction set.
[0046] It's worth noting that before the instruction translation engine receives a request from a slave component, it can also perform process initialization to configure the environment required for executing translation instructions. This process initialization can be performed each time an application is executed. For example, in a cloud desktop scenario, multiple applications can be installed on the cloud desktop. When any application starts running, the instruction translation engine's process can be initialized. After the process starts, the application can execute its corresponding tasks. These tasks are executed using threads, and when threads execute, there's no need to re-initialize the instruction translation engine's process.
[0047] In an optional embodiment, the process initialization process includes: initializing the virtual CPU parameters supported by the first architecture instruction set; initializing the conversion relationship between the first architecture instruction set and the second architecture instruction set; allocating process environment blocks and runtime parameters to the slave component program; allocating data structures and register structures to the virtual CPU of the instruction translation engine; allocating thread environment blocks, thread stacks, and runtime parameters to the slave component program, and binding the slave component program to the registers of the virtual CPU; setting a general filter for unhandled process exceptions; reading the application's file header, and registering and loading the list of dependent components in the slave component program and the host component program according to the list of dependent components in the file header; and reading the application execution entry address in the file header.
[0048] Virtual CPU parameters may include at least one of the following: clock speed, cores, threads, cache, and architecture. The conversion relationship between the first and second architecture instruction sets can be pre-defined by relevant technical personnel. For example, the conversion relationship can be a mapping relationship between the first and second architecture instruction sets, specifically including the function mapping relationships corresponding to the first and second architecture instruction sets respectively.
[0049] Optionally, the instruction translation engine is implemented based on QEMU technology. Correspondingly, the conversion relationship between the first and second architecture instruction sets can be achieved through the QEMU dynamic translation mechanism. Specifically, the first architecture instruction set is the x86 instruction set, and the second architecture instruction set is the ARM64 instruction set. The QEMU dynamic translation mechanism can translate x86 instructions into equivalent ARM64 instructions in real time.
[0050] The data structure allocated to the virtual CPU of the instruction translation engine can be an array, linked list, tree, or graph, etc.; correspondingly, the register structure can include general-purpose registers or status registers, and different registers can correspond to different functions. Specifically, different types of data structures can be stored using registers with different structures.
[0051] The program allocates thread environment blocks, thread stacks, and runtime parameters for the slave component program and binds the slave component program to the registers of the virtual CPU. Specifically, allocating thread stacks can involve allocating corresponding memory space for different slave component programs, i.e., allocating corresponding thread stacks. The instructions corresponding to the slave component call requests generated by different slave component programs are stored in the thread stacks corresponding to the slave component programs for easy retrieval of instructions later.
[0052] The slave component call request may include the application's file header, which may contain a list of dependent components, including application components associated with the application. The slave and master component programs register and load the list of dependent components; the application execution entry address is read from the file header. Each application may correspond to one execution entry address, representing the first x86 instruction executed.
[0053] For example, the instruction translation engine can identify the x86 instruction set based on the file header, query the corresponding functions for the x86 and ARM64 instruction sets according to the pre-set conversion relationship between the x86 and ARM64 instruction sets, and perform corresponding transformations on the preset adjustment parameters. For example, the adjustment parameters may include at least one of instruction name, instruction type, and data structure. This optional embodiment configures the environment required to execute the translation instructions by initializing the instruction translation engine process.
[0054] S130, The host component program obtains and processes the host component call request, and generates the first instruction execution request of the first operating system.
[0055] The host component program may include host components, and the host component program can intercept, invoke, and transform host component call requests. The host component may be a DLL supported by the first operating system, which may be a Windows system.
[0056] For example, the host component program can intercept host component call requests and then invoke and process the intercepted requests. Specifically, the host component program can obtain the memory address and data structure of the request parameters based on the host component call request, perform 32-bit / 64-bit conversion on the obtained request parameters, and process the request parameters and return values. After processing the host component call request, the host component program generates a first instruction execution request for the first operating system. This first instruction execution request may be a request to retrieve instructions from a DLL supported by the first operating system.
[0057] S140: The operating system virtual program obtains the first instruction execution request, converts it into a second instruction execution request of the second operating system supported by the second architecture instruction set, and processes it.
[0058] An operating system virtual program can be a program that loads host components that are supported by host component programs. An operating system virtual program can load the execution environment of a host component program.
[0059] For example, the operating system virtual program obtains a first instruction execution request and transforms it to obtain a second instruction execution request from a second operating system supported by a second architecture instruction set. The second architecture instruction set can be the ARM64 instruction set, and the second operating system can be a Linux system. The second instruction execution request can be a request to retrieve instructions from a DLL supported by the second operating system. The operating system virtual program can then process and respond to the second instruction execution request.
[0060] This embodiment of the disclosure obtains and processes application component call requests from a slave component program to generate a slave component call request; an instruction translation engine obtains the slave component call request and converts it into a host component call request; a host component program obtains and processes the host component call request, generating a first instruction execution request for a first operating system; and an operating system virtual program obtains the first instruction execution request, converts it into a second instruction execution request for a second operating system supported by a second architecture instruction set, and processes it. This scheme, through the instruction translation engine, converts slave component call requests into host component call requests, achieving mutual conversion between different architecture instruction sets. This enables applications developed based on the first architecture instruction set under the first operating system to run on a second operating system supported by the second architecture instruction set.
[0061] Based on the above technical solutions, this disclosure also provides an optional embodiment. In this optional embodiment, the program processing method is added. For parts not described in detail in this embodiment, please refer to the descriptions in the foregoing embodiments, which will not be repeated here.
[0062] In this optional embodiment, the instruction translation engine is implemented based on QEMU technology; the slave component program includes a QEMU slave component program, and the master component program includes a QEMU master component program. The operating system virtual program is implemented based on Wine technology; the slave component program further includes a Wine slave component program, and the master component program includes a Wine master component program; the QEMU slave component program includes a first operating system core component library; the Wine slave component program includes a first operating system non-core component library.
[0063] See Figure 2 A program processing method includes:
[0064] S210, the qemu slave component program obtains the application component call request of the application. If the application component call request includes a variable parameter list, the qemu slave component program converts the variable parameter list into a fixed data structure and generates a slave component call request.
[0065] The applications and application components are implemented based on a first operating system supported by a first architecture instruction set.
[0066] Before the QEMU slave component program obtains the application's application component call request, all parameters are pre-packaged and a variable parameter list is generated. When the QEMU slave component program obtains the application's application component call request, if the application component call request includes parameters from the variable parameter list, the QEMU slave component program converts the variable parameter list into a fixed data structure and generates a slave component call request. The fixed data structure can be pre-defined by relevant technical personnel; for example, the fixed data structure can be an array of a preset length, with the meaning of each parameter in the array predetermined.
[0067] For example, the first architecture instruction set is the x86 instruction set. The QEMU slave component program can invoke assembly instructions of the x86 instruction set according to the application component call request, and pass in the system call sequence number and parameter packet address to generate a slave component call request. The system call sequence number and parameter packet address specify the system to be called and the parameters required for the call.
[0068] S220, the wine slave component program obtains and processes non-core component call requests from the application, and generates core component call requests and / or slave component call requests.
[0069] Non-core components can be infrequently used application components implemented based on the first operating system. The wine slave component program can include the non-core component library of the first operating system.
[0070] Non-core component call requests can be initiated by the application to the Wine slave component program and processed by the Wine slave component program. The Wine slave component program can generate core component call requests based on non-core component call requests and send them to the QEMU slave component program, which then processes the core component call requests. Alternatively, the Wine slave component program can directly generate slave component call requests based on non-core component call requests and send them directly to the instruction translation engine, which then processes the slave component call requests.
[0071] The S230 and qemu slave component programs obtain core component call requests and generate corresponding slave component call requests.
[0072] The core components can be basic and commonly used application components implemented based on the first operating system. The QEMU slave component program can include the core component library of the first operating system.
[0073] Core component call requests can be initiated by the application and / or Wine slave component programs, and processed by the QEMU slave component programs. The QEMU slave component programs can generate corresponding slave component call requests based on the core component call requests and send them to the instruction translation engine, which then processes the slave component call requests.
[0074] In an optional embodiment, the application's built-in component program obtains and processes the application's application component call request, and generates a slave component call request; wherein, the application's built-in component is implemented based on a first operating system supported by a first architecture instruction set.
[0075] Application-provided components can process the application's built-in components. These components are implemented on a first operating system supported by a first architecture instruction set; for example, they could be implemented on a Windows system supported by the x86 instruction set.
[0076] For example, the application's built-in component program can obtain and process the application's component call requests, generate slave component call requests, and directly send the slave component call requests to the instruction conversion engine; the application's built-in component program can also generate non-core component call requests based on the application and send the non-core component call requests to the Wine slave component program for processing; the application's built-in component program can also generate core component call requests based on the application and send the core component call requests to the QEMU slave component program for processing.
[0077] Optionally, the application can also generate execution instructions directly during execution and send them directly to the instruction conversion engine, without needing to be processed by the application's own component program, Wine slave component program, or QEMU slave component program.
[0078] This optional embodiment obtains and processes the application component call requests of the application through the application's built-in component program, and generates slave component call requests. It realizes the processing of custom application component call requests implemented by the first operating system supported by the first architecture instruction set. It comprehensively considers the acquisition and processing of application component call requests of the application under various conditions, and improves the comprehensiveness of processing application component call requests of the application.
[0079] It should be noted that the execution order of S210, S220, and S230 can be parallel or sequential. This embodiment does not restrict the execution order of S210, S220, and S230.
[0080] S240, the instruction translation engine obtains the slave component call request and translates the slave component call request into the master component call request; wherein, the master component is implemented based on the first operating system supported by the second architecture instruction set.
[0081] S250 and qemu host component programs obtain host component call requests, call wine host component programs according to host component call requests and process them, generating the first instruction execution request of the first operating system.
[0082] For example, the QEMU host component program can support host component invocation requests sent by the QEMU slave component program and converted by the instruction translation engine. The Wine host component program can support the conversion between homogeneous instructions; the Wine host component program can support DLLs of all first operating systems developed based on the second architecture instruction set. Specifically, the Wine host component program can process host component invocation requests and generate first instruction execution requests based on the Windows operating system.
[0083] S260: The operating system virtual program obtains the first instruction execution request, converts it into a second instruction execution request of the second operating system supported by the second architecture instruction set, and processes it.
[0084] This optional embodiment obtains application component call requests from the application through the QEMU slave component program; the Wine slave component program obtains and processes non-core component call requests from the application, generating core component call requests and / or slave component call requests; the QEMU slave component program obtains core component call requests and generates corresponding slave component call requests; the instruction translation engine obtains slave component call requests and converts them into host component call requests; the QEMU host component program obtains host component call requests, calls the Wine host component program according to the host component call requests, processes them, and generates a first instruction execution request for the first operating system. The above scheme implements the processing of application component call requests and / or core component call requests through the QEMU slave component program; it also implements the processing of non-core component call requests through the Wine slave component program. The conversion and processing of host component call requests are achieved through the QEMU host component program and the Wine host component program, thereby enabling the running of applications developed under the first operating system based on the first architecture instruction set within the second operating system supported by the second architecture instruction set.
[0085] Figure 3 This is a schematic diagram of a program processing device according to an embodiment of the present disclosure. This embodiment is applicable to situations where x86 architecture Windows applications run on an ARM64 architecture Linux system. The device is configured in an electronic device and can implement the program processing method described in any embodiment of the present disclosure. (Reference) Figure 3 The program processing device 300 specifically includes the following:
[0086] The first call request generation module 301 is used to obtain and process the application component call request of the application program, and generate a slave component call request; wherein the application program and the application component are implemented based on a first operating system supported by a first architecture instruction set;
[0087] The call request conversion module 302 is used by the instruction conversion engine to obtain the slave component call request and convert the slave component call request into a host component call request; wherein the host component is implemented based on a first operating system supported by a second architecture instruction set;
[0088] The request processing module 303 is used for the host component program to obtain and process the host component call request, and to generate a first instruction execution request of the first operating system.
[0089] The execution request acquisition module 304 is used for the operating system virtual program to acquire the first instruction execution request, convert it into a second instruction execution request of the second operating system supported by the second architecture instruction set, and process it.
[0090] This embodiment of the disclosure obtains and processes application component call requests from a slave component program to generate a slave component call request; an instruction translation engine obtains the slave component call request and converts it into a host component call request; a host component program obtains and processes the host component call request, generating a first instruction execution request for a first operating system; and an operating system virtual program obtains the first instruction execution request, converts it into a second instruction execution request for a second operating system supported by a second architecture instruction set, and processes it. This scheme, through the instruction translation engine, converts slave component call requests into host component call requests, achieving mutual conversion between different architecture instruction sets. This enables applications developed based on the first architecture instruction set under the first operating system to run on a second operating system supported by the second architecture instruction set.
[0091] In one alternative implementation, the first architecture instruction set is the x86 instruction set, and the second architecture instruction set is the ARM64 instruction set; the first operating system is a Windows system, and the second operating system is a Linux system.
[0092] In one optional implementation, the instruction translation engine is implemented based on QEMU technology; the slave component program includes a QEMU slave component program, and the master component program includes a QEMU master component program.
[0093] In one optional implementation, the operating system virtual program is implemented based on Wine technology; the slave component program further includes a Wine slave component program, and the host component program includes a Wine host component program; the QEMU slave component program includes a first operating system core component library; the Wine slave component program includes a first operating system non-core component library.
[0094] In one alternative embodiment, the device further includes:
[0095] The second call request generation module is used to obtain and process the application component call requests of the application, and generate slave component call requests; wherein, the application component is implemented based on the first operating system supported by the first architecture instruction set.
[0096] In one optional implementation, the apparatus further includes a process initialization module;
[0097] The process initialization module includes:
[0098] The first initialization unit is used to initialize the virtual CPU parameters supported by the first architecture instruction set;
[0099] The second initialization unit is used to initialize the conversion relationship between the first architecture instruction set and the second architecture instruction set.
[0100] The parameter allocation unit is used to allocate process environment blocks and runtime parameters to slave component programs;
[0101] The structure allocation unit is used to allocate data structures and register structures to the virtual CPU of the instruction translation engine;
[0102] The register binding unit is used to allocate thread environment blocks, thread stacks and runtime parameters to the slave component program, and bind the slave component program to the registers of the virtual CPU;
[0103] The process setting unit is used to set the overall filter for unhandled process exceptions;
[0104] The file header reading unit is used to read the file header of the application and register the list of dependent components in the slave component program and the host component program according to the list of dependent components in the file header.
[0105] The address reading unit is used to read the application execution entry address in the file header.
[0106] In one optional implementation, the first call request generating module includes:
[0107] The first call request generation unit is used by the qemu slave component program to obtain the application component call request of the application.
[0108] The second call request generation unit is used to convert the variable parameter list into a fixed data structure and generate a slave component call request if the application component call request includes a variable parameter list.
[0109] In one optional implementation, the first call request generating module includes:
[0110] The third call request generation unit is used by the Wine slave component program to obtain and process non-core component call requests of the application, and generate core component call requests and / or slave component call requests.
[0111] The fourth call request generation unit is used by the qemu slave component program to obtain the core component call request and generate the corresponding slave component call request.
[0112] In one optional implementation, the call request processing module includes:
[0113] The execution request generation unit is used for the qemu host component program to obtain the host component call request, call the wine host component program according to the host component call request and process it, and generate a first instruction execution request of the first operating system.
[0114] The program processing apparatus provided by the technical solutions of this disclosure can execute the program processing methods provided by any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing program processing methods.
[0115] The technical solutions disclosed herein, including the acquisition and processing of application component call requests, comply with relevant laws and regulations and do not violate public order and good morals.
[0116] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0117] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0118] like Figure 4 As shown, device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 402 or a computer program loaded from storage unit 408 into random access memory (RAM) 403. RAM 403 may also store various programs and data required for the operation of device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0119] Multiple components in device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of monitors, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0120] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as program processing methods. For example, in some embodiments, the program processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the program processing method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform program processing methods by any other suitable means (e.g., by means of firmware).
[0121] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0122] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0123] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0124] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0125] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0126] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0127] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0128] Cloud computing refers to a technology system that enables access to a shared pool of physical or virtual resources via a network. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for applications such as artificial intelligence and blockchain, as well as for model training.
[0129] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0130] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A program processing method applied to a backend server, the backend server comprising an x86-supported portion and an ARM-supported portion, wherein, The x86 support component includes applications, application-provided components, and slave components; the method includes: The slave component program obtains and processes the application component call request of the application, and generates a slave component call request; wherein the application and application component are implemented based on a first operating system supported by a first architecture instruction set; The instruction conversion engine obtains the slave component call request and converts it into a master component call request; wherein, the master component is implemented based on a first operating system supported by a second architecture instruction set; the instruction conversion engine is implemented based on QEMU technology; and the slave component program includes a QEMU slave component program. The host component program obtains and processes the host component call request, and generates a first instruction execution request for the first operating system; the host component program includes the qemu host component program; The operating system virtual program obtains the first instruction execution request, converts it into a second instruction execution request supported by the second architecture instruction set of the second operating system, and processes it; the operating system virtual program is implemented based on Wine technology; the slave component program also includes a Wine slave component program, and the host component program includes a Wine host component program; the QEMU slave component program includes a first operating system core component library; the Wine slave component program includes a first operating system non-core component library; The application's built-in component program obtains and processes the application component call requests of the application, and generates slave component call requests; wherein, the application's built-in component is implemented based on the first operating system supported by the first architecture instruction set; The slave component program obtains and processes application component call requests from the application, and generates slave component call requests including: Wine slave component program obtains and processes non-core component call requests from the application, and generates core component call requests and / or slave component call requests; The QEMU slave component program obtains the core component call request and generates the corresponding slave component call request.
2. The method according to claim 1, wherein, The first architecture instruction set is the x86 instruction set, and the second architecture instruction set is the ARM64 instruction set; the first operating system is the Windows system, and the second operating system is the Linux system.
3. The method according to claim 1 or 2 further includes a process initialization process for the instruction translation engine, the process initialization process including: Initialize the virtual CPU parameters supported by the first architecture instruction set; Initialize the conversion relationship between the first and second architecture instruction sets; Allocate process environment blocks and runtime parameters for slave component programs; Allocate data structures and register structures for the virtual CPU of the instruction translation engine; Allocate thread environment blocks, thread stacks, and runtime parameters to the slave component program, and bind the slave component program to the registers of the virtual CPU; Set a general filter for unhandled process exceptions; Read the application's file header and, based on the list of dependent components in the file header, register and load the list of dependent components in the slave component program and the master component program; Read the application execution entry address from the file header.
4. The method according to claim 1, wherein, The slave component program obtains and processes application component call requests from the application, and generates slave component call requests including: The QEMU slave component program obtains the application component call request from the application. If the application component call request includes a variable parameter list, the qemu slave component program converts the variable parameter list into a fixed data structure and generates a slave component call request.
5. The method according to claim 1, wherein, The host component program obtains and processes the host component invocation request, and generates a first instruction execution request for the first operating system, including: The qemu host component program obtains the host component call request, calls the wine host component program according to the host component call request and processes it, generating a first instruction execution request for the first operating system.
6. A program processing apparatus applied to a backend server, the backend server comprising an x86 support portion and an ARM support portion, wherein, The x86 support component includes applications, application-included component programs, and slave component programs. The device includes: The first call request generation module is used to obtain and process application component call requests from the application program and generate slave component call requests; wherein the application program and application components are implemented based on a first operating system supported by a first architecture instruction set; A call request conversion module is used by the instruction conversion engine to obtain the slave component call request and convert the slave component call request into a master component call request; wherein, the master component is implemented based on a first operating system supported by a second architecture instruction set; the instruction conversion engine is implemented based on QEMU technology; and the slave component program includes a QEMU slave component program. A request processing module is invoked, which is used by the host component program to obtain and process the host component invocation request, and to generate a first instruction execution request of the first operating system; the host component program includes the qemu host component program; The execution request acquisition module is used for the operating system virtual program to acquire the first instruction execution request, convert it into a second instruction execution request of the second operating system supported by the second architecture instruction set, and process it; the operating system virtual program is implemented based on Wine technology; the slave component program also includes a Wine slave component program, and the host component program includes a Wine host component program; the QEMU slave component program includes a first operating system core component library; the Wine slave component program includes a first operating system non-core component library; The second call request generation module is used to obtain and process the application component call requests of the application, and generate slave component call requests; wherein, the application component is implemented based on the first operating system supported by the first architecture instruction set; The first call request generation module includes: The third call request generation unit is used by the Wine slave component program to obtain and process non-core component call requests of the application, and generate core component call requests and / or slave component call requests. The fourth call request generation unit is used by the qemu slave component program to obtain the core component call request and generate the corresponding slave component call request.
7. The apparatus according to claim 6, wherein, The first architecture instruction set is the x86 instruction set, and the second architecture instruction set is the ARM64 instruction set; the first operating system is the Windows system, and the second operating system is the Linux system.
8. An electronic device, comprising: 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 to enable the at least one processor to perform the program processing method according to any one of claims 1-5.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the program processing method according to any one of claims 1-5.