Method, device, electronic device and storage medium for executing service
By switching the operating system in the target scenario and utilizing the equipment resources of the first electronic device, the problem of unavailable navigation of the cockpit system under load conditions is solved, and the efficiency and accuracy of the service are improved.
Patent Information
- Application Number
- CN202210332202.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-03-30
AI Technical Summary
Under load conditions, the existing cockpit system may be in a signal-free state for a long time due to the limitation of the on-board GPS hardware capabilities, resulting in the navigation being unable to be used normally.
By switching the operating system of the first electronic device to the target operating system in the target scenario, and performing the target service based on the device resources of the first electronic device, the efficiency and accuracy of executing the target service are improved.
It realizes the use of the equipment resources of the first electronic device in the target scenario, improves the execution efficiency and accuracy of the target service, and solves the problem of unavailability of the cockpit system under load conditions.
Smart Images

Figure CN115080226B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a method, device, electronic device and storage medium for executing a service. Background Art
[0002] With the development of terminal technology, the functions of terminals are becoming more and more abundant, making the application scope of terminals 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 vehicle terminals, so that the cockpit system controls the vehicle terminals to provide navigation, multimedia, telephone and other services to drivers and passengers with the help of in-car speakers, microphones, etc.
[0003] In the related art, the cockpit system is applied to the vehicle terminal, and the vehicle terminal controls the hardware provided by the vehicle to provide services to the user. For example, the cockpit system of the vehicle terminal controls the vehicle global positioning system (GPS) to provide navigation for the user.
[0004] In the above-mentioned related technologies, since the cockpit system depends on the hardware capabilities provided by the car, there are certain limitations. For example, in a loaded road condition, due to the hardware capability limitation of the vehicle GPS, the vehicle GPS may be in a state of weak signal or no signal for a long time, resulting in the inability to use the navigation normally. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for executing a service, which can improve the efficiency and accuracy of executing a target service. The technical solution is as follows:
[0006] In one aspect, a method for executing a service is provided, the method being executed by a first electronic device, the method comprising:
[0007] In response to a target event, switching the operating system of the first electronic device to a target operating system, the target operating system being an operating system associated with a target scene, the target event being used to indicate that the current scene is the target scene;
[0008] In response to a service request of a target service, the target service is executed based on device resources of the first electronic device and the target operating system.
[0009] In another aspect, a device for executing a service is provided, the device being executed by a first electronic device, the device comprising:
[0010] a switching module, configured to switch the operating system of the first electronic device to a target operating system in response to a target event, wherein 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;
[0011] The execution module is used to execute the target service in response to a service request of the target service based on the device resources of the first electronic device and the target operating system.
[0012] On the other hand, an electronic device is provided, comprising a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the method for executing a service as described in the above aspect.
[0013] On the other hand, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the method for executing a service as described in the above aspect.
[0014] On the other hand, a computer program product is provided, wherein the computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the method for executing a service as described in the above aspect.
[0015] In an 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. In this way, when implementing the target service, the efficiency and accuracy of executing the target service are improved by using the device resources of the first electronic device outside the target scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram showing an implementation environment involved in a method for executing a service provided by an exemplary embodiment of the present application;
[0017] Figure 2 A flowchart of a method for executing a service according to an exemplary embodiment of the present application is shown;
[0018] Figure 3 A flowchart of a method for executing a service according to an exemplary embodiment of the present application is shown;
[0019] Figure 4 A flowchart of a method for executing a service according to an exemplary embodiment of the present application is shown;
[0020] Figure 5A block diagram of an apparatus for executing a service shown in an exemplary embodiment of the present application is shown;
[0021] Figure 6 A structural block diagram of an electronic device shown in an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0023] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0024] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the device resources, services, etc. involved in this application are all obtained with full authorization.
[0025] The technology involved in this application is introduced below.
[0026] Virtual Machine: refers to a complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment. Any work that can be done in a physical electronic device can be done in a 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 an independent CMOS, hard disk and operating system, and the virtual machine can be operated just like a physical electronic device.
[0027] Figure 1 is a schematic diagram of an implementation environment of a method for executing a service provided in an embodiment of the present application, see Figure 1, the implementation environment includes: a first electronic device 101 and a second electronic device 102, the first electronic device 101 can be provided as a mobile terminal, and the second electronic device 102 can be provided as a terminal set in a target scene, for controlling an 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-mounted terminal, and the output device is an audio device. The first electronic device 101 and the second electronic device 102 can be connected via Bluetooth, a wired network, or a wireless network, which is not specifically limited in the embodiments of the present application.
[0028] In some embodiments, the implementation environment further includes a server, in which multiple installation packages of operating systems of the second electronic device 102 are stored, and is used to provide an installation package of an operating system that can be run on a virtual machine for the first electronic device 101. Accordingly, developers develop installation packages of multiple operating systems and upload the developed installation packages to the server, so that the server sends these installation packages to the first electronic device 101.
[0029] In some embodiments, the first electronic device 101 may be any electronic device such as a smart phone, a tablet computer, a laptop computer, a wearable device, or a PC (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, or an office management device. The output device may be a display, a speaker, an audio device, or a projector. The service manager may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides at least one basic cloud computing service among cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data, and artificial intelligence platforms.
[0030] Figure 2 is a flowchart of a method for executing a service provided in an embodiment of the present application, see Figure 2 , the method comprising:
[0031] Step S201: In response to a target event, the first electronic device switches its operating system 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.
[0032] The target operating system is an operating system running in an electronic device for controlling an output device in a target scene. For example, if the target scene is a car cockpit scene, the target operating system is an operating system running in a vehicle terminal, for example, the target operating system is an 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 an office.
[0033] In an 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 is running 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.
[0034] The target event can be any event that can indicate the current scene. In some embodiments, the first electronic device detects the connection status of Bluetooth, and determines that the target event occurs when it detects that the Bluetooth of the first electronic device is connected to the Bluetooth in the target scene. In some embodiments, the first electronic device detects the location of the first electronic device, and determines that the target event occurs when it detects that the first electronic device is in the target scene. In some embodiments, the first electronic device displays icons of multiple operating systems, and determines that the target event occurs in response to a click operation on the icon of the target system. In the embodiments of the present application, the triggering method of the target operating system is not specifically limited.
[0035] Step S202: In response to a service request of a target service, the first electronic device executes the target service based on device resources of the first electronic device and the target operating system.
[0036] The device resources may be at least one of the hardware resources, application resources, and data resources of the first electronic device. The first electronic device determines the device resources for executing the target service, and calls the device resources to execute the target service. In an embodiment of the present application, the target operating system and the system of the first electronic device itself are run in the first electronic device, 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 resources of the first electronic device can be called to implement the service. For example, the target service is a navigation service, and the first electronic device calls its own navigation resources for navigation to obtain the navigation result.
[0037] In some embodiments, the first electronic device determines the function of the target service, and based on the function of the target service, determines the device resources for implementing the function. In some embodiments, the first electronic device determines the device resources corresponding to the target service based on the correspondence between the service and the device resources. In some embodiments, the first electronic device determines the same device resources as those required by the second electronic device to implement the target service.
[0038] The service request may be a request triggered by a first electronic device or a request triggered by a second electronic device, wherein the second electronic device is an electronic device in the target scenario that is originally used to implement the target service based on the target operating system.
[0039] Accordingly, in some embodiments, the first electronic device displays a display interface of the target operating system, and the display interface displays multiple services; in response to a trigger operation for a target service of the multiple services, a service request for the target service is generated. In this implementation, the multiple services displayed in the display interface of the target operating system are services that can be implemented by the second electronic device in the target scenario, and the target service triggered by the user on the display interface is determined through the display interface, and a service request is generated based on the target service.
[0040] 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. Accordingly, 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; and receives the service request sent by the second electronic device. In some embodiments, the second electronic device displays the display interface of the target operating system, and the display interface displays multiple services; based on the display interface, a trigger operation for any target service in the multiple services is determined, and a service request is generated based on the target service; based on the communication connection, the service request is sent to the first electronic device. In some embodiments, the first electronic device projects the display interface of the target operating system to the second electronic device based on the communication connection, and the display interface displays multiple services. The second electronic device is used to determine the trigger operation of any target service in the multiple services based on the display interface, and feedback the service request to the first electronic device based on the trigger operation. In the embodiment of the present application, when the second electronic device triggers the target service, the source of the content displayed in the second electronic device is not specifically limited.
[0041] In an 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. In this way, when implementing the target service, the efficiency and accuracy of executing the target service are improved by using the device resources of the first electronic device outside the target scenario.
[0042] In some embodiments, a virtual machine is running in the first electronic device, and accordingly, the first electronic device runs the target operating system based on the virtual machine. Figure 3 is a flowchart of a method for executing a service provided in an embodiment of the present application, see Figure 3 , the method comprising:
[0043] Step S301: In response to a target event, the first electronic device switches its operating system 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.
[0044] The principle of this step is the same as that of step S201 and will not be repeated here.
[0045] Step S302: In response to a service request of a target service, the first electronic device calls a device resource in the first electronic device for executing the target service based on the virtual machine.
[0046] The virtual machine is provided with an interface for data interaction with the first electronic device. In an embodiment of the present application, the virtual machine in the first electronic device interacts with the first electronic device based on the interface, thereby calling device resources of the first electronic device.
[0047] 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 can 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).
[0048] Step S303: the first electronic device runs the service instruction of the target service in the target operating system based on the device resources.
[0049] In some embodiments, the first electronic device sends a service result of the target service to the second electronic device in the target scene, so that the second electronic device controls an 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.
[0050] In the case where 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 controls the output device of the target scene based on the communication connection with the second electronic device. Correspondingly, the first electronic device determines the output device for outputting the service result based on the communication connection, sends an output instruction to the second electronic device, and the service result and the device identification of the output device carried in the output instruction are sent to the output device by the second electronic device based on the device identification, and the output device outputs the service result based on the output instruction. In an embodiment of the present application, the first electronic device replaces the second electronic device to control the output device of 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.
[0051] 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, and 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 use the device resources of the first electronic device to complete the target service, thereby improving the instructions 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 needs of the second electronic device, without occupying a large amount of resources of the first electronic device, thereby reducing the impact of occupying device resources on the operation of the first electronic device.
[0052] In an 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. In this way, when implementing the target service, the efficiency and accuracy of executing the target service are improved by using the device resources of the first electronic device outside the target scenario.
[0053] Before the first electronic device switches to the target operating system, the target operating system needs to be downloaded to the first electronic device. Figure 4 , Figure 4 is a flowchart of a method for executing a service provided in an embodiment of the present application. In the embodiment of the present application, the first electronic device is taken as an example to install a target operating system. Figure 4 , the method comprising:
[0054] Step S401: the first electronic device displays a plurality of scene tags in a target application, where the target application is used to download the target operating system.
[0055] The target application is an application for downloading the target operating system. For example, the target application is a portable cockpit mirror store. The target application includes download links for multiple operating systems. The download links for the multiple operating systems are classified according to different scenarios, and each scenario classification corresponds to a scenario tag. For example, the scenario tag includes a car cockpit scenario tag and an office scenario tag. Each scenario tag includes multiple operating systems for the scenario.
[0056] Step S402: In response to a triggering operation of a target scene tag among the multiple scene tags, the first electronic device displays system tags of multiple operating systems under the target scene tag.
[0057] In response to a click operation on a 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, which includes system tags of multiple operating systems. The system tag may be a name of the operating system.
[0058] 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.
[0059] The first electronic device obtains the installation package corresponding to the target operating system based on the system tag, verifies the integrity and legality of the installation package, and installs the installation package to the corresponding storage resource partition of the virtual machine if the installation package is complete and legal. In some embodiments, the first electronic device installs the installation package using an incremental installation method to reduce the size of the installation package and retain previously installed software.
[0060] In response to a triggering operation of the system tag of the target operating system, the first electronic device obtains an installation package of the target operating system from a server of the target application program and installs the installation package.
[0061] In some embodiments, the server of the target application includes installation packages of multiple operating systems. Accordingly, before this step, the developer compiles the operating system of the second electronic device into an installation package of the virtual machine installable system image of the first electronic device; signs the installation package; and uploads the installation package to the server of the target application so that the first electronic device obtains the installation package of the target operating system from the server of the target application.
[0062] In some embodiments, in response to a trigger operation of a system tag of a target operating system, a scene type of the target scene is obtained; 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 car model, that is, the same second electronic device can have multiple mirrored operating systems. The user selects an operating system according to his or her preferences, and the first electronic device determines the installation package that matches the operating system with the car model based on the operating system selected by the user.
[0063] In an 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. In this way, when implementing the target service, the efficiency and accuracy of executing the target service are improved by using the device resources of the first electronic device outside the target scenario.
[0064] Please refer to Figure 5 , which shows a structural block diagram of a device for executing services provided by an embodiment of the present application. The device for executing services can be implemented as all or part of a processor through software, hardware, or a combination of both. The device includes:
[0065] A switching module 501 is used for switching the operating system of the first electronic device to a target operating system in response to 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 that the current scene is the target scene;
[0066] The execution module 502 is used to execute the target service in response to a service request of the target service based on the device resources of the first electronic device and the target operating system.
[0067] In some embodiments, the first electronic device runs a virtual machine, and the execution module 502 includes:
[0068] A calling unit, configured to respond to a service request of a target service and call a device resource in the first electronic device for executing the target service based on the virtual machine;
[0069] An operating unit is used to operate the service instruction of the target service in the target operating system based on the device resources.
[0070] In some embodiments, the apparatus further comprises:
[0071] A first display module, used to display a display interface of the target operating system, where the display interface displays multiple services;
[0072] The generating module is used to generate a service request of a target service of the multiple services in response to a triggering operation on the target service.
[0073] In some embodiments, the apparatus further comprises:
[0074] An establishing module, used to establish a communication connection with a second electronic device in the target scene, and the second electronic device is used to control an output device in the target scene to output a service result of the target service;
[0075] The receiving module is used to receive the service request sent by the second electronic device.
[0076] In some embodiments, the apparatus further comprises:
[0077] The sending module is used 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.
[0078] In some embodiments, the apparatus comprises:
[0079] A second display module, used for displaying a plurality of scene tags of a target application, the target application being used for downloading the target operating system;
[0080] The second display module is used to display the system labels of the multiple operating systems under the target scene label in response to multiple triggering operations on the target scene label among the multiple scene labels;
[0081] The installation module is used to install the installation package corresponding to the system tag in response to the trigger operation on the system tag of the target operating system.
[0082] In some embodiments, the installation module includes:
[0083] An acquisition unit, used to acquire an installation package corresponding to the system tag based on the system tag;
[0084] The installation unit is used to install the installation package in a target storage resource, where the target storage resource is a storage resource allocated for the target operating system in the first electronic device.
[0085] In some embodiments, the acquisition unit is used to obtain the scene type of the target scene in response to a trigger operation of a system tag of the target operating system; based on the scene type, determine an installation package of the target operating system that matches the scene type.
[0086] In an 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. In this way, when implementing the target service, the efficiency and accuracy of executing the target service are improved by using the device resources of the first electronic device outside the target scenario.
[0087] Please refer to Figure 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 laptop computer, or a wearable device. The first electronic device 600 in the present application may include one or more of the following components: a processor 610 and a memory 620.
[0088] The processor 610 may include one or more processing cores. The processor 610 uses various interfaces and lines to connect various parts within the entire first electronic device 600, and executes various functions and processes data of the first electronic device 600 by running or executing at least one instruction stored in the memory 620, and calling the data stored in the memory 620. Optionally, the processor 610 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 610 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 610, but may be implemented by a separate chip.
[0089] The memory 620 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 620 includes a non-transitory computer-readable storage medium. The memory 620 may be used to store at least one instruction. The memory 620 may include a program storage area and a data storage area, wherein the program storage 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 for implementing the following embodiments, etc.; the data storage area may store data (such as audio data, a phone book) created according to the use of the first electronic device 600, etc.
[0090] 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, through which the user can use any suitable object such as a finger or a stylus to perform touch operations on the display screen. The display screen is usually arranged 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 as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which is not limited in this embodiment.
[0091] 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. The first electronic device 600 may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the first electronic device 600 also includes a microphone, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, Wi-Fi) module, a power supply, a Bluetooth module and other components, which will not be repeated here.
[0092] An embodiment of the present application also provides a computer-readable medium, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method of executing the service shown in the above embodiments.
[0093] An embodiment of the present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method of executing the service shown in the above embodiments.
[0094] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0095] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for performing a service, characterized in that: The method is performed by a first electronic device, and includes: Display multiple scene tags of a target application, wherein the target application is used to download a target operating system; in response to multiple trigger operations for a target scene tag among the multiple scene tags, display system tags for multiple operating systems under the target scene tag; in response to a trigger operation for a system tag of the target operating system, install an installation package corresponding to the system tag; In response to a target event, switching the operating system of the first electronic device to the target operating system, the target operating system being an operating system associated with a target scene, the target event being used to indicate that the 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; The service result of the target service is sent to a second electronic device in the target scene, so that the second electronic device controls an output device in the target scene to output the service result.
2. The method according to claim 1, characterized in that The first electronic device runs a virtual machine, and the responding to the service request of the target service, based on the device resources of the first electronic device and the target operating system, executes the target service, including: In response to a service request of a target service, calling a device resource in the first electronic device for executing the target service based on the virtual machine; The service instructions of the target service in the target operating system are executed based on the device resources.
3. The method according to claim 1, characterized in that The method further comprises: Displaying a display interface of the target operating system, wherein the display interface displays a plurality of services; In response to a triggering operation for a target service of the plurality of services, a service request for the target service is generated.
4. The method according to claim 1, characterized in that: The method further comprises: Establishing a communication connection with a second electronic device in the target scene, the second electronic device being used to control an output device in the target scene to output a service result of the target service; Receive a service request sent by the second electronic device.
5. The method according to claim 1, characterized in that The step of installing the installation package corresponding to the system tag in response to the triggering operation of the system tag of the target operating system includes: Based on the system tag, obtaining an installation package corresponding to the system tag; The installation package is installed in a target storage resource, where the target storage resource is a storage resource allocated for the target operating system in the first electronic device.
6. The method according to claim 5, characterized in that The step of obtaining the installation package corresponding to the system tag in response to the triggering operation of the system tag of the target operating system includes: In response to a triggering operation of a system tag of a target operating system, acquiring a scene type of the target scene; Based on the scenario type, an installation package of a target operating system matching the scenario type is determined.
7. A device for executing a service, characterized in that: The device runs in a first electronic device, and includes: A second display module is used to display multiple scene tags of a target application, wherein the target application is used to download a target operating system; in response to multiple trigger operations for a target scene tag among the multiple scene tags, display system tags of multiple operating systems under the target scene tag; An installation module, configured to install an installation package corresponding to a system tag in response to a trigger operation on a system tag of a target operating system; a switching module, configured to switch the operating system of the first electronic device to the target operating system in response to the occurrence of a target event, wherein 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; an execution module, configured to execute the target service in response to a service request of the target service based on the device resources of the first electronic device and the target operating system; The sending module is used 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.
8. The device according to claim 7, characterized in that The first electronic device runs a virtual machine, and the execution module includes: a calling unit, configured to call, in response to a service request of a target service, a device resource in the first electronic device for executing the target service based on the virtual machine; An operating unit is used to operate the service instruction of the target service in the target operating system based on the device resources.
9. The device according to claim 7, characterized in that The device also includes: A first display module, used to display a display interface of the target operating system, wherein the display interface displays a plurality of services; The generating module is used to generate a service request of a target service among the multiple services in response to a triggering operation on the target service.
10. The device according to claim 7, characterized in that The device also includes: An establishing module, used to establish a communication connection with a second electronic device in the target scene, and the second electronic device is used to control an output device in the target scene to output a service result of the target service; The receiving module is used to receive the service request sent by the second electronic device.
11. The device according to claim 7, characterized in that The installation module comprises: An acquisition unit, configured to acquire, based on the system tag, an installation package corresponding to the system tag; An installation unit is configured to install the installation package in a target storage resource, where the target storage resource is a storage resource allocated for the target operating system in the first electronic device.
12. The device according to claim 11, characterized in that The acquisition unit is used to acquire the scene type of the target scene in response to a trigger operation of the system tag of the target operating system; and determine the installation package of the target operating system matching the scene type based on the scene type.
13. An electronic device, characterized in that: The electronic device includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the method for executing a service as described in any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the method for executing a service according to any one of claims 1 to 6.
15. A computer program product, characterized in that The computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the method for executing a service according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for system switching and terminal
CN106383740A