CN113672289B - File opening method and equipment - Google Patents
File opening method and equipment Download PDFInfo
- Publication number
- CN113672289B CN113672289B CN202110838308.3A CN202110838308A CN113672289B CN 113672289 B CN113672289 B CN 113672289B CN 202110838308 A CN202110838308 A CN 202110838308A CN 113672289 B CN113672289 B CN 113672289B
- Authority
- CN
- China
- Prior art keywords
- file
- operating system
- application
- proxy
- message
- 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 47
- 230000006870 function Effects 0.000 claims description 40
- 239000003795 chemical substances by application Substances 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000004590 computer program Methods 0.000 description 6
- 241000699666 Mus <mouse, genus> Species 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 241000699670 Mus sp. Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
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/4401—Bootstrapping
- G06F9/4406—Loading of operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/156—Query results presentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- 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
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 present application discloses a file opening method and device, which relate to the field of electronic devices and solve the problem that a file cannot be opened through an application program in a computer operating system when a file is opened on a mobile device operating system simulator. The specific solution is as follows: the electronic device runs a first operating system, and an emulator of the second operating system runs on the first operating system. Wherein, 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. When the proxy application detects that the user chooses to open the first file using the first operating system in the emulator of the second operating system, the proxy application may send a first message to the proxy service module, where the first message includes the first The file name of the file, and/or the storage path of the first file; the proxy service module can 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
技术领域technical field
本申请涉及电子设备领域,尤其涉及一种文件打开方法及设备。The present application relates to the field of electronic devices, and in particular, to a file opening method and device.
背景技术Background technique
随着移动设备(如手机、平板等)的发展,利用移动设备上的应用程序进行办公的用户也越来越多。在使用电脑办公时,为了便于使用移动设备上的应用程序,很多用户会通过在电脑上的操作系统运行移动设备操作系统模拟器的方式,在电脑上使用运行在移动设备操作系统模拟器中的应用程序。With the development of mobile devices (such as mobile phones, tablets, etc.), more and more users use applications on mobile devices for office work. When working with a computer, in order to facilitate the use of applications on mobile devices, many users will use the mobile device operating system simulator on the computer by running the mobile device operating system simulator on the operating system of the computer. application.
但是,目前在移动设备操作系统模拟器上打开文件时无法通过电脑的操作系统中的应用程序打开。However, currently opening a file on a mobile device operating system emulator cannot be opened by an application in the computer's operating system.
发明内容SUMMARY OF THE INVENTION
本申请提供一种文件打开方法及设备,解决了在移动设备操作系统模拟器上打开文件时无法通过电脑的操作系统中的应用程序打开的问题。The present application provides a method and device for opening a file, which solves the problem that a file cannot be opened by an application program in an operating system of a computer when a file is opened on a mobile device operating system simulator.
为了达到上述目的,本申请采用如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
第一方面,本申请提供一种文件打开方法,该方法可应用于电子设备,该电子设备运行第一操作系统,在第一操作系统上运行有第二操作系统的模拟器。其中,第一操作系统中预设有代理服务模块,第二操作系统的模拟器中预设有代理应用程序。该方法可包括:当代理应用程序检测到用户在第二操作系统的模拟器中选择使用第一操作系统打开第一文件的操作时,代理应用程序可向代理服务模块发送第一消息,该第一消息包括第一文件的文件名,和/或,第一文件的存储路径;代理服务模块便可根据第一消息在所述第一操作系统中打开第一文件。其中,第一文件由第二操作系统的模拟器存储在电子设备中。In a first aspect, the present application provides a file opening method, which can be applied to an electronic device running a first operating system on which an emulator of the second operating system runs. Wherein, 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. The method may include: when the proxy application detects that the user selects the operation of opening the first file using the first operating system in the emulator of the second operating system, the proxy application may send a first message to the proxy service module, the first A message includes the file name of the first file and/or the storage path of the first file; the proxy service module can open 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.
采用上述技术方案,用户可以在需要打开第二操作系统的模拟器上的文件时通过第一操作系统打开,从而为用户提供更加便捷的文件打开体验。例如,用户在第二操作系统的模拟器上需要打开某个文件时,若第二操作系统的模拟器中没有能够打开用户需要打开的文件的应用程序,而第一操作系统中有能够打开用户需要打开的文件的应用程序,则用户可以通过第一操作系统中的相应应用程序打开要打开的文件。又例如,用户在第二操作系统的模拟器上需要打开某个文件时,第二操作系统的模拟器中安装有能够打开该文件的应用程序,第一操作系统中也安装有能够打开该文件的应用程序,则此时用户可以根据个人喜好使用第一操作系统中的应用程序来打开该文件,而不使用第二操作系统的模拟器中的应用程序。With the above technical solution, the user can open the file on the simulator of the second operating system through the first operating system when the user needs to open the file, thereby providing the user with a more convenient file opening experience. For example, when a user needs to open a certain file on the simulator of the second operating system, if the simulator of the second operating system does not have an application program that can open the file that the user needs to open, but there is an application program that can open the file that the user needs to open in the first operating system If the application program of the file to be opened is required, the user can open the file to be opened through the corresponding application program in the first operating system. For another example, when the user needs to open a certain file on the simulator of the second operating system, an application program capable of opening the file is installed in the simulator of the second operating system, and an application program capable of opening the file is also installed in the first operating system. The user can use the application in the first operating system to open the file according to personal preference, instead of using the application in the simulator of the second operating system.
在一种可能的实现方式中,第一操作系统包括应用层、框架层以及内核层,代理服务模块部署于应用层,框架层包括系统框架,内核层包括内核;第二操作系统的模拟器包括代理动态库以及系统驱动,代理应用程序部署于应用层,代理动态库部署于框架层,系统驱动部署于内核层。In a 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 includes Proxy dynamic library and system driver, the proxy application is deployed in the application layer, the proxy dynamic library is deployed in the framework layer, and the system driver is deployed in the 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 to the proxy service module Send the first message.
在一种可能的实现方式中,代理应用程序向代理服务模块发送第一消息,包括:代理应用程序通过代理动态库调用系统驱动向内核发送第一消息;内核通过系统框架将第一消息发送给代理服务模块。In a possible implementation manner, the proxy application sends the first message to the proxy service module, including: the proxy application invokes the system driver through the proxy dynamic library to send the first message to the kernel; the kernel sends the first message to the kernel through the system framework Proxy service module.
在一种可能的实现方式中,在代理应用程序检测到用户在第二操作系统的模拟器中选择使用第一操作系统打开第一文件的操作之前,方法还包括:代理应用程序检测到用户在第二操作系统的模拟器中选择第一文件的操作,显示用于触发使用第一操作系统打开第一文件的功能选项;相应地,用户在第二操作系统的模拟器中选择使用第一操作系统打开第一文件的操作包括:用户对功能选项的选择操作。In a possible implementation manner, before the proxy application detects that the user selects in the simulator of the second operating system to open the first file using the first operating system, the method further includes: the proxy application detects that the user is in The operation of selecting the first file in the simulator of the second operating system displays a function option for triggering the opening of the first file by using the first operating system; correspondingly, the user selects and uses the first operation in the simulator of the second operating system The operation of the system to open the first file includes: a user's selection operation of function options.
如此,代理应用程序在检测到用户在第二操作系统的模拟器中选择了第一文件时,能够向用户显示可触发使用第一操作系统打开第一文件的功能选项供用户选择,从而便于用户通过选择该功能选项来触发使用第一操作系统来打开第一文件。In this way, when detecting that the user has selected the first file in the emulator of the second operating system, the proxy application can display to the user a function option that can trigger the use of the first operating system to open the first file for the user to select, thereby facilitating the user The use of the first operating system to open the first file is triggered by selecting this functional option.
在一种可能的实现方式中,代理应用程序中预设有文件格式清单,该文件格式清单包含能够使用第一操作系统打开的文件的文件格式;相应地,在显示用于触发使用第一操作系统打开第一文件的功能选项之前,方法还包括:代理应用程序根据文件格式清单确定第一文件能够使用第一操作系统打开。In a possible implementation manner, a file format list is preset in the agent application, and the file format list includes file formats of files that can be opened using the first operating system; Before the system opens the function options of the first file, the method further includes: the agent application determines that the first file can be opened using the first operating system according to the file format list.
如此,代理应用程序能够仅向可以使用第一操作系统打开的文件提供用于触发使用第一操作系统打开文件的功能选项,从而避免用户通过功能选项触发了使用第一操作系统打开文件的功能,最终第一操作系统却无法打开文件的情况。In this way, the proxy application can only provide the function option for triggering the opening of the file using the first operating system to the file that can be opened using the first operating system, thereby preventing the user from triggering the function of opening the file using the first operating system through the function option, In the end, the first operating system was unable to open the file.
在一种可能的实现方式中,用户在第二操作系统的模拟器中选择第一文件的操作包括:用户长按或右键点击第一文件。In a possible implementation manner, the operation of the user selecting the first file in the simulator of the second operating system includes: the user long-pressing or right-clicking the first file.
在一种可能的实现方式中,第一消息还包括用于指示打开第一文件的打开指令。In a possible implementation manner, the first message further includes an opening instruction for instructing to open the first file.
在第一消息中包括打开指令,可通过该指令来指示第一操作系统执行打开第一文件的动作。当然,在一些其他可能的实现方式中,第一消息还可以自身作为用于指示第一操作系统打开第一文件的指令,此处不做限制。The first message includes an opening instruction, which can be used to instruct the first operating system to perform an action of opening the first file. Of course, in some other possible implementation manners, the first message itself may also serve as an instruction for instructing the first operating system to open the first file, which is not limited here.
在一种可能的实现方式中,代理服务模块根据第一消息在所述第一操作系统中打开第一文件,包括:代理服务模块根据第一消息确定第一文件的存储位置;代理服务模块根据第一文件的文件格式确定第一应用程序,第一应用程序为所述第一操作系统中具有打开第一文件的功能的应用程序;代理服务模块通过第一应用程序打开第一文件。In a possible implementation manner, the proxy service module opens the first file in the first operating system according to the first message, including: the proxy service module determines the storage location of the first file according to the first message; the proxy service module determines the storage location of the first file according to the first message; The file format of the first file determines a first application program, and the first application program is an application program in the first operating system with the function of opening the first file; the proxy service module opens the first file through the first application program.
其中,当第一消息包括文件名时,代理服务模块可以根据文件名在电子设备中进行搜索以确定第一文件的存储位置。当第一消息包括存储路径时,代理服务模块可以根据存储路径直接确定第一文件的存储位置。Wherein, when the first message includes the file name, the proxy service module may search the electronic device according to the file name to determine the storage location of the first file. When the first message includes the storage path, the proxy service module may directly determine the storage location of the first file according to the storage path.
在一种可能的实现方式中,代理服务模块根据第一消息在所述第一操作系统中打开第一文件,包括:代理服务模块根据第一消息确定第一文件的存储位置;代理服务模块根据第一文件的文件格式确定并显示所述第一操作系统中至少一个具有打开第一文件的功能的应用程序;代理服务模块检测到用户选择应用程序的操作,通过用户选择的应用程序打开第一文件。In a possible implementation manner, the proxy service module opens the first file in the first operating system according to the first message, including: the proxy service module determines the storage location of the first file according to the first message; the proxy service module determines the storage location of the first file according to the first message; The file format of the first file determines and displays at least one application program with the function of opening the first file in the first operating system; the proxy service module detects the operation of the user selecting the application program, and opens the first file through the application program selected by the user. document.
如此,能够在第一操作系统包括多个能够打开第一文件的应用程序时,向用户提供可选择的应用程序,供用户根据喜好选择使用相应的应用程序打开第一文件。In this way, when the first operating system includes a plurality of application programs capable of opening the first file, a selectable application program can be provided to the user for the user to choose to use the corresponding application program to open the first file according to preference.
第二方面,本申请提供一种文件打开装置,该装置可以应用于电子设备,用于实现上述第一方面中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,代理应用模块和代理服务模块等。其中,代理应用模块服务于第二操作系统的模拟器,代理服务模块服务于第一操作系统。In a second aspect, the present application provides an apparatus for opening a file, which can be applied to an electronic device and is used to implement the method in the above-mentioned first aspect. The functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, for example, an agent application module and an agent service module. The proxy application module serves the simulator of the second operating system, and the proxy service module serves the first operating system.
其中,代理应用模块,可用于检测到用户在第二操作系统的模拟器中选择使用第一操作系统打开第一文件的操作时,向代理服务模块发送第一消息,该第一消息包括第一文件的文件名,和/或,第一文件的存储路径。代理服务模块,可用于根据第一消息在所述第一操作系统中打开第一文件。其中,第一文件由第二操作系统的模拟器存储在电子设备中。The proxy application module can be configured to detect that the user selects the operation of opening the first file using the first operating system in the simulator of the second operating system, and sends a first message to the proxy service module, where the first message includes the first The file name of the file, and/or, the storage path of the first file. The proxy service module can be used to open 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 proxy application module is further configured to detect that the user selects the first file in the simulator of the second operating system, and display the function for triggering the opening of the first file by using the first operating system Correspondingly, the operation of the user selecting to open the first file using the first operating system in the simulator of the second operating system includes: the user's selection operation of a function option.
在一种可能的实现方式中,代理应用模块中预设有文件格式清单,该文件格式清单包含能够使用第一操作系统打开的文件的文件格式;相应地,代理应用模块,还用于根据文件格式清单确定第一文件能够使用第一操作系统打开。In a possible implementation manner, the proxy application module is preset with a file format list, and the file format list includes the file formats of the files that can be opened by the first operating system; correspondingly, the proxy application module is further configured to The format manifest determines that the first file can be opened using the first operating system.
在一种可能的实现方式中,用户在第二操作系统的模拟器中选择第一文件的操作包括:用户长按或右键点击第一文件。In a possible implementation manner, the operation of the user selecting the first file in the simulator of the second operating system includes: the user long-pressing or right-clicking the first file.
在一种可能的实现方式中,第一消息还包括用于指示打开第一文件的打开指令。In a possible implementation manner, the first message further includes an opening instruction for instructing to open the first file.
在一种可能的实现方式中,代理服务模块,具体用于根据第一消息确定第一文件的存储位置;根据第一文件的文件格式确定第一应用程序,第一应用程序为所述第一操作系统中具有打开第一文件的功能的应用程序;通过第一应用程序打开第一文件。In a possible implementation manner, the proxy service module is specifically configured to determine the storage location of the first file according to the first message; determine the first application program according to the file format of the first file, and the first application program is the first application program. An application program with the function of opening the first file in the operating system; the first file is opened through the first application program.
在一种可能的实现方式中,代理服务模块,具体用于根据第一消息确定第一文件的存储位置;根据第一文件的文件格式确定并显示所述第一操作系统中至少一个具有打开第一文件的功能的应用程序;检测到用户选择应用程序的操作,通过用户选择的应用程序打开第一文件。In a possible implementation manner, the proxy service module is specifically configured to determine the storage location of the first file according to the first message; determine and display according to the file format of the first file that at least one of the first operating systems has the ability to open the first file. An application program with a function of a file; an operation of selecting an application program by the user is detected, and the first file is opened through the application program selected by the user.
第三方面,本申请提供一种电子设备,包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的文件打开方法。In a third aspect, the present application provides an electronic device, including: a processor, and a memory for storing instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the file opening method according to any one of the first aspect or 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. When the computer program instructions are executed by the electronic device, the electronic device is caused to implement the file opening method according to any one of the first aspect or possible implementation manners of the first aspect.
第五方面,本申请提供一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的文件打开方法。In a fifth aspect, the present application provides a computer program product, comprising computer-readable codes, which, when the computer-readable codes are executed in an electronic device, enable the electronic device to realize the first aspect or a possible implementation manner of the first aspect The file opening method described in any one of.
应当理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It should be understood that, for the beneficial effects of the foregoing second aspect to the fifth aspect, reference may be made to the relevant descriptions in the foregoing first aspect, and details are not described herein again.
附图说明Description of drawings
图1为本申请提供的一种电子设备的结构示意图;1 is a schematic structural diagram of an electronic device provided by the application;
图2为本申请提供的一种系统的体系架构示意图;Fig. 2 provides a kind of application for this application Schematic diagram of the system architecture;
图3为本申请提供的一种文件打开方法应用时的界面示意图;3 is a schematic interface diagram when a file opening method provided by the application is applied;
图4为本申请提供的另一种文件打开方法应用时的界面示意图;4 is a schematic interface diagram when another file opening method provided by the application is applied;
图5为本申请提供的另一种文件打开方法应用时的界面示意图。FIG. 5 is a schematic diagram of an interface when another file opening method provided by the present application is applied.
具体实施方式Detailed ways
随着移动设备(如手机、平板等)不断发展,用户使用移动设备的频率越来越高。并且,凭借移动设备的便携性,用户使用移动设备利用应用程序进行移动轻办公的需求也越来越大。因此,当用户通过电脑进行办公时,为了能够方便的使用常用的应用程序,用户通常会通过在电脑的操作系统上运行移动设备操作系统模拟器的方式使用移动设备的应用程序。即在电脑上使用移动设备操作系统模拟器运行移动设备的应用程序。With the continuous development of mobile devices (such as mobile phones, tablets, etc.), users use mobile devices more and more frequently. Moreover, with the portability of mobile devices, there is a growing demand for users to use mobile devices to use applications for mobile light office work. Therefore, when a user works through a computer, in order to conveniently use the commonly used application programs, the user usually uses the mobile device application program by running the mobile device operating system simulator on the computer operating system. That is, use the mobile device operating system emulator to run the application of the mobile device on the computer.
但是,目前在移动设备操作系统模拟器上打开文件时无法通过电脑的操作系统中的应用程序打开。即,用户在电脑的操作系统上需要打开某个文件时,用户只能通过电脑的操作系统上的应用程序来打开。用户在移动设备操作系统模拟器上需要打开某个文件时,用户只能通过移动设备操作系统模拟器上的应用程序来打开。However, currently opening a file on a mobile device operating system emulator cannot be opened by an application in the computer's operating system. That is, when a user needs to open a certain file on the operating system of the computer, the user can only open it through an application program on the operating system of the computer. When a user needs to open a file on the mobile device operating system simulator, the user can only open it through an application on the mobile device operating system simulator.
因此,当用户在移动设备操作系统模拟器上需要打开某个文件,而在移动设备操作系统模拟器中没有能够打开该文件的应用程序时,即使电脑的操作系统上有能够打开该文件的应用程序,用户也无法打开该文件。Therefore, when a user needs to open a file on the mobile device operating system simulator, but there is no application that can open the file in the mobile device operating system simulator, even if there is an application that can open the file on the computer's operating system program, the user cannot open the file.
为了解决上述问题,本申请实施例提供一种文件打开方法。该方法可以应用于运行第一操作系统的电子设备上运行有第二操作系统的模拟器时,用户在第二操作系统的模拟器上打开文件时通过电子设备的第一操作系统中的应用程序打开该文件的场景。例如,以电子设备为电脑,第一操作系统为电脑的操作系统,第二操作系统的模拟器为移动设备操作系统模拟器为例,用户在移动设备操作系统模拟器上打开文件时可以通过电脑的操作系统中的应用程序打开该文件。In order to solve the above problem, an embodiment of the present application provides a file opening method. The method can be applied to when a simulator of a second operating system runs on an electronic device running a first operating system, when a user opens a file on the simulator of the second operating system, the user can use the application program in the first operating system of the electronic device to open a file. Open the file's scene. For example, taking the electronic device as a computer, the first operating system as the computer's operating system, and the simulator of the second operating system as a mobile device operating system simulator, when a user opens a file on the mobile device operating system simulator, the application in your operating system to open the file.
该文件打开方法可以包括:电子设备上运行第一操作系统以及第二操作系统的模拟器。当用户在第二操作系统的模拟器上打开文件(如第一文件)时,第二操作系统的模拟器可以向第一操作系统发送第一消息(如,包含用户要打开的该文件的文件路径的消息),第一操作系统接收到该消息后,第一操作系统便可以根据该消息打开用户要打开的文件。其中,第一操作系统和第二操作系统为不同的操作系统。The file opening method may include: running an emulator of the first operating system and the second operating system on the electronic device. When the user opens a file (eg, the first file) on the emulator of the second operating system, the emulator of the second operating system may send a first message (eg, a file containing the file to be opened by the user) to the first operating system path message), after the first operating system receives the message, the first operating system can 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 (such as the first file) to be opened by the user on the simulator of the second operating system refers to a file stored in the electronic device by the simulator of the second operating system, and it can be considered that the file is located in the simulator of the second operating system. in the simulator.
需要说明的是,由于第二操作系统的模拟器运行在第一操作系统上,因此,第二操作系统的模拟器和第一操作系统均使用同一存储装置进行数据存储。并且,第一操作系统和第二操作系统的模拟器均使用第一操作系统的资源管理器。所以,第一操作系统能够读取访问第二操作系统的模拟器存储的数据,第二操作系统的模拟器也能够读取和访问第一操作系统存储的数据。It should be noted that, since the simulator of the second operating system runs on the first operating system, the simulator of the second operating system and the first operating system both use the same storage device for data storage. In addition, the emulators of the first operating system and the second operating system both use the resource manager of the first operating system. Therefore, the first operating system can read and access data stored by the emulator of the second operating system, and the emulator of the second operating system can also read and access data stored by the first operating system.
如此,用户可以在需要打开第二操作系统的模拟器上的文件时通过第一操作系统打开,从而为用户提供更加便捷的文件打开体验。例如,用户在第二操作系统的模拟器上需要打开某个文件时,若第二操作系统的模拟器中没有能够打开用户需要打开的文件的应用程序,而第一操作系统中有能够打开用户需要打开的文件的应用程序,则用户可以通过第一操作系统中的相应应用程序打开要打开的文件。又例如,用户在第二操作系统的模拟器上需要打开某个文件时,第二操作系统的模拟器中安装有能够打开该文件的应用程序,第一操作系统中也安装有能够打开该文件的应用程序,则此时用户可以根据个人喜好使用第一操作系统中的应用程序来打开该文件,而不使用第二操作系统的模拟器中的应用程序。In this way, the user can open the file on the simulator of the second operating system through the first operating system when the user needs to open the file, thereby providing the user with a more convenient file opening experience. For example, when a user needs to open a certain file on the simulator of the second operating system, if the simulator of the second operating system does not have an application program that can open the file that the user needs to open, but there is an application program that can open the file that the user needs to open in the first operating system If the application program of the file to be opened is required, the user can open the file to be opened through the corresponding application program in the first operating system. For another example, when the user needs to open a certain file on the simulator of the second operating system, an application program capable of opening the file is installed in the simulator of the second operating system, and an application program capable of opening the file is also installed in the first operating system. The user can use the application in the first operating system to open the file according to personal preference, instead of using the application in the simulator of the second operating system.
以下,将结合附图对本申请实施例提供的文件打开方法进行说明。Hereinafter, the file opening method provided by the embodiments of the present application will be described with reference to the accompanying drawings.
在本申请实施例中,上述电子设备,可以是手机、平板电脑、手持计算机,PC,蜂窝电话,个人数字助理(personal digital assistant,PDA),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,智能投影仪,智能电视盒等。本申请实施例对于电子设备的具体设备形态不作特殊限制。In the embodiment of the present application, the above 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 (such as a TV), a car ( Such as: car computer), smart screen, game console, smart projector, smart TV box, etc. The embodiments of the present application do not specifically limit the specific device form of the electronic device.
在本申请实施例中,上述电子设备是可以运行操作系统,安装应用程序的电子设备。可选地,上述第一操作系统和/或第二操作系统,可以是系统、系统、系统、系统、系统、系统等。更具体的,还可以是系统、系统等。其中,第一操作系统和第二操作系统不同,例如,第一操作系统为系统,第二操作系统为系统,又例如,第一操作系统为系统,第二操作系统为系统等。In the embodiment of the present application, the above-mentioned electronic device is an electronic device that can run an operating system and install application programs. Optionally, the above-mentioned first operating system and/or second operating system may be system, system, system, system, system, system, etc. More specifically, it can also be system, system, etc. The first operating system and the second operating system are different, for example, the first operating system is system, the second operating system is system, for another example, the first operating system is system, the second operating system is system, etc.
示例地,以电子设备为电脑为例,图1示出了本申请实施例提供的一种电子设备的结构示意图。也即,示例性的,图1所示的电子设备可以是电脑。For example, taking the electronic device as a computer as an example, FIG. 1 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. That is, by way of example, the electronic device shown in FIG. 1 may be a computer.
如图1所示,电子设备可以包括:射频(radio frequency,RF)电路110、存储器120、输入单元130、显示单元140、传感器150、音频电路160、无线保真(wireless fidelity,WiFi)模块170、处理器180、电源190以及蓝牙模块1100等部件。本领域技术人员可以理解,图1中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 1 , the electronic device may include: a radio frequency (RF)
下面结合图1对电子设备的部分构成部件进行具体的介绍:The following is a detailed introduction to some components of the electronic device in conjunction with FIG. 1 :
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行电子设备的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)、引导装载程序(boot loader)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The
输入单元130可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,输入单元130可包括触控面板131以及其他输入设备132。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。在本申请实施例中,用户可以通过触控面板131、鼠标或键盘来输入通过电脑的系统打开模拟器中的文件的操作。The
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种菜单。显示单元140可包括显示面板141,可选的,可以采用液晶显示器(liquidcrystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板141。进一步的,触控面板131可覆盖显示面板141,当触控面板131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图1中,触控面板131与显示面板141是作为两个独立的部件来实现电子设备的输入和输入功能,但是在某些实施例中,可以将触控面板131与显示面板141集成而实现电子设备的输入和输出功能。The
处理器180是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器120内的软件程序或模块,以及调用存储在存储器120内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器180可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。The
当然,可以理解的,上述图1所示仅仅为电子设备的形态为电脑时的示例性说明。若电子设备是平板电脑,手持计算机,手机,PDA,智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机等其他设备形态时,电子设备的结构中可以包括比图1中所示更少的结构,也可以包括比图1中所示更多的结构,在此不作限制。Of course, it can be understood that the above-mentioned FIG. 1 is only an exemplary illustration when the form of the electronic device is a computer. If the electronic device is a tablet computer, handheld computer, mobile phone, PDA, smart home equipment (such as: TV), car machine (such as: car computer), smart screen, game console and other equipment forms, the structure of the electronic device can be Fewer structures than those shown in FIG. 1 are included, and more structures than those shown in FIG. 1 may be included, without limitation.
以下实施例中的方法均可以在具有上述硬件结构的电子设备中实现。下面将结合附图对本申请实施例进行举例说明。The methods in the following embodiments can all be implemented in an electronic device having the above-mentioned hardware structure. The embodiments of the present application will be illustrated below with reference to the accompanying drawings.
以电子设备为个人计算机(personal computer,PC),或称为电脑,电子设备上运行的第一操作系统为系统,第二操作系统为系统(即第二操作系统的模拟器为系统模拟器)为例。Taking the electronic device as a personal computer (PC), or referred to as a computer, the first operating system running on the electronic device is system, the second operating system is system (i.e. the emulator of the second operating system is system simulator) as an example.
图2示出了系统的体系架构示意图。如图2所示,该系统一般包括:应用层、框架层以及内核层。其中,应用层可以用于部署各种应用程序,框架层可以提供各种系统组件和系统运行库,以供应用层部署的应用程序调度。内核层能够为操作系统提供最基本的功能服务,能够管理系统进程、设备驱动等。示例地,本申请实施例中,可以将系统分成两个虚拟区域,其中一个虚拟区域用于正常运行系统,另一个虚拟区域则用于运行系统模拟器。运行在系统上的系统模拟器则可以通过上述的内核层与系统进行信息交互,例如系统和系统模拟器可以通过内核层相互发送通知消息,请求消息等,示例地,本申请实施例中系统模拟器向系统发送的第一消息便可以通过内核层发送。在系统中,应用层可以部署一个代理服务(即windows服务,在本申请实施例中代理服务还可以称为代理服务模块),用于接收和响应系统模拟器发送的第一消息。框架层则包括系统框架,内核层包括内核。系统模拟器可以包括代理应用程序、代理动态库(dll)以及安卓(Android)驱动(即系统驱动)。其中,代理应用程序部署在上述应用层中,能够提供触发使用系统打开用户要打开的文件(如第一文件)的功能,以及生成和发送第一消息的功能。代理动态库位于上述框架层,能够被代理应用程序调度以调用安卓驱动实现代理应用程序的功能。安卓驱动位于上述内核层,能够被代理动态库调用以执行相应操作。Figure 2 shows Schematic diagram of the system architecture. As shown in Figure 2, the The system generally includes: application layer, framework layer and kernel layer. Among them, the application layer can be used to deploy various applications, and the framework layer can provide various system components and system runtime libraries to schedule applications 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, etc. For example, in this embodiment of the present application, the The system is divided into two virtual areas, one of which is used for normal operation system, another virtual area is used to run System emulator. operating on the system The system simulator can communicate with the above-mentioned kernel layer The system interacts with information, such as system and The system simulators can send notification messages, request messages, etc. to each other through the kernel layer. For example, in the embodiments of the present application system emulator The first message sent by the system can then be sent through the kernel layer. exist In the system, the application layer can deploy a proxy service (that is, a windows service, in the embodiment of this application, the proxy service can also be called a proxy service module) for receiving and responding The first message sent by the system simulator. The framework layer includes the system framework, and the kernel layer includes the kernel. The system emulator may include an agent application, an agent dynamic library (dll), and an Android (Android) driver (ie, a system driver). Among them, the proxy application is deployed in the above application layer, which can provide trigger usage The system has the function of opening the file (eg, the first file) to be opened by the user, and the function of generating and sending the first message. The proxy dynamic library is located in the above-mentioned framework layer, and can be dispatched by the proxy application to call the Android driver to realize the function of the proxy application. The Android driver is located at the above-mentioned kernel layer and can be called by the proxy dynamic library to perform corresponding operations.
示例地,如图3中的(a)所示,在用户在运行系统的电脑上打开系统模拟器时,电脑会显示系统模拟器的界面302。若用户在系统模拟器的界面上使用即时通讯类应用程序与其他用户进行聊天时(例如,用户在系统打开即时通讯类应用程序并登陆第一账户进行使用时,还通过系统模拟器打开系统模拟器中的该通讯类应用程序并登陆第二账户进行使用,以便同时使用两个账户登陆该即时通讯类应用程序),系统模拟器上的即时通讯类应用程序接收到了其他用户发送的第一文件(如文档1),但是在系统模拟器中没有安装能够打开该第一文件的应用程序,而系统中安装有能够打开该第一文件的应用程序,则此时用户可以在电脑上通过系统中安装的应用程序打开该第一文件。Illustratively, as shown in (a) of Figure 3, when the user is running Open on the system computer When the system simulator is running, the computer will display The
可选地,用户可以通过在系统模拟器上选择使用系统打开要打开的第一文件的操作来触发使用电脑的系统打开第一文件。其中,要打开的文件,即第一文件,为由系统模拟器存储在电子设备中的文件。Optionally, the user can Choose to use on the system emulator The operation of the system to open the first file to be opened triggers the use of the computer The system opens the first file. Among them, the file to be opened, that is, the first file, is A file stored in an electronic device by the system simulator.
作为一种示例,可以在系统模拟器中为文件设置用于触发使用电脑(即使用系统)打开文件的功能选项,如“用PC打开”的功能选项。可供用户需要通过PC的系统(即第一操作系统)来打开文件时选择。As an example, you can The file settings in the system simulator are used to trigger the use of the computer (that is, use System) to open the file function options, such as "open with PC" function option. Available to users who need to pass the PC system (ie, the first operating system) to select when opening the file.
示例地,该用于触发使用电脑(即使用系统)打开文件的功能选项可以设置在右键菜单中,以使用户可以通过右键点击要打开的文件时,能够在右键菜单中选择使用电脑打开文件的功能选项。Illustratively, this is used to trigger the use of a computer (i.e. System) function options for opening files can be set in the right-click menu, so that when users right-click the file to be opened, they can select the function option to open files using computer in the right-click menu.
例如,如图3所示,在PC中显示有系统的界面301以及系统模拟器的界面302。如图3中的(a)所示,当用户在系统模拟器中将鼠标指针放在要打开的第一文件(如文档1)上,并右键选择要打开的文件时,如图3中的(b)所示, 系统模拟器的界面302中会显示该文件的右键菜单,在该菜单中可以包括“复制”、“用PC打开”以及“用其他应用打开”的功能选项。如图3中的(b)所示,用户可以通过选择“用PC打开”的功能选项来选择使用PC(即PC运行的系统)打开该文件。For example, as shown in Figure 3, the PC displays with
示例地,该使用PC打开文件的功能选项还可以设置为当用户长按要打开的文件时显示。For example, the function option of using the PC to open a file can also be set to be displayed when the user long presses the file to be opened.
例如,在PC中显示有系统的界面以及系统模拟器的界面。当用户在系统模拟器中选择并长按(可以是手指触控选择并长按,还可以通过鼠标选择并长按、手写笔选择并长按等此处不做限制)要打开的第一文件(如文档1)时,系统模拟器的界面中会显示该文件相关的功能选项菜单,在该菜单中可以包括“复制”、“用PC打开”以及“用其他应用打开”的功能选项。用户可以通过选择“用PC打开”的功能选项来选择使用PC(即PC运行的系统)打开该文件。For example, in the PC it is displayed with system interface and The interface of the system emulator. when the user is Select and long-press in the system simulator (it can be selected and long-pressed by finger touch, or selected and long-pressed by mouse, selected and long-pressed by stylus, etc. There are no restrictions here) to open the first file (such as a document) 1), when In the interface of the system simulator, a menu of function options related to the file will be displayed, and the menu can include the function options of "Copy", "Open with PC" and "Open with other applications". The user can choose to use the PC (that is, the PC running system) to open the file.
作为另一种示例,用户在系统模拟器上选择使用系统打开要打开的第一文件,还可以是通过预设的快捷键、手势等实现此处不做限制。例如,可以预设使用PC打开文件的快捷键,当用户选择要打开的文件后,输入快捷键便能够选择使用PC(即系统)打开要打开的文件。As another example, the user is Choose to use on the system emulator When the system opens the first file to be opened, it can also be realized by preset shortcut keys, gestures, etc., and there is no restriction here. For example, a shortcut key for opening a file using a PC can be preset, and when the user selects the file to be opened, the user can choose to use the PC (ie, system) to open the file to be opened.
可选地,可以在系统模拟器中注册能够支持用系统打开的文件格式(即在模拟器中预设包含能够使用系统打开的文件的文件格式(或称为文件类型)的文件格式清单),从而使注册了的文件格式对应的文件才能够被用户选择使用系统打开。例如,基于上述示例,只为注册了的文件格式对应的文件提供用于触发使用系统打开文件的功能选项。或者,只有当用户选择了注册了的文件格式对应的文件后输出快捷键或手势才能选择使用系统打开该文件。Optionally, you can Registering in the system simulator can support The file format opened by the system (that is, the preset in the simulator contains the ability to use The file format (or file format list) of the file opened by the system, so that the file corresponding to the registered file format can be selected and used by the user The system is turned on. For example, based on the above example, only the files corresponding to the registered file formats are provided for triggering usage System options for opening files. Or, only when the user selects the file corresponding to the registered file format, the output shortcut key or gesture can be selected to use The system opens the file.
可选地,上述用于触发使用系统打开文件的示例,如,在系统模拟器中为文件设置用于触发使用电脑(即使用系统)打开文件的功能选项的示例,以及预设使用PC打开文件的快捷键的示例,均可以通过图2中所示的系统模拟器中的代理应用程序实现。Optionally, the above is used to trigger the use of An example of the system opening a file, e.g. in The file settings in the system simulator are used to trigger the use of the computer (that is, use An example of the function options for opening a file in the system), and an example of the shortcut key for opening a file by default using the PC, can be accessed through the Proxy application implementation in the system simulator.
当用户选择了使用系统打开要打开的第一文件后,响应于用户的操作, 系统模拟器可以向系统发送用于指示系统打开文件的消息(如第一消息)。When the user chooses to use After the system opens the first file to be opened, in response to the user's operation, The system emulator can sent by the system to indicate The message that the system opened the file (eg the first message).
其中,系统模拟器向系统发送的消息可以是套接字(socket)消息。当然,在本申请实施例中,上述消息还可以是其他用于进程间交互的消息类型此处不做限制。in, system emulator The messages sent by the system may be socket messages. Of course, in this embodiment of the present application, the above message may also be other message types used for inter-process interaction, which is not limited here.
作为一种示例,在该用于指示系统打开文件的消息中,可以包括打开文件的指令(在本申请中也可称为打开指令)如,“open”,以及用户选择的要打开的第一文件的文件信息。示例地,文件信息可以是文件的文件路径(或称为存储路径)。当系统接收到该消息后,便能够根据用户选择的要打开的第一文件的文件路径确定文件的存储位置,然后打开相应的文件。As an example, where used to indicate The message of the system to open the file may include 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. For example, the file information may be a file path (or referred to as a storage path) of the file. when After receiving the message, the system can determine the storage location 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, where the user indicates In the message that the system opens the file, the above-mentioned file information contained in the message may be the file name of the file to be opened by the user (ie, the first file). when After receiving the message, the system can search the electronic device according to the file name of the file to be opened selected by the user, determine the storage location of the file according to the search result, and then open the corresponding file.
可选地,第一消息可以由图2中所示的系统模拟器中的代理应用程序来生成。即当代理应用程序检测到用户选择使用系统打开文件的操作后,代理应用程序能够根据用户选择的要打开的文件生成第一消息。代理应用程序生成第一消息后,可以通过代理动态库来调用安卓驱动以向系统发送第一消息。Optionally, the first message may consist of the one shown in FIG. 2 Agent application in the system simulator to generate. i.e. when the proxy application detects that the user chooses to use After the system opens the file, the agent application can generate the first message according to the file to be opened selected by the user. After the proxy application generates the first message, it can call the Android driver through the proxy dynamic library to send The system sends the first message.
当系统接收到系统模拟器发送的消息后,系统便可以根据接收到的第一消息通过相应的应用程序打开用户要打开的文件(即第一文件)。when system receives After the system emulator sends the message, The system can then open the file (ie, the first file) to be opened by the user through the corresponding application program according to the received first message.
示例地,系统可以对系统模拟器的消息进行监听,当确定接收到的消息来自系统模拟器,且包含打开文件的指令(如上述的打开指令)时,便可以根据消息中包含的文件名或文件路径打开第一文件(即,系统根据文件路径或文件名确定第一文件的存储位置,然后打开存储于该存储位置的第一文件)。Illustratively, system can The message of the system simulator is monitored, and when it is determined that the received message comes from When the system simulator contains an instruction to open a file (such as the above-mentioned open instruction), the first file can be opened according to the file name or file path contained in the message (that is, The system determines the storage location of the first file according to the file path or file name, and then opens the first file stored in the storage location).
例如,当用户采用如图3所示的方式选择使用PC打开要打开的文件后,如图4所示,在系统的界面401中,便能够显示采用相应应用程序打开的用户选择的文件。For example, when the user chooses to use the PC to open the file to be opened in the manner shown in Figure 3, as shown in Figure 4, in In the
其中,系统在打开相应的文件时,可以直接执行explorer命令来根据相应文件的文件格式自动使用相应的应用程序来打开文件。即系统在打开相应的文件时,可以根据该文件的文件格式(或者说文件类型)从注册表中查询关联的能够打开该文件的应用程序(如第一应用程序),然后通过该应用程序打开相应的文件。in, When the system opens the corresponding file, it can directly execute the explorer command to automatically use the corresponding application program to open the file according to the file format of the corresponding file. which is When the system opens a corresponding file, it can query the associated application (such as the first application) that can open the file from the registry according to the file format (or file type) of the file, and then open the corresponding application through the application. document.
当然,在一些其他实施例中,系统还可向用户展示(即显示)能够打开该文件的至少一个应用程序供用户选择。当用户选择相应的应用程序后,系统可以通过用户选择的应用程序来打开文件。例如,如图5所示,当用户选择使用系统打开相应的文件后(例如,用户通过如图4所示的方式选择使用PC打开要打开的文件),系统的界面501中可以向用户展示能够打开用户选择的文件的多个应用程序(例如,图中所示的应用程序1、应用程序2以及应用程序3等),当用户选择相应的应用程序时,系统便能够通过用户选择的应用程序打开用户要打开的文件。Of course, in some other embodiments, The system may also present (ie, display) to the user at least one application program capable of opening the file for selection by the user. When the user selects the corresponding application, The system can open the file with an application of the user's choice. For example, as shown in Figure 5, when the user chooses to use After the system opens the corresponding file (for example, the user chooses to use the PC to open the file to be opened as shown in Figure 4), In the
可选地,当系统接收到第一消息后,上述的根据第一消息通过相应的应用程序打开用户要打开的文件的示例,以及打开文件时向用户展示多个能够打开相关文件的应用程序的示例,均可通过图2中所示的系统中的代理服务来实现。Optionally, when After the system receives the first message, the above-mentioned example of opening the file to be opened by the user through the corresponding application program according to the first message, and the example of showing the user multiple applications that can open the related file when opening the file can all be performed through shown in Figure 2 Proxy service in the system to achieve.
示例地,基于上述实施例,当电脑采用如图2所示的体系架构时,系统模拟器的代理应用程序可以在检测到用户选择使用系统打开第一文件的操作时,生成第一消息,然后通过代理动态库调用安卓驱动经内核和系统框架向系统中的代理服务发送第一消息。系统中的代理服务可以持续监听消息,当接收到第一消息后,代理服务便可以根据第一消息来打开第一文件。Exemplarily, based on the above embodiment, when the computer adopts the architecture shown in FIG. 2, The system emulator's proxy application can detect that the user chooses to use When the system opens the first file, it generates the first message, and then calls the Android driver through the kernel and system framework through the proxy dynamic library. The proxy service in the system sends the first message. The proxy service in the system can continuously monitor the message, and after receiving the first message, the proxy service can open the first file according to the first message.
采用上述实施例中的方法,用户可以在第二操作系统的模拟器上打开文件时通过第一操作系统打开,从而为用户提供更加便捷的文件打开体验。With the method in the above embodiment, the user can open the file through the first operating system when opening the file on the simulator of the second operating system, thereby providing the user with a more convenient file opening experience.
例如,用户在第二操作系统的模拟器上需要打开某个文件时,若第二操作系统的模拟器中没有能够打开用户需要打开的文件的应用程序,而第一操作系统中有能够打开用户需要打开的文件的应用程序,则用户可以通过第一操作系统中的相应应用程序打开要打开的文件。示例地,以第一操作系统为系统,第二操作系统为系统(即第二操作系统的模拟器为系统模拟器)为例,当用户在系统模拟器上通过即时通讯应用程序接收到图纸文件后,用户需要打开该图纸文件时,若系统模拟器上没有能够打开该图纸文件的应用程序而系统上有,则用户可以通过系统上的应用程序来打开该图纸文件。For example, when a user needs to open a certain file on the simulator of the second operating system, if the simulator of the second operating system does not have an application program that can open the file that the user needs to open, but there is an application program that can open the file that the user needs to open in the first operating system If the application program of the file to be opened is required, the user can open the file to be opened through the corresponding application program in the first operating system. For example, the first operating system is system, the second operating system is system (i.e. the emulator of the second operating system is system simulator) as an example, when the user is After receiving the drawing file through the instant messaging application on the system simulator, when the user needs to open the drawing file, if There is no application on the system simulator capable of opening the drawing file and is available on the system, the user can application on the system to open the drawing file.
对应于前述实施例中的方法,本申请实施例还提供一种文件打开装置。该装置可以应用于上述的电子设备用于实现前述实施例中的方法。该装置的功能可以通过硬件执行相应的软件实现。包括一个或多个与上述方法功能相对应的模块。例如,该装置包括:代理应用模块、代理服务模块等。代理应用模块可服务于第二操作系统的模拟器,代理服务模块可服务于第一操作系统,配合用于实现上述实施例中的方法。Corresponding to the methods in the foregoing embodiments, an embodiment of the present application further provides a file opening device. The apparatus can be applied to the above-mentioned electronic equipment to implement the methods in the foregoing embodiments. The functions of the device can be implemented by hardware executing corresponding software. It includes one or more modules corresponding to the above method functions. For example, the apparatus includes: an agent application module, an agent service module, and the like. The proxy application module can serve the simulator of the second operating system, and the proxy service module can serve the first operating system, and is used to implement the method in the above embodiment.
本申请实施例还可以提供一种装置,如:电子设备,可以包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如前述实施例中的文件打开方法。该存储器可以位于该电子设备之内,也可以位于该电子设备之外。且该处理器包括一个或多个。Embodiments of the present application may further provide an apparatus, such as an electronic device, which may include a processor, and a memory for storing instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the file opening method in the foregoing embodiment. The memory may be located within the electronic device or external to the electronic device. And the processor includes one or more.
本申请实施例还提供一种芯片系统,该芯片系统可以应用于上述电子设备。芯片系统包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;处理器通过接口电路从电子设备的存储器接收并执行计算机指令,以实现以上方法实施例中相关的方法。An embodiment of the present application further provides a chip system, which can be applied to the above electronic device. 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, so as to realize the related methods in the above method embodiments. Methods.
本申请实施例还提供一种计算机程序产品,包括电子设备,如上述电子设备,运行的计算机指令(即计算机可读代码)。当计算机可读代码在电子设备中运行时,使得电子设备实现上述方法实施例中相关的方法。Embodiments of the present application also provide a computer program product, including computer instructions (ie, computer-readable codes) that are run by an electronic device, such as the above-mentioned electronic device. When the computer-readable code is executed in the electronic device, the electronic device is made to implement the related methods in the above method embodiments.
本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述方法实施例中的文件打开方法。Embodiments of the present application may further provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by the electronic device, the electronic device is made to implement the file opening method in the foregoing method embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. . Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims (9)
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 CN113672289A (en) | 2021-11-19 |
CN113672289B true 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) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8037473B2 (en) * | 2006-10-20 | 2011-10-11 | International Business Machines Corporation | Method to share licensed applications between virtual machines |
CN102023904B (en) * | 2009-09-21 | 2013-09-04 | 联想(北京)有限公司 | 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 emulator and method for implementing Android emulator |
-
2021
- 2021-07-23 CN CN202110838308.3A patent/CN113672289B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113672289A (en) | 2021-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8881047B2 (en) | Systems and methods for dynamic background user interface(s) | |
US10156980B2 (en) | Toggle gesture during drag gesture | |
KR102021048B1 (en) | Method for controlling user input and an electronic device thereof | |
KR102064952B1 (en) | Electronic device for operating application using received data | |
US20140173747A1 (en) | Disabling access to applications and content in a privacy mode | |
US9857940B2 (en) | Method and apparatus for managing screens in a portable terminal | |
US20140078091A1 (en) | Terminal Device and Method for Quickly Starting Program | |
US20140191979A1 (en) | Operating System Signals to Applications Responsive to Double-Tapping | |
US20230195298A1 (en) | Permission setting method and apparatus and electronic device | |
US12118187B2 (en) | Systems and methods for providing tab previews via an operating system user interface | |
KR20130028238A (en) | Method for providing shortcut in lock screen and portable device employing the same | |
CN110417988A (en) | Interface display method, device and device | |
CN106484262A (en) | Method, device and terminal for generating a clone application | |
CN106529312B (en) | Permission control method and device of mobile terminal and mobile terminal | |
WO2020006669A1 (en) | Icon switching method, method for displaying gui, and electronic device | |
WO2014035765A2 (en) | Single contact scaling gesture | |
WO2019201140A1 (en) | Application display method and apparatus, storage medium, and electronic device | |
JP2010533926A (en) | Standardized method and system for providing a configurable keypad | |
CN113672290B (en) | File opening method and equipment | |
US20210223920A1 (en) | Shortcut Key Control Method and Terminal | |
JP2006330912A (en) | Information processor and program | |
CN113672289B (en) | File opening method and equipment | |
US9026691B2 (en) | Semi-autonomous touch I/O device controller operation under control of host | |
US20230034967A1 (en) | Application compatibility on a computing device | |
JP5461542B2 (en) | Method and system for revealing function assignments on a fixed keypad |
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 | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |