CN113672289A - File opening method and equipment - Google Patents

File opening method and equipment Download PDF

Info

Publication number
CN113672289A
CN113672289A CN202110838308.3A CN202110838308A CN113672289A CN 113672289 A CN113672289 A CN 113672289A CN 202110838308 A CN202110838308 A CN 202110838308A CN 113672289 A CN113672289 A CN 113672289A
Authority
CN
China
Prior art keywords
file
operating system
user
message
application program
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.)
Granted
Application number
CN202110838308.3A
Other languages
Chinese (zh)
Other versions
CN113672289B (en
Inventor
吴新显
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110838308.3A priority Critical patent/CN113672289B/en
Publication of CN113672289A publication Critical patent/CN113672289A/en
Application granted granted Critical
Publication of CN113672289B publication Critical patent/CN113672289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a file opening method and equipment, relates to the field of electronic equipment, and solves the problem that a file cannot be opened through an application program in an operating system of a computer when the file is opened on an operating system simulator of mobile equipment. The specific scheme is as follows: the electronic equipment runs a first operating system, and a simulator of a second operating system runs on the first operating system. The first operating system is preset with an agent service module, and the simulator of the second operating system is preset with an agent application program. When the agent application detects that the user selects an operation of opening the first file by using the first operating system in the simulator of the second operating system, the agent application can send a first message to the agent service module, wherein the first message comprises the file name of the first file and/or the storage path of the first file; the proxy service module may open the first file according to the first message. Wherein the first file is stored in the electronic device by the emulator of the second operating system.

Description

File opening method and equipment
Technical Field
The present application relates to the field of electronic devices, and in particular, to a file opening method and device.
Background
With the development of mobile devices (such as mobile phones, tablets and the like), more and more users work with applications on the mobile devices. In order to facilitate the use of the application program on the mobile device when the computer is used for office work, many users use the application program running in the simulator of the operating system of the mobile device on the computer by running the simulator of the operating system of the mobile device on the computer.
However, currently, when a file is opened on a simulator of an operating system of a mobile device, the file cannot be opened through an application program in the operating system of a computer.
Disclosure of Invention
The application provides a file opening method and device, and solves the problem that a file cannot be opened through an application program in an operating system of a computer when the file is opened on an operating system simulator of mobile equipment.
In order to achieve the purpose, the following technical scheme is adopted in the application:
in a first aspect, the present application provides a file opening method, which is applicable to an electronic device running a first operating system on which a simulator of a second operating system runs. The first operating system is preset with an agent service module, and the simulator of the second operating system is preset with an agent application program. The method can comprise the following steps: when the agent application detects that the user selects an operation of opening the first file by using the first operating system in the simulator of the second operating system, the agent application can send a first message to the agent service module, wherein the first message comprises the file name of the first file and/or the storage path of the first file; the proxy service module may open a first file in the first operating system based on the first message. Wherein the first file is stored in the electronic device by the emulator of the second operating system.
By adopting the technical scheme, the user can open the file on the simulator of the second operating system through the first operating system when the file needs to be opened, so that more convenient file opening experience is provided for the user. For example, when a user needs to open a certain file on the emulator of the second operating system, if there is no application program capable of opening the file that the user needs to open in the emulator of the second operating system, and there is an application program capable of opening the file that the user needs to open in the first operating system, the user may open the file to be opened through the corresponding application program in the first operating system. For another example, when a user needs to open a certain file on the emulator of the second operating system, an application program capable of opening the file is installed in the emulator of the second operating system, and an application program capable of opening the file is also installed in the first operating system, at this time, the user can open the file using the application program in the first operating system according to personal preference without using the application program in the emulator of the second operating system.
In one possible implementation manner, the first operating system includes an application layer, a framework layer and a kernel layer, the proxy service module is deployed in the application layer, the framework layer includes a system framework, and the kernel layer includes a kernel; the simulator of the second operating system comprises an agent dynamic library and a system driver, wherein the agent application program is deployed in an application layer, the agent dynamic library is deployed in a framework layer, and the system driver is deployed in a kernel layer.
In this way, the emulator of the second operating system and the first operating system can perform data interaction through the kernel layer, so that the emulator of the second operating system sends the first message to the first operating system, that is, the proxy application sends the first message to the proxy service module.
In one possible implementation, the proxy application sending a first message to the proxy service module, including: the agent application program calls a system driver through an agent dynamic library to send a first message to the kernel; the kernel sends the first message to the proxy service module through the system framework.
In one possible implementation, before the agent application detects that the user selects an operation to open the first file using the first operating system in the emulator of the second operating system, the method further includes: the agent application program detects that a user selects the operation of the first file in the simulator of the second operating system, and displays a function option for triggering the first file to be opened by using the first operating system; accordingly, the user selecting an operation of opening the first file using the first operating system in the emulator of the second operating system includes: and selecting the function option by the user.
In this way, when the agent application detects that the user selects the first file in the simulator of the second operating system, the agent application can display a function option which can trigger the first file to be opened by using the first operating system to the user for the user to select, so that the user can conveniently trigger the first file to be opened by using the first operating system by selecting the function option.
In one possible implementation manner, a file format list is preset in the agent application program, and the file format list contains file formats of files which can be opened by using the first operating system; accordingly, prior to displaying the functionality option for triggering the opening of the first file using the first operating system, the method further comprises: the agent application determines from the file format manifest that the first file is capable of being opened using the first operating system.
Therefore, the agent application program can only provide the function option for triggering the file to be opened by using the first operating system for the file to be opened by using the first operating system, so that the condition that the file cannot be opened by the first operating system due to the fact that the function option is triggered by a user to open the file by using the first operating system is avoided.
In one possible implementation, the operation of the user selecting the first file in the emulator of the second operating system includes: the user long-presses or right-clicks on the first file.
In one possible implementation, the first message further includes an open instruction for instructing to open the first file.
An open instruction is included in the first message by which the first operating system can be instructed to perform an action to open the first file. Of course, in some other possible implementations, the first message may also serve as an instruction for instructing the first operating system to open the first file by itself, which is not limited herein.
In one possible implementation manner, the opening, by the proxy service module, the first file in the first operating system according to the first message includes: the proxy service module determines the storage position of the first file according to the first message; the agent service module determines a first application program according to the file format of the first file, wherein the first application program is an application program with a function of opening the first file in the first operating system; the proxy service module opens the first file through the first application program.
Wherein, when the first message includes a file name, the proxy service module may search in the electronic device according to the file name to determine a storage location of the first file. When the first message includes a storage path, the proxy service module may directly determine a storage location of the first file according to the storage path.
In one possible implementation manner, the opening, by the proxy service module, the first file in the first operating system according to the first message includes: the proxy service module determines the storage position of the first file according to the first message; the proxy service module determines and displays at least one application program with the function of opening a first file in the first operating system according to the file format of the first file; the agent service module detects the operation of selecting the application program by the user and opens the first file through the application program selected by the user.
In this way, when the first operating system comprises a plurality of application programs capable of opening the first file, selectable application programs can be provided for the user, and the user can select to open the first file by using the corresponding application programs according to the preference.
In a second aspect, the present application provides a file opening apparatus, which can be applied to an electronic device, for implementing the method in the first aspect. The functions of the device can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, for example, a proxy application module, a proxy service module, and the like. The agent application module serves the simulator of the second operating system, and the agent service module serves the first operating system.
The proxy application module may be configured to send a first message to the proxy service module when detecting that a user selects an operation of opening a first file using the first operating system in the emulator of the second operating system, where the first message includes a file name of the first file and/or a storage path of the first file. And the proxy service module can be used for opening the first file in the first operating system according to the first message. Wherein the first file is stored in the electronic device by the emulator of the second operating system.
In a possible implementation manner, the agent application module is further configured to detect an operation of a user selecting a first file in a simulator of the second operating system, and display a function option for triggering the first file to be opened by using the first operating system; accordingly, the user selecting an operation of opening the first file using the first operating system in the emulator of the second operating system includes: and selecting the function option by the user.
In a possible implementation manner, a file format list is preset in the agent application module, and the file format list contains file formats of files which can be opened by using the first operating system; correspondingly, the proxy application module is further configured to determine that the first file can be opened using the first operating system according to the file format manifest.
In one possible implementation, the operation of the user selecting the first file in the emulator of the second operating system includes: the user long-presses or right-clicks on the first file.
In one possible implementation, the first message further includes an open instruction for instructing to open the first file.
In a possible implementation manner, the proxy service module is specifically configured to determine a storage location of the first file according to the first message; determining a first application program according to the file format of a first file, wherein the first application program is an application program with a function of opening the first file in the first operating system; the first file is opened by the first application.
In a possible implementation manner, the proxy service module is specifically configured to determine a storage location of the first file according to the first message; determining and displaying at least one application program with a function of opening a first file in the first operating system according to the file format of the first file; and detecting the operation of selecting the application program by the user, and opening the first file through the application program selected by the user.
In a third aspect, the present application provides an electronic device, comprising: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the above instructions to enable the electronic device to implement the file opening method according to the first aspect or any one of the possible implementation manners of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having computer program instructions stored thereon. The computer program instructions, when executed by the electronic device, cause the electronic device to implement the file opening method as described in the first aspect or any one of the possible implementations of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising computer readable code which, when run in an electronic device, causes the electronic device to implement the file opening method according to the first aspect or any one of the possible implementations of the first aspect.
It should be understood that the beneficial effects of the second to fifth aspects can be seen from the description of the first aspect, and are not repeated herein.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device provided in the present application;
FIG. 2 is a schematic diagram of a system according to the present application
Figure BDA0003177978340000031
An architectural schematic of the system;
FIG. 3 is a schematic interface diagram of a file opening method according to the present application;
FIG. 4 is a schematic interface diagram of another file opening method provided in the present application;
fig. 5 is a schematic interface diagram of another file opening method provided by the present application when applied.
Detailed Description
With the continuous development of mobile devices (such as mobile phones, tablets and the like), users use the mobile devices more and more frequently. In addition, due to the portability of the mobile device, the user has an increasing demand for mobile light office work using the mobile device by using an application program. Therefore, when a user works through a computer, in order to conveniently use a common application program, the user usually uses the application program of the mobile device by running the simulator of the operating system of the mobile device on the operating system of the computer. Namely, the application program of the mobile equipment is run on a computer by using the simulator of the operating system of the mobile equipment.
However, currently, when a file is opened on a simulator of an operating system of a mobile device, the file cannot be opened through an application program in the operating system of a computer. That is, when a user needs to open a certain file on the operating system of the computer, the user can only open the file through the application program on the operating system of the computer. When a user needs to open a certain file on the simulator of the operating system of the mobile equipment, the user can only open the file through an application program on the simulator of the operating system of the mobile equipment.
Therefore, when a user needs to open a certain file on the mobile device operating system simulator and there is no application program capable of opening the file in the mobile device operating system simulator, the user cannot open the file even if there is an application program capable of opening the file on the operating system of the computer.
In order to solve the above problem, an embodiment of the present application provides a file opening method. The method can be applied to a scene that when a simulator of a second operating system runs on the electronic equipment running the first operating system, a user opens a file on the simulator of the second operating system through an application program in the first operating system of the electronic equipment. For example, taking the electronic device as a computer, the first operating system as an operating system of the computer, and the simulator of the second operating system as a simulator of the operating system of the mobile device as an example, when a user opens a file on the simulator of the operating system of the mobile device, the user can open the file through an application program in the operating system of the computer.
The file opening method may include: the simulator runs a first operating system and a second operating system on the electronic equipment. When a user opens a file (e.g., a first file) on the emulator of the second operating system, the emulator of the second operating system may send a first message (e.g., a message containing a file path of the file to be opened by the user) to the first operating system, and after receiving the message, the first operating system may open the file to be opened by the user according to the message. The first operating system and the second operating system are different operating systems.
The file (e.g., the first file) to be opened by the user on the emulator of the second operating system refers to a file stored in the electronic device by the emulator of the second operating system, and the file may be considered to be located in the emulator of the second operating system.
It should be noted that, since the emulator of the second operating system runs on the first operating system, both the emulator of the second operating system and the first operating system use the same storage device for data storage. And the simulators of the first operating system and the second operating system both use the resource manager of the first operating system. Thus, the first operating system is able to read data stored by the emulator that accesses the second operating system, and the emulator of the second operating system is also able to read and access data stored by the first operating system.
Therefore, the user can open the files on the simulator of the second operating system through the first operating system when the files on the simulator of the second operating system need to be opened, and therefore more convenient file opening experience is provided for the user. For example, when a user needs to open a certain file on the emulator of the second operating system, if there is no application program capable of opening the file that the user needs to open in the emulator of the second operating system, and there is an application program capable of opening the file that the user needs to open in the first operating system, the user may open the file to be opened through the corresponding application program in the first operating system. For another example, when a user needs to open a certain file on the emulator of the second operating system, an application program capable of opening the file is installed in the emulator of the second operating system, and an application program capable of opening the file is also installed in the first operating system, at this time, the user can open the file using the application program in the first operating system according to personal preference without using the application program in the emulator of the second operating system.
Hereinafter, a file opening method provided in an embodiment of the present application will be described with reference to the drawings.
In the embodiment of the present application, the electronic device may be a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a Personal Digital Assistant (PDA), a smart home device (e.g., a television), a vehicle machine (e.g., a vehicle-mounted computer), a smart screen, a game machine, a smart projector, a smart tv box, or the like. The embodiment of the present application is not particularly limited to the specific device form of the electronic device.
In this embodiment, the electronic device is an electronic device that can run an operating system and install an application program. Optionally, the first operating system and/or the second operating system may be
Figure BDA0003177978340000051
The system,
Figure BDA0003177978340000052
The system,
Figure BDA0003177978340000053
The system,
Figure BDA0003177978340000054
The system,
Figure BDA0003177978340000055
The system,
Figure BDA0003177978340000056
Systems, and the like. More specifically, it may be
Figure BDA0003177978340000057
The system,
Figure BDA0003177978340000058
Systems, and the like. Wherein the first operating system and the second operating system are different, e.g., the first operating system is
Figure BDA0003177978340000059
The second operating system is
Figure BDA00031779783400000510
The system, for example, the first operating system is
Figure BDA00031779783400000511
The second operating system is
Figure BDA00031779783400000512
Systems, and the like.
By way of example, taking an electronic device as a computer as an example, fig. 1 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application. That is, the electronic device shown in fig. 1 may be a computer, for example.
As shown in fig. 1, the electronic device may include: a Radio Frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (WiFi) module 170, a processor 180, a power supply 190, and a bluetooth module 1100. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Some constituent components of the electronic device will be described in detail below with reference to fig. 1:
the memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing of the electronic device by operating the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, a boot loader (boot loader), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 131 (e.g., operations of the user on or near the touch panel 131 using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 131 may include two parts, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like. In the embodiment of the present application, the user may input an operation of opening a file in the simulator through a system of the computer through the touch panel 131, the mouse, or the keyboard.
The display unit 140 may be used to display information input by a user or information provided to the user and various menus of the electronic device. The display unit 140 may include a display panel 141, and optionally, the display panel 141 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 131 can cover the display panel 141, and when the touch panel 131 detects a touch operation on or near the touch panel 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in fig. 1, the touch panel 131 and the display panel 141 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 131 and the display panel 141 may be integrated to implement the input and output functions of the electronic device.
The processor 180 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs or modules stored in the memory 120 and calling data stored in the memory 120, thereby integrally monitoring the electronic device. Alternatively, processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
Of course, it should be understood that fig. 1 is only an exemplary illustration of the electronic device in the form of a computer. If the electronic device is a tablet computer, a handheld computer, a mobile phone, a PDA, a smart home device (e.g., a television), a vehicle machine (e.g., a vehicle-mounted computer), a smart screen, a game machine, or other devices, the structure of the electronic device may include fewer structures than those shown in fig. 1, or may include more structures than those shown in fig. 1, which is not limited herein.
The methods in the following embodiments may be implemented in an electronic device having the above hardware structure. The embodiments of the present application will be described below by way of example with reference to the accompanying drawings.
The electronic device is a Personal Computer (PC), or a computer, and the first operating system running on the electronic device is
Figure BDA0003177978340000061
The second operating system is
Figure BDA0003177978340000062
The system (i.e. the simulator of the second operating system is
Figure BDA0003177978340000063
System simulator) as an example.
FIG. 2 shows
Figure BDA0003177978340000064
Architectural schematic of a system. As shown in FIG. 2, the
Figure BDA0003177978340000065
The system generally includes: an application layer, a framework layer, and a kernel layer. The framework layer may provide various system components and system runtime libraries for application scheduling deployed by the application layer. The kernel layer can provide the most basic functional services for the operating system, and can manage system processes, device drivers and the like. In the embodiment of the present application, for example, the following steps may be performed
Figure BDA0003177978340000066
The system is divided into two virtual areas, wherein one virtual area is used for normal operation
Figure BDA0003177978340000067
The system, another virtual area is used for operation
Figure BDA0003177978340000068
A system simulator. Operate at
Figure BDA0003177978340000069
On the system
Figure BDA00031779783400000610
The system simulator can pass through the inner core layer and the
Figure BDA00031779783400000611
The systems performing information interactions, e.g.
Figure BDA00031779783400000612
System and method
Figure BDA00031779783400000613
The system simulator may send notification messages, request messages, etc. to each other through the kernel layer, for example, in the embodiment of the present application
Figure BDA00031779783400000614
System simulator direction
Figure BDA00031779783400000615
The first message sent by the system may be sent through the kernel layer. In that
Figure BDA00031779783400000616
In the system, the application layer may deploy a proxy service (i.e. windows service, in this embodiment, the proxy service may also be referred to as proxy service module) for receiving and responding
Figure BDA00031779783400000617
A first message sent by the system simulator. The framework layer comprises a system framework, and the kernel layer comprises a kernel.
Figure BDA00031779783400000618
The system simulator may include an agent application, an agent dynamic library (dll), and an Android (Android) driver (i.e., a system driver). Wherein, the agent application program is deployed in the application layer and can provide trigger use
Figure BDA00031779783400000619
The system has a function of opening a file (e.g., a first file) to be opened by the user, and a function of generating and transmitting a first message. The agent dynamic library is positioned in the framework layer and can be usedThe proxy application schedules to call the android driver to implement the functionality of the proxy application. The android driver is positioned in the kernel layer and can be called by the proxy dynamic library to execute corresponding operations.
Illustratively, as shown in (a) of fig. 3, the user is running
Figure BDA00031779783400000620
System on-computer open
Figure BDA00031779783400000621
When the system simulator is in use, the computer will display
Figure BDA00031779783400000622
Interface 302 of the system simulator. If the user is at
Figure BDA00031779783400000623
Using an instant messaging application to chat with other users on the system simulator's interface (e.g., the user is at
Figure BDA00031779783400000624
When the system opens the instant communication application program and logs in the first account for use, the instant communication application program is also used by the system
Figure BDA0003177978340000072
System simulator turn on
Figure BDA0003177978340000071
The communication application program in the system simulator logs in a second account for use, so as to log in the instant communication application program by using two accounts at the same time),
Figure BDA0003177978340000073
the instant messaging application on the system simulator receives the first file (e.g., document 1) sent by the other user, but is still
Figure BDA0003177978340000074
System for controlling a power supplyThe emulator does not have an application installed that can open the first file, and
Figure BDA0003177978340000075
the system is provided with an application program capable of opening the first file, and the user can pass through the application program on a computer at the moment
Figure BDA0003177978340000076
An application installed in the system opens the first file.
Alternatively, the user may be able to navigate through
Figure BDA0003177978340000079
Selective use on a system simulator
Figure BDA0003177978340000077
The system opens the first file to be opened to trigger the use of the computer
Figure BDA0003177978340000078
The system opens the first file. Wherein the file to be opened, i.e. the first file, is composed of
Figure BDA00031779783400000710
The system simulator stores files in the electronic device.
As an example, can be in
Figure BDA00031779783400000711
Setting up files in system simulator for triggering use of computer (i.e. use)
Figure BDA00031779783400000712
System) opens a file, such as "open with PC" function. For users needing to pass through PC
Figure BDA00031779783400000713
The system (i.e., the first operating system) selects when the file is to be opened.
Illustratively, the user is triggered to use the computer (i.e., use it
Figure BDA00031779783400000714
System) function options for opening files may be provided in the right-click menu, so that a user may select a function option for opening a file using a computer in the right-click menu when clicking the file to be opened by a right-click.
For example, as shown in FIG. 3, in the PC is displayed
Figure BDA00031779783400000716
Interface 301 of system and
Figure BDA00031779783400000715
interface 302 of the system simulator. As shown in fig. 3 (a), when the user is present
Figure BDA00031779783400000717
When the mouse pointer is placed on the first file to be opened (e.g., document 1) in the system simulator and the right button selects the file to be opened, as shown in (b) of fig. 3,
Figure BDA00031779783400000718
Figure BDA00031779783400000719
a right-click menu of the file is displayed in the interface 302 of the system simulator, and functional options of "copy", "open with PC", and "open with other application" may be included in the menu. As shown in FIG. 3 (b), the user may select to use the PC (i.e., PC running) by selecting the "open with PC" function option
Figure BDA00031779783400000720
The system) opens the file.
For example, the function option for opening a file using a PC may also be set to be displayed when the user presses the file to be opened for a long time.
For example, in PC there are displays
Figure BDA00031779783400000721
Interface of system and
Figure BDA00031779783400000722
interface to a system simulator. When the user is at
Figure BDA00031779783400000723
When a first file (such as a document 1) to be opened is selected and pressed for a long time in the system simulator (the selection and the long pressing can be performed by finger touch, the selection and the long pressing can also be performed by a mouse, the selection and the long pressing can be performed by a stylus pen, and the like without limitation),
Figure BDA00031779783400000724
the interface of the system simulator displays a menu of function options related to the file, and the menu can comprise function options of 'copy', 'open with PC' and 'open with other applications'. The user may select to use the PC (i.e., PC running) by selecting the "open with PC" function option
Figure BDA00031779783400000725
The system) opens the file.
As another example, the user is at
Figure BDA00031779783400000727
Selective use on a system simulator
Figure BDA00031779783400000726
The system opens the first file to be opened, and may also be implemented by a preset shortcut key, a gesture, and the like without limitation. For example, a shortcut key for opening a file using a PC may be preset, and when a user selects a file to be opened, the user inputs the shortcut key to select the PC (i.e., the user selects the PC to be used)
Figure BDA00031779783400000728
System) opens the file to be opened.
Optionally, can be at
Figure BDA00031779783400000729
System simulator registration supportable
Figure BDA00031779783400000730
File format opened by the system (i.e. preset inclusion in the simulator to enable use of
Figure BDA00031779783400000731
File format list of file format (or called file type) opened by system), so that the file corresponding to the registered file format can be selected by user for use
Figure BDA00031779783400000732
The system is turned on. For example, based on the above example, only files corresponding to the registered file format are provided for triggering use
Figure BDA00031779783400000733
And (4) function options of opening the file by the system. Or, the user can only select to use the file after the user selects the file corresponding to the registered file format and outputs a shortcut key or gesture
Figure BDA00031779783400000735
The system opens the file.
Optionally, the above for triggering use
Figure BDA00031779783400000736
Examples of systems opening files, e.g., in
Figure BDA00031779783400000734
Setting up files in system simulator for triggering use of computer (i.e. use)
Figure BDA0003177978340000081
System) an example of a function option for opening a file, and an example of presetting a shortcut key for opening a file using a PC, may be implemented by the function option shown in fig. 2Show
Figure BDA0003177978340000082
A proxy application implementation in the system simulator.
When the user selects to use
Figure BDA0003177978340000083
After the system opens the first file to be opened, in response to a user operation,
Figure BDA0003177978340000084
Figure BDA0003177978340000085
the system simulator can simulate the system
Figure BDA0003177978340000086
System transmission for indication
Figure BDA0003177978340000087
A message (e.g., the first message) that the system opened the file.
Wherein,
Figure BDA0003177978340000088
system simulator direction
Figure BDA0003177978340000089
The message sent by the system may be a socket message. Of course, in the embodiment of the present application, the message may also be other message types for inter-process interaction, which is not limited herein.
As an example, where the indication is
Figure BDA00031779783400000810
In the message that the system opens the file, an instruction to open the file (also referred to as an open instruction in this application) such as "open" and file information of the first file to be opened selected by the user may be included. For example, the file information may be a file path (or called a storage path) of the file. When in use
Figure BDA00031779783400000811
After receiving the message, the system can determine the storage position of the file according to the file path of the first file to be opened selected by the user, and then open the corresponding file.
As another example, at the user indication
Figure BDA00031779783400000812
The file information contained in the message for opening the file by the system may be a file name of a file (i.e., the first file) to be opened by the user. When in use
Figure BDA00031779783400000813
After receiving the message, the system can search in the electronic equipment according to the file name of the file to be opened selected by the user, determine the storage position of the file according to the search result, and then open the corresponding file.
Alternatively, the first message may be the one shown in fig. 2
Figure BDA00031779783400000814
A proxy application in the system simulator. I.e. when the agent application detects a user selection for use
Figure BDA00031779783400000815
After the system opens the file, the agent application can generate a first message according to the file to be opened selected by the user. After the agent application generates the first message, an android driver may be invoked through the agent dynamic library to send the first message to the agent application
Figure BDA00031779783400000816
The system sends a first message.
When in use
Figure BDA00031779783400000817
System reception
Figure BDA00031779783400000818
After the message sent by the system simulator,
Figure BDA00031779783400000819
the system may open the file (i.e., the first file) to be opened by the user through the corresponding application according to the received first message.
As an example of this, the following is given,
Figure BDA00031779783400000820
the system can be aligned with
Figure BDA00031779783400000821
The system simulator listens for messages, and when it is determined that the received message is from
Figure BDA00031779783400000822
The system simulator, when containing an instruction to open a file (such as the open instruction described above), may open the first file based on the file name or file path contained in the message (i.e.,
Figure BDA00031779783400000823
the system determines the storage location of the first file according to the file path or the file name, and then opens the first file stored in the storage location).
For example, after the user selects to open a file to be opened using a PC in the manner shown in FIG. 3, as shown in FIG. 4, the file is opened using the PC
Figure BDA00031779783400000824
The user-selected file opened using the corresponding application can be displayed in the interface 401 of the system.
Wherein,
Figure BDA00031779783400000825
when the system opens the corresponding file, the explorer command can be directly executed to automatically open the file using the corresponding application according to the file format of the corresponding file. Namely, it is
Figure BDA00031779783400000826
When the system opens the corresponding file, the system may query the registry for an associated application (e.g., a first application) capable of opening the file according to the file format (or file type) of the file, and then open the corresponding file through the application.
Of course, in some other embodiments,
Figure BDA00031779783400000827
the system may also present (i.e., display) to the user at least one application that is capable of opening the file for selection by the user. When the user selects the corresponding application program,
Figure BDA00031779783400000829
the system may open the file through an application selected by the user. For example, as shown in FIG. 5, when the user selects to use
Figure BDA00031779783400000828
After the system opens the corresponding file (e.g., the user selects to open the file to be opened using the PC in the manner shown in fig. 4),
Figure BDA00031779783400000830
the user may be presented with a plurality of applications (e.g., application 1, application 2, and application 3, etc. shown in the figure) in the interface 501 of the system that are capable of opening a file selected by the user, and when the user selects a corresponding application,
Figure BDA00031779783400000831
the system can open the file to be opened by the user through the application selected by the user.
Optionally when
Figure BDA0003177978340000091
After the system receives the first message, the user is opened through the corresponding application program according to the first messageExamples of files to be opened and applications that present a user with multiple open related files when a file is opened may be provided by the example shown in FIG. 2
Figure BDA0003177978340000092
A proxy service in the system.
Illustratively, based on the above-described embodiments, when the computer employs the architecture shown in FIG. 2,
Figure BDA0003177978340000093
the agent application of the system simulator may detect a user selection for use
Figure BDA0003177978340000094
When the system opens the operation of the first file, a first message is generated, and then an android driver is called through a proxy dynamic library to the first message through a kernel and a system framework
Figure BDA0003177978340000095
A proxy service in the system sends the first message.
Figure BDA0003177978340000096
The proxy service in the system may continuously listen for messages, and upon receiving the first message, the proxy service may open the first file based on the first message.
By adopting the method in the embodiment, the user can open the file through the first operating system when opening the file on the simulator of the second operating system, so that more convenient file opening experience is provided for the user.
For example, when a user needs to open a certain file on the emulator of the second operating system, if there is no application program capable of opening the file that the user needs to open in the emulator of the second operating system, and there is an application program capable of opening the file that the user needs to open in the first operating system, the user may open the file to be opened through the corresponding application program in the first operating system. Illustratively, the first operating system is
Figure BDA0003177978340000097
The second operating system is
Figure BDA0003177978340000098
The system (i.e. the simulator of the second operating system is
Figure BDA0003177978340000099
System simulator), for example, when the user is present
Figure BDA00031779783400000910
After receiving the drawing file through the instant communication application program on the system simulator, if the user needs to open the drawing file
Figure BDA00031779783400000911
The system simulator has no application program capable of opening the drawing file
Figure BDA00031779783400000913
If the system is available, the user can pass
Figure BDA00031779783400000912
An application on the system opens the drawing file.
Corresponding to the method in the foregoing embodiment, an embodiment of the present application further provides a file opening apparatus. The apparatus can be applied to the electronic device described above for implementing the method in the foregoing embodiment. The functions of the device can be realized by hardware and corresponding software. Comprising one or more modules corresponding in function to the method described above. For example, the apparatus includes: a proxy application module, a proxy service module, etc. The agent application module may serve as a simulator for the second operating system, and the agent service module may serve as the first operating system, in cooperation with implementing the method in the above embodiments.
The embodiment of the present application may further provide an apparatus, such as: an electronic device may include: a processor, a memory for storing instructions executable by the processor. The processor is configured to execute the above instructions, so that the electronic device implements the file opening method as in the foregoing embodiments. The memory may be located within the electronic device or external to the electronic device. And the processor includes one or more.
The embodiment of the application also provides a chip system, and the chip system can be applied to the electronic equipment. The chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit to implement the methods associated in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising computer instructions (i.e., computer readable code) for execution by an electronic device, such as the electronic device described above. The computer readable code, when run in the electronic device, causes the electronic device to implement the method related in the above-described method embodiments.
Embodiments of the present application may also provide a computer-readable storage medium having stored thereon computer program instructions. The computer program instructions, when executed by the electronic device, cause the electronic device to implement a file opening method as in the aforementioned method embodiments.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A file opening method is applied to an electronic device, wherein the electronic device runs a first operating system, a simulator of a second operating system runs on the first operating system, a proxy service module is preset in the first operating system, and a proxy application program is preset in the simulator of the second operating system, and the method comprises the following steps:
the agent application detects that a user selects an operation of opening a first file using the first operating system in the emulator of the second operating system, the first file being stored in the electronic device by the emulator of the second operating system;
the agent application program sends a first message to the agent service module, wherein the first message comprises the file name of the first file and/or the storage path of the first file;
and the proxy service module opens the first file in the first operating system according to the first message.
2. The method of claim 1, wherein the first operating system comprises an application layer, a framework layer, and a kernel layer, wherein the proxy service module is deployed in the application layer, wherein the framework layer comprises a system framework, and wherein the kernel layer comprises a kernel; the simulator of the second operating system comprises an agent dynamic library and a system driver, the agent application program is deployed in the application layer, the agent dynamic library is deployed in the framework layer, and the system driver is deployed in the kernel layer.
3. The method of claim 2, wherein the proxy application sends a first message to the proxy service module comprising:
the agent application program calls the system driver through the agent dynamic library to send the first message to the kernel;
and the kernel sends the first message to the proxy service module through the system framework.
4. The method of any of claims 1 to 3, wherein prior to the agent application detecting a user selecting an operation in the emulator of the second operating system to open a first file using the first operating system, the method further comprises:
the agent application program detects the operation of selecting the first file in the simulator of the second operating system by a user, and displays a function option for triggering the first file to be opened by using the first operating system;
the user selecting, in the simulator of the second operating system, an operation to open a first file using the first operating system comprises: and selecting the function option by the user.
5. The method according to claim 4, wherein a file format list is preset in the agent application, and the file format list contains file formats of files that can be opened by using the first operating system;
before the displaying a functionality option for triggering opening of the first file using the first operating system, the method further comprises:
the proxy application determines, from the file format manifest, that the first file is openable using the first operating system.
6. The method of claim 5, wherein the user's operation of selecting the first file in the simulator of the second operating system comprises: and the user long presses or right clicks the first file.
7. The method of claim 1, wherein the first message further comprises an open instruction for instructing opening of the first file.
8. The method of claim 1 or 7, wherein the proxy service module opens the first file in the first operating system according to the first message, comprising:
the proxy service module determines the storage position of the first file according to the first message;
the agent service module determines a first application program according to the file format of the first file, wherein the first application program is an application program which has a function of opening the first file in the first operating system;
and the proxy service module opens the first file through the first application program.
9. The method of claim 1 or 7, wherein the proxy service module opens the first file in the first operating system according to the first message, comprising:
the proxy service module determines the storage position of the first file according to the first message;
the proxy service module determines and displays at least one application program with the function of opening the first file in the first operating system according to the file format of the first file;
and the proxy service module detects the operation of selecting the application program by the user and opens the first file through the application program selected by the user.
10. An electronic device, comprising: a processor, a memory for storing the processor-executable instructions, the processor configured to, when executed, cause the electronic device to implement the method of any of claims 1 to 9.
11. A computer program product comprising computer readable code which, when run in an electronic device, causes the electronic device to carry out the method of any one of claims 1 to 9.
CN202110838308.3A 2021-07-23 2021-07-23 File opening method and equipment Active CN113672289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110838308.3A CN113672289B (en) 2021-07-23 2021-07-23 File opening method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110838308.3A CN113672289B (en) 2021-07-23 2021-07-23 File opening method and equipment

Publications (2)

Publication Number Publication Date
CN113672289A true CN113672289A (en) 2021-11-19
CN113672289B CN113672289B (en) 2022-09-20

Family

ID=78540050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110838308.3A Active CN113672289B (en) 2021-07-23 2021-07-23 File opening method and equipment

Country Status (1)

Country Link
CN (1) CN113672289B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098391A1 (en) * 2006-10-20 2008-04-24 Alexander Medvedev Method to share licensed applications between virtual machines
CN102023904A (en) * 2009-09-21 2011-04-20 联想(北京)有限公司 Computer and file recovery method
CN103605559A (en) * 2013-11-21 2014-02-26 中标软件有限公司 KVM (kernel-based virtual machine) virtualized service system and data communication method for same
CN106445630A (en) * 2016-08-10 2017-02-22 北京奇虎科技有限公司 Android simulator and method for realizing Android simulator

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098391A1 (en) * 2006-10-20 2008-04-24 Alexander Medvedev Method to share licensed applications between virtual machines
CN102023904A (en) * 2009-09-21 2011-04-20 联想(北京)有限公司 Computer and file recovery method
CN103605559A (en) * 2013-11-21 2014-02-26 中标软件有限公司 KVM (kernel-based virtual machine) virtualized service system and data communication method for same
CN106445630A (en) * 2016-08-10 2017-02-22 北京奇虎科技有限公司 Android simulator and method for realizing Android simulator

Also Published As

Publication number Publication date
CN113672289B (en) 2022-09-20

Similar Documents

Publication Publication Date Title
EP4432274A2 (en) Control method applied to screen projection scenario and related device
EP2701054B1 (en) Method and apparatus for constructing a home screen in a terminal having a touch screen
US9838524B2 (en) Apparatus and method for controlling operation of mobile terminal
CN110168487B (en) Touch control method and device
EP4206883A1 (en) Permission setting method and apparatus and electronic device
EP3093745A1 (en) Method and apparatus for managing screens in a portable terminal
CN111078076A (en) Application program switching method and electronic equipment
CN105975190B (en) Graphical interface processing method, device and system
CN109508136B (en) Display method of application program and mobile terminal
US11455075B2 (en) Display method when application is exited and terminal
CN108681427B (en) Access right control method and terminal equipment
CN111443844A (en) Information processing method and electronic equipment
CN113672290B (en) File opening method and equipment
CN110703972B (en) File control method and electronic equipment
CN110225180B (en) Content input method and terminal equipment
CN106371749A (en) Method and device for terminal control
CN112817555B (en) Volume control method and volume control device
CN110647277A (en) Control method and terminal equipment
CN108780400B (en) Data processing method and electronic equipment
CN113282546B (en) File processing method and device
CN108563416B (en) Application display method and device, storage medium and electronic equipment
CN107728898B (en) Information processing method and mobile terminal
US20210223920A1 (en) Shortcut Key Control Method and Terminal
WO2020253282A1 (en) Item starting method and apparatus, and display device
CN113672289B (en) File opening method and equipment

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