CN114416199B - Windows program running method and device, electronic equipment and storage medium - Google Patents
Windows program running method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114416199B CN114416199B CN202210016353.5A CN202210016353A CN114416199B CN 114416199 B CN114416199 B CN 114416199B CN 202210016353 A CN202210016353 A CN 202210016353A CN 114416199 B CN114416199 B CN 114416199B
- Authority
- CN
- China
- Prior art keywords
- bits
- windows program
- bit
- address
- windows
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000006243 chemical reaction Methods 0.000 claims description 15
- 238000013507 mapping Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000011017 operating method Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a method and a device for operating a Windows program, electronic equipment and a storage medium, and relates to the technical field of computers, in particular to a chip technology. The specific implementation scheme is as follows: when the to-be-operated Windows program calls the Host Wine library, judging that the number of bits of the to-be-operated Windows program is a first number of bits or a second number of bits; if the number of bits of the Windows program to be run is the first number of bits, converting the address of the Windows program to be run into the address of the second number of bits; converting the parameter type of the Windows program to be run into the parameter type of the second bit data; running a Windows program on the ARM chip server based on the address of the second bit number and the parameter type of the second bit number; wherein the first number of bits is 32 bits; the second number of bits is 64 bits. The embodiment of the application can realize the operation of Windows program by the Host wine+Qemu technology on the Linux system of the 64-bit ARM chip.
Description
Technical Field
The disclosure relates to the technical field of computers, and further relates to chip technology, in particular to a method and a device for operating a Windows program, electronic equipment and a storage medium.
Background
When the program is executed, the data type length and addressing space of the 32-bit and 64-bit Windows program are different, for example: the pointer in a 32-bit system is 4 bytes, while the pointer in a 64-bit system is 8 bytes; the addressing space of a 32-bit system is to the power of 2, i.e. 4GB, while the addressing space of a 64-bit system is to the power of 2, i.e. 8GB.
Current Windows programs have both 32-bit and 64-bit programs, which require instruction execution by Qemu to ARM 64-bit conversion. So that it is not compatible with 32-bit and 64-bit Windows programs on existing 64-bit ARM chip servers.
Disclosure of Invention
The disclosure provides a method and a device for operating a Windows program, electronic equipment and a storage medium.
In a first aspect, the present application provides a method for operating a Windows program, where the method includes:
when a to-be-operated Windows program calls a Host Wine library, judging that the number of bits of the to-be-operated Windows program is a first number of bits or a second number of bits;
if the number of bits of the Windows program to be operated is the first number of bits, converting the address of the Windows program to be operated into the address of the second number of bits; converting the parameter type of the Windows program to be run into the parameter type of the second bit data;
running the Windows program on an ARM chip server based on the address of the second bit number and the parameter type of the second bit number; wherein the first number of bits is 32 bits; the second number of bits is 64 bits.
In a second aspect, the present application provides an operating device for a Windows program, where the device includes: the device comprises a judging module, a converting module and an operating module; wherein,,
the judging module is used for judging that the number of bits of the Windows program to be operated is a first number of bits or a second number of bits when the Windows program to be operated calls a Host Wine library;
the conversion module is configured to convert an address of the Windows program to be executed into an address of the second bit number if the number of bits of the Windows program to be executed is the first number of bits; converting the parameter type of the Windows program to be run into the parameter type of the second bit data;
the running module is used for running the Windows program on the ARM chip server based on the address of the second bit number and the parameter type of the second bit number; wherein the first number of bits is 32 bits; the second number of bits is 64 bits.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for operating a Windows program according to any embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a storage medium having stored thereon a computer program, which when executed by a processor, implements the method for operating a Windows program according to any embodiment of the present application.
The technology solves the technical problems that the prior art Windows program has 32-bit and 64-bit programs, the program needs to be converted into ARM 64-bit instructions through Qemu for execution, and the prior 64-bit ARM chip server cannot be compatible with the 32-bit and 64-bit Windows program. The technical scheme provided by the application can realize the running of Windows program by the Host wine+Qemu technology on a Linux system of a 64-bit ARM chip.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a first flow chart of a method for operating a Windows program according to an embodiment of the present application;
FIG. 2 is a second flow chart of the operating method of the Windows program according to the embodiment of the present application;
FIG. 3 is a third flow chart of the operating method of the Windows program according to the embodiment of the present application;
FIG. 4 is a schematic structural diagram of a Linux system with a 64-bit ARM chip according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an operating device of a Windows program according to an embodiment of the present application;
fig. 6 is a block diagram of an electronic device for implementing an operation method of a Windows program according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example 1
Fig. 1 is a schematic flow chart of a first procedure of an operating method of a Windows program according to an embodiment of the present application, where the method may be performed by an operating device or an electronic device of the Windows program, where the device or the electronic device may be implemented by software and/or hardware, and where the device or the electronic device may be integrated into any intelligent device having a network communication function. As shown in fig. 1, the operating method of the Windows program may include the steps of:
s101, when a to-be-operated Windows program calls a Host Wine library, judging that the number of bits of the to-be-operated Windows program is a first number of bits or a second number of bits.
In this step, when the Windows program to be run calls the Host Wine library, the electronic device may determine that the number of bits of the Windows program to be run is the first number of bits or the second number of bits; wherein the first number of bits is 32 bits; the second number of bits is 64 bits. There are two kinds of existing Windows programs, namely a 32-bit Windows program and a 64-bit Windows program. The embodiment of the application respectively carries out different running methods aiming at Windows programs with different digits, thereby being compatible with the Windows programs with 32 digits and 64 digits in one set of program.
S102, if the number of bits of the Windows program to be run is the first number of bits, converting the address of the Windows program to be run into the address of the second number of bits; and converting the parameter type of the Windows program to be run into the parameter type of the second bit data.
In this step, if the number of bits of the Windows program to be run is the first number of bits, the electronic device may convert the address of the Windows program to be run into the address of the second number of bits; and simultaneously converting the parameter type of the Windows program to be run into the parameter type of the second bit data. Specifically, the electronic device may convert the address of the 32-bit Windows program to a 64-bit address; and simultaneously, converting the parameter type of the 32-bit Windows program into the parameter type of 64-bit.
S103, running a Windows program on the ARM chip server based on the address of the second bit number and the parameter type of the second bit number; wherein the first number of bits is 32 bits; the second number of bits is 64 bits.
In this step, the electronic device may run a Windows program on the ARM chip server based on the address of the second number of digits and the parameter type of the second number of digits; wherein the first number of bits is 32 bits; the second number of bits is 64 bits. Specifically, the 64-bit ARM chip server may run Windows programs on the 64-bit ARM chip server based on the 64-bit address and the 64-bit parameter type.
When the Windows program to be operated calls the Host Wine library, the operating method of the Windows program provided by the embodiment of the application firstly judges whether the number of bits of the Windows program to be operated is the first number of bits or the second number of bits; if the number of bits of the Windows program to be run is the first number of bits, converting the address of the Windows program to be run into the address of the second number of bits; converting the parameter type of the Windows program to be run into the parameter type of the second bit data; then, running Windows program on ARM chip server based on the address of the second digit and the parameter type of the second digit; wherein the first number of bits is 32 bits; the second number of bits is 64 bits. That is, the present application can be compatible with the execution of 32-bit and 64-bit windows programs in a suite of programs. In the existing running method of the Windows program, the 32-bit and 64-bit Windows program cannot be compatible on the existing 64-bit ARM chip server. Because the application adopts the technical means of address conversion and parameter type conversion, the technical problems that the prior art Windows program has two kinds of programs of 32 bits and 64 bits, which are required to be executed by converting Qemu into ARM64 bits, and the prior 64-bit ARM chip server cannot be compatible with the 32-bit and 64-bit Windows program are overcome; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 2 is a second flow chart of the operating method of the Windows program according to the embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments. As shown in fig. 2, the operating method of the Windows program may include the steps of:
s201, when the to-be-operated Windows program calls the Host Wine library, judging that the number of bits of the to-be-operated Windows program is the first number of bits or the second number of bits.
In this step, when the Windows program to be run calls the Host Wine library, the electronic device may determine that the number of bits of the Windows program to be run is the first number of bits or the second number of bits; wherein the first number of bits is 32 bits; the second number of bits is 64 bits. There are two kinds of existing Windows programs, namely a 32-bit Windows program and a 64-bit Windows program. The embodiment of the application respectively carries out different running methods aiming at Windows programs with different digits, thereby being compatible with the Windows programs with 32 digits and 64 digits in one set of program.
S202, if the number of bits of the Windows program to be run is the first number of bits, transmitting the address of the Windows program to Qemu, and converting the address of the Windows program into the address of the second number of bits through Qemu; and transmitting the parameter type of the Windows program to Qemu, and converting the parameter type of the Windows program into the parameter type of the second bit data through Qemu.
In this step, if the number of bits of the Windows program to be run is the first number of bits, the electronic device may transmit the address of the Windows program to Qemu, and convert the address of the Windows program to the address of the second number of bits through Qemu; and transmitting the parameter type of the Windows program to Qemu, and converting the parameter type of the Windows program into the parameter type of the second bit data through Qemu. Specifically, when the 32-bit Windows program calls the Host Wine library for execution, since the addressing space of the 32-bit program is 4G, when Qemu calls the Host Wine, the front of the 32-bit address needs to be added with 0 to be a 64-bit address, and the 32-bit parameter type is converted into a 64-bit parameter type and transmitted to the Host Wine. When the Host wire returns data to the 32-bit Windows program, the memory allocation space of the Host wire is mapped to the memory allocation space of 4GB, the generated memory address is 64 bits, but the first 32 bits are 0, when the data is returned to the Qemu, the Qemu removes the first 32 bits 0 of the 64-bit memory address to become a 32-bit memory address, and the 64-bit parameter type is converted to a 32-bit parameter type and transmitted to the 32-bit Windows program.
S203, transmitting the address of the second bit number and the parameter type of the second bit number to a Host Wine through Qemu, and running a Windows program on the ARM chip server through the Host Wine.
In this step, the electronic device may transmit the address of the second number of bits and the parameter type of the second number of bits to the Host Wine through Qemu, and run the Windows program on the ARM chip server through the Host Wine. Specifically, the 64-bit ARM chip server may run Windows programs on the 64-bit ARM chip server based on the 64-bit address and the 64-bit parameter type.
When the Windows program to be operated calls the Host Wine library, the operating method of the Windows program provided by the embodiment of the application firstly judges whether the number of bits of the Windows program to be operated is the first number of bits or the second number of bits; if the number of bits of the Windows program to be run is the first number of bits, converting the address of the Windows program to be run into the address of the second number of bits; converting the parameter type of the Windows program to be run into the parameter type of the second bit data; then, running Windows program on ARM chip server based on the address of the second digit and the parameter type of the second digit; wherein the first number of bits is 32 bits; the second number of bits is 64 bits. That is, the present application can be compatible with the execution of 32-bit and 64-bit windows programs in a suite of programs. In the existing running method of the Windows program, the 32-bit and 64-bit Windows program cannot be compatible on the existing 64-bit ARM chip server. Because the application adopts the technical means of address conversion and parameter type conversion, the technical problems that the prior art Windows program has two kinds of programs of 32 bits and 64 bits, which are required to be executed by converting Qemu into ARM64 bits, and the prior 64-bit ARM chip server cannot be compatible with the 32-bit and 64-bit Windows program are overcome; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example III
Fig. 3 is a third flow chart of the operating method of the Windows program according to the embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments. As shown in fig. 3, the operating method of the Windows program may include the steps of:
s301, when a to-be-operated Windows program calls a Host Wine library, judging that the number of bits of the to-be-operated Windows program is a first number of bits or a second number of bits.
In this step, when the Windows program to be run calls the Host Wine library, the electronic device may determine that the number of bits of the Windows program to be run is the first number of bits or the second number of bits. There are two kinds of existing Windows programs, namely a 32-bit Windows program and a 64-bit Windows program. The embodiment of the application respectively carries out different running methods aiming at Windows programs with different digits, thereby being compatible with the Windows programs with 32 digits and 64 digits in one set of program.
S302, if the number of bits of the Windows program to be run is the second number of bits, mapping the memory allocation space of the Windows program to be run into the memory allocation space corresponding to the first number of bits, and generating an address of the second number of bits.
In this step, if the number of bits of the Windows program to be run is the second number of bits, the electronic device may map the memory allocation space of the Windows program to be run to the memory allocation space corresponding to the first number of bits, to generate the address of the second number of bits. Specifically, when the 64-bit windows program calls the Host Wine library to execute, the memory allocation space of the 64-bit windows program is mapped to the memory allocation space of the 4G to generate 64-bit data, but the first 32 bits of the data memory address are all 0, the parameter type of the 64-bit windows program is 64 bits, conversion is not needed, and when Qemu calls the Host Wine, the 64-bit address and the 64-bit parameter are transmitted to the Host Wine together. When the Host wire returns data to the 64-bit Windows program, the memory allocation space of the Host wire is mapped to the memory allocation space of 4GB, the generated memory address is 64 bits, but the first 32 bits are 0, the data is generated, and when the data is returned to the Qemu, the Qemu transmits the 64-bit memory address and the 64-bit parameter type to the 64-bit Windows program.
S303, running the Windows program on the ARM chip server based on the address of the second digit and the parameter type of the Windows program to be run.
In this step, the electronic device may run the Windows program on the ARM chip server based on the address of the second number of digits and the parameter type of the Windows program to be run. Specifically, the 64-bit ARM chip server may run Windows programs on the 64-bit ARM chip server based on the 64-bit address and the 64-bit parameter type.
Fig. 4 is a schematic structural diagram of a Linux system with a 64-bit ARM chip according to an embodiment of the present application. As shown in FIG. 4, it can be seen from the frame diagram that the Qemu module is a support and release module, which is responsible for the translation of X86 instructions to ARM instructions of Windows programs, because the Linux operating system is a 64-bit system running on an ARM 64-bit chip, host Wine is a 64-bit program, and both the parameters and data types of the incoming Host Wine must be 64 bits, thus Qemu needs to complete address mapping and conversion of the parameter types. Since the current Windows program is mainly 32 bits, the addressing space of the 32-bit system is 4GB, and from the compatibility, the addresses used by the 64-bit Windows program are mapped to the 4GB memory space for allocation. The main processes of the embodiment of the application are as follows: 1) When the 32-bit Windows program calls the Host Wine library for execution, because the addressing space of the 32-bit program is 4G, when Qemu calls the Host Wine, the front of the 32-bit address needs to be supplemented with a 64-bit address, and the 32-bit parameter type is converted into a 64-bit parameter type and transmitted to the Host Wine. 2) When the Host Wine returns data to the 32-bit Windows program, the memory allocation space of the Host Wine is mapped to the memory allocation space of 4GB, the generated memory address is 64 bits, but the front 32 bits are 0, when the data is returned to the Qemu, the Qemu removes the front 32 bits 0 of the 64-bit memory address to become a 32-bit memory address, and the 64-bit parameter type is converted to a 32-bit parameter type and transmitted to the 32-bit Windows program. 3) When the 64-bit windows program calls the Host Wine library to execute, the memory allocation space of the 64-bit windows program is mapped to the memory allocation space of the 4G to allocate memory, 64-bit data is generated, but the first 32 bits of the data memory address are all 0, the parameter type of the 64-bit windows program is 64 bits, conversion is not needed, and when Qemu calls the Host Wine, the 64-bit address and the 64-bit parameter are transmitted to the Host Wine together. 4) When the Host Wine returns data to the 64-bit Windows program, the memory allocation space of the Host Wine is mapped to the memory allocation space of 4GB, the generated memory address is 64 bits, but the first 32 bits are 0, the data is generated, and when the data is returned to the Qemu, the Qemu transmits the 64-bit memory address and the 64-bit parameter type to the 64-bit Windows program. Such a Qemu enables a 32-bit and 64-bit Windows program to be compatible.
When the Windows program to be operated calls the Host Wine library, the operating method of the Windows program provided by the embodiment of the application firstly judges whether the number of bits of the Windows program to be operated is the first number of bits or the second number of bits; if the number of bits of the Windows program to be run is the first number of bits, converting the address of the Windows program to be run into the address of the second number of bits; converting the parameter type of the Windows program to be run into the parameter type of the second bit data; then, running Windows program on ARM chip server based on the address of the second digit and the parameter type of the second digit; wherein the first number of bits is 32 bits; the second number of bits is 64 bits. That is, the present application can be compatible with the execution of 32-bit and 64-bit windows programs in a suite of programs. In the existing running method of the Windows program, the 32-bit and 64-bit Windows program cannot be compatible on the existing 64-bit ARM chip server. Because the application adopts the technical means of address conversion and parameter type conversion, the technical problems that the prior art Windows program has two kinds of programs of 32 bits and 64 bits, which are required to be executed by converting Qemu into ARM64 bits, and the prior 64-bit ARM chip server cannot be compatible with the 32-bit and 64-bit Windows program are overcome; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example IV
Fig. 5 is a schematic structural diagram of an operating device of a Windows program according to an embodiment of the present application. As shown in fig. 5, the apparatus 500 includes: a judging module 501, a converting module 502 and an operating module 503; wherein,,
the judging module 501 is configured to judge, when a Windows program to be run calls a Host Wine library, that the number of bits of the Windows program to be run is a first number of bits or a second number of bits;
the conversion module 502 is configured to convert an address of the Windows program to be executed into an address of the second bit number if the number of bits of the Windows program to be executed is the first number of bits; converting the parameter type of the Windows program to be run into the parameter type of the second bit data;
the running module 503 is configured to run the Windows program on an ARM chip server based on the address of the second bit number and the parameter type of the second bit number; wherein the first number of bits is 32 bits; the second number of bits is 64 bits.
Further, the device further comprises: an address mapping module 504 (not shown in the figure) configured to map the memory allocation space of the Windows program to be executed to the memory allocation space corresponding to the first number of bits, if the number of bits of the Windows program to be executed is the second number of bits, to generate an address of the second number of bits;
the running module 503 is configured to run the Windows program on the ARM chip server based on the address of the second bit number and the parameter type of the Windows program to be run.
Further, the conversion module 502 is specifically configured to transmit the address of the Windows program to Qemu, and convert the address of the Windows program to the address of the second bit number through the Qemu.
Further, the conversion module 502 is specifically configured to transmit the parameter type of the Windows program to the Qemu, and convert the parameter type of the Windows program to the parameter type of the second bit data through the Qemu.
Further, the running module 503 is specifically configured to transmit, by using the Qemu, the address of the second bit and the parameter type of the second bit to a Host Wine, and run, by using the Host Wine, the Windows program on an ARM chip server.
The running device of the Windows program can execute the method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the method. Technical details which are not described in detail in the present embodiment can be referred to the operating method of the Windows program provided in any embodiment of the present application.
Example five
According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized 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 601 performs the respective methods and processes described above, for example, the running method of the Windows program. For example, in some embodiments, the method of operating a Windows program may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the above-described running method of the Windows program may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the running method of the Windows program in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These 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 the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present disclosure may be performed in parallel, sequentially, or in a different order, so long as the desired result of the technical solution of the present disclosure is achieved, and the present disclosure is not limited herein. In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (6)
1. A method of operating a Windows program, the method comprising:
when a to-be-operated Windows program calls a Host Wine library, judging that the number of bits of the to-be-operated Windows program is a first number of bits or a second number of bits;
if the number of bits of the Windows program to be run is the first number of bits, transmitting the address of the Windows program to Qemu, and converting the address of the Windows program into the address of the second number of bits through the Qemu; transmitting the parameter type of the Windows program to the Qemu, and converting the parameter type of the Windows program into the parameter type of the second bit data through the Qemu;
transmitting the address of the second digit and the parameter type of the second digit to a Host Wine through the Qemu, and running the Windows program on an ARM chip server through the Host Wine; wherein the first number of bits is 32 bits; the second number of bits is 64 bits.
2. The method of claim 1, the method further comprising:
if the number of bits of the Windows program to be run is the second number of bits, mapping the memory allocation space of the Windows program to be run into the memory allocation space corresponding to the first number of bits, and generating an address of the second number of bits;
and running the Windows program on an ARM chip server based on the address of the second digit and the parameter type of the Windows program to be run.
3. An operating apparatus of a Windows program, the apparatus comprising: the device comprises a judging module, a converting module and an operating module; wherein,,
the judging module is used for judging that the number of bits of the Windows program to be operated is a first number of bits or a second number of bits when the Windows program to be operated calls a Host Wine library;
the conversion module is configured to, if the number of bits of the Windows program to be run is the first number of bits, transmit an address of the Windows program to Qemu, and convert the address of the Windows program to an address of the second number of bits through the Qemu; transmitting the parameter type of the Windows program to the Qemu, and converting the parameter type of the Windows program into the parameter type of the second bit data through the Qemu;
the running module is configured to transmit, by using the Qemu, an address of a second bit number and a parameter type of the second bit number to a Host Wine, and run, by using the Host Wine, the Windows program on an ARM chip server; wherein the first number of bits is 32 bits; the second number of bits is 64 bits.
4. The apparatus of claim 3, the apparatus further comprising: the address mapping module is used for mapping the memory allocation space of the Windows program to be operated to the memory allocation space corresponding to the first bit number if the bit number of the Windows program to be operated is the second bit number, and generating an address of the second bit number;
and the running module is used for running the Windows program on the ARM chip server based on the address of the second digit and the parameter type of the Windows program to be run.
5. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-2.
6. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210016353.5A CN114416199B (en) | 2022-01-07 | 2022-01-07 | Windows program running method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210016353.5A CN114416199B (en) | 2022-01-07 | 2022-01-07 | Windows program running method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114416199A CN114416199A (en) | 2022-04-29 |
CN114416199B true CN114416199B (en) | 2023-08-11 |
Family
ID=81272201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210016353.5A Active CN114416199B (en) | 2022-01-07 | 2022-01-07 | Windows program running method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114416199B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109375927A (en) * | 2018-10-26 | 2019-02-22 | 武汉斗鱼网络科技有限公司 | Method, system, server and the storage medium of window application starting are realized using Qt |
CN111353263A (en) * | 2018-12-21 | 2020-06-30 | 创发信息科技(苏州)有限公司 | Software and hardware design and verification platform system |
CN113127100A (en) * | 2021-05-14 | 2021-07-16 | 武汉深之度科技有限公司 | Heterogeneous program execution method and device, computing device and readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7451298B2 (en) * | 2006-08-03 | 2008-11-11 | Apple Inc. | Processing exceptions from 64-bit application program executing in 64-bit processor with 32-bit OS kernel by switching to 32-bit processor mode |
-
2022
- 2022-01-07 CN CN202210016353.5A patent/CN114416199B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109375927A (en) * | 2018-10-26 | 2019-02-22 | 武汉斗鱼网络科技有限公司 | Method, system, server and the storage medium of window application starting are realized using Qt |
CN111353263A (en) * | 2018-12-21 | 2020-06-30 | 创发信息科技(苏州)有限公司 | Software and hardware design and verification platform system |
CN113127100A (en) * | 2021-05-14 | 2021-07-16 | 武汉深之度科技有限公司 | Heterogeneous program execution method and device, computing device and readable storage medium |
Non-Patent Citations (1)
Title |
---|
曹子建 ; 容晓峰 ; 刘宝龙 ; .一种64位进程调用32位DLL的方法.计算机技术与发展.2013,(第03期),99-101+106. * |
Also Published As
Publication number | Publication date |
---|---|
CN114416199A (en) | 2022-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108959127B (en) | Address translation method, device and system | |
CN113342345A (en) | Operator fusion method and device of deep learning framework | |
CN112540806A (en) | Applet page rendering method and device, electronic equipment and storage medium | |
CN114816393B (en) | Information generation method, device, equipment and storage medium | |
US10621124B2 (en) | Method, device and computer program product for enabling SR-IOV functions in endpoint device | |
US11784946B2 (en) | Method for improving data flow and access for a neural network processor | |
CN113791875A (en) | Input device virtualization method and device, electronic device and storage medium | |
CN114936173A (en) | Read-write method, device, equipment and storage medium of eMMC device | |
CN114416199B (en) | Windows program running method and device, electronic equipment and storage medium | |
CN113722037B (en) | User interface refreshing method and device, electronic equipment and storage medium | |
CN115866156A (en) | Data processing method and device, electronic equipment and storage medium | |
CN216623148U (en) | Embedded server, intelligent network card, SOC module and electronic equipment | |
CN112965836B (en) | Service control method, device, electronic equipment and readable storage medium | |
CN113905040A (en) | File transmission method, device, system, equipment and storage medium | |
CN113204538A (en) | Method, apparatus, device, medium and program product for data migration | |
CN112714420A (en) | Network access method and device of wifi hotspot providing equipment and electronic equipment | |
CN115858432B (en) | Access method, device, electronic equipment and readable storage medium | |
CN114780470B (en) | Cloud mobile phone management system, method, device, electronic equipment and readable storage medium | |
CN117270862A (en) | Software pluggable method, device, equipment and medium based on dynamic compiling | |
CN118433039A (en) | Node communication method and device during model training | |
CN114327771A (en) | Communication method, device, equipment and storage medium of virtual machine and host | |
CN116708362A (en) | Communication address processing method, device, equipment and storage medium | |
CN118175139A (en) | Address allocation method, device, equipment and storage medium based on cloud mobile phone push | |
CN117278648A (en) | Protocol dynamic adaptation method, device, electronic equipment and storage medium | |
CN116501284A (en) | Voice control method, device, equipment, storage medium and program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |