[go: up one dir, main page]

CN115080226A - Method, device, electronic equipment and storage medium for executing service - Google Patents

Method, device, electronic equipment and storage medium for executing service Download PDF

Info

Publication number
CN115080226A
CN115080226A CN202210332202.0A CN202210332202A CN115080226A CN 115080226 A CN115080226 A CN 115080226A CN 202210332202 A CN202210332202 A CN 202210332202A CN 115080226 A CN115080226 A CN 115080226A
Authority
CN
China
Prior art keywords
target
electronic device
service
operating system
scene
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
CN202210332202.0A
Other languages
Chinese (zh)
Other versions
CN115080226B (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.)
Zero Beam Technology Co ltd
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Zero Beam Technology Co ltd
Guangdong Oppo Mobile Telecommunications Corp 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 Zero Beam Technology Co ltd, Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Zero Beam Technology Co ltd
Priority to CN202210332202.0A priority Critical patent/CN115080226B/en
Publication of CN115080226A publication Critical patent/CN115080226A/en
Application granted granted Critical
Publication of CN115080226B publication Critical patent/CN115080226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

本申请涉及一种执行服务的方法、装置、电子设备及存储介质,属于终端技术领域。该方法包括:响应于发生目标事件,将第一电子设备的操作系统切换为目标操作系统,目标操作系统为与目标场景关联的操作系统,目标事件用于指示当前场景为目标场景;响应于目标服务的服务请求,基于第一电子设备的设备资源和目标操作系统,执行目标服务。通过上述方案,通过在目标场景下,将第一电子设备的操作系统切换为目标操作系统,从而基于第一电子设备的设备资源为目标操作系统的目标服务提供可用的设备资源,这样实现目标服务时,借助目标场景以外的第一电子设备的设备资源,从而提高了执行目标服务的效率和准确率。

Figure 202210332202

The present application relates to a method, an apparatus, an electronic device and a storage medium for performing a service, and belongs to the technical field of terminals. The method includes: in response to the occurrence of a target event, switching the operating system of the first electronic device to a target operating system, where the target operating system is an operating system associated with the target scene, and the target event is used to indicate that the current scene is the target scene; The service request of the service executes the target service based on the device resources of the first electronic device and the target operating system. Through the above solution, in the target scenario, the operating system of the first electronic device is switched to the target operating system, so as to provide available device resources for the target service of the target operating system based on the device resources of the first electronic device, thus realizing the target service At the time, the device resources of the first electronic device other than the target scene are used, thereby improving the efficiency and accuracy of executing the target service.

Figure 202210332202

Description

执行服务的方法、装置、电子设备及存储介质Method, apparatus, electronic device and storage medium for performing services

技术领域technical field

本申请实施例涉及终端技术领域,特别涉及一种执行服务的方法、装置、电子设备及存储介质。The embodiments of the present application relate to the field of terminal technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for executing a service.

背景技术Background technique

随着终端技术的发展,终端的功能越来越丰富,使得终端的应用范围也越来越广泛。开发人员也基于不同的应用领域为终端开发了多种运行系统。例如,在汽车领域,开发人员为车载终端开发了座舱系统,从而基于座舱系统控制车载终端来借助车内扬声器、麦克风等给驾乘人员提供导航、多媒体、电话等服务。With the development of terminal technology, the functions of the terminal are more and more abundant, which makes the application scope of the terminal more and more extensive. Developers have also developed a variety of operating systems for terminals based on different application fields. For example, in the automotive field, developers have developed cockpit systems for in-vehicle terminals, so as to control the in-vehicle terminals based on the cockpit system to provide drivers and passengers with services such as navigation, multimedia, and telephony with the help of in-vehicle speakers and microphones.

相关技术中,座舱系统应用在车载终端上,通过车载终端控制汽车所提供的硬件为用户提供服务。例如,通过车载终端的座舱系统,控制车载全球定位系统(GlobalPositioning System,GPS)为用户导航。In the related art, the cockpit system is applied on the vehicle-mounted terminal, and the vehicle-mounted terminal controls the hardware provided by the vehicle to provide services for the user. For example, the vehicle-mounted global positioning system (Global Positioning System, GPS) is controlled to navigate the user through the cockpit system of the vehicle-mounted terminal.

上述相关技术中,由于座舱系统依赖于汽车所提供的硬件能力,因此,存在一定的局限性。例如,在负载路况中,受到车载GPS的硬件能力限制,存在车载GPS长时间处于若信号或无信号的状态,导致导航无法正常使用。In the above-mentioned related art, since the cockpit system depends on the hardware capabilities provided by the automobile, there are certain limitations. For example, in a load road condition, limited by the hardware capability of the on-board GPS, there is a state where the on-board GPS is in a state of no signal or no signal for a long time, which causes the navigation to be unable to be used normally.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种执行服务的方法、装置、电子设备及存储介质,能够提高了执行目标服务的效率和准确率。所述技术方案如下:The embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for executing a service, which can improve the efficiency and accuracy of executing a target service. The technical solution is as follows:

一方面,提供了一种执行服务的方法,所述方法由第一电子设备执行,所述方法包括:In one aspect, a method for performing a service is provided, the method being performed by a first electronic device, the method comprising:

响应于发生目标事件,将所述第一电子设备的操作系统切换为目标操作系统,所述目标操作系统为与目标场景关联的操作系统,所述目标事件用于指示当前场景为所述目标场景;In response to the occurrence of a target event, the operating system of the first electronic device is switched to a target operating system, where the target operating system is an operating system associated with a target scene, and the target event is used to indicate that the current scene is the target scene ;

响应于目标服务的服务请求,基于所述第一电子设备的设备资源和所述目标操作系统,执行所述目标服务。In response to a service request of the target service, the target service is executed based on the device resources of the first electronic device and the target operating system.

另一方面,提供了一种执行服务的装置,所述装置由第一电子设备执行,所述装置包括:In another aspect, an apparatus for performing a service is provided, the apparatus is performed by a first electronic device, and the apparatus includes:

切换模块,用于响应于发生目标事件,将所述第一电子设备的操作系统切换为目标操作系统,所述目标操作系统为与目标场景关联的操作系统,所述目标事件用于指示当前场景为所述目标场景;A switching module, configured to switch the operating system of the first electronic device to a target operating system in response to the occurrence of a target event, where the target operating system is an operating system associated with a target scene, and the target event is used to indicate the current scene is the target scene;

执行模块,用于响应于目标服务的服务请求,基于所述第一电子设备的设备资源和所述目标操作系统,执行所述目标服务。An execution module, configured to execute the target service based on the device resources of the first electronic device and the target operating system in response to a service request of the target service.

另一方面,提供了一种电子设备,所述电子设备包括处理器和存储器;所述存储器存储有至少一条程序代码,所述至少一条程序代码用于被所述处理器执行以实现如上述方面所述的执行服务的方法。In another aspect, an electronic device is provided, the electronic device comprising a processor and a memory; the memory stores at least one piece of program code, the at least one piece of program code for being executed by the processor to implement the above-mentioned aspects The described method of executing the service.

另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有至少一条程序代码,所述至少一条程序代码用于被处理器执行以实现如上述方面所述的执行服务的方法。In another aspect, a computer-readable storage medium is provided, the computer-readable storage medium stores at least one piece of program code, and the at least one piece of program code is used to be executed by a processor to implement the execution service as described in the above aspects Methods.

另一方面,提供了一种计算机程序产品,所述计算机程序产品存储有至少一条程序代码,所述至少一条程序代码用于被处理器执行以实现如上述方面所述的执行服务的方法。In another aspect, a computer program product is provided, the computer program product stores at least one piece of program code for being executed by a processor to implement the method for performing a service as described in the above aspects.

在本申请实施例中,通过在目标场景下,将第一电子设备的操作系统切换为目标操作系统,从而基于第一电子设备的设备资源为目标操作系统的目标服务提供可用的设备资源,这样实现目标服务时,借助目标场景以外的第一电子设备的设备资源,从而提高了执行目标服务的效率和准确率。In the embodiment of the present application, by switching the operating system of the first electronic device to the target operating system in the target scenario, available device resources are provided for the target service of the target operating system based on the device resources of the first electronic device, so that When the target service is realized, the device resources of the first electronic device other than the target scene are used, thereby improving the efficiency and accuracy of executing the target service.

附图说明Description of drawings

图1示出了本申请一个示例性实施例所提供的执行服务的方法所涉及的实施环境的示意图;FIG. 1 shows a schematic diagram of an implementation environment involved in a method for executing a service provided by an exemplary embodiment of the present application;

图2示出了本申请一个示例性实施例示出的执行服务的方法的流程图;FIG. 2 shows a flowchart of a method for executing a service according to an exemplary embodiment of the present application;

图3示出了本申请一个示例性实施例示出的执行服务的方法的流程图;FIG. 3 shows a flowchart of a method for executing a service according to an exemplary embodiment of the present application;

图4示出了本申请一个示例性实施例示出的执行服务的方法的流程图;FIG. 4 shows a flowchart of a method for executing a service according to an exemplary embodiment of the present application;

图5示出了本申请一个示例性实施例示出的执行服务的装置的框图;FIG. 5 shows a block diagram of an apparatus for performing a service according to an exemplary embodiment of the present application;

图6示出了本申请一个示例性实施例示出的电子设备的结构框图。FIG. 6 shows a structural block diagram of an electronic device according to an exemplary embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。As used herein, "plurality" refers to two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.

需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、显示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中涉及到的设备资源、服务等都是在充分授权的情况下获取的。It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in this application, All are authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the device resources, services, etc. involved in this application are all obtained with full authorization.

下面对本申请涉及的技术进行介绍。The technology involved in this application is introduced below.

虚拟机(Virtual Machine):指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。在实体电子设备中能够完成的工作在虚拟机中都能够实现。在电子设备中创建虚拟机时,需要将实体电子设备的部分硬盘和内存容量作为虚拟机的硬盘和内存容量。每个虚拟机都有独立的CMOS、硬盘和操作系统,可以像使用实体电子设备一样对虚拟机进行操作。Virtual Machine: refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. The work that can be done in the physical electronic device can be realized in the virtual machine. When creating a virtual machine in an electronic device, part of the hard disk and memory capacity of the physical electronic device needs to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has its own CMOS, hard disk, and operating system, and the virtual machine can be operated as if it were a physical electronic device.

图1是本申请实施例提供的一种执行服务的方法的实施环境的示意图,参见图1,该实施环境包括:第一电子设备101和第二电子设备102,该第一电子设备101可以提供为移动终端,第二电子设备102可以提供为设置在目标场景中的终端,用于控制目标场景中的输出设备。例如,第一电子设备101为手机,第二电子设备102为车载终端,输出设备为音响设备。第一电子设备101和第二电子设备102可以通过蓝牙、有线网络或无线网络连接,在本申请实施例中,对此不作具体限定。FIG. 1 is a schematic diagram of an implementation environment of a method for executing a service provided by an embodiment of the present application. Referring to FIG. 1, the implementation environment includes: a first electronic device 101 and a second electronic device 102, and the first electronic device 101 can provide As a mobile terminal, the second electronic device 102 may be provided as a terminal set in the target scene for controlling the output device in the target scene. For example, the first electronic device 101 is a mobile phone, the second electronic device 102 is a vehicle terminal, and the output device is an audio device. The first electronic device 101 and the second electronic device 102 may be connected through Bluetooth, a wired network, or a wireless network, which is not specifically limited in this embodiment of the present application.

在一些实施例中,该实施环境还包括服务器,该服务器中存储多个第二电子设备102的操作系统的安装包,用于为第一电子设备101提供可运行在虚拟机的操作系统的安装包。相应地,开发人员开发多种操作系统的安装包,将开发的安装包上传至服务器中,以便服务器将这些安装包下发至第一电子设备101中。In some embodiments, the implementation environment further includes a server, where a plurality of installation packages of the operating systems of the second electronic devices 102 are stored in the server, so as to provide the first electronic device 101 with the installation of the operating system that can run on the virtual machine Bag. Correspondingly, the developer develops installation packages of various operating systems, and uploads the developed installation packages to the server, so that the server can deliver these installation packages to the first electronic device 101 .

在一些实施例中,该第一电子设备101可以是诸如智能手机、平板电脑、笔记本电脑、可穿戴设备、PC(Personal Computer,个人计算机)中的任一电子设备。第二电子设备102可以是诸如智能家电、车载终端、智能语音交互设备、办公管理设备中的任一电子设备。该输出设备可以为显示器、扬声器、音响设备或投影仪等。该服务管理器可以为独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)、大数据和人工智能平台中至少一种基础云计算服务的云服务器。In some embodiments, the first electronic device 101 may be any electronic device such as a smart phone, a tablet computer, a notebook computer, a wearable device, and a PC (Personal Computer, personal computer). The second electronic device 102 may be any electronic device such as a smart home appliance, a vehicle-mounted terminal, an intelligent voice interaction device, and an office management device. The output device may be a display, a speaker, an audio device or a projector, and the like. The service manager can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud A cloud server for at least one basic cloud computing service in communication, middleware service, domain name service, security service, CDN (Content Delivery Network, Content Delivery Network), big data and artificial intelligence platform.

图2是本申请实施例提供的一种执行服务的方法的流程图,参见图2,该方法包括:FIG. 2 is a flowchart of a method for executing a service provided by an embodiment of the present application. Referring to FIG. 2 , the method includes:

步骤S201:响应于发生目标事件,第一电子设备将该第一电子设备的操作系统切换为目标操作系统,该目标操作系统为与目标场景关联的操作系统,该目标事件用于指示当前场景为该目标场景。Step S201: In response to the occurrence of a target event, the first electronic device switches the operating system of the first electronic device to a target operating system, where the target operating system is an operating system associated with the target scene, and the target event is used to indicate that the current scene is the target scene.

该目标操作系统为用于控制目标场景中的输出设备的电子设备中运行的操作系统。例如,该目标场景为汽车座舱场景,则该目标操作系统为车载终端中运行的操作系统,例如,该目标操作系统为Android Auto系统,基于MirrorLink协议的操作系统。再例如,该目标场景为办公室场景,则该目标操作系统为用于管理办公室中的电子设备的操作系统。The target operating system is the operating system running in the electronic device for controlling the output device in the target scene. For example, if the target scene is a car cockpit scene, the target operating system is the operating system running in the vehicle terminal, for example, the target operating system is the Android Auto system, an operating system based on the MirrorLink protocol. For another example, if the target scene is an office scene, the target operating system is an operating system for managing electronic devices in the office.

在本申请实施例中,第一电子设备在发生目标事件时,将第一电子设备当前运行的其自身的操作系统,切换为该目标操作系统。在一些实施例中,第一电子设备中运行有虚拟机,第一电子设备基于该虚拟机运行该目标操作系统。这样第一电子设备能够运行两个系统,这两个系统共享第一电子设备的设备资源,从而提高目标操作系统提供服务的质量。In this embodiment of the present application, when a target event occurs, the first electronic device switches its own operating system currently running on the first electronic device to the target operating system. In some embodiments, a virtual machine runs in the first electronic device, and the first electronic device runs the target operating system based on the virtual machine. In this way, the first electronic device can run two systems, and the two systems share the device resources of the first electronic device, thereby improving the quality of services provided by the target operating system.

目标事件可以为能够指示当前场景的任一事件。在一些实施例中,第一电子设备检测蓝牙的连接状态,在检测到第一电子设备的蓝牙与该目标场景中的蓝牙建立连接时,确定目标事件发生。在一些实施例中,第一电子设备检测第一电子设备的位置,在检测到第一电子设备处于目标场景中时,确定目标事件发生。在一些实施例中,第一电子设备显示多个操作系统的图标,响应于目标系统的图标的点击操作,确定目标事件发生。在本申请实施例中,对目标操作系统的触发方式不作具体限定。The target event can be any event that can indicate the current scene. In some embodiments, the first electronic device detects the Bluetooth connection state, and determines that the target event occurs when detecting that the Bluetooth of the first electronic device establishes a connection with the Bluetooth in the target scene. In some embodiments, the first electronic device detects the position of the first electronic device, and when detecting that the first electronic device is in the target scene, determines that the target event occurs. In some embodiments, the first electronic device displays icons of a plurality of operating systems, and determines that the target event occurs in response to a click operation on the icons of the target system. In this embodiment of the present application, the triggering manner of the target operating system is not specifically limited.

步骤S202:响应于目标服务的服务请求,第一电子设备基于该第一电子设备的设备资源和该目标操作系统,执行该目标服务。Step S202: In response to the service request of the target service, the first electronic device executes the target service based on the device resources of the first electronic device and the target operating system.

该设备资源可以为第一电子设备的硬件资源、应用资源、数据资源中的至少一种。第一电子设备确定用于执行该目标服务的设备资源,调用该设备资源以执行该目标服务。在本申请实施例中,第一电子设备中运行目标操作系统和第一电子设备本身的系统,使得目标操作系统可以共享第一电子设备的设备资源,从而在需要完成目标场景中的服务时,能够调用第一电子设备的设备资源来实现该服务。例如,该目标服务为导航服务,该第一电子设备调用自身的导航资源进行导航,得到该导航结果。The device resource may be at least one of hardware resources, application resources, and data resources of the first electronic device. The first electronic device determines a device resource for executing the target service, and invokes the device resource to execute the target service. In the embodiment of the present application, the first electronic device runs the target operating system and the system of the first electronic device itself, so that the target operating system can share the device resources of the first electronic device, so that when the service in the target scene needs to be completed, The device resource of the first electronic device can be invoked to implement the service. For example, the target service is a navigation service, and the first electronic device invokes its own navigation resource for navigation to obtain the navigation result.

在一些实施例中,第一电子设备确定该目标服务的功能,基于该目标服务的功能,确定用于实现该功能的设备资源。在一些实施例中,第一电子设备基于该服务与设备资源的对应关系,确定该目标服务对应的设备资源。在一些实施例中,第一电子设备确定与第二电子设备实现该目标服务时所需的设备资源相同的设备资源。In some embodiments, the first electronic device determines the function of the target service, and based on the function of the target service, determines device resources for implementing the function. In some embodiments, the first electronic device determines the device resource corresponding to the target service based on the corresponding relationship between the service and the device resource. In some embodiments, the first electronic device determines the same device resources as the device resources required by the second electronic device to implement the target service.

该服务请求可以为基于第一电子设备触发的请求,也可以为基于第二电子设备触发的请求。其中,该第二电子设备为目标场景中,原本用于基于该目标操作系统实现该目标服务的电子设备。The service request may be a request triggered based on the first electronic device, or may be a request triggered based on the second electronic device. Wherein, the second electronic device is an electronic device in the target scene that was originally used to implement the target service based on the target operating system.

相应地,在一些实施例中,第一电子设备显示目标操作系统的显示界面,该显示界面显示有多个服务;响应于针对该多个服务的目标服务的触发操作,生成该目标服务的服务请求。在本实现方式中,该目标操作系统的显示界面中显示的多个服务为目标场景中第二电子设备可实现的服务,通过该显示界面确定用户在该显示界面触发的目标服务,基于该目标服务生成服务请求。Correspondingly, in some embodiments, the first electronic device displays a display interface of the target operating system, and the display interface displays a plurality of services; in response to a trigger operation for the target service of the plurality of services, the service of the target service is generated ask. In this implementation manner, the multiple services displayed on the display interface of the target operating system are services that can be implemented by the second electronic device in the target scene, and the target service triggered by the user on the display interface is determined through the display interface, and based on the target service The service generates a service request.

在一些实施例中,用户通过第二电子设备触发该目标服务,由第二电子设备将该服务请求发送给第一电子设备。相应地,第一电子设备与该目标场景中的第二电子设备建立通信连接,该第二电子设备用于控制该目标场景中的输出设备输出该目标服务的服务结果;接收该第二电子设备发送的服务请求。在一些实施例中,第二电子设备显示目标操作系统的显示界面,该显示界面显示有多个服务;基于该显示界面,确定对该多个服务中的任一目标服务的触发操作,基于该目标服务生成服务请求;基于通信连接,将该服务请求发送给第一电子设备。在一些实施例中,第一电子设备基于该通信连接,将该目标操作系统的显示界面投影到该第二电子设备,该显示界面显示有多个服务,该第二电子设备用于基于该显示界面确定对该多个服务中的任一目标服务的触发操作,基于该触发操作向该第一电子设备反馈服务请求。在本申请实施例中,对第二电子设备触发目标服务的情况下,第二电子设备中显示的内容来源不作具体限定。In some embodiments, the user triggers the target service through the second electronic device, and the second electronic device sends the service request to the first electronic device. Correspondingly, the first electronic device establishes a communication connection with the second electronic device in the target scene, and the second electronic device is used to control the output device in the target scene to output the service result of the target service; receive the second electronic device service request sent. In some embodiments, the second electronic device displays a display interface of the target operating system, where multiple services are displayed on the display interface; based on the display interface, a trigger operation for any target service among the multiple services is determined, and based on the display interface The target service generates a service request; based on the communication connection, the service request is sent to the first electronic device. In some embodiments, the first electronic device projects a display interface of the target operating system to the second electronic device based on the communication connection, the display interface displays a plurality of services, and the second electronic device is configured to display a plurality of services based on the display The interface determines a trigger operation for any target service in the plurality of services, and feeds back a service request to the first electronic device based on the trigger operation. In the embodiment of the present application, when the target service is triggered by the second electronic device, the source of the content displayed in the second electronic device is not specifically limited.

在本申请实施例中,通过在目标场景下,将第一电子设备的操作系统切换为目标操作系统,从而基于第一电子设备的设备资源为目标操作系统的目标服务提供可用的设备资源,这样实现目标服务时,借助目标场景以外的第一电子设备的设备资源,从而提高了执行目标服务的效率和准确率。In the embodiment of the present application, by switching the operating system of the first electronic device to the target operating system in the target scenario, available device resources are provided for the target service of the target operating system based on the device resources of the first electronic device, so that When the target service is realized, the device resources of the first electronic device other than the target scene are used, thereby improving the efficiency and accuracy of executing the target service.

在一些实施例中,第一电子设备中运行有虚拟机,相应地,第一电子设备基于该虚拟机运行该目标操作系统。图3是本申请实施例提供的一种执行服务的方法的流程图,参见图3,该方法包括:In some embodiments, a virtual machine runs in the first electronic device, and accordingly, the first electronic device runs the target operating system based on the virtual machine. FIG. 3 is a flowchart of a method for executing a service provided by an embodiment of the present application. Referring to FIG. 3 , the method includes:

步骤S301:响应于发生目标事件,第一电子设备将该第一电子设备的操作系统切换为目标操作系统,该目标操作系统为与目标场景关联的操作系统,该目标事件用于指示当前场景为该目标场景。Step S301: In response to the occurrence of a target event, the first electronic device switches the operating system of the first electronic device to a target operating system, where the target operating system is an operating system associated with the target scene, and the target event is used to indicate that the current scene is the target scene.

本步骤与步骤S201的原理相同,在此不再赘述。The principle of this step is the same as that of step S201, and details are not repeated here.

步骤S302:响应于目标服务的服务请求,第一电子设备基于该虚拟机调用该第一电子设备中用于执行该目标服务的设备资源。Step S302: In response to the service request of the target service, the first electronic device invokes, based on the virtual machine, a device resource in the first electronic device for executing the target service.

虚拟机设置有与第一电子设备进行数据交互的接口,在本申请实施例中,第一电子设备中的虚拟机基于该接口与第一电子设备进行交互,从而调用第一电子设备的设备资源。The virtual machine is provided with an interface for performing data interaction with the first electronic device. In this embodiment of the present application, the virtual machine in the first electronic device interacts with the first electronic device based on the interface, thereby invoking device resources of the first electronic device. .

在一些实施例中,该第一电子设备运行有虚拟接,通过虚拟机支持运行其他操作系统的虚拟机。例如,该虚拟机可以为JVM虚拟机(Java Virtual Machine,一种Java虚拟机)或Dalvik虚拟机(一种用于手机平台的虚拟机)。In some embodiments, the first electronic device runs a virtual interface, and supports virtual machines running other operating systems through the virtual machine. For example, the virtual machine may be a JVM virtual machine (Java Virtual Machine, a Java virtual machine) or a Dalvik virtual machine (a virtual machine for a mobile phone platform).

步骤S303:第一电子设备基于该设备资源运行该目标操作系统中该目标服务的服务指令。Step S303: The first electronic device runs the service instruction of the target service in the target operating system based on the device resource.

在一些实施例中,第一电子设备向目标场景中的第二电子设备发送该目标服务的服务结果,以使该第二电子设备控制该目标场景中的输出设备输出该服务结果。第一电子设备基于该目标操作系统替换该第二电子设备的操作系统,或者第一电子设备基于该目标操作系统辅助该第二电子设备中的目标系统。In some embodiments, the first electronic device sends the service result of the target service to the second electronic device in the target scene, so that the second electronic device controls the output device in the target scene to output the service result. The first electronic device replaces the operating system of the second electronic device based on the target operating system, or the first electronic device assists the target system in the second electronic device based on the target operating system.

在第一电子设备基于该目标操作系统替换该第二电子设备的操作系统的情况下,第一电子设备基于与第二电子设备的通信连接,接管第二电子设备对输出设备的控制,即第一电子设备基于与第二电子设备的通信连接,控制目标场景的输出设备。相应地,第一电子设备基于该通信连接,确定用于输出该服务结果的输出设备,向该第二电子设备发送输出指令,该输出指令中携带的服务结果和输出设备的设备标识,通过第二电子设备基于该设备标识,将该输出指令发送至输出设备,输出设备基于该输出指令输出该服务结果。在本申请实施例中,第一电子设备替换第二电子设备控制目标场景的输出设备,这样无需依赖于第二电子设备的设备资源就能实现目标服务,从而提高了服务结果的质量。When the first electronic device replaces the operating system of the second electronic device based on the target operating system, the first electronic device takes over the control of the output device by the second electronic device based on the communication connection with the second electronic device, that is, the first electronic device takes over the control of the output device by the second electronic device. An electronic device controls the output device of the target scene based on the communication connection with the second electronic device. Correspondingly, the first electronic device determines an output device for outputting the service result based on the communication connection, and sends an output instruction to the second electronic device. The second electronic device sends the output instruction to the output device based on the device identification, and the output device outputs the service result based on the output instruction. In this embodiment of the present application, the first electronic device replaces the output device of the second electronic device to control the target scene, so that the target service can be achieved without relying on the device resources of the second electronic device, thereby improving the quality of the service result.

在第一电子设备基于该目标操作系统辅助该第二电子设备中的目标系统的情况下,第一电子设备基于与第二电子设备的通信连接,将该服务结果发送给的第二电子设备,第二电子设备接收服务结果,基于该服务器结果对应的输出设备,输出该服务结果。这样第二电子设备可以借用第一电子设备的设备资源完成目标服务,从而提高服务结果的指令,并且,第一电子设备仅需要基于第二电子设备的需求,辅助第二电子设备完成目标服务,无需占用第一电子设备的大量资源,从而降低了由于占用设备资源对运行第一电子设备的影响。In the case where the first electronic device assists the target system in the second electronic device based on the target operating system, the first electronic device sends the service result to the second electronic device based on the communication connection with the second electronic device, The second electronic device receives the service result, and outputs the service result based on the output device corresponding to the server result. In this way, the second electronic device can borrow the device resources of the first electronic device to complete the target service, thereby improving the instruction of the service result, and the first electronic device only needs to assist the second electronic device to complete the target service based on the demand of the second electronic device, There is no need to occupy a large amount of resources of the first electronic device, thereby reducing the impact on the operation of the first electronic device due to the occupation of device resources.

在本申请实施例中,通过在目标场景下,将第一电子设备的操作系统切换为目标操作系统,从而基于第一电子设备的设备资源为目标操作系统的目标服务提供可用的设备资源,这样实现目标服务时,借助目标场景以外的第一电子设备的设备资源,从而提高了执行目标服务的效率和准确率。In the embodiment of the present application, by switching the operating system of the first electronic device to the target operating system in the target scenario, available device resources are provided for the target service of the target operating system based on the device resources of the first electronic device, so that When the target service is realized, the device resources of the first electronic device other than the target scene are used, thereby improving the efficiency and accuracy of executing the target service.

在第一电子设备切换目标操作系统之前,需要先将目标操作系统下载到第一电子设备中。参见图4,图4是本申请实施例提供的一种执行服务的方法的流程图,在本申请实施例中,以第一电子设备安装目标操作系统为例进行说明,参见图4,该方法包括:Before the first electronic device switches the target operating system, the target operating system needs to be downloaded to the first electronic device. Referring to FIG. 4, FIG. 4 is a flowchart of a method for executing a service provided by an embodiment of the present application. In the embodiment of the present application, the first electronic device is used to install a target operating system as an example for description. Referring to FIG. 4, the method include:

步骤S401:第一电子设备显示目标应用程序中的多个场景标签,该目标应用程序用于下载该目标操作系统。Step S401: The first electronic device displays a plurality of scene tags in a target application program, and the target application program is used to download the target operating system.

该目标应用程序为用于下载该目标操作系统的应用程序。例如,该目标应用程序为随身座舱镜像商店。其中,该目标应用程序包括多个操作系统的下载链接。该多个操作系统的下载链接按照不同的场景分类,每个场景分类对应一个场景标签。例如,该场景标签包括汽车座舱场景标签和办公场景标签。每个场景标签下包括该场景的多个操作系统。The target application is an application for downloading the target operating system. For example, the target application is a cockpit mirror store. Wherein, the target application includes download links of multiple operating systems. The download links of the multiple operating systems are classified according to different scenarios, and each scenario classification corresponds to a scenario label. For example, the scene tags include car cockpit scene tags and office scene tags. Each scene tab includes multiple operating systems for that scene.

步骤S402:响应于该多个场景标签中的目标场景标签的触发操作,第一电子设备显示该目标场景标签下的多个操作系统的系统标签。Step S402: In response to the triggering operation of the target scene label in the plurality of scene labels, the first electronic device displays the system labels of the plurality of operating systems under the target scene label.

响应于针对目标场景标签的点击操作,确定接收到目标场景标签的触发操作,第一电子设备显示系统选择界面,该系统选择界面中包括多个操作系统的系统标签。该系统标签可以为操作系统的名称。In response to a click operation on the target scene tag, it is determined that a trigger operation of the target scene tag is received, and the first electronic device displays a system selection interface, where the system selection interface includes system tags of a plurality of operating systems. The system label can be the name of the operating system.

步骤S403:响应于目标操作系统的系统标签的触发操作,第一电子设备安装该系统标签对应的安装包。Step S403: In response to the triggering operation of the system tag of the target operating system, the first electronic device installs the installation package corresponding to the system tag.

第一电子设备基于该系统标签获取该目标操作系统对应的安装包,校验该安装包的完整性和合法性;在该安装包完整且合法的情况下,将该安装包安装到该虚拟机的对应存储资源分区。在一些实施例中,第一电子设备使用增量安装方式安装该安装包,以减少安装包大小,并保留以前安装的软件。The first electronic device obtains the installation package corresponding to the target operating system based on the system label, and verifies the integrity and legality of the installation package; if the installation package is complete and legal, installs the installation package into the virtual machine The corresponding storage resource partition. In some embodiments, the first electronic device installs the installation package using an incremental installation manner to reduce the size of the installation package and retain previously installed software.

响应于目标操作系统的系统标签的触发操作,第一电子设备从该目标应用程序的服务器在获取该目标操作系统的安装包,安装该安装包。In response to the triggering operation of the system tag of the target operating system, the first electronic device obtains the installation package of the target operating system from the server of the target application program, and installs the installation package.

在一些实施例中,目标应用程序的服务器中包括多种操作系统的安装包。相应地,在本步骤之前,开发人员将第二电子设备的操作系统编译成第一电子设备的虚拟机可安装系统镜像的安装包;将该安装包签名;将安装包上传到目标应用程序的服务器中,以便第一电子设备从目标应用程序的服务器中获取该目标操作系统的安装包。In some embodiments, the server of the target application includes installation packages of various operating systems. Correspondingly, before this step, the developer compiles the operating system of the second electronic device into an installation package of the virtual machine of the first electronic device that can install the system image; signs the installation package; uploads the installation package to the target application in the server, so that the first electronic device obtains the installation package of the target operating system from the server of the target application.

在一些实施例中,响应于目标操作系统的系统标签的触发操作,获取该目标场景的场景类型;基于该场景类型,确定与该场景类型匹配的目标操作系统的安装包。该场景类型根据不同的场景进行划分,例如,该场景为汽车座舱场景,则该场景类型可以根据车机型号机型划分,即同一个第二电子设备可以有多种镜像的操作系统。用户根据喜好选择一种操作系统,第一电子设备根据用户选择的操作系统,确定该操作系统与该汽车型号匹配的安装包。In some embodiments, in response to a triggering operation of the system tag of the target operating system, the scene type of the target scene is acquired; based on the scene type, an installation package of the target operating system matching the scene type is determined. The scene type is divided according to different scenes. For example, if the scene is a car cockpit scene, the scene type can be divided according to the model of the car and the model, that is, the same second electronic device can have multiple mirrored operating systems. The user selects an operating system according to preference, and the first electronic device determines, according to the operating system selected by the user, an installation package matching the operating system and the car model.

在本申请实施例中,通过在目标场景下,将第一电子设备的操作系统切换为目标操作系统,从而基于第一电子设备的设备资源为目标操作系统的目标服务提供可用的设备资源,这样实现目标服务时,借助目标场景以外的第一电子设备的设备资源,从而提高了执行目标服务的效率和准确率。In the embodiment of the present application, by switching the operating system of the first electronic device to the target operating system in the target scenario, available device resources are provided for the target service of the target operating system based on the device resources of the first electronic device, so that When the target service is realized, the device resources of the first electronic device other than the target scene are used, thereby improving the efficiency and accuracy of executing the target service.

请参考图5,其示出了本申请一个实施例提供的执行服务的装置的结构框图。该执行服务的装置可以通过软件、硬件或者两者的结合实现成为处理器的全部或一部分。该装置包括:Please refer to FIG. 5 , which shows a structural block diagram of an apparatus for executing a service provided by an embodiment of the present application. The means for performing services can be implemented as all or a part of the processor through software, hardware or a combination of the two. The device includes:

切换模块501,用于响应于发生目标事件,将该第一电子设备的操作系统切换为目标操作系统,该目标操作系统为与目标场景关联的操作系统,该目标事件用于指示当前场景为该目标场景;The switching module 501 is used for switching the operating system of the first electronic device to a target operating system in response to the occurrence of a target event, where the target operating system is an operating system associated with the target scene, and the target event is used to indicate that the current scene is the target operating system. target scene;

执行模块502,用于响应于目标服务的服务请求,基于该第一电子设备的设备资源和该目标操作系统,执行该目标服务。The execution module 502 is configured to execute the target service based on the device resources of the first electronic device and the target operating system in response to the service request of the target service.

在一些实施例中,该第一电子设备运行有虚拟机,该执行模块502,包括:In some embodiments, the first electronic device runs a virtual machine, and the execution module 502 includes:

调用单元,用于响应于目标服务的服务请求,基于该虚拟机调用该第一电子设备中用于执行该目标服务的设备资源;a calling unit, configured to call a device resource in the first electronic device for executing the target service based on the virtual machine in response to a service request of the target service;

运行单元,用于基于该设备资源运行该目标操作系统中该目标服务的服务指令。The running unit is configured to run the service instruction of the target service in the target operating system based on the device resource.

在一些实施例中,该装置还包括:In some embodiments, the apparatus further includes:

第一显示模块,用于显示目标操作系统的显示界面,该显示界面显示有多个服务;a first display module, used to display a display interface of the target operating system, and the display interface displays a plurality of services;

生成模块,用于响应于针对该多个服务的目标服务的触发操作,生成该目标服务的服务请求。A generating module, configured to generate a service request for the target service in response to a triggering operation for the target service of the plurality of services.

在一些实施例中,该装置还包括:In some embodiments, the apparatus further includes:

建立模块,用于与该目标场景中的第二电子设备建立通信连接,该第二电子设备用于控制该目标场景中的输出设备输出该目标服务的服务结果;an establishment module for establishing a communication connection with a second electronic device in the target scene, where the second electronic device is configured to control the output device in the target scene to output the service result of the target service;

接收模块,用于接收该第二电子设备发送的服务请求。The receiving module is used for receiving the service request sent by the second electronic device.

在一些实施例中,该装置还包括:In some embodiments, the apparatus further includes:

发送模块,用于向该目标场景中的第二电子设备发送该目标服务的服务结果,以使该第二电子设备控制该目标场景中的输出设备输出该服务结果。The sending module is configured to send the service result of the target service to the second electronic device in the target scene, so that the second electronic device controls the output device in the target scene to output the service result.

在一些实施例中,该装置包括:In some embodiments, the apparatus includes:

第二显示模块,用于显示目标应用程序的多个场景标签,该目标应用程序用于下载该目标操作系统;a second display module, configured to display a plurality of scene tags of a target application, which is used to download the target operating system;

该第二显示模块,用于响应于针对该多个场景标签中的目标场景标签的多个触发操作,显示该目标场景标签下的多个操作系统的系统标签;the second display module, configured to display system labels of multiple operating systems under the target scene label in response to multiple trigger operations for the target scene label in the plurality of scene labels;

安装模块,用于响应于针对目标操作系统的系统标签的触发操作,安装该系统标签对应的安装包。An installation module, configured to install an installation package corresponding to the system label in response to a triggering operation for the system label of the target operating system.

在一些实施例中,该安装模块,包括:In some embodiments, the installation module includes:

获取单元,用于基于该系统标签,获取该系统标签对应的安装包;an obtaining unit for obtaining the installation package corresponding to the system label based on the system label;

安装单元,用于将该安装包安装在目标存储资源,该目标存储资源为第一电子设备中为该目标操作系统划分的存储资源。An installation unit, configured to install the installation package on a target storage resource, where the target storage resource is a storage resource divided for the target operating system in the first electronic device.

在一些实施例中,该获取单元,用于响应于目标操作系统的系统标签的触发操作,获取该目标场景的场景类型;基于该场景类型,确定与该场景类型匹配的目标操作系统的安装包。In some embodiments, the obtaining unit is configured to obtain the scene type of the target scene in response to a trigger operation of the system tag of the target operating system; based on the scene type, determine the installation package of the target operating system that matches the scene type .

在本申请实施例中,通过在目标场景下,将第一电子设备的操作系统切换为目标操作系统,从而基于第一电子设备的设备资源为目标操作系统的目标服务提供可用的设备资源,这样实现目标服务时,借助目标场景以外的第一电子设备的设备资源,从而提高了执行目标服务的效率和准确率。In the embodiment of the present application, by switching the operating system of the first electronic device to the target operating system in the target scenario, available device resources are provided for the target service of the target operating system based on the device resources of the first electronic device, so that When the target service is realized, the device resources of the first electronic device other than the target scene are used, thereby improving the efficiency and accuracy of executing the target service.

请参考图6,其示出了本申请一个示例性实施例提供的第一电子设备600的结构方框图。第一电子设备600可以是智能手机、平板电脑、笔记本电脑或可穿戴设备等终端。本申请中的第一电子设备600可以包括一个或多个如下部件:处理器610和存储器620。Please refer to FIG. 6 , which shows a structural block diagram of a first electronic device 600 provided by an exemplary embodiment of the present application. The first electronic device 600 may be a terminal such as a smart phone, a tablet computer, a notebook computer, or a wearable device. The first electronic device 600 in this application may include one or more of the following components: a processor 610 and a memory 620 .

处理器610可以包括一个或者多个处理核心。处理器610利用各种接口和线路连接整个第一电子设备600内的各个部分,通过运行或执行存储在存储器620内的至少一条指令,以及调用存储在存储器620内的数据,执行第一电子设备600的各种功能和处理数据。可选地,处理器610可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器610可集成中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、神经网络处理器(Neural-network Processing Unit,NPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;NPU用于实现人工智能(Artificial Intelligence,AI)功能;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器610中,单独通过一块芯片进行实现。Processor 610 may include one or more processing cores. The processor 610 uses various interfaces and lines to connect various parts of the entire first electronic device 600, and executes the first electronic device by running or executing at least one instruction stored in the memory 620 and calling data stored in the memory 620. 600 of various functions and processing data. Optionally, the processor 610 may employ at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware. The processor 610 may integrate one or more of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a neural network processing unit (Neural-network Processing Unit, NPU), a modem, and the like. combination. Among them, the CPU mainly handles the operating system, user interface, and applications; the GPU is used to render and draw the content that the display needs to display; the NPU is used to implement artificial intelligence (AI) functions; the modem is used to process wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 610, but is implemented by a single chip.

存储器620可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器620包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器620可用于存储至少一条指令。存储器620可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个实施例的指令等;存储数据区可存储根据第一电子设备600的使用所创建的数据(比如音频数据、电话本)等。The memory 620 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory, ROM). Optionally, the memory 620 includes a non-transitory computer-readable storage medium. Memory 620 may be used to store at least one instruction. The memory 620 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the various embodiments described below; the storage data area may store data (such as audio data, phone book) and the like created according to the use of the first electronic device 600 .

在一些实施例中,该第一电子设备600还包括显示屏,显示屏是用于显示用户界面的显示组件。可选的,该显示屏为具有触控功能的显示屏,通过触控功能,用户可以使用手指、触摸笔等任何适合的物体在显示屏上进行触控操作。显示屏通常设置在第一电子设备600的前面板。显示屏可被设计成为全面屏、曲面屏、异型屏、双面屏或折叠屏。显示屏还可被设计成为全面屏与曲面屏的结合,异型屏与曲面屏的结合等,本实施例对此不加以限定。In some embodiments, the first electronic device 600 further includes a display screen, which is a display component for displaying a user interface. Optionally, the display screen is a display screen with a touch function, and through the touch function, the user can use any suitable object such as a finger, a touch pen and the like to perform a touch operation on the display screen. The display screen is usually disposed on the front panel of the first electronic device 600 . The display screen can be designed as a full screen, a curved screen, a special-shaped screen, a double-sided screen or a folding screen. The display screen can also be designed to be a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which are not limited in this embodiment.

除此之外,本领域技术人员可以理解,上述附图所示出的终端800的结构并不构成对第一电子设备600的限定,第一电子设备600可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,第一电子设备600中还包括麦克风、扬声器、射频电路、输入单元、传感器、音频电路、无线保真(Wireless Fidelity,Wi-Fi)模块、电源、蓝牙模块等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the terminal 800 shown in the above drawings does not constitute a limitation on the first electronic device 600, and the first electronic device 600 may include more or less than shown in the drawings. components, or a combination of certain components, or a different arrangement of components. For example, the first electronic device 600 further includes components such as a microphone, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a Wireless Fidelity (Wi-Fi) module, a power supply, and a Bluetooth module, which will not be repeated here. .

本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,该至少一条指令由该处理器加载并执行以实现如上各个实施例示出的执行服务的方法。Embodiments of the present application further provide a computer-readable medium, where the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for executing a service as shown in each of the above embodiments.

本申请实施例还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,该至少一条指令由该处理器加载并执行以实现如上各个实施例示出的执行服务的方法。Embodiments of the present application further provide a computer program product, where the computer program product stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for executing a service as shown in each of the above embodiments.

本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should realize that, in one or more of the above examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (11)

1. A method of performing a service, the method performed by a first electronic device, the method comprising:
in response to occurrence of a target event, switching an operating system of the first electronic device to a target operating system, wherein the target operating system is an operating system associated with a target scene, and the target event is used for indicating that a current scene is the target scene;
in response to a service request of a target service, executing the target service based on device resources of the first electronic device and the target operating system.
2. The method of claim 1, wherein the first electronic device runs a virtual machine, and wherein executing the target service based on the device resources of the first electronic device and the target operating system in response to the service request of the target service comprises:
in response to a service request of a target service, calling a device resource for executing the target service in the first electronic device based on the virtual machine;
and running the service instruction of the target service in the target operating system based on the equipment resource.
3. The method of claim 1, further comprising:
displaying a display interface of a target operating system, wherein the display interface displays a plurality of services;
in response to a trigger operation for a target service of the plurality of services, a service request for the target service is generated.
4. The method of claim 1, further comprising:
establishing communication connection with a second electronic device in the target scene, wherein the second electronic device is used for controlling an output device in the target scene to output a service result of the target service;
and receiving a service request sent by the second electronic equipment.
5. The method of claim 1, further comprising:
and sending a service result of the target service to a second electronic device in the target scene so as to enable the second electronic device to control an output device in the target scene to output the service result.
6. The method according to claim 1, characterized in that it comprises:
displaying a plurality of scene tags of a target application program, the target application program being used for downloading the target operating system;
in response to a plurality of trigger operations for a target scene tag of the plurality of scene tags, displaying system tags of a plurality of operating systems under the target scene tag;
and responding to the trigger operation of the system label aiming at the target operating system, and installing the installation package corresponding to the system label.
7. The method of claim 6, wherein the installing the installation package corresponding to the system tag in response to the triggering operation of the system tag of the target operating system comprises:
acquiring an installation package corresponding to the system label based on the system label;
and installing the installation package on a target storage resource, wherein the target storage resource is a storage resource which is divided for the target operating system in the first electronic equipment.
8. The method of claim 7, wherein the obtaining of the installation package corresponding to the system tag in response to the trigger operation of the system tag of the target operating system comprises:
responding to the trigger operation of a system label of a target operating system, and acquiring the scene type of the target scene;
and determining an installation package of the target operating system matched with the scene type based on the scene type.
9. An apparatus for performing a service, the apparatus operating in a first electronic device, the apparatus comprising:
the switching module is used for responding to a target event, switching an operating system of the first electronic device to a target operating system, wherein the target operating system is an operating system associated with a target scene, and the target event is used for indicating that a current scene is the target scene;
and the execution module is used for responding to a service request of a target service and executing the target service based on the equipment resource of the first electronic equipment and the target operating system.
10. An electronic device, comprising a processor and a memory; the memory stores at least one program code for execution by the processor to implement the method of performing a service according to any of claims 1 to 8.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores at least one program code for execution by a processor to implement the method of executing a service according to any one of claims 1 to 8.
CN202210332202.0A 2022-03-30 2022-03-30 Method, device, electronic device and storage medium for executing service Active CN115080226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210332202.0A CN115080226B (en) 2022-03-30 2022-03-30 Method, device, electronic device and storage medium for executing service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210332202.0A CN115080226B (en) 2022-03-30 2022-03-30 Method, device, electronic device and storage medium for executing service

Publications (2)

Publication Number Publication Date
CN115080226A true CN115080226A (en) 2022-09-20
CN115080226B CN115080226B (en) 2025-02-14

Family

ID=83247408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210332202.0A Active CN115080226B (en) 2022-03-30 2022-03-30 Method, device, electronic device and storage medium for executing service

Country Status (1)

Country Link
CN (1) CN115080226B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870298A (en) * 2012-12-17 2014-06-18 联想(北京)有限公司 Switching method and electronic device
CN106383740A (en) * 2016-09-12 2017-02-08 深圳市金立通信设备有限公司 Method for system switching and terminal
BR112015018870A2 (en) * 2013-03-14 2017-07-18 Intel Corp context-based switching to a secure operating system environment
CN108874539A (en) * 2018-03-13 2018-11-23 Oppo广东移动通信有限公司 Resource allocation method, device, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870298A (en) * 2012-12-17 2014-06-18 联想(北京)有限公司 Switching method and electronic device
BR112015018870A2 (en) * 2013-03-14 2017-07-18 Intel Corp context-based switching to a secure operating system environment
CN106383740A (en) * 2016-09-12 2017-02-08 深圳市金立通信设备有限公司 Method for system switching and terminal
CN108874539A (en) * 2018-03-13 2018-11-23 Oppo广东移动通信有限公司 Resource allocation method, device, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姚一楠;翟世俊;邓样辉;: "双操作系统移动智能终端安全分析", 移动通信, no. 21, 15 November 2017 (2017-11-15), pages 1 - 5 *

Also Published As

Publication number Publication date
CN115080226B (en) 2025-02-14

Similar Documents

Publication Publication Date Title
CN114461239B (en) Software upgrading system and software upgrading method
JP7601478B2 (en) Control method and apparatus, and electronic device
KR20120134132A (en) Method and apparatus for providing cooperative enablement of user input options
CN110069308B (en) Page launching method, apparatus, electronic device and storage medium
CN113038434B (en) Device registration method and device, mobile terminal and storage medium
CN112328413A (en) Application service calling method, device and system
CN104115119A (en) Mobile device application integration with infotainment head units
CN111309216B (en) List page display method and device, computer equipment and storage medium
US11991040B2 (en) Network configuration method and device
CN110139118A (en) Application program function operating method, device, electronic device, and storage medium
CN115048642A (en) Communication method between trusted applications in multiple trusted execution environments and electronic equipment
WO2023103759A1 (en) Service calling method, system and apparatus, and device and storage medium
CN114884990B (en) Screen projection method and device based on virtual screen
CN112203130A (en) An in-vehicle infotainment terminal and a multi-screen interactive display method thereof, and an automobile
CN115080226B (en) Method, device, electronic device and storage medium for executing service
WO2024114796A1 (en) Vehicle usb firmware upgrade method and device, and vehicle
EP4332756A1 (en) Application deployment method, distributed operation system, electronic device, and storage medium
CN104077126B (en) Audio/video processing unit for automobile
CN116700552A (en) Application connection method and terminal equipment
CN117667115A (en) Application program installation method and electronic device
CN114390485A (en) Data transmission method and electronic device
CN107632896A (en) A data processing method, data processing device and communication equipment
CN101911003B (en) Information processing apparatus and program
CN116302295B (en) An interface display method
CN116546042B (en) IoT device control method, device, system, and computer-readable storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: 201805 room 2201, No. 888, Moyu South Road, Anting Town, Jiading District, Shanghai jt1740

Applicant after: Zero Beam Technology Co.,Ltd.

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Country or region before: China

Applicant before: Zero Beam Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant