WO2024093703A1 - 一种实例的管理方法、装置、电子设备及存储介质 - Google Patents

一种实例的管理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2024093703A1
WO2024093703A1 PCT/CN2023/125981 CN2023125981W WO2024093703A1 WO 2024093703 A1 WO2024093703 A1 WO 2024093703A1 CN 2023125981 W CN2023125981 W CN 2023125981W WO 2024093703 A1 WO2024093703 A1 WO 2024093703A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
component
electronic device
instance
component instance
Prior art date
Application number
PCT/CN2023/125981
Other languages
English (en)
French (fr)
Inventor
曹春雷
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024093703A1 publication Critical patent/WO2024093703A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72427User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting games or graphical animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Definitions

  • the present application belongs to the field of device control technology, and in particular, relates to a management method, device, electronic device and storage medium of an example.
  • the present application provides an instance management method, device, electronic device and computer-readable storage medium, which can solve the problem of frequent opening and closing of component instances, high operational difficulty and low switching efficiency when switching between multiple component instances in the same application.
  • an embodiment of the present application provides an instance management method, comprising: an electronic device receives an instruction to open a component of a target application; the electronic device creates a component instance corresponding to the component, and configures a task identifier for the component instance according to startup configuration information of the target application; the electronic device configures a corresponding first task view for the component instance according to the task identifier.
  • the startup configuration information corresponding to the target application is read, a task identifier is assigned to the component instance running the target application through the startup configuration information corresponding to the target application, and a corresponding first task view is configured for the component instance based on the task identifier to operate the component instance running in the target application, thereby achieving the purpose of flexibly configuring the task view in the same target application.
  • a component of a target application is only assigned one task view, but a corresponding task identifier can be assigned to each component instance according to the startup configuration information, so that the task view is configured according to the task identifier, that is, component instances with different task identifiers in a target application can correspond to different task views, which is convenient for users to quickly switch views when starting multiple component instances in an application, so as to realize operations on multiple different component instances at the same time, avoiding the target application from frequently opening and closing component instances, improving the efficiency of switching between component instances, and reducing the waiting time required for users to switch instances, thereby improving the user experience.
  • the startup configuration information includes a startup mode identifier; the electronic device creates a component instance corresponding to the component, and configures a task identifier for the component instance according to the startup configuration information of the target application, including: when the startup mode identifier is the first value, the electronic device configures the task identifier for the component instance according to the startup configuration information.
  • the electronic device before the electronic device creates a component instance corresponding to the component and configures a task identifier for the component instance according to the startup configuration information of the target application, it also includes: the electronic device determines the environmental information when the open instruction is received; the electronic device queries the startup mode identifier associated with the environmental information through the startup configuration information.
  • the environmental information includes: a startup time, a startup location, and one or a combination of two or more of the applications running on the device.
  • the electronic device configures a first task view corresponding to the component instance according to the task identifier, including: when the first task view corresponding to the task identifier exists in the task view of the electronic device, the electronic device reuses the first task view corresponding to the task identifier; when the first task view corresponding to the task identifier does not exist in the task view of the electronic device When the first task view corresponding to the task identifier is obtained, the electronic device configures the first task view corresponding to the task identifier for the component instance.
  • the electronic device after receiving an opening instruction for a component of a target application, it also includes: when the startup mode identifier is a second bit value, the electronic device displays the component instance in a second task view corresponding to the target application; wherein the second task view is used to display all component instances in the target application; or, when the startup mode identifier is a third bit value, the electronic device configures a corresponding third task view for the component instance; wherein each component instance opened by the opening instruction corresponds to one third task view.
  • the electronic device after the electronic device configures a corresponding first task view for the component instance according to the task identifier, it also includes: in response to a shutdown instruction of the component instance in the target application, the electronic device destroys the component instance running in the target application; the electronic device retains the first task view corresponding to the component instance, and stores a first association relationship between the task identifier of the component instance and the first task view.
  • the electronic device configures a corresponding first task view for the component instance according to the task identifier, including: the electronic device generates the component instance and a component record corresponding to the component instance through a common component of the target application; the component record contains the task identifier; the electronic device configures the corresponding first task view for the component instance, and establishes a second association relationship between the first task view and the component record.
  • an embodiment of the present application provides a management device of an example, including:
  • An opening instruction response unit used for receiving an opening instruction for a component running on a target application
  • a task identifier configuration unit used to create a component instance corresponding to the component, and configure a task identifier for the component instance according to the startup configuration information of the target application;
  • the task view configuration unit is used to configure a corresponding first task view for the component instance according to the task identifier.
  • the startup configuration information includes a startup mode identifier; and the task identifier configuration unit includes:
  • the first configuration unit is used to configure a task identifier for the component instance according to the startup configuration information when the startup mode identifier is a first value.
  • the management device further includes:
  • an environment information determination unit used to determine the environment information when the opening instruction is received
  • a mode determination unit is used to query the startup mode identifier associated with the environment information through the startup configuration information.
  • the environmental information includes: one or a combination of two or more of a startup time, a startup location, and a device running application.
  • the task view configuration unit includes:
  • a multiplexing configuration unit configured to reuse the first task view corresponding to the task identifier when the first task view corresponding to the task identifier exists in the task view of the electronic device
  • a new configuration unit is used to configure the first task view corresponding to the task identifier for the component instance by the electronic device when the first task view corresponding to the task identifier does not exist in the task view of the electronic device.
  • the management device further includes:
  • a second configuration unit is configured to display the component instance in a second task view corresponding to the target application when the startup mode identifier is a second bit value; wherein the second task view is used to display all component instances in the target application; and/or,
  • the third configuration unit is used to configure a corresponding third task view for the component instance when the startup mode identifier is a third bit value; wherein each component instance opened by the opening instruction corresponds to one third task view.
  • the management device further includes:
  • a component removal unit configured to destroy the component instance running in the target application in response to a closing instruction of the component instance in the target application
  • the view retaining unit is used to retain the first task view corresponding to the component instance and store a first association relationship between the task identifier of the component instance and the first task view.
  • the task view configuration unit includes:
  • a component record creation unit configured to generate the component instance and the component instance through the common component of the target application a corresponding component record; the component record including the task identifier;
  • the association creation unit is used to configure the first task view corresponding to the component instance and establish a second association relationship between the first task view and the component record.
  • an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, the management method of any one of the instances described in the first aspect above is implemented.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and wherein when the computer program is executed by a processor, the management method of any one of the instances described in the first aspect is implemented.
  • an embodiment of the present application provides a computer program product.
  • the computer program product When the computer program product is run on an electronic device, the electronic device executes the management method of any one of the instances described in the first aspect above.
  • an embodiment of the present application provides a chip system, comprising a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement a management method as described in any one of the examples in the first aspect.
  • FIG1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG2 is a software structure block diagram of an electronic device according to an embodiment of the present application.
  • FIG3 is a schematic diagram of viewing an existing electronic document
  • FIG4 is a schematic diagram of the structure of each component instance in the application program
  • FIG5 is a schematic diagram of a task view of an application in a multi-instance mode
  • FIG6 is a flowchart of an implementation of a management method of an example provided in an embodiment of the present application.
  • Figure 7 is the existing The system displays implementation diagrams of multiple component instances based on scenarios
  • FIG8 is a flowchart of a specific implementation of S602 in the management method of an example provided in an embodiment of the present application.
  • FIG. 9 is a flowchart of a specific implementation of S603 in the management method of an example provided in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of management of a first task view provided by an embodiment of the present application.
  • FIG11 is a schematic diagram of creating a first task view provided by an embodiment of the present application.
  • FIG12 is a schematic diagram of a task view management method according to an embodiment of the present application.
  • FIG13 is a schematic diagram of a destruction component example provided in an embodiment of the present application.
  • FIG. 14 is a block diagram of a management device according to an example provided in an embodiment of the present application.
  • FIG. 15 is a structural block diagram of an electronic device provided in one embodiment of the present application.
  • the term “if” can be interpreted as “when” or “uponce” or “in response to determining” or “in response to detecting”, depending on the context.
  • the phrase “if it is determined” or “if [described condition or event] is detected” can be interpreted as meaning “uponce it is determined” or “in response to determining” or “uponce [described condition or event] is detected” or “in response to detecting [described condition or event]", depending on the context.
  • references to "one embodiment” or “some embodiments” etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean “one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
  • the terms “including”, “comprising”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized in other ways.
  • the instance management method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc.
  • the instance management method can be applied to smart phones, or electronic devices with multi-core processors that have the function of opening multiple component instances within an application.
  • the embodiment of the present application does not impose any restrictions on the specific type of electronic devices.
  • the electronic device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a personal digital assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a computer, a laptop computer, a handheld communication device, a handheld computing device, and/or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved public land mobile network (PLMN) network, etc.
  • STAION, ST in a WLAN
  • a cellular phone a cordless phone
  • SIP Session Initiation Protocol
  • WLL Wireless Local Loop
  • PDA personal digital assistant
  • a handheld device with wireless communication function a computing device or other processing device connected to a wireless modem
  • a computer a laptop
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus
  • USB universal serial bus, USB
  • charging management module 140 power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple groups of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 can include multiple I2S buses.
  • the processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100.
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from a wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
  • the power management module 141 can also be set in the processor 110.
  • the power management module 141 and the charging management module 140 can also be set in the same device.
  • the wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 can be used to cover a single or Multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 150 may receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
  • at least some of the functional modules of the mobile communication module 150 may be arranged in the processor 110.
  • at least some of the functional modules of the mobile communication module 150 may be arranged in the same device as at least some of the modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the electronic device 100.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared
  • the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation system
  • the electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a management microprocessor of an example, connecting the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. Among them, the above-mentioned display screen 194 can specifically display the generated test report so that the user can view the test report through the display screen 194.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the display screen 194 may include a touch panel and other input devices.
  • the electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted to the camera photosensitive element through the lens, and the light signal is converted into an electrical signal.
  • the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into
  • the ISP can also optimize the noise, brightness, and skin color of the image.
  • the ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene.
  • the ISP can be set in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor.
  • CMOS complementary metal oxide semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
  • the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital videos.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG Moving Picture Experts Group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural network (NN) computing processor.
  • NN neural network
  • applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
  • the internal memory 121 can be used to store computer executable program codes, which include instructions.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
  • the speaker 170A also called a "speaker" is used to convert an audio electrical signal into a sound signal.
  • the electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
  • the speaker 170A can be used to output prompt information.
  • the receiver 170B also called a "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be received by placing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C.
  • the electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
  • the earphone interface 170D is used to connect a wired earphone.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals and convert them into electrical signals.
  • the pressure sensor 180A can be set on the display screen 194.
  • the electronic device can obtain the user's weight through the pressure sensor 180A.
  • Capacitive pressure sensors can include at least two parallel plates with conductive materials. When a force acts on the pressure sensor 180A, The capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the touch operation intensity based on the pressure sensor 180A.
  • the electronic device 100 may also calculate the touch position based on the detection signal of the pressure sensor 180A.
  • touch operations applied to the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes i.e., x, y, and z axes
  • the gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light outward through the light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the touch sensor 180K is also called a "touch control device”.
  • the touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals of the human body's vocal part vibrating bone blocks. The bone conduction sensor 180M can also contact the human body's pulse to receive blood pressure beating signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones.
  • the audio module 170 can parse out the voice signal based on the vibration signal of the vocal part vibrating bone blocks obtained by the bone conduction sensor 180M to realize the voice function.
  • the application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize the heart rate detection function.
  • the key 190 includes a power key, a volume key, etc.
  • the key 190 may be a mechanical key or a touch key.
  • the electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
  • Motor 191 can generate vibration prompts.
  • Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • touch operations acting on different areas of the display screen 194 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminders, receiving messages, alarm clocks, games, etc.
  • the touch vibration feedback effect can also support customization.
  • Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.
  • the electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications.
  • the electronic device 100 uses an eSIM, i.e., an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
  • FIG. 2 is a software structure block diagram of an electronic device according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, each with clear roles and division of labor.
  • the layers communicate with each other through software interfaces.
  • the operating system of the electronic device is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the runtime system layer, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, calendar, map, WLAN, Bluetooth, music, video, short message, mailbox, etc.
  • the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
  • the view system can be used to build applications.
  • a display interface can be composed of one or more views.
  • a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
  • the phone manager is used to provide communication functions for electronic devices, such as management of call status (including answering, hanging up, etc.).
  • the resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
  • the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
  • the runtime system layer includes the core library and the virtual machine.
  • the runtime system layer is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system layer can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • functional modules such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • the surface manager is used to manage the display subsystem and provide the fusion of two-dimensional and three-dimensional layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, etc.
  • a 2D graphics engine is a drawing engine for 2D drawings.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information).
  • the raw input event is stored in the kernel layer.
  • the application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.
  • smartphones can only provide relatively basic functions, such as telephone communication, short message interaction, and taking pictures. Now, they can run a game application in the foreground while running other interactive applications in the background to receive interactive information sent by the other end in real time, and play favorite music through the music application running in the background. In addition to being able to run multiple different applications at the same time, smartphones can also run different component instances in the same application. With the popularity of mini-programs and application programming interfaces (APIs), the types of component instances that can run in applications have also increased. How electronic devices can effectively manage multiple component instances running in applications has become the key to affecting user experience.
  • APIs application programming interfaces
  • an electronic device can store multiple different documents, such as document 1, document 2, etc.
  • FIG3 shows a schematic diagram of viewing an existing electronic document.
  • the electronic device is a smart phone, and multiple different applications are installed in the smart phone, such as application 31 capable of document editing.
  • application 31 capable of document editing.
  • the electronic device will run the document editing application and generate a corresponding application operation interface, that is, a task view corresponding to the application, as shown in FIG3 (b).
  • the user can select the electronic document to be opened.
  • the electronic device will open the corresponding electronic document, that is, generate a component instance corresponding to the electronic document.
  • the component instance can be displayed through a visual view to generate a task view as shown in FIG3 (c).
  • component instances of an application in an electronic device may be divided into the following two modes: a single instance operation mode and a multi-instance operation mode. The details are as follows:
  • Mode 1 Single instance operation mode.
  • each launched component instance in the application will be stored in the form of a task stack.
  • Figure 4 shows a schematic diagram of the structure of each component instance in the application.
  • the electronic device can run different applications at the same time, such as application 1 and application 2.
  • Each application can run a corresponding component instance.
  • instance 1, instance 2 and instance 3 are running in application 1
  • instance X and instance Y are running in application 2.
  • Each application corresponds to a task, that is, a task view.
  • the component instances in the application can be operated in the task view managed in the application.
  • the single instance operation mode the application can open multiple component instances at the same time.
  • the user can open document 1 in the document editing, and then open document 2.
  • the task view of the application will display the content of document 2, that is, in Figure 3.
  • the content of (c) will be overwritten by the content of document 2, that is, the task view of document 2 will be on the task view of document 1, which is consistent with the stack form.
  • the document editing application needs to close the task view of document 2 first, that is, the component instance of document 2 is removed, and the task view of document 1 covered under the task view of document 2 will be displayed again. Only then can the user edit the task content of document 1.
  • documents 1 to 3 are stored in the form of stacks, all documents opened after document 1 need to be closed before the content of document 1 can be displayed. This is a first-in-last-out storage form.
  • the document editing application will overlay the task view of document 2 on the task view of document 1 again. It can be seen that when the application runs as a single instance, when it is necessary to switch between component instances, the component instances need to be frequently opened and closed, which increases the user's operation difficulty, reduces the user's operation efficiency, and affects the user's experience.
  • Mode 2 Multi-instance operation mode.
  • the application In the multi-instance operation mode, when a user opens a component instance through an application, the application will configure a corresponding task view for the component instance, so that the user can switch back and forth between multiple task views.
  • FIG5 shows a schematic diagram of the task view of the application in the multi-instance mode.
  • the file editing application opens two instances of document 1 and document 2, and the file editing application configures two task views for the two documents, namely view 51 and view 52. The user can edit different documents by switching the task views of the two documents in the task management interface of the electronic device.
  • the multi-instance operation mode can configure the corresponding task view every time the user opens a component instance, when the user opens the same component instance multiple times, for example, after the user opens document 1, then opens document 2, and then opens document 1 again, a new task view will be assigned to the document 1 again, as shown in FIG5 (b). Therefore, in the multi-instance operation mode, the task view will be repeatedly configured for the same component instance, thereby increasing unnecessary resource consumption and system overhead, and reducing the resource utilization of the electronic device.
  • the present application provides a management method of an example, and the execution subject of the management method of the example is an electronic device, which includes but is not limited to: smart phones, tablet computers, computers, laptops and other electronic devices that can run applications and operate applications.
  • FIG6 shows a flowchart of an implementation of a management method of an example provided by an embodiment of the present application, which is described in detail as follows:
  • a plurality of different applications are installed in the electronic device, and the program icons corresponding to each application can be displayed in the main view of the electronic device.
  • the user can select the application icon corresponding to the application (i.e., the target application) to be started in the main view by clicking or double-clicking, so as to initiate a startup operation for the target application.
  • the specific startup process can be seen in FIG3, which is not repeated here.
  • the electronic device can identify the application specified by the startup operation as the target application, obtain the application identifier of the target application, and generate a startup instruction carrying the application identifier to run the target application in the electronic device.
  • the user can open the component corresponding to the target application, and then initiate an open instruction for the component to create a corresponding component instance through the general component in the target application to start a function in the target application and configure the corresponding visual view, i.e., the task view.
  • a target application may contain multiple different components.
  • the user can open the component by clicking the control corresponding to any component to create a corresponding component instance; of course, a target application may correspond to only one component.
  • the user can initiate an opening instruction for the target application, such as clicking the application icon of the target application in the main view or clicking the task snapshot corresponding to the target application in the background.
  • the electronic device will respond to the opening instruction and create a component instance of the target application component.
  • a component instance corresponding to the component is created, and a task identifier is configured for the component instance according to the startup configuration information of the target application.
  • each application may be associated with corresponding startup configuration information, which is specifically used to limit The corresponding startup mode of the application when running the component instance is determined.
  • the startup mode includes but is not limited to: single instance startup mode, multi-instance startup mode and specified instance startup mode. It should be understood that the application (such as the target application) running in the specified instance startup mode can dynamically allocate task views according to actual conditions.
  • an application may correspond to multiple different components, and different components may correspond to different startup configuration information.
  • the electronic device may open the component associated with the instruction and obtain the startup configuration information corresponding to the component, so that different components can configure the task view in different ways, so as to achieve the purpose of accurately managing the component instances in the target application.
  • the game application when an application is a fixed instance application, such as a game-type application, the game application generally has only one game instance that can run, that is, there is no need to switch between multiple instances.
  • the startup configuration information of the application can be a default value or a default configuration, which can be set according to actual conditions.
  • the above startup configuration information can be configured before the application is released.
  • the startup configuration information can be carried in the program package of the application.
  • the developer of the application can determine the corresponding startup configuration information according to the common usage scenarios of the application, and add it to the program package of the application when the application is released.
  • the electronic device receives the startup instruction for the target application, it can query the program package corresponding to the application identifier from the memory according to the application identifier carried by the startup instruction, and read the startup configuration information of the target application from the program package, so as to determine the startup mode corresponding to the target application.
  • the instance management method provided in this embodiment is completed through the application service module on the electronic device side, that is, the component instance is not managed and maintained through the components in the application. Compared with the existing component instance management technology, there is no need for developers to redevelop the component instance startup mode for the application.
  • the system displays a schematic diagram of the implementation of multiple component instances according to the scenario. See Figure 7.
  • the system provides an application service module that provides task views for multiple component instances in the same application.
  • a multi-task view session request will be sent to the application service module, and the application service module will establish a multi-task view session with the application.
  • the application service module is specifically used to maintain the life cycle of the application, while the UI life cycle of the task view based on the component instance configured in the application is completed through the view proxy unit in the application.
  • the view proxy unit configures the corresponding task view for each component instance in the application, thereby achieving the purpose of flexible configuration of the task view.
  • the task view of each component instance in the application in this implementation is completed on the application side.
  • the system only provides a session and leaves the maintenance authority of the task view life cycle to the application side. How different applications maintain the task view needs to be completed by the application developers, which increases the development cost of application developers. If the developer of an application does not develop a startup mode that dynamically adjusts the instance according to the scenario, the application does not support the above startup mode, thereby reducing the scope of application of the startup mode.
  • the management method provided in this embodiment is applied to the electronic device side.
  • the application developer only needs to configure the startup configuration information and does not need to develop the corresponding view proxy unit for the application.
  • the management of the task view of the component instance is not completed by the application layer, but is completed by the application service module in the electronic device (that is, implemented on the service side in the electronic device), thereby avoiding the need for each application developer to perform separate development, reducing the amount of application development, and thereby improving the scope of application of dynamically adjusting the startup mode of the instance according to the scenario.
  • the startup configuration information defines the startup mode of the component instance running in the target application
  • the startup mode of the component instance and the configuration method of the task identifier associated with the startup mode are determined through the startup configuration information, so that the task identifier corresponding to the component instance to be run is configured according to the startup mode and the configuration method of the task identifier.
  • the task identifier is used to allocate the task view.
  • the above configuration method can be to configure the task identifier based on the instance name. Specifically, if the instance names of the component instances to be run in the target application are different, different task identifiers will be assigned. For example, if the target application is a document editing application, when the user opens component instances with different document names, the electronic device will assign different task identifiers to each of the component instances. Task ID, for example, the component instance corresponding to document 1 is assigned a task ID 1, and the component instance corresponding to document 2 is assigned a task ID 2. If the user opens document 2 multiple times, since the document names are the same, the task ID will not be assigned again, and the same task ID 2 will be reused.
  • the instance names of the component instances to be run in the target application are different, different task identifiers will be assigned. For example, if the target application is a document editing application, when the user opens component instances with different document names, the electronic device will assign different task identifiers to each of the component instances. Task ID, for example, the component instance corresponding
  • the above configuration method can configure the task identifier based on the storage location of the instance. Specifically, when the storage locations of the component instances required to be run in the target application are different, different task identifiers will be assigned. For example, if there are two component instances with the same instance name stored in the target application (such as instance name 1), and one of the component instances is stored in the C drive, and the other component instance is stored in the D drive, then the storage locations of the two component instances are different. At this time, different task identifiers will be configured for different component instances.
  • the above configuration method can be to configure the task identifier based on the user account. Specifically, when the user accounts to which the component instances running in the target application belong are different, different task identifiers will be assigned. For example, if the target application is a social application, users can log in to different user accounts in the social application, that is, run multiple component instances, and different user accounts correspond to different conversation lists. In order to realize simultaneous operation of multiple accounts, corresponding task identifiers can be configured for different user accounts, so as to configure different task views for different user accounts.
  • the developer can record the configuration method associated with the application in the above-mentioned startup configuration information, and the electronic device can configure the task identifier for the component instance according to the configuration method specified in the startup configuration information.
  • the above-mentioned startup configuration information includes a startup mode identifier, which is specifically used to determine the startup mode of the target application. Different bit values of the startup mode identifier correspond to different startup modes.
  • Figure 8 shows a specific implementation flow chart of S602 in the management method of an example provided in an embodiment of the present application. As shown in Figure 8, S602 provided in the embodiment of the present application specifically includes S6023 to S6025, which are specifically described as follows:
  • a task identifier is configured for the component instance according to the startup configuration information.
  • the startup mode of the application can be specifically divided into three types, namely single instance startup mode, multi-instance startup mode and designated instance startup mode (i.e., the startup mode of the task view is assigned according to the task identifier). Different startup modes have different bit values corresponding to the startup mode identifier in the startup configuration information.
  • the startup mode identifier is the first value, it means that the startup mode of the target application is the specified instance startup mode. In this case, it is necessary to configure the task identifier for the component instance according to the configuration method in the startup configuration information, so that the corresponding task view can be assigned according to the task identifier later.
  • the component instance is displayed in a second task view corresponding to the target application; wherein the second task view is used to display all component instances in the target application.
  • the startup mode when the startup mode is identified as the second value, it means that the startup mode of the target application is the single instance startup mode, so the component instance will be displayed in the second task view corresponding to the target application.
  • the target application corresponds to only one task view, that is, all running component instances in the target application reuse the same task view, that is, the second task view.
  • Multiple component instances running in the single instance startup mode can be stored in the form of a stack structure, that is, when a component instance in the stack can be operated, the component instance can be operated after closing other component instances that have been opened in the instance stack for a longer time than the component instance required for the operation.
  • the opening instruction corresponding to the component instance can also be re-initiated in the instance library to re-add the component instance to the stack structure so that the second task view of the target application is used to display the component instance.
  • the electronic device configures a corresponding third task view for the component instance; wherein each component instance opened by the opening instruction corresponds to a third task view.
  • the startup mode when the startup mode is identified as the third value, it indicates that the startup mode of the target application is a multi-instance startup mode, that is, all running component instances in the target application are configured with a new task view, namely, the third task view.
  • a third task view is configured for the component instance.
  • the first bit value is 1, the second bit value is 2, and the third bit value is 3.
  • the electronic device opens the component of the target application, it obtains the startup configuration information of the target application, extracts the startup mode identifier from the startup configuration information, and determines the startup mode. If the bit value of the format identifier is 1, the operation of S6021 is executed; if the bit value is 2, the operation of S6022 is executed; if the bit value is 3, the operation of S6023 is executed.
  • the developer can set different bit values to set the startup mode of the component in the target application, so as to run the component instance in the electronic device in the startup mode matching the target application.
  • the startup configuration information in the embodiment of the present application includes a startup mode identifier. The developer only needs to adjust the value to change the startup mode of the target application without redeveloping the components of the application, which reduces the difficulty of mode switching of the mode application, and then can increase the scope of application of the startup mode of the specified instance.
  • a target application may correspond to multiple different startup mode identifiers, and different startup mode identifiers may be associated with corresponding usage scenarios.
  • the electronic device may determine the startup mode identifier corresponding to the current usage scenario to manage the component instance in the target application in a corresponding startup manner.
  • S6021 and S6022 may also be included before S6023 to S6024, and the specific description is as follows:
  • the environment information when the open instruction is received is determined.
  • the electronic device can collect the environmental information corresponding to the moment of receiving the opening instruction according to the type of environmental information to be collected in the startup configuration information. For example, if the startup configuration information defines that different times correspond to different startup mode identifiers, then the type of environmental information to be collected is time type information, and the electronic device can collect the startup time as the above-mentioned environmental information; for another example, if the startup configuration information defines that different locations correspond to different startup mode identifiers, then the type of environmental information to be collected is location type information, and the electronic device can obtain the corresponding startup point through the built-in positioning module, and use the collected startup location as the above-mentioned environmental information.
  • the electronic device may not perform operations S6021 and S6022, but may perform any one of operations S6023 to S6025 according to the bit value of the startup mode identifier.
  • the startup mode identifier associated with the environment information is queried through the startup configuration information.
  • the startup configuration information not only includes the startup mode identifier, but also includes the usage scenario range associated with the startup mode identifier.
  • the electronic device can match the environmental information with each usage scenario range, and associate the startup mode identifier with the usage scenario range that matches the environmental information to determine the startup mode that the target application needs to use this time, thereby achieving the purpose of using different startup modes for different scenarios.
  • the environmental information includes: a startup time, a startup location, and one or a combination of two or more of the applications running on the device.
  • the environmental information includes the startup time.
  • An application uses the specified instance startup mode during the day (7:00-18:00) and the single instance startup mode at night (18:00-7:00).
  • the electronic device can obtain the startup time corresponding to the time when the opening instruction is received, for example, 14:00, and it can be determined that it is in the daytime. Therefore, the startup mode identifier is the third bit value, that is, the specified instance startup mode.
  • the environmental information includes a startup location.
  • An application uses the designated instance startup mode in the office and the multi-instance startup mode at home.
  • the electronic device can obtain the startup location corresponding to when receiving the opening instruction. For example, if the current position value is within the position value range of the office through the positioning mode, the startup mode can be set to the designated instance startup mode.
  • the above environmental information may include two or more combinations, and the specific matching and identification method may be similar to the matching process of a single environmental information, that is, to determine the environmental information range into which the collected environmental information falls, thereby determining the corresponding startup mode identifier.
  • the corresponding startup mode identifier can be determined based on environmental information, and different startup modes can be used to run component instances in the target application according to different usage scenarios, thereby improving the flexibility of component instance management.
  • a corresponding first task view is configured for the component instance according to the task identifier.
  • the electronic device before configuring the task view of the component instance in the target application, the electronic device needs to determine the task identifier corresponding to the component instance and configure a task view for the component instance according to the task identifier, namely the first task view mentioned above.
  • different component instances are configured with different task views. For example, when there are two component instances running in the target application, and the two component instances are respectively configured with different task identifiers, the electronic device will respectively configure two first task views for the two component instances, each of which is used to operate one component instance.
  • different component instances correspond to different first task views, that is, component instances corresponding to different task identifiers are independent of each other.
  • the same task identifier when a user repeatedly opens the same component instance, since the component instance is the same, the same task identifier will be assigned. When the electronic device recognizes that the task identifiers corresponding to the component instances opened multiple times are the same, it will reuse the same task view, and will not configure a new task view for the component instance. Compared with the multi-instance startup mode, when the same component instance is opened, since the task identifiers corresponding to the same component instance are the same, a new first task view will not be repeatedly configured for the component instance, but the component instances with the same task identifier will reuse the same first task view, thereby avoiding the consumption of unnecessary resources and improving the resource utilization of the electronic device.
  • the task view can be configured in a manner similar to the "single instance startup mode" for the same component instance, while the task view can be configured in a manner similar to the "multi-instance startup mode" for different component instances. That is, the advantages of the multi-instance startup mode and the single-instance startup mode are retained, while the problems of the above two startup modes are solved, thereby providing accuracy in component instance management.
  • FIG9 shows a specific implementation flow chart of S603 in the management method of an example provided in an embodiment of the present application.
  • S603 in the embodiment of the present application specifically includes S6031 to S6032, which are specifically described as follows:
  • a component instance and a component record corresponding to the component instance are generated through a common component of the target application; the component record includes a task identifier.
  • the electronic device runs the corresponding component instance in the target application, it is necessary to use the general component associated with the target application as the container of the component instance, thereby generating an operable component instance.
  • a component record corresponding to the component instance will be generated in the component management service on the electronic device side.
  • the component record is the smallest unit for managing each application in the application, and each component record corresponds to a component instance on the application side. Since the electronic device side has determined the task identifier corresponding to each component instance before configuring the component instance, in some implementations, the task identifier corresponding to the component instance can be the key of the component instance.
  • the above-mentioned task identifier can also be the instance name or storage address of the component instance.
  • the task identifier can be added to the component record so that when the same component instance is repeatedly started later, it can be determined whether a new first task view needs to be configured by querying the task identifier in the component record.
  • Figure 10 shows a management diagram of the first task view provided by an embodiment of the present application.
  • each component instance running on the application side corresponds to a component instance, such as component instance 1, component instance 2, etc.
  • a corresponding component record is created for each component instance in the component management service on the electronic device side, for example, the component record corresponding to component instance 1 is component record 1, and the component record corresponding to component instance 2 is component record 2, etc.
  • a corresponding first task view is configured for the component instance, and a second association relationship between the first task view and the component record is established.
  • the electronic device after the electronic device creates a component record corresponding to the component instance, it needs to configure the corresponding first task view, that is, to visualize the component instance so that the user can operate the component instance through the first task view.
  • the electronic device needs to establish an association relationship between the first task view and the component record carrying the task identifier, that is, the above-mentioned second association relationship.
  • a first task view is the smallest unit for managing tasks on the electronic device side.
  • a first task view contains only one component instance, that is, one component instance corresponds to one first task view.
  • Multiple component instances of an application can be displayed in the view management interface.
  • a task snapshot will be generated for each first task view. Users can quickly determine the component instance for the required operation by viewing the corresponding task snapshot in the view management interface.
  • the first task view corresponding to the above-mentioned component instance 1 is the first task view 1
  • the corresponding task snapshot is task snapshot 1
  • the first task view corresponding to the component 2 instance is the first task view 2.
  • the corresponding task snapshot is task snapshot 2.
  • the above task snapshot is a persistent view, that is, the component instance and application corresponding to the task snapshot are not running in the background, but the task snapshot will be retained in the task management view. The user can restart the corresponding component instance and application by clicking any task snapshot in the above task management view.
  • the application side in the process of running a component instance of a target application in an electronic device, the application side only needs to manage the component instance, while the configuration and maintenance of the first task view are completed by the component management service on the electronic device side.
  • the electronic device side is configured with an application service module, which is specifically used to read the startup configuration information from the program package of the application, and configure the corresponding task identifier for the component instance running in the application based on the startup configuration information, so as to configure the first task view based on the task identifier. It can be seen that for the application, it only needs to undertake the task of creating the component instance, and there is no need to perform additional development for the specified instance startup mode alone, which reduces the difficulty of application development.
  • the specified instance startup mode is completed by the electronic device side, that is, it can be applied to all applications installed in the electronic device.
  • the startup mode identifier is the first value
  • different methods are used to configure the first task view for the component instance according to whether the first task view corresponding to the task identifier has been configured. Specifically, the following two situations are included:
  • Case 1 There is a task view that has been configured for the task identifier corresponding to the component instance.
  • the electronic device will reuse the first task view corresponding to the task identifier, that is, the component instance corresponding to the component instance will be displayed in the first task view with the same task identifier, thereby avoiding the situation where multiple task views are configured when the same component instance is repeatedly opened. Since the configured first task view is used to display the component instance that has been opened during the running of the application, it may be that when the user needs to operate other component instances or applications, the component instance is switched to the background, and the corresponding first task view is not displayed in the foreground. Therefore, when the user needs to re-operate the component instance that has been opened, the electronic device can reuse the fourth task view with the same task identifier without redrawing the view, thereby improving the startup efficiency of the component instance.
  • Case 2 If there is no configured task view for the task identifier corresponding to the component instance, a first task view corresponding to the task identifier is configured for the component instance, wherein the configuration operation may be to create a new first task view for the component instance, or to extract the task view corresponding to the task identifier from the view library.
  • the electronic device since the task view associated with the task identifier of the component instance does not exist in the configured task view, that is, the component instance is not opened repeatedly, in this case, the electronic device will configure a first task view corresponding to the task identifier for the component instance, so that when multiple instances are running, the task views between different component instances are independent of each other, and the purpose of being able to quickly switch between multiple instances is achieved.
  • FIG11 shows a schematic diagram of the configuration of the first task view provided by an embodiment of the present application.
  • the target application is a document editing application, and the user can open multiple documents in the document editing application, such as document 1 and document 2.
  • the electronic device will configure the corresponding first task views for the above two documents respectively, and the task view running in the current electronic device can be viewed by calling the task management view, as shown in (a) in FIG11.
  • the user opens document 1 again in the first task view of document 2, as shown in (b) in FIG11, by clicking the open control 111, the corresponding document library in the electronic device will be displayed.
  • the user can select the document to be opened in the document library, for example, select the icon 112 corresponding to document 1. Since the task identifier of the document 1 opened this time is the same as the task identifier of the document 1 that has been opened, the electronic device does not configure a new first task view for the document 1, that is, the document 1 opened this time and the document 1 that has been opened reuse the same fourth task view, that is, the configured first task view. At this time, calling the task management view to view the task view running in the electronic device will be as shown in (c) in Figure 11, except that the view currently running in the foreground is switched from the view of document 2 to the view of document 1, and the total number of task views will not change.
  • Figure 12 shows a management diagram of a task view provided by an embodiment of the present application.
  • the target application is specifically a document editing application.
  • the electronic device When a user repeatedly opens the same document 1, the electronic device does not configure a new first task view, but reuses the same first task view, i.e., first task view 1, and the component records corresponding to the two openings are the same, i.e., component record 1; and when the user opens another document, i.e., document 2, due to the different task identifiers between document 1 and document 2, the electronic device creates a new first task view, i.e., first task view 2, configures the corresponding component record, i.e., component record 2, and establishes an association relationship between the component record and the task view.
  • the method further includes: in response to a closing instruction of the component instance in the target application, destroying the component instance running in the target application; retaining the first task view corresponding to the component instance;
  • the task view stores a first association relationship between a task identifier of any component instance and a first task view.
  • the instance management method provided in the embodiment of the present application is able to reuse the configured first task view when the same component instance is repeatedly opened.
  • the basis is that when an application in an electronic device closes a component instance, although the application side will destroy the component instance in the target application, the task view corresponding to the component instance will not be destroyed, that is, the first task view of the component instance is still retained, and the association relationship between the first task view and the task identifier (that is, the first association relationship) is stored, so that when the component instance with the same task identifier is detected to be running subsequently, the same first task view can be reused to avoid frequent configuration of the same task view.
  • the electronic device when it receives a shutdown instruction, in addition to destroying the above-mentioned component instance, it can also freeze the component instance running in the target application, that is, retain the relevant data of the component instance so that when the component instance is used again later, the frozen component instance can be reactivated.
  • FIG13 shows a schematic diagram of destroying a component instance provided by an embodiment of the present application.
  • the electronic device runs three different applications, wherein the component instance running in application 1 is created based on component 1, such as component instance 1.1, and the component instance running in application 2 is created based on component 2, such as component instance 2.1 and component instance 2.2.
  • the component instance corresponding to application 3 is component instance 3.1.
  • the electronic device When the user closes the second running component instance in application 2, i.e., component instance 2.2, the electronic device will destroy the component instance 2.2 corresponding to the component instance, and correspondingly, the component record corresponding to the component instance 2.2 can also be destroyed at the same time, i.e., component record 3, but the first task view corresponding to the component instance will be retained, i.e., first task view 3, and the corresponding task snapshot will also be retained, so that the first task view and task snapshot can be called when the component instance is started again later.
  • an instance management method provided by an embodiment of the present application can read the startup configuration information corresponding to the target application when the user opens the component in the target application, assign a task identifier to the component instance running on the target application through the startup configuration information corresponding to the target application, and configure the corresponding first task view for the component instance based on the task identifier to operate the component instance running in the target application, thereby achieving the purpose of flexibly configuring the task view in the same target application.
  • a component of a target application only assigns one task view, but can assign a corresponding task identifier to each component instance according to the startup configuration information, so as to configure the task view according to the task identifier, that is, component instances with different task identifiers in a target application can correspond to different task views, which is convenient for users to quickly switch views when starting multiple component instances in an application, so as to realize the operation of multiple different component instances at the same time, avoiding the frequent opening and closing of component instances of the target application, improving the efficiency of switching between component instances, and reducing the waiting time required for users to switch instances, thereby improving the user experience.
  • FIG14 shows a structural block diagram of the management device of the instance provided in the embodiment of the present application. For the sake of convenience of explanation, only the part related to the embodiment of the present application is shown.
  • the management device of this example includes:
  • the opening instruction response unit 141 is used to receive an opening instruction for a component running on a target application
  • a task identifier configuration unit 142 configured to create a component instance corresponding to the component and configure a task identifier for the component instance according to the startup configuration information of the target application;
  • the task view configuration unit 143 is configured to configure a corresponding first task view for the component instance according to the task identifier.
  • the startup configuration information includes a startup mode identifier; and the task identifier configuration unit 142 includes:
  • the first configuration unit is used to configure a task identifier for the component instance according to the startup configuration information when the startup mode identifier is a first value.
  • the management device further includes:
  • an environment information determination unit used to determine the environment information when the opening instruction is received
  • a mode determination unit is used to query the startup mode identifier associated with the environment information through the startup configuration information.
  • the environmental information includes: a startup time, a startup location, and one or a combination of two or more of the applications running on the device.
  • the task view configuration unit 143 includes:
  • a multiplexing configuration unit configured to reuse the first task view corresponding to the task identifier when the first task view corresponding to the task identifier exists in the task view of the electronic device
  • a new configuration unit is used to configure the first task view corresponding to the task identifier for the component instance by the electronic device when the first task view corresponding to the task identifier does not exist in the task view of the electronic device.
  • the management device further includes:
  • a second configuration unit is configured to display the component instance in a second task view corresponding to the target application when the startup mode identifier is a second bit value; wherein the second task view is used to display all component instances in the target application; and/or
  • the third configuration unit is used to configure a corresponding third task view for the component instance when the startup mode identifier is a third bit value; wherein each component instance opened by the opening instruction corresponds to one third task view.
  • the management device further includes:
  • a component removal unit configured to destroy the component instance running in the target application in response to a closing instruction of the component instance in the target application
  • the view retaining unit is used to retain the first task view corresponding to the component instance and store a first association relationship between the task identifier of the component instance and the first task view.
  • the task view configuration unit 143 includes:
  • a component record creation unit configured to generate the component instance and a component record corresponding to the component instance through a common component of the target application; the component record includes the task identifier;
  • the association creation unit is used to configure the first task view corresponding to the component instance and establish a second association relationship between the first task view and the component record.
  • the instance management device provided in the embodiment of the present application can also read the startup configuration information corresponding to the target application when the user opens the component in the target application, assign a task identifier to the component instance running on the target application through the startup configuration information corresponding to the target application, and configure the corresponding first task view for the component instance based on the task identifier to operate the component instance running in the target application, thereby achieving the purpose of flexibly configuring the task view in the same target application.
  • a component of a target application only assigns one task view, but can assign a corresponding task identifier to each component instance according to the startup configuration information, so as to configure the task view according to the task identifier, that is, component instances with different task identifiers in a target application can correspond to different task views, which is convenient for users to quickly switch views when starting multiple component instances in an application, so as to realize the operation of multiple different component instances at the same time, avoiding the frequent opening and closing of component instances of the target application, improving the efficiency of switching between component instances, and reducing the waiting time required for users to switch instances, thereby improving the user experience.
  • FIG15 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • the electronic device 15 of this embodiment includes: at least one processor 150 (only one processor is shown in FIG15 ), a memory 151, and a computer program 152 stored in the memory 151 and executable on the at least one processor 150, and when the processor 150 executes the computer program 152, the steps in the management method embodiment of any of the above-mentioned examples are implemented.
  • the electronic device 15 may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server.
  • the electronic device may include, but is not limited to, a processor 150 and a memory 151.
  • FIG. 15 is merely an example of the electronic device 15 and does not constitute a limitation on the electronic device 15.
  • the electronic device 15 may include more or fewer components than shown in the figure, or may combine certain components, or different components, and may also include, for example, input and output devices, network access devices, etc.
  • the processor 150 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or any conventional processor, etc.
  • the memory 151 may be an internal storage unit of the electronic device 15, such as a hard disk or memory of the electronic device 15. In other embodiments, the memory 151 may also be an external storage device of the electronic device 15, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 15. Furthermore, the memory 151 may also include both an internal storage unit of the electronic device 15 and an external storage device.
  • the memory 151 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc.
  • the memory 151 can also be used to temporarily store data that has been output or is about to be output.
  • the technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration.
  • the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
  • the functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
  • An embodiment of the present application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.
  • An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
  • An embodiment of the present application provides a computer program product.
  • the computer program product runs on a mobile terminal
  • the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium.
  • the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented.
  • the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form.
  • the computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera/electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium.
  • ROM read-only memory
  • RAM random access memory
  • electric carrier signal telecommunication signal and software distribution medium.
  • USB flash drive mobile hard disk, disk or optical disk.
  • computer-readable media cannot be electric carrier signals and telecommunication signals.
  • the disclosed devices/network equipment and methods can be implemented in other ways.
  • the device/network equipment embodiments described above are merely schematic.
  • the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)

Abstract

本申请提供了一种实例的管理方法、装置、电子设备及存储介质,该方法包括:接收对目标应用运行的组件的打开指令;创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识;根据所述任务标识为所述组件实例配置对应的第一任务视图。本申请提供的技术方案能够实现同时对多个不同的组件实例进行操作,避免了目标应用频繁开启以及关闭组件实例,提高了组件实例间切换的效率,并降低了用户在切换实例时所需等待的时间,提高了用户的使用体验。

Description

一种实例的管理方法、装置、电子设备及存储介质
本申请要求于2022年10月31日提交国家知识产权局、申请号为202211354069.5、申请名称为“一种实例的管理方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于设备控制技术领域,尤其涉及一种实例的管理方法、装置、电子设备及存储介质。
背景技术
通过在电子设备上同时运行多个应用程序,生成各个应用程序对应的任务视图,用户可以在多个任务视图间进行切换,实现同时操作多个应用的目的。
电子设备虽然能够同时运行多个不同的应用程序,但在一个应用程序内启动多个实例时,往往复用同一个任务视图。若用户需要在一个应用程序内进行实例间的切换,则需要应用程序关闭当前显示实例的任务视图后才能够切换至的另一实例的任务视图,从而降低了在同一应用程序内不同实例间的切换效率,增加了用户的操作难度以及所需的等待时长。
发明内容
本申请提供了一种实例的管理方法、装置、电子设备以及计算机可读存储介质,可以解决在同一应用程序内需要在多个组件实例切换时,需要频繁开启以及关闭组件实例,操作难度大以及切换效率低的问题。
第一方面,本申请实施例提供了一种实例的管理方法,包括:电子设备接收对目标应用的组件的打开指令;所述电子设备创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识;所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图。
通过在用户打开目标应用中的组件时,读取该目标应用对应的启动配置信息,通过该目标应用对应的启动配置信息对其运行的组件实例分配任务标识,并基于任务标识为组件实例配置对应的第一任务视图,以对该目标应用中运行的组件实例进行操作,实现了同一目标应用中可以灵活配置任务视图的目的。与现有的实例管理技术相比,一个目标应用的组件只是分配一个任务视图,而是可以根据启动配置信息为每个组件实例分配对应的任务标识,从而根据任务标识进行任务视图的配置,即一个目标应用内任务标识不同的组件实例可以对应不同的任务视图,方便用户在一个应用中启动多个组件实例时,能够进行视图的快速切换,以实现同时对多个不同的组件实例进行操作,避免了目标应用频繁开启以及关闭组件实例,提高了组件实例间切换的效率,并降低了用户在切换实例时所需等待的时间,提高了用户的使用体验。
在第一方面的一种可能实现方式中,所述启动配置信息包含启动模式标识;所述电子设备创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识,包括:当所述启动模式标识为第一位值时,所述电子设备根据所述启动配置信息为所述组件实例配置任务标识。
在第一方面的一种可能实现方式中,在所述电子设备创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识之前,还包括:所述电子设备确定接收到所述打开指令时的环境信息;所述电子设备通过所述启动配置信息查询所述环境信息关联的所述启动模式标识。
在第一方面的一种可能实现方式中,所述环境信息包括:启动时间、启动地点、设备运行应用中的一个或两个以上的组合。
在第一方面的一种可能实现方式中,所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图,包括:当所述电子设备的任务视图中存在所述任务标识对应的第一任务视图时,所述电子设备复用所述任务标识对应的第一任务视图;当所述电子设备的任务视图中不存在 所述任务标识对应的所述第一任务视图时,所述电子设备为所述组件实例配置所述任务标识对应的第一任务视图。
在第一方面的一种可能实现方式中,在所述接收对目标应用的组件的打开指令之后,还包括:当所述启动模式标识为第二位值时,所述电子设备将所述组件实例在所述目标应用对应的第二任务视图内显示;其中,所述第二任务视图用于显示所述目标应用内的所有组件实例;或者,当所述启动模式标识为第三位值时,所述电子设备为所述组件实例配置对应的第三任务视图;其中,每一个所述打开指令打开的所述组件实例对应一个所述第三任务视图。
在第一方面的一种可能实现方式中,在所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图之后,还包括:响应于所述目标应用中组件实例的关闭指令,所述电子设备销毁在所述目标应用中运行的所述组件实例;所述电子设备保留所述组件实例对应的所述第一任务视图,并存储所述组件实例的任务标识与所述第一任务视图的第一关联关系。
在第一方面的一种可能实现方式中,所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图,包括:所述电子设备通过所述目标应用的通用组件生成所述组件实例以及所述组件实例对应的组件记录;所述组件记录包含所述任务标识;所述电子设备为所述组件实例配置对应的所述第一任务视图,并建立所述第一任务视图与所述组件记录之间的第二关联关系。
第二方面,本申请实施例提供了一种实例的管理装置,包括:
打开指令响应单元,用于接收对目标应用运行的组件的打开指令;
任务标识配置单元,用于创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识;
任务视图配置单元,用于根据所述任务标识为所述组件实例配置对应的第一任务视图。
在第二方面的一种可能实现方式中,所述启动配置信息包含启动模式标识;所述任务标识配置单元包括:
第一配置单元,用于当所述启动模式标识为第一位值时,根据所述启动配置信息为所述组件实例配置任务标识。
在第二方面的一种可能实现方式中,所述管理装置还包括:
环境信息确定单元,用于确定接收到所述打开指令时的环境信息;
模式确定单元,用于通过所述启动配置信息查询所述环境信息关联的所述启动模式标识。
在第二方面的一种可能实现方式中,所述环境信息包括:启动时间、启动地点、设备运行应用中的一个或两个以上的组合。
在第二方面的一种可能实现方式中,所述任务视图配置单元包括:
复用配置单元,用于当电子设备的任务视图中存在所述任务标识对应的第一任务视图时,复用所述任务标识对应的第一任务视图;
新建配置单元,用于当电子设备的任务视图中不存在所述任务标识对应的所述第一任务视图时,所述电子设备为所述组件实例配置所述任务标识对应的第一任务视图。
在第二方面的一种可能实现方式中,所述管理装置还包括:
第二配置单元,用于当所述启动模式标识为第二位值时,将所述组件实例在所述目标应用对应的第二任务视图内显示;其中,所述第二任务视图用于显示所述目标应用内的所有组件实例;和/或,
第三配置单元,用于当所述启动模式标识为第三位值时,为所述组件实例配置对应的第三任务视图;其中,每一个所述打开指令打开的所述组件实例对应一个所述第三任务视图。
在第二方面的一种可能实现方式中,所述管理装置还包括:
组件移除单元,用于响应于所述目标应用中组件实例的关闭指令,销毁在所述目标应用中运行的所述组件实例;
视图保留单元,用于保留所述组件实例对应的所述第一任务视图,并存储所述组件实例的任务标识与所述第一任务视图的第一关联关系。
在第二方面的一种可能实现方式中,所述任务视图配置单元包括:
组件记录创建单元,用于通过所述目标应用的通用组件生成所述组件实例以及所述组件实例 对应的组件记录;所述组件记录包含所述任务标识;
关联创建单元,用于为所述组件实例配置对应的所述第一任务视图,并建立所述第一任务视图与所述组件记录之间的第二关联关系。
第三方面,本申请实施例提供了一种电子设备,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现上述第一方面中任一项所述实例的管理方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现上述第一方面中任一项所述实例的管理方法。
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面中任一项所述实例的管理方法。
第六方面,本申请实施例提供一种芯片系统,包括处理器,处理器与存储器耦合,所述处理器执行存储器中存储的计算机程序,以实现如第一方面中任一项所述实例的管理方法。
可以理解的是,上述第二方面至第六方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
附图说明
图1是本申请实施例提供的电子设备的结构示意图;
图2是本申请实施例的电子设备的软件结构框图;
图3是现有的电子文档的查看示意图;
图4是应用程序中各个组件实例的结构示意图;
图5是应用程序在多实例模式下的任务视图示意图;
图6是本申请一实施例提供的实例的管理方法的实现流程图;
图7是现有系统根据场景展示多组件实例的实现示意图;
图8是本申请一实施例提供的实例的管理方法中S602的具体实现流程图;
图9是本申请一实施例提供的实例的管理方法中的S603的具体实现流程图;
图10是本申请一实施例提供的第一任务视图的管理示意图;
图11是本申请一实施例提供的第一任务视图的创建示意图;
图12是本申请一实施例提供的任务视图的管理示意图;
图13是本申请一实施例提供的销毁组件实例的示意图;
图14是本申请实施例提供的实例的管理装置的结构框图;
图15是本申请一实施例提供的电子设备的结构框图。
具体实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于 区分描述,而不能理解为指示或暗示相对重要性。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
本申请实施例提供的实例的管理方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,特别地,该实例的管理方法可以应用于智能手机,或具有在应用程序内打开多个组件实例功能的多核处理器的电子设备上,本申请实施例对电子设备的具体类型不作任何限制。
例如,所述电子设备可以是WLAN中的站点(STAION,ST),可以是蜂窝电话、无绳电话、会话启动协议(Session InitiationProtocol,SIP)电话、无线本地环路(Wireless Local Loop,WLL)站、个人数字处理(Personal Digital Assistant,PDA)设备、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、电脑、膝上型计算机、手持式通信设备、手持式计算设备、和/或用于在无线系统上进行通信的其它设备以及下一代通信系统,例如,5G网络中的移动终端或者未来演进的公共陆地移动网络(Public Land Mobile Network,PLMN)网络中的移动终端等。
图1示出了电子设备100的一种结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线
(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或 多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为实例的管理微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。其中,上述显示屏194具体可以显示生成的检测报告,以便用户可以通过显示屏194查看检测报告。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。显示屏194可包括触控面板以及其他输入设备。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为 肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,脸部识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。特别地,上述扬声器170A可以用于输出提示信息。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194,例如电子设备可以通过压力传感器180A获取用户的体重。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A, 电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功 能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图2是本申请实施例的电子设备的一种软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将电子设备的操作系统分为四层,从上至下分别为应用程序层,应用程序框架层,运行时的系统层,以及内核层。
应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机,日历,地图,WLAN,蓝牙,音乐,视频,短信息、邮箱等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
运行时的系统层包括核心库和虚拟机。运行时的系统层负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统层可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了二维和三维图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成和图层处理等。
二维图形引擎是二维绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
现今,随着设备技术的不断发展,电子设备的性能越来越强大。以智能手机为例,由原本只能够提供较为基础的功能,如电话通信、短信息交互以及拍照等,到现在可以在前台运行一个游戏应用的同时,后台还可以运行其他交互应用以实时接收对端发送的交互信息,并通过后台运行的音乐应用播放喜爱的音乐。智能手机除了能够同时运行多个不同的应用程序外,在同一个应用程序内还可以运行不同的组件实例,并且随着小程序以及应用程序编程接口(Application Programming Interface,API)的普及,应用程序内能够运行的组件实例的类型也随之增加,电子设备如何能够有效地对应用程序内运行的多个组件实例进行管理,则成为了影响用户使用体验的关键。
以文档编辑应用为例进行说明,电子设备可以存储有多个不同的文档,如文档1、文档2等,示例性地,图3示出了现有的电子文档的查看示意图。参见图3中的(a)所示,该电子设备为一智能手机,该智能手机内安装有多个不同的应用程序,如能够进行文档编辑的应用31。用户在需要查看本地存储的电子文档时,可以打开该文档编辑的应用31,此时,电子设备会运行该文档编辑的应用程序,并生成对应的应用操作界面,即该应用程序对应的任务视图,如图3中的(b)所示,在该任务视图中用户可以选择需要打开的电子文档,如存储有文档1以及文档2,则电子设备会打开对应的电子文档,即生成电子文档对应的组件实例,该组件实例可以通过一可视化视图进行显示,生成如图3中的(c)所示的任务视图。
在一些实现方式中,电子设备中的应用程序的组件实例可以分为以下两种模式:单实例运行模式以及多实例运行模式。具体详述如下:
方式1:单实例运行模式。在单实例运行模式下,应用程序内的各个启动的组件实例会以任务栈的形式进行存储。示例性地,图4示出了应用程序中各个组件实例的结构示意图。参见图4所示,电子设备可以同时运行有不同的应用程序,如应用程序1以及应用程序2,每个应用程序内可以运行有对应的组件实例,例如,在应用程序1中运行有实例1、实例2以及实例3,而在应用程序2中则运行有实例X以及实例Y。每个应用程序对应一个任务,即对应一个任务视图,在应用程序中管理的任务视图内可以对该应用程序内的组件实例进行操作。在单实例的运行模式下,应用程序可以同时开启多个组件实例,继续以文档编辑应用为例进行说明,用户可以在文档编辑中开打文档1后,再打开文档2,此时,该应用程序的任务视图会显示文档2的内容,即图3中 的(c)的内容会被文档2的内容覆盖,即文档2的任务视图会在文档1的任务视图上,即与栈形式一致。此时,用户需要编辑文档1的内容时,由于文档1与文档2共用同一任务视图,则文档编辑应用需要先关闭该文档2的任务视图,即文档2这一组件实例被移除,被覆盖于文档2的任务视图下的文档1的任务视图会重新被显示,此时用户才能够对文档1的任务内容进行编辑。若用户在文档2的基础上,还打开了文档3,则用户需要先关闭文档3的任务视图,然后再关闭文档2的任务视图由于文档1至3均是以栈形式存储,需要把在文档1后开启的所有文档关闭完成后,才能够显示文档1的内容,是一种先入后出的存储形式。用户在编辑完成文档1后,需要再次编辑文档2的内容,则需要在文档编辑应用中重新选择打开文档2,文档编辑应用才会重新将文档2的任务视图覆盖于文档1的任务视图上。由此可见,应用程序以单实例运行的情况下,当需要对进行组件实例间的切换时,需要频繁开启以及关闭组件实例,从而增加了用户的操作难度,降低了用户的操作效率,影响了用户的使用体验。
方式2:多实例运行模式。在多实例运行模式下,用户通过应用程序开启一个组件实例,则该应用程序会为该组件实例配置对应的任务视图,从而能够方便用户在多个任务视图间进行来回切换。示例性地,图5示出了应用程序在多实例模式下的任务视图示意图。参见图5中的(a)所示,文件编辑应用开启了文档1以及文档2两个实例,则该文件编辑应用为两个文档配置了两个任务视图,即视图51以及视图52。用户可以通过在电子设备的任务管理界面中切换两个文档的任务视图,以实现对不同的文档进行编辑。然而,上述多实例运行模式虽然能够在用户每次打开一个组件实例时,均能够配置对应的任务视图,但用户多次打开同一组件实例的情况下,例如用户在打开文档1后,再打开文档2,再次打开文档1,则会再次为该文档1分配一个新的任务视图,如图5中的(b)所示。因此,在多实例运行模式下,会重复为同一组件实例配置任务视图,从而增加了不必要的资源消耗以及系统的开销,降低了电子设备的资源利用率。
由此可见,对于一些应用程序对于组件实例的管理方法,应用程序在以单实例的方式运行时,在需要进行组件实例间切换时需要频繁开启以及关闭组件实例,从而降低了用户的操作效率;若应用程序以多实例的方式运行时,则容易对同一组件实例开启多个任务视图,导致资源浪费的情况。然而,现有应用程序的启动模式是固定的,现有的启动模式无法同时兼顾用户操作的效率以及避免不必要的资源消耗。
因此,为了解决上述技术中存在的问题,本申请提供了一种实例的管理方法,该实例的管理方法的执行主体以一电子设备,该电子设备包括但不限于:智能手机、平板电脑、计算机电脑、手提电脑等能够运行应用程序并对应用程序进行操作的电子设备。
图6示出了本申请一实施例提供的实例的管理方法的实现流程图,详述如下:
在S601中,接收对目标应用运行的组件的打开指令。
在本实施例中,电子设备中安装有多个不同的应用程序,各个应用程序对应的程序图标可以显示于电子设备的主视图内,用户可以通过点击或双击等方式选择主视图内所需启动的应用程序(即目标应用)对应的应用图标,以实现对目标应用发起启动操作,具体启动过程可以参见图3所示,在此不再赘述。电子设备可以将该启动操作所指定的应用程序识别为目标应用,并获取该目标应用的应用标识,生成携带有该应用标识的启动指令,以在电子设备中运行该目标应用。在运行目标应用的过程中,用户可以打开该目标应用对应的组件,则可以对该组件发起一个打开指令,以通过目标应用内的通用组件创建对应的组件实例,以启动目标应用中的某一功能,并配置对应的可视化视图,即任务视图。
需要说明的是,一个目标应用内可以包含多个不同的组件,在该情况下,用户可以通过点击任一组件对应的控件以打开该组件,以创建对应的组件实例;当然,一个目标应用可以只对应一个组件,在该情况下,用户可以发起该目标应用的打开指令,例如点击目标应用在主视图内的应用图标或者点击该目标应用对应在后台内的任务快照,电子设备会响应该打开指令,则创建该目标应用组件的组件实例。
在S602中,创建组件对应的组件实例,并根据目标应用的启动配置信息为组件实例配置任务标识。
在本实施例中,每个应用程序可以关联有对应的启动配置信息,该启动配置信息具体用于限 定该应用程序在运行组件实例时对应的启动模式。该启动模式包括但不限于:单实例启动模式、多实例启动模式以及指定实例启动模式。应理解,以指定实例启动模式运行的应用程序(如目标应用)可以根据实际情况动态分配任务视图。
在一种可能的实现方式中,应用程序内可以对应多个不同组件,不同的组件可以对应不同的启动配置信息。在该情况下,电子设备可以打开指令关联的组件,获取该组件对应的启动配置信息,从而能够实现不同组件可以通过不同的方式配置任务视图,以实现了对目标应用内的组件实例进行精准管理的目的。
在一种可能的实现方式中,当某一应用程序为固定实例的应用时,例如游戏类型的应用程序,游戏应用程序一般只有一个能够运行的游戏实例,即不存在需要在多个实例间进行切换的情况,在该情况下,该应用程序的启动配置信息可以为默认值,又或者缺省配置,具体可以根据实际情况进行设置。
在本实施例中,上述启动配置信息具体可以是应用程序在发布之前已经配置完成的,例如该启动配置信息可以携带于应用程序的程序包内,应用程序的开发人员可以根据该应用程序的常用使用场景确定其对应的启动配置信息,并在发布该应用程序时,添加到该应用程序的程序包内。电子设备在接收到对于目标应用的启动指令时,则可以根据该启动指令携带的应用标识,从存储器内查询该应用标识对应的程序包,并从该程序包内读取该目标应用的启动配置信息,从而确定该目标应用对应的启动模式。
为了减少对于应用程序侧的开发难度以及开发量,提高组件实例间灵活切换的适用范围,本实施例提供的实例的管理方法是通过电子设备侧的应用服务模块完成,即并非通过应用程序内的组件进行组件实例的管理以及维护。与现有的组件实例的管理技术相比,无需开发人员对应用程序进行组件实例启动模式的再次开发。
以下以应用于系统内针对实例动态维护的解决方案为例进行说明。示例性地,图7示出了现有系统根据场景展示多组件实例的实现示意图。参见图7所示,系统提供了为同一应用程序内的多组件实例分别提供任务视图的应用服务模块,在该应用程序需要实现多实例配置不同的任务视图时,会向该应用服务模块发送一个多任务视图会话请求,应用服务模块会与该应用程序建立多任务视图会话,此时,该应用服务模块具体用于维护该应用程序的生命周期,而基于该应用程序内配置的组件实例的任务视图的UI生命周期,则通过该应用程序内的视图代理单元完成,通过该视图代理单元为应用程序内的各个组件实例配置对应的任务视图,从而能够实现灵活配置任务视图的目的。然而,通过图7可以确定,该实现方式中应用程序中各个组件实例的任务视图是通过应用程序侧完成的,系统只是提供一个会话,将任务视图的生命周期的维护权限交由应用程序侧完成,不同的应用程序如何维护任务视图则需要应用程序侧的开发人员完成,从而增加应用程序开发人员的开发成本,并且若某一应用程序的开发人员并没有开发根据场景动态调整实例的启动模式,则该应用程序则不支持上述启动模式,继而降低了该启动模式的适用范围。
为了解决现有的组件实例的管理技术存在的缺陷,本实施例提供的管理方法是应用于电子设备侧的,应用程序的开发人员只需要配置启动配置信息即可,无需为应用程序开发对应的视图代理单元,组件实例的任务视图的管理并非交由应用层完成,而是通过电子设备内的应用服务模块完成(即电子设备内的服务侧实现),从而避免了需要每个应用程序的开发人员进行单独开发,减少了应用程序的开发量,继而提高了根据场景动态调整实例的启动模式的适用范围。
在本实施例中,由于上述启动配置信息限定了目标应用中运行的组件实例的启动模式,因此,在接收到目标应用中任一组件实例的打开指令时,在目标应用中打开该组件实例之前,会通过启动配置信息确定该组件实例的启动模式,以及与该启动模式关联的任务标识的配置方式,从而根据启动模式以及任务标识的配置方式,为所需运行的组件实例配置与之对应的任务标识。该任务标识是用于进行任务视图的分配的。
在一种可能的实现方式中,上述的配置方式可以为基于实例名配置任务标识。具体地,若目标应用中所需运行的组件实例的实例名不同,则会分配不同的任务标识。例如,目标应用为文档编辑的应用,则用户打开不同文档名的组件实例时,电子设备会为上述各个组件实例分配不同的 任务标识,例如,文档1对应的组件实例分配一个任务标识1,文档2对应的组件实例分配一个任务标识2,若用户多次打开文档2,由于文档名相同,则不会再次分配任务标识,均复用相同的任务标识2。
在一种可能的实现方式中,上述的配置方式可以为基于实例的存储位置配置任务标识。具体地,当目标应用中所需运行的组件实例的存储位置不同时,会分配不同的任务标识。例如,目标应用中存储有两个实例名相同的组件实例(如实例名均为实例1),而其中一个组件实例存储于C盘,而另一个组件实例存储于D盘,则两个组件实例的存储位置不同,此时,会分别为不同的组件实例配置不同的任务标识。
在一种可能的实现方式中,上述的配置方式可以为基于用户账户配置任务标识。具体地,当目标应用中所运行的组件实例所属的用户账户不同时,会分配不同的任务标识。例如,目标应用为一社交应用,用户可以在该社交应用中分别登录不同的用户账户,即运行多个组件实例,不同的用户账户又对应不同的对话列表,为了实现多账户同时操作,可以为不同的用户账户配置对应的任务标识,以为不同的用户账户配置不同的任务视图。
由此可见,为组件实例配置任务标识的方式是多样的,与应用程序的程序类型以及所运行的组件实例的实例类型相关,因此,为了提高任务标识配置的准确性,开发人员可以将该应用程序关联的配置方式记录于上述的启动配置信息中,电子设备可以根据该启动配置信息中限定的配置方式为组件实例配置任务标识。
作为本申请的另一实施例,上述启动配置信息中包含启动模式标识,该启动模式标识具体用于确定该目标应用的启动模式。该启动模式标识的位值不同,则对应不同的启动模式。图8示出了本申请一实施例提供的实例的管理方法中S602的具体实现流程图。参见图8所示,本申请实施例提供的S602具体包含S6023~S6025,具体描述如下:
在S6023中,当启动模式标识为第一位值时,根据启动配置信息为组件实例配置任务标识。
在本实施例中,应用程序的启动模式具体可以分为三种类型,分别为单实例启动模式、多实例启动模式以及指定实例启动模式(即根据任务标识分配任务视图的启动模式)。不同的启动模式在启动配置信息中的启动模式标识对应不同的位值。
在启动模式标识为第一位值时,则表示该目标应用的启动模式为是指定实例启动模式,在该情况下,则需要根据启动配置信息中的配置方式,为组件实例配置任务标识,以便后续可以根据任务标识分配对应的任务视图。
在S6024中,当启动模式标识为第二位值时,将组件实例在目标应用对应的第二任务视图内显示;其中,第二任务视图用于显示目标应用内的所有组件实例。
在本实施例中,在启动模式标识为第二位值时,则表示该目标应用的启动模式为单实例启动模式,因此组件实例会显示在目标应用对应的第二任务视图内。在单实例启动模式下,目标应用只对应一个任务视图,即该目标应用中所有运行的组件实例均复用同一任务视图,即第二任务视图,以单实例启动模式下运行的多个组件实例可以是基于栈结构的形式存储,即可以对栈中某一组件实例进行操作时,可以通过先关闭在实例栈中打开时间大于所需操作的组件实例的其他组件实例后,对该组件实例进行操作。在单实例运行中,除了通过关闭在后打开的其他组件实例,还可以在实例库中重新发起组件实例对应的打开指令,以重新将该组件实例添加到栈结构内,以使该目标应用的第二任务视图用于显示该组件实例。
在S6025中,当启动模式标识为第三位值时,电子设备为组件实例配置对应的第三任务视图;其中,每一个打开指令打开的组件实例对应一个第三任务视图。
在本实施例中,在启动模式标识为第三位值时,则表示该目标应用的启动模式为多实例启动模式,即该目标应用中所有运行的组件实例均配置一个新的任务视图,即第三任务视图,应用程序每打开一个组件实例,均会为该组件实例配置一个第三任务视图,当用户重复打开同一个组件实例时,会生成与打开次数相同的多个第三任务视图,每个第三任务视图均可以对组件实例进行操作。
举例性地,第一位值为1,第二位值为2,第三位值为3。电子设备在打开该目标应用的组件时,会获取该目标应用的启动配置信息,并从启动配置信息中提取启动模式标识,确定该启动模 式标识的位值,若其数值为1,则执行S6021的操作;若其数值为2,则执行S6022的操作;若其数值为3,则执行S6023的操作。开发人员可以通过设置不同的位值,以实现对目标应用内组件的启动模式进行设置,以采用有目标应用相匹配的启动模式在电子设备内运行组件实例。
在本申请实施例中,通过设置启动模式标识以限定目标应用中运行组件实例的启动方式,能够根据启动模式标识的不同采用不同的启动方式。与现有的组件实例的管理技术相比,本申请实施例内的启动配置信息中包含有启动模式标识,开发人员只需通过调整该数值,则可以改变目标应用的启动模式,无需重新对应用程序的组件进行开发,降低了模式应用程序模式切换的难度,继而能够提高指定实例启动模式应用的范围。
进一步地,作为本申请的另一实施例,一个目标应用可以对应多个不同的启动模式标识,不同的启动模式标识可以关联有对应的使用场景。电子设备可以根据当前的使用场景,确定与之对应的启动模式标识,以采用对应的启动方式管理该目标应用内的组件实例。具体地,在S6023至S6024之前还可以包含S6021以及S6022,具体描述如下:
在S6021中,确定接收到打开指令时的环境信息。
在本实施例中,电子设备可以根据启动配置信息中所需采集的环境信息类型,采集在接收到打开指令时刻对应的环境信息。例如,启动配置信息中限定了不同的时间对应不同的启动模式标识,则所需采集的环境信息类型为时间类型的信息,则电子设备可以采集启动时间作为上述的环境信息;又例如,启动配置信息中限定了不同地点对应不同的启动模式标识,则所需采集的环境信息类型为位置类型的信息,则电子设备可以通过内置的定位模块获取对应的启动点,并将采集得到的启动地点作为上述的环境信息。
在一种可能的实现方式中,当该启动配置信息中只存在一种启动模式标识时,即所有使用场景均采用相同的启动模式,在该情况下,电子设备可以不执行S6021以及S6022的操作,而是根据启动模式标识的位值,执行S6023~S6025中任一项的操作。
在S6022中,通过启动配置信息查询环境信息关联的启动模式标识。
在本实施例中,启动配置信息不仅包含有启动模式标识,还包含有启动模式标识关联的使用场景范围,电子设备在确定了接收到打开指令时刻对应的环境信息后,可以将该环境信息与各个使用场景范围进行匹配,将环境信息匹配的使用场景范围关联的启动模式标识,以确定该目标应用本次所需使用的启动模式,实现了不同场景采用不同启动模式的目的。
在一种可能的实现方式中,环境信息包括:启动时间、启动地点、设备运行应用中的一个或两个以上的组合。
举例性地,该环境信息包含了启动时间。某一应用程序在白天的时候(7:00~18:00)使用指定实例启动模式,而在夜晚的时候(18:00~7:00)则使用单实例启动模式。在该情况下,电子设备可以获取接收到打开指令时对应的启动时间,例如为14:00,则可以确定其处于白天的时间,因此,该启动模式标识即为第三位值,即为指定实例启动模式。
举例性地,该环境信息包含了启动地点。某一应用程序在办公室内使用指定实例启动模式,而在家中则使用多实例启动模式。在该情况下,电子设备可以获取接收到打开指令时对应的启动地点,例如通过定位模式识别到当前的位值处于办公室所在的位值范围内,则可以将启动模式设置为指定实例启动模式。
当然,上述环境信息可以包含两个或以上的组合,具体匹配识别方式可以与单项环境信息的匹配过程相似,也是判断采集得到的环境信息所落入的环境信息范围,从而确定与之对应的启动模式标识。
在本申请实施例中,通过为不同的启动模式标识配置与之对应的使用环境范围,从而能够根据环境信息确定与之对应的启动模式标识,能够根据不同的使用场景使用不同的启动模式运行目标应用中的组件实例,提高了组件实例管理的灵活性。
在S603中,根据任务标识为组件实例配置对应的第一任务视图。
在本实施例中,电子设备在配置目标应用中的组件实例的任务视图之前,需要确定该组件实例对应的任务标识,并根据该任务标识为该组件实例配置一个任务视图,即上述的第一任务视图。 需要说明的是,不同的组件实例所配置的任务视图不同。举例性地,当目标应用中运行有两个组件实例,且上述两个组件实例分别配置了不同的任务标识时,电子设备会分别为上述两个组件实例配置两个第一任务视图,每一个第一任务视图用于对一个组件实例进行操作,与单实例启动模式相比,在开启多个组件实例的情况下,不同的组件实例对应不同的第一任务视图,即对应不同任务标识的组件实例之间是相互独立的,在用户需要在不同组件实例间进行切换时,无需关闭其他组件实例,而是切换至对应组件实例的第一任务视图,即可对该组件实例进行操作。
在又一例子中,当用户重复开启同一个组件实例时,由于该组件实例相同,即会分配相同的任务标识,电子设备在识别得到多次开启的组件实例对应的任务标识相同的情况下,则会复用同一个任务视图,而并不会为该组件实例配置一个新的任务视图。与多实例启动模式相比,在开启同一组件实例的情况下,由于同一组件实例对应的任务标识相同,则不会重复为该组件实例配置新的第一任务视图,而是相同任务标识的组件实例会复用相同的第一任务视图,从而能够避免消耗不必要的资源,继而提高电子设备的资源利用率。
由此可见,根据任务标识为组件实例配置第一任务视图,能够对同一组件实例采用类似“单实例启动模式”的方式配置任务视图,而对于不同组件实例则采用类似“多实例启动模式”的方式配置任务视图,即保留了多实例启动模式以及单实例启动模式的优点,而解决上述两个启动模式的问题,从而提供了组件实例管理的准确性。
进一步地,作为本申请的另一实施例,图9示出了本申请一实施例提供的实例的管理方法中的S603的具体实现流程图。参见图9所示,本申请实施例中的S603具体包含S6031~S6032,具体描述如下:
在S6031中,通过目标应用的通用组件生成组件实例以及组件实例对应的组件记录;组件记录包含任务标识。
在本实施例中,电子设备在目标应用中运行对应的组件实例时,需要使用目标应用关联的通用组件作为该组件实例的容器,从而生成了用于可操作的组件实例。与此同时,在电子设备侧的组件管理服务中会生成该组件实例对应的组件记录,该组件记录是对应用程序内各个应用是进行管理的最小单元,每一个组件记录对应于应用程序侧的一个组件实例。由于电子设备侧在配置组件实例之前,已经确定了个组件实例对应的任务标识,在一些实现方式中,该组件实例对应的任务标识可以为该组件实例的key,当然,在一些组件实例中,上述任务标识还可以为组件实例的实例名或存储地址等,电子设备在创建组件记录时,可以将该任务标识添加到该组件记录内,以便后续对于同一组件实例进行重复启动时,可以通过查询组件记录中的任务标识,确定是否需要配置新的第一任务视图。
示例性地,图10示出了本申请一实施例提供的第一任务视图的管理示意图。参见图10所示,在应用程序侧中运行的每一个组件实例会对应一个组件实例,如组件实例1、组件实例2等,并且在电子设备侧的组件管理服务中会为各个组件实例创建对应的组件记录,例如组件实例1对应的组件记录即为组件记录1,而组件实例2对应的组件记录即为组件记录2等。
在S6032中,为组件实例配置对应的第一任务视图,并建立第一任务视图与组件记录之间的第二关联关系。
在本实施例中,电子设备在创建了组件实例对应的组件记录后,需要配置对应的第一任务视图,即对组件实例进行可视化,以便用户可以通过第一任务视图对组件实例进行操作,与此同时,为了实现具有相同的任务记录复用同一第一任务视图,电子设备需要建立第一任务视图与携带有任务标识的组件记录之间的关联关系,即上述的第二关联关系。
继续参见图10中的例子进行说明,电子设备在建立了组件实例以及组件记录后,需要配置用于显示该组件实例对应的第一任务视图,任务视图是电子设备侧管理任务的最小单位,一个第一任务视图只包含一个组件实例,即一个组件实例即对应一个第一任务视图,一个应用的多个组件实例均能够在视图管理界面内进行展示。为了便于用户在视图管理界面中确定所需操作的组件实例,会对每一个第一任务视图生成一个任务快照,用户可以通过在视图管理界面中查看对应的任务快照快速确定所需操作的组件实例。例如,上述组件实例1对应的第一任务视图即为第一任务视图1,对应的任务快照即为任务快照1,而组件2实例对应的第一任务视图即为第一任务视图2, 对应的任务快照即为任务快照2。需要说明的是,上述任务快照是一个持久保留的视图,即该任务快照对应的组件实例以及应用程序并没有在后台运行,但该任务快照会保留在任务管理视图内,用户可以通过点击上述任务管理视图中任一任务快照,以重新启动对应的组件实例以及应用程序。
在本申请实施例中,在电子设备内运行目标应用的组件实例的过程中,应用程序侧只需管理该组件实例,而第一任务视图的配置以及维护则交由电子设备侧的组件管理服务完成。需要说明的是,电子设备侧配置有应用服务模块,该应用服务模块具体用于从应用程序的程序包中读取启动配置信息,并基于启动配置信息对应用程序内运行的组件实例配置对应的任务标识,以基于任务标识进行第一任务视图的配置。由此可见,对于应用程序而言,其只需承担组件实例的创建任务,无需单独为指定实例启动模式进行额外的开发,降低了应用程序的开发难度,指定实例启动模式是通过电子设备侧完成的,即能够适用所有安装于该电子设备内的应用程序。
作为本申请的另一实施例,在指定实例启动模式下(即启动模式标识为第一位值时),根据是否已经配置有任务标识对应的第一任务视图,会采用不同的方式为组件实例配置第一任务视图。具体包含以下两种情况:
情况1:组件实例对应的任务标识存在已经配置的任务视图在该情况下,电子设备会将任务标识对应的第一任务视图进行复用,即该组件实例对应的组件实例会显示于具有相同的任务标识的第一任务视图,从而避免了对于同一组件实例进行重复开启时,会配置多个任务视图的情况发生。由于已经配置的第一任务视图是用于显示在应用程序运行过程中已经开启过的组件实例,可能是由于用户需要对其他组件实例或应用程序进行操作时,将该组件实例切换至后台,对应的第一任务视图并没有在前台显示。因此,在用户需要重新对已经开启过的组件实例进行操作,电子设备可以通过复用与其具有相同任务标识的第四任务视图,无需重新进行视图绘制,提高了组件实例的启动效率。
情况2:组件实例对应的任务标识不存在已经配置的任务视图,则为该组件实例配置与该任务标识对应的第一任务视图,其中,上述配置操作可以为为该组件实例创建一个新的第一任务视图,也可以从视图库中提取该任务标识对应的任务视图。在该情况下,由于已经配置的任务视图中并不存在于该组件实例的任务标识关联的任务视图,即并非重复开启的组件实例,在该情况下,电子设备会为该组件实例配置一个该任务标识对应的第一任务视图,从而能够实现在多实例运行的情况下,不同的组件实例之间的任务视图相互独立,实现能够快速在多实例间进行切换操作的目的。
示例性地,图11示出了本申请一实施例提供的第一任务视图的配置示意图。该目标应用为一文档编辑应用,用户可以在文档编辑应用中开启多个文档,例如文档1以及文档2,此时,由于上述两个文档对应的任务标识不同,因此电子设备会分别为上述两个文档配置对应的第一任务视图,可以通过调用任务管理视图查看当前电子设备中运行的任务视图,如图11中的(a)所示。此时,当用户在文档2的第一任务视图内再次开启文档1时,如图11中的(b)所示,通过点击打开控件111,会显示电子设备内对应的文档库。用户可以在文档库中选择所需开启的文档,例如选取文档1对应的图标112,由于本次开启的文档1的任务标识与已经开启了的文档1的任务标识相同,则电子设备并不为该文档1配置新的第一任务视图,即本次开启的文档1以及已经开启的文档1复用相同的第四任务视图,即已经配置过的第一任务视图,此时调用任务管理视图查看电子设备中运行的任务视图会如图11中的(c)所示,只是当前运行前台运行的视图由文档2的视图切换至文档1的视图,而总的任务视图的数量并不会发生变化。
示例性地,图12示出了本申请一实施例提供的任务视图的管理示意图。参见图12所示,该目标应用具体为一文档编辑应用,用户重复打开同一个文档1时,电子设备并不会配置新的第一任务视图,而是复用同一第一任务视图,即第一任务视图1,并且两次打开对应的组件记录均相同,均为组件记录1;而在用户打开另一文档,即文档2时,由于文档1与文档2之间的任务标识不同,电子设备会创建一个新的第一任务视图,即第一任务视图2,并配置对应的组件记录,即组件记录2,并建立组件记录与任务视图之间的关联关系。
在一种可能的实现方式中,在已配置组件实例对应的第一任务视图之后,还包括:响应于目标应用中组件实例的关闭指令,销毁在目标应用中运行的组件实例;保留组件实例对应的第一任 务视图,并存储任一组件实例的任务标识与第一任务视图的第一关联关系。
需要说明的是,本申请实施例提供的实例的管理方法能够在重复打开同一组件实例时,复用已配置的第一任务视图的基础是,在电子设备内的应用程序关闭一个组件实例时,虽然应用程序侧会销毁该目标应用中关于该组件实例,但该组件实例对应的任务视图并不会销毁,即仍然保留关于该组件实例的第一任务视图,并存储有该第一任务视图与任务标识之间的关联关系(即第一关联关系),以便后续在检测到相同的任务标识的组件实例运行时,能够复用同一第一任务视图,避免频繁配置相同任务视图。
在一些可能的实现方式中,电子设备在接收到关闭指令时,除了可以销毁上述组件实例外,还可以冻结该目标应用内运行的组件实例,即保留该组件实例的相关数据,以便后续再次使用该组件实例时,能够重新激活已冻结的组件实例。
示例性地,图13示出了本申请一实施例提供的销毁组件实例的示意图。参见图13所示,电子设备运行有3种不同的应用程序,其中,应用程序1内运行的组件实例是根据组件1创建的,如组件实例1.1,而应用程序2内运行的组件实例是根据组件2创建的,如组件实例2.1以及组件实例2.2,对应地,应用程序3对应的组件实例为组件实例3.1。当用户关闭了应用程序2内第二个运行的组件实例时,即组件实例2.2,电子设备会销毁该组件实例对应的组件实例2.2,对应地,该组件实例2.2对应的组件记录也可以同时被销毁,即组件记录3,但该组件实例对应的第一任务视图会被保留,即第一任务视图3,对应的任务快照同样会被保留,以便后续再次启动该组件实例时能够调用该第一任务视图以及任务快照。
以上可以看出,本申请实施例提供的一种实例的管理方法可以通过在用户打开目标应用中的组件时,读取该目标应用对应的启动配置信息,通过该目标应用对应的启动配置信息对其运行的组件实例分配任务标识,并基于任务标识为组件实例配置对应的第一任务视图,以对该目标应用中运行的组件实例进行操作,实现了同一目标应用中可以灵活配置任务视图的目的。与现有的实例管理技术相比,一个目标应用的组件只是分配一个任务视图,而是可以根据启动配置信息为每个组件实例分配对应的任务标识,从而根据任务标识进行任务视图的配置,即一个目标应用内任务标识不同的组件实例可以对应不同的任务视图,方便用户在一个应用中启动多个组件实例时,能够进行视图的快速切换,以实现同时对多个不同的组件实例进行操作,避免了目标应用频繁开启以及关闭组件实例,提高了组件实例间切换的效率,并降低了用户在切换实例时所需等待的时间,提高了用户的使用体验。
对应于上文实施例所述的实例的管理方法,图14示出了本申请实施例提供的实例的管理装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。
参照图14,该实例的管理装置包括:
打开指令响应单元141,用于接收对目标应用运行的组件的打开指令;
任务标识配置单元142,用于创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识;
任务视图配置单元143,用于根据所述任务标识为所述组件实例配置对应的第一任务视图。
在一些可能的实现方式中,所述启动配置信息包含启动模式标识;所述任务标识配置单元142包括:
第一配置单元,用于当所述启动模式标识为第一位值时,根据所述启动配置信息为所述组件实例配置任务标识。
在一些可能的实现方式中,所述管理装置还包括:
环境信息确定单元,用于确定接收到所述打开指令时的环境信息;
模式确定单元,用于通过所述启动配置信息查询所述环境信息关联的所述启动模式标识。
在一些可能的实现方式中,所述环境信息包括:启动时间、启动地点、设备运行应用中的一个或两个以上的组合。
在一些可能的实现方式中,所述任务视图配置单元143包括:
复用配置单元,用于当电子设备的任务视图中存在所述任务标识对应的第一任务视图时,复用所述任务标识对应的第一任务视图;
新建配置单元,用于当电子设备的任务视图中不存在所述任务标识对应的所述第一任务视图时,所述电子设备为所述组件实例配置所述任务标识对应的第一任务视图。
在一些可能的实现方式中,所述管理装置还包括:
第二配置单元,用于当所述启动模式标识为第二位值时,将所述组件实例在所述目标应用对应的第二任务视图内显示;其中,所述第二任务视图用于显示所述目标应用内的所有组件实例;和/或
第三配置单元,用于当所述启动模式标识为第三位值时,则为所述组件实例配置对应的第三任务视图;其中,每一个所述打开指令打开的所述组件实例对应一个所述第三任务视图。
在一些可能的实现方式中,所述管理装置还包括:
组件移除单元,用于响应于所述目标应用中组件实例的关闭指令,销毁在所述目标应用中运行的所述组件实例;
视图保留单元,用于保留所述组件实例对应的所述第一任务视图,并存储所述组件实例的任务标识与所述第一任务视图的第一关联关系。
在一些可能的实现方式中,所述任务视图配置单元143包括:
组件记录创建单元,用于通过所述目标应用的通用组件生成所述组件实例以及所述组件实例对应的组件记录;所述组件记录包含所述任务标识;
关联创建单元,用于为所述组件实例配置对应的所述第一任务视图,并建立所述第一任务视图与所述组件记录之间的第二关联关系。
因此,本申请实施例提供的实例的管理装置同样可以通过在用户打开目标应用中的组件时,读取该目标应用对应的启动配置信息,通过该目标应用对应的启动配置信息对其运行的组件实例分配任务标识,并基于任务标识为组件实例配置对应的第一任务视图,以对该目标应用中运行的组件实例进行操作,实现了同一目标应用中可以灵活配置任务视图的目的。与现有的实例管理技术相比,一个目标应用的组件只是分配一个任务视图,而是可以根据启动配置信息为每个组件实例分配对应的任务标识,从而根据任务标识进行任务视图的配置,即一个目标应用内任务标识不同的组件实例可以对应不同的任务视图,方便用户在一个应用中启动多个组件实例时,能够进行视图的快速切换,以实现同时对多个不同的组件实例进行操作,避免了目标应用频繁开启以及关闭组件实例,提高了组件实例间切换的效率,并降低了用户在切换实例时所需等待的时间,提高了用户的使用体验。
图15为本申请一实施例提供的电子设备的结构示意图。如图15所示,该实施例的电子设备15包括:至少一个处理器150(图15中仅示出一个处理器)、存储器151以及存储在所述存储器151中并可在所述至少一个处理器150上运行的计算机程序152,所述处理器150执行所述计算机程序152时实现上述任意各个实例的管理方法实施例中的步骤。
所述电子设备15可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。该电子设备可包括,但不仅限于,处理器150、存储器151。本领域技术人员可以理解,图15仅仅是电子设备15的举例,并不构成对电子设备15的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。
所称处理器150可以是中央处理单元(Central Processing Unit,CPU),该处理器150还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器151在一些实施例中可以是所述电子设备15的内部存储单元,例如电子设备15的硬盘或内存。所述存储器151在另一些实施例中也可以是所述电子设备15的外部存储设备,例如所述电子设备15上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器151还可以既包括所述电子设备15的内部存储单元也包括外部存储设备。所述存储器151用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器 151还可以用于暂时地存储已经输出或者将要输出的数据。
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本申请实施例还提供了一种电子设备,该电子设备包括:至少一个处理器、存储器以及存储在所述存储器中并可在所述至少一个处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任意各个方法实施例中的步骤。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。
本申请实施例提供了一种计算机程序产品,当计算机程序产品在移动终端上运行时,使得移动终端执行时实现可实现上述各个方法实施例中的步骤。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到拍照装置/电子设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/网络设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/网络设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (11)

  1. 一种实例的管理方法,其特征在于,包括:
    电子设备接收对目标应用的组件的打开指令;
    所述电子设备创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识;
    所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图。
  2. 根据权利要求1所述的管理方法,其特征在于,所述启动配置信息包含启动模式标识;所述电子设备创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识,包括:
    当所述启动模式标识为第一位值时,所述电子设备根据所述启动配置信息为所述组件实例配置任务标识。
  3. 根据权利要求2所述的管理方法,其特征在于,在所述电子设备创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识之前,还包括:
    所述电子设备确定接收到所述打开指令时的环境信息;
    所述电子设备通过所述启动配置信息查询所述环境信息关联的所述启动模式标识。
  4. 根据权利要求3所述的管理方法,其特征在于,所述环境信息包括:启动时间、启动地点、设备运行应用中的一个或两个以上的组合。
  5. 根据权利要求2所述的管理方法,其特征在于,所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图,包括:
    当所述电子设备的任务视图中存在所述任务标识对应的第一任务视图时,所述电子设备复用所述任务标识对应的第一任务视图;
    当所述电子设备的任务视图中不存在所述任务标识对应的所述第一任务视图时,所述电子设备为所述组件实例配置所述任务标识对应的第一任务视图。
  6. 根据权利要求2所述的管理方法,其特征在于,在所述电子设备接收对目标应用的组件的打开指令之后,还包括:
    当所述启动模式标识为第二位值时,所述电子设备将所述组件实例在所述目标应用对应的第二任务视图内显示;其中,所述第二任务视图用于显示所述目标应用内的所有组件实例;或者,
    当所述启动模式标识为第三位值时,所述电子设备为所述组件实例配置对应的第三任务视图;其中,每一个所述打开指令打开的所述组件实例对应一个所述第三任务视图。
  7. 根据权利要求1-6任一项所述的管理方法,其特征在于,在所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图之后,还包括:
    响应于所述目标应用中的组件实例的关闭指令,所述电子设备销毁在所述目标应用中运行的所述组件实例;
    所述电子设备保留所述组件实例对应的所述第一任务视图,并存储所述组件实例的任务标识与所述第一任务视图的第一关联关系。
  8. 根据权利要求1-6任一项所述的管理方法,其特征在于,所述电子设备根据所述任务标识为所述组件实例配置对应的第一任务视图,包括:
    所述电子设备通过所述目标应用的通用组件生成所述组件实例以及所述组件实例对应的组件记录;所述组件记录包含所述任务标识;
    所述电子设备为所述组件实例配置对应的所述第一任务视图,并建立所述第一任务视图与所述组件记录之间的第二关联关系。
  9. 一种实例的管理装置,其特征在于,包括:
    打开指令响应单元,用于接收对目标应用运行的组件的打开指令;
    任务标识配置单元,用于创建所述组件对应的组件实例,并根据所述目标应用的启动配置信息为所述组件实例配置任务标识;
    任务视图配置单元,用于根据所述任务标识为所述组件实例配置对应的第一任务视图。
  10. 一种电子设备,其特征在于,所述电子设备包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时如权利要求1至8任一项所述方法的步骤。
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述方法的步骤。
PCT/CN2023/125981 2022-10-31 2023-10-23 一种实例的管理方法、装置、电子设备及存储介质 WO2024093703A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211354069.5A CN117998004A (zh) 2022-10-31 2022-10-31 一种实例的管理方法、装置、电子设备及存储介质
CN202211354069.5 2022-10-31

Publications (1)

Publication Number Publication Date
WO2024093703A1 true WO2024093703A1 (zh) 2024-05-10

Family

ID=90898195

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/125981 WO2024093703A1 (zh) 2022-10-31 2023-10-23 一种实例的管理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN117998004A (zh)
WO (1) WO2024093703A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294451A (zh) * 2012-02-22 2013-09-11 腾讯科技(深圳)有限公司 富页面中应用的多任务多窗口实现方法及系统
CN112099617A (zh) * 2019-06-18 2020-12-18 腾讯科技(深圳)有限公司 一种数据处理方法、装置以及计算机可读存储介质
CN114327666A (zh) * 2020-09-30 2022-04-12 华为技术有限公司 应用启动方法、装置和电子设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294451A (zh) * 2012-02-22 2013-09-11 腾讯科技(深圳)有限公司 富页面中应用的多任务多窗口实现方法及系统
CN112099617A (zh) * 2019-06-18 2020-12-18 腾讯科技(深圳)有限公司 一种数据处理方法、装置以及计算机可读存储介质
CN114327666A (zh) * 2020-09-30 2022-04-12 华为技术有限公司 应用启动方法、装置和电子设备

Also Published As

Publication number Publication date
CN117998004A (zh) 2024-05-07

Similar Documents

Publication Publication Date Title
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2022257977A1 (zh) 电子设备的投屏方法和电子设备
WO2021159746A1 (zh) 文件共享方法、系统及相关设备
CN114079893B (zh) 蓝牙通信方法、终端设备及计算机可读存储介质
WO2021052204A1 (zh) 基于通讯录的设备发现方法、音视频通信方法及电子设备
CN113961157B (zh) 显示交互系统、显示方法及设备
CN113805797B (zh) 网络资源的处理方法、电子设备及计算机可读存储介质
WO2022042770A1 (zh) 控制通信服务状态的方法、终端设备和可读存储介质
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
CN113691842A (zh) 一种跨设备的内容投射方法及电子设备
WO2022001258A1 (zh) 多屏显示方法、装置、终端设备及存储介质
CN113821767A (zh) 应用程序的权限管理方法、装置和电子设备
US20240095000A1 (en) Plug-In Installation Method, Apparatus, and Storage Medium
US20240098354A1 (en) Connection establishment method and electronic device
CN113703894A (zh) 通知消息的显示方法和显示装置
CN110609650B (zh) 一种应用状态切换方法及终端设备
CN112532508B (zh) 一种视频通信方法及视频通信装置
CN113438366A (zh) 信息通知的交互方法、电子设备和存储介质
EP4293997A1 (en) Display method, electronic device, and system
WO2022062902A1 (zh) 一种文件传输方法和电子设备
WO2024093703A1 (zh) 一种实例的管理方法、装置、电子设备及存储介质
CN114398108A (zh) 电子设备及其驱动加载方法、介质
CN110737916A (zh) 通信终端及处理方法
CN116709609B (zh) 消息传递方法、电子设备及存储介质
WO2024067037A1 (zh) 一种服务调用方法、系统和电子设备