CN116048629B - System service switching method, control device, electronic equipment and storage medium - Google Patents

System service switching method, control device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116048629B
CN116048629B CN202211008775.4A CN202211008775A CN116048629B CN 116048629 B CN116048629 B CN 116048629B CN 202211008775 A CN202211008775 A CN 202211008775A CN 116048629 B CN116048629 B CN 116048629B
Authority
CN
China
Prior art keywords
service
configuration file
loaded
electronic device
path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211008775.4A
Other languages
Chinese (zh)
Other versions
CN116048629A (en
Inventor
黄宝军
王海军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211008775.4A priority Critical patent/CN116048629B/en
Publication of CN116048629A publication Critical patent/CN116048629A/en
Application granted granted Critical
Publication of CN116048629B publication Critical patent/CN116048629B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application provides a system service switching method, a control device, an electronic device and a storage medium, wherein the method is applied to the electronic device, the electronic device is configured with a 32-bit service execution program and a 64-bit service execution program, and the method comprises the following steps: the following steps are executed in the starting-up stage of the electronic equipment: loading and analyzing a first configuration file under a first path, and obtaining a first analysis record of the first configuration file; loading and analyzing a second configuration file under the second path, and obtaining a second analysis record of the second configuration file; starting corresponding service according to the first analysis record and the second analysis record; the first path comprises a plurality of first configuration files, wherein the first configuration files are configuration files of 64-bit service; the second path comprises a plurality of second configuration files, and the second configuration files are configuration files of 32-bit service. When some services have the requirement of running 32-bit system services, dynamic switching can be performed, so that service functions are realized, and user experience is improved.

Description

System service switching method, control device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of system services, and in particular, to a system service switching method, a control device, an electronic device, and a storage medium.
Background
The System Server is one of the important processes in the operating System of the electronic device, and there are several target services in the operating System of the electronic device.
At the present time of normalization of the system components, some services in the system components are still limited by the chip components, and different chip components have different requirements on the system components, and specifically, there may be a requirement for running 32 bits and a requirement for running 64 bits for some services in the system components. When the currently running system service is 64 bits and some chip components only support 32-bit system service, the functions of the chip components cannot be realized, and the user experience is affected.
Disclosure of Invention
According to the system service switching method, the control device, the electronic equipment and the storage medium, when some services have the requirement of running 32-bit system services, dynamic switching can be performed, and then the 32-bit system services can be run when corresponding services are started, so that the functions of the services can be realized, and user experience is improved.
In a first aspect, an embodiment of the present application provides a system service switching method, applied to an electronic device, where the electronic device is configured with an execution program of a 32-bit service and an execution program of a 64-bit service, the method includes: the following steps are executed in the starting-up stage of the electronic equipment: loading and analyzing a first configuration file under a first path, and obtaining a first analysis record of the first configuration file; loading and analyzing a second configuration file under the second path, and obtaining a second analysis record of the second configuration file; starting corresponding service according to the first analysis record and the second analysis record; the first path comprises a plurality of first configuration files, wherein the first configuration files are configuration files of 64-bit service; the second path comprises a plurality of second configuration files, and the second configuration files are configuration files of 32-bit service.
Further, loading and analyzing the first configuration file under the first path, and obtaining a first analysis record of the first configuration file includes: periodically executing a first loading analysis flow until all the first configuration files under the first path are analyzed, and obtaining a first analysis record; the first loading analysis flow comprises the following steps: determining whether all the first configuration files under the first path are analyzed completely, if all the first configuration files under the first path are analyzed completely, executing the steps of loading and analyzing the second configuration files under the second path, and obtaining second analysis records of the second configuration files, and if all the first configuration files under the first path are not analyzed completely, loading the next first configuration file to be loaded based on a set sequence; and determining whether the information of the loaded first configuration file corresponding service exists in the analysis record, if not, adding the information of the loaded first configuration file corresponding service into the analysis record, and if so, updating the analysis record based on the information of the loaded first configuration file corresponding service.
Further, updating the resolution record based on the loaded information of the first profile corresponding service includes: and determining whether an overlay tag exists in the information of the loaded first configuration file corresponding service, if the overlay tag exists, replacing original corresponding information in the analysis record with the information of the loaded first configuration file corresponding service, and if the overlay tag does not exist, deleting the information of the loaded first configuration file corresponding service in the analysis record, and generating an exception report of the loaded first configuration file.
Further, loading and parsing the second configuration file under the second path, and obtaining a second parsing record of the second configuration file includes: periodically executing a second loading analysis flow until analysis is completed on all second configuration files in the second path, and obtaining a second analysis record; the second loading analysis flow includes: determining whether all the second configuration files under the second path are analyzed completely, if all the second configuration files are analyzed completely, executing the step of starting corresponding services according to the first analysis record and the second analysis record, and if all the second configuration files are not analyzed completely, loading the next second configuration file to be loaded under the second path based on the set sequence; and determining whether the information of the loaded second configuration file corresponding service exists in the analysis record, if not, adding the information of the loaded second configuration file corresponding service into the analysis record, and if so, updating the analysis record based on the information of the loaded second configuration file corresponding service.
Further, updating the resolution record based on the loaded information of the second profile corresponding service includes: and determining whether an overlay tag exists in the information of the loaded second configuration file corresponding service, if the overlay tag exists, replacing original corresponding information in the analysis record with the information of the loaded second configuration file corresponding service, and if the overlay tag does not exist, deleting the information of the loaded second configuration file corresponding service in the analysis record, and generating an exception report of the loaded second configuration file.
Further, the electronic device is also configured with a default execution program that links to the execution program of the 64-bit service.
In a second aspect, an embodiment of the present application further provides a system service switching control device, where the device includes: the system comprises a processor and a memory for storing at least one instruction which when loaded and executed by the processor implements the system service switching method provided in the first aspect. The system service switching control device can be a chip or a chip module.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device may include an electronic device body and the system service switching control device provided in the second aspect. In one embodiment, the system service switching control device may be a chip or a chip module built in the electronic device.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium having a computer program stored thereon, where the computer program when executed by a processor implements the system service switching method provided in the first aspect.
In a fifth aspect, embodiments of the present application further provide a computer program product, including a computer program or instructions, which when executed by a processor implement the system service switching method provided in the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a block diagram of a software architecture of an electronic device according to one embodiment of the present application;
FIG. 3a is a schematic diagram of compiling customization during production of an electronic device according to one embodiment of the present application;
FIG. 3b is a schematic diagram of a customization flow compiled during production of an electronic device according to an embodiment of the present application;
FIG. 4 is a flowchart of a service start-up procedure for an electronic device in a boot phase according to one embodiment of the present application;
FIG. 5 is a flowchart of a method for switching services of an electronic device system according to one embodiment of the present application;
fig. 6 is a schematic structural diagram of a system service switching control device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In order to facilitate understanding of the solution provided by the embodiments of the present application, the following correspondingly explains the concepts related to the application:
1. a System service (System Server) is one of the important processes in an operating System of an electronic device.
When the Android system is started, an init process is started first, and the media server is started by the init process.
After bootloader is started, kernel is started, init process is started in user space, and relevant configuration in init. Rc is read through init process, so that other relevant processes and other operations are started.
2. A Service (Service) is a component that runs in the background.
When App needs to use these services, it can call the Service Manager's get Service (get Service) method to get them.
Service contains two states, a Started state and a Bound state, respectively. An Android application component, such as an Activity, starts a Service by Start Service (), and the Service is in a Started state. When the Android application program component binds a Service through Bind Service (), the Service is in Bound state. The Bound state service provides a client server interface to allow components to interact with the service, such as sending requests, obtaining results, performing cross-process communication through IPC, and the like.
In some embodiments, the System Server may initiate services including the following:
1. starting a boot service (Bootstrap Services);
2. Starting Core Services (Core Services);
3. other Services (Other Services) are started.
Wherein the guidance service may include: an activity management Service (Activity Manager Service, AMS), a power management Service (Power Manager Service), a backlight Service (Light Service), a display management Service (Display Manager Service), a package management Service (Package Manager Service), and a user management Service (User Manager Service).
The core service may include: battery monitoring Service (Battery Service), APP usage information collection Service (Usage Stats Service), and page view update Service (Web View Update Service).
The other services may include: camera Service (Camera Service), bluetooth Service (Bl uetooth Service), wiFi Service (WiFi Service), location management Service (Location Manager Service), multimedia session Service (Media Session Service), and the like. The other services may also be some other type of service that the electronic device may support, and are not described in detail herein.
Service contains two states, a Started state and a Bound state, respectively. An Android application component, such as an Activity, starts a Service by Start Service (), and the Service is in a Started state. When the Android application program component binds a Service through Bind Service (), the Service is in Bound state. The Bound state service provides a client server interface to allow components to interact with the service, such as sending requests, obtaining results, performing cross-process communication through IPC, and the like.
In some embodiments, the System Server may initiate services including the following:
1. starting a boot service (Bootstrap Services);
2. starting Core Services (Core Services);
3. other Services (Other Services) are started.
Wherein the guidance service may include: an activity management Service (Activity Manager Service, AMS), a power management Service (Power Manager Service), a backlight Service (Light Service), a display management Service (Display Manager Service), a package management Service (Package Manager Service), and a user management Service (User Manager Service).
The core service may include: battery monitoring Service (Battery Service), APP usage information collection Service (Usage Stats Service), and page view update Service (Web View Update Service).
The other services may include: camera Service (Camera Service), bluetooth Service (Bl uetooth Service), wiFi Service (WiFi Service), location management Service (Location Manager Service), multimedia session Service (Media Session Service), and the like. The other services may also be some other type of service that the electronic device may support, and are not described in detail herein.
Fig. 1 shows a schematic configuration 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 (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscri ber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bidirectional synchronous serial bus, and includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serialinterface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may 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, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present invention is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided 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 for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating 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 low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (FLED), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dotlight emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred 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 the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
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 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, 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 employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, 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 for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface 1 manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with capturing a photo scene.
When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, time stamp of touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the input event. Taking the touch operation as a touch click operation, taking a control corresponding to the click operation as an example of a control of a camera application icon, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera driver by calling a kernel layer, and captures a still image or video by the camera 193.
The following describes a system service switching method provided in an embodiment of the present application with reference to the accompanying drawings.
The embodiment of the application provides a system service switching method, which can be used for carrying out corresponding dynamic switching on the system service based on the operation requirement of the service to be started on the system service in the starting stage of the service to be started under the condition of normalization of a system component so as to support normal operation of the service to be started after the service to be started is started and enable the started service to provide corresponding functions. For example, the electronic device defaults to launch the 64-bit service (server 64), however, the service to be launched needs to use the 32-bit service (server 32), and the system service can be switched to the 32-bit service during the startup phase of the service to be launched, so as to support normal operation of the service to be launched after the service is launched and enable the service after the service is launched to provide corresponding functions.
In order to implement the system service switching method, in the stage of producing the electronic device, the produced electronic device needs to have a 32-bit execution program (server 32) and a 64-bit execution program (server 64) at the same time, and therefore, in the stage of compiling the production of the electronic device, the corresponding execution programs need to be packed into a service existence path.
The electronic device production process may include a compile packaging stage and a product customization stage.
Fig. 3a is a schematic diagram of compiling customization during production of an electronic device according to an embodiment of the present application.
Fig. 3b is a schematic diagram of a customization flow compiled during production of an electronic device according to an embodiment of the present application.
As shown in connection with fig. 3a and 3b, in the compilation packaging phase, the compilation can be performed by:
step 101: compilation generates a 32-bit executive (server 32), a 64-bit executive (server 64) and sets a default startup item.
In one embodiment, the default startup item is a default startup 64-bit execution program (server 64), and is linked to the 64-bit execution program (server 64), and in the startup phase of the electronic device, if there is no system service switching requirement, the default startup item is linked to the 64-bit execution program (server 64) through the default execution program server, and the default startup 64-bit service (server 64).
After compiling and generating a 32-bit execution program (server 32) and a 64-bit execution program (server 64), in the starting-up stage of the electronic equipment, if a system service switching requirement exists, canceling the 64-bit service (server 64) started by default, and switching to start the 32-bit service (server 32) so as to realize corresponding functions after corresponding services (services) are started.
In another embodiment, the default initiation item is a default initiation 32-bit execution program (server 32), and is linked to the 32-bit execution program (server 32), and in the electronic device power-on stage, if there is no system service switching requirement, the default initiation 32-bit service (server 32) is initiated by linking to the 32-bit execution program (server 32) through the default execution program server.
After compiling and generating a 32-bit execution program (server 32) and a 64-bit execution program (server 64), in the starting-up stage of the electronic equipment, if a system Service switching requirement exists, canceling the 32-bit Service (server 32) started by default, and switching to start the 64-bit Service (server 64) so as to realize corresponding functions after the corresponding Service (Service) is started.
Step 102: and generating a first configuration file of the default execution program, and packaging the first configuration file under a default configuration file path.
In one embodiment, the configuration file main content of the default initiated executive (e.g., server 64) is exemplified as follows:
file name: server.rc
File content rules: the fixed field indicates the program path that defines the execution of a service name service.
File content example: service server/system/bin/server (a service called server is defined, and the service is executed by the system/bin/server).
As shown in fig. 3, in the stage of customizing the electronic device, the customizing flow may be implemented by the following steps:
step 103: and generating a second configuration file of the custom execution program, and packaging the second configuration file under the custom configuration file path.
In one embodiment, the main content of the configuration file of the custom-initiated executive (e.g., server 32) is exemplified as follows:
file name: server32.Rc
File content rules: the fixed field indicates a program path override defining the execution of a service name service.
File content example: service server/system/bin/server32 override.
Wherein an existing service definition called server is overridden and the execution of the service is modified to be/system/bin/server 32.
After the compiling and customizing operations are completed on the electronic device, a corresponding Service (Service) can be started at the startup stage of the electronic device.
Fig. 4 is a service initiation flow chart according to an embodiment of the present application.
Referring to fig. 4, the process may include the steps of:
step 201: init loads the parse configuration (rc) file.
In the startup phase of the electronic device, a plurality of services (Service) can be started in a System Server process, so that each Service provides a corresponding function after being started. If the Service (Service) is to be started, the Service (Service) to be started needs to be configured and analyzed based on the set order, i.e. the configuration file is loaded and analyzed. Wherein, the dynamic switching system service can be realized in the stage of analyzing the configuration file.
Fig. 5 is a flowchart of a system service switching method according to an embodiment of the present application.
Referring to fig. 5, the method may include the steps of:
step 301: determining whether all rc files under the default configuration file path are parsed, if all the rc files are parsed, executing step 311, and if all the rc files are not parsed, executing step 302.
Step 302: the first rc file to be loaded under the default configuration file path is loaded.
The first rc file may be: based on the set loading sequence, the rc file currently needed to be loaded under the default configuration file path.
Step 303: it is determined whether the information of the service corresponding to the first rc file exists in the analysis record, if not, step 304 is executed, and if so, step 305 is executed.
After loading a first rc file in step 302, the loaded first rc file may be parsed. In one embodiment, the parsing may be to determine whether information of the service corresponding to the first rc file exists in the parsed record.
Step 304: after adding the information of the service corresponding to the first rc file to the analysis record, the process returns to step 301.
Step 305: determining whether there is an overlay tag in the definition information of the first rc file, if there is the overlay tag, executing step 306, and if there is no overlay tag, executing step 307.
Step 306: after updating the analysis record of the first rc file, the process returns to step 301.
Wherein, the basic composition unit of the rc file is section. The service is used to describe a service, and the syntax is as follows:
service<name><path>[<argument>*]
<option>
<option>
< name > -represents the name of the service
< parameters > -parameters attached when starting the service
< option > -constraint options for this service
The specific implementation steps of step 306 are as follows:
after the rc file is loaded and each line of content in the file is circularly analyzed, the content analyzed to belong to the section is added to the corresponding record to realize the content update.
Step 307: and deleting the original analysis record of the first rc file, and returning to the step 301 after recording the abnormal information of the first rc file.
The steps 301 to 307 are implemented for the loading and analyzing process for the first rc file under the default configuration file path according to the embodiment of the present application, by periodically executing the processes of steps 301 to 307, loading and analyzing the first rc file under one default configuration file path every period until loading and analyzing all the first rc files under the default configuration file path are completed.
In one embodiment, after all rc files under the default configuration file path are loaded and parsed, the steps of loading and parsing the rc files under the custom path may be executed, that is, after step 301 determines that all rc files under the default configuration file path are parsed, step 311 is executed continuously, and the specific steps of loading and parsing the rc files under the custom path are as follows:
Step 311: determining whether all rc files under the custom configuration file path are parsed, if so, executing step 202, and if not, executing step 312.
Step 312: and loading a second rc file to be loaded under the custom configuration file path.
Wherein, the second rc file may be: based on the set loading sequence, the rc file needing to be loaded currently under the configuration file path is customized.
Step 313: it is determined whether the information of the service corresponding to the second rc file exists in the analysis record, if not, step 314 is executed, and if so, step 315 is executed.
Step 314: after adding the information of the service corresponding to the second rc file to the analysis record, the process returns to step 311.
Step 315: determining whether there is an overlay tag in the definition information of the second rc file, if there is the overlay tag, executing step 316, and if there is no overlay tag, executing step 317.
Step 316: after updating the analysis record of the second rc file, the process returns to step 311.
In one embodiment, the specific implementation of step 316 may be the same as or similar to that of step 306 described above, and will not be described again here.
Step 317: and deleting the original analysis record of the second rc file, and returning to the step 311 after recording the abnormal information of the second rc file.
The steps 311 to 317 are implemented for the loading and analyzing process of the second rc file in the custom configuration file path according to the embodiment of the present application, and the processes of the steps 311 to 317 are periodically executed until all the second rc files in the custom configuration file path are loaded and analyzed.
In one embodiment, when all the first rc files under the default configuration file path are loaded and parsed, and all the second rc files under the custom configuration file path are loaded and parsed, a corresponding Service (Service) is started according to the parsed record. That is, after determining that all the second rc files under the custom configuration file path are loaded and parsed in step 311, step 202 is continued.
Step 202: and starting the service according to the analysis record.
According to the system service switching method of the embodiment shown in fig. 5, loading and analyzing all the first rc files in the default configuration file path are completed, and after loading and analyzing all the second rc files in the custom configuration file path are completed, a first analysis record and a second analysis record are obtained, so that the electronic device 100 can start corresponding services based on the first analysis record and the second analysis record.
After step 202, i.e. after starting the corresponding service based on the updated resolution record, the electronic device 100 may further start other programs during the start-up phase.
Fig. 6 is a schematic diagram of a mechanism of a system service switching control device according to an embodiment of the present application. Referring to fig. 6, the apparatus includes: a processor 601 and a memory 602, the memory 602 being configured to store at least one instruction, which when loaded and executed by the processor 601, implements a system service switching method provided by any of the embodiments of the present application. The system service switching control device can be a chip or a chip module.
The electronic device 100 provided in the embodiment of the present application may include a system service switching control device provided in the embodiment shown in fig. 6. In one embodiment, the system service switching control device may be a chip or a chip module built in the electronic device 100.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the system service switching method provided by any embodiment of the application.
The embodiments of the present application also provide a computer program product, including a computer program or an instruction, which when executed by a processor, implements the system service switching method provided in any embodiment of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a Processor (Processor) to perform part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (7)

1. A system service switching method, characterized by being applied to an electronic device configured with an execution program of a 32-bit service and an execution program of a 64-bit service, the method comprising:
the following steps are executed in the starting-up stage of the electronic equipment:
loading and analyzing a first configuration file under a first path, and obtaining a first analysis record of the first configuration file;
loading and analyzing a second configuration file under a second path, and obtaining a second analysis record of the second configuration file;
the first path comprises a plurality of first configuration files, wherein the first configuration files are configuration files of 64-bit service; the second path comprises a plurality of second configuration files, wherein the second configuration files are configuration files of 32-bit service;
Starting the 64-bit service according to the first analysis record, and starting the 32-bit service according to the second analysis record;
wherein,
the loading and analyzing the first configuration file under the first path, and obtaining a first analysis record of the first configuration file includes:
periodically executing a first loading analysis flow until all the first configuration files under the first path are analyzed, and obtaining the first analysis record;
the first loading analysis flow includes:
determining whether all the first configuration files under the first path are analyzed completely, if so, executing the loading and analyzing the second configuration files under the second path, and obtaining second analysis records of the second configuration files, and if not, loading the next first configuration file to be loaded under the first path based on a set sequence;
determining whether the loaded information of the service corresponding to the first configuration file exists in the first analysis record, if not, adding the loaded information of the service corresponding to the first configuration file into the first analysis record, and if so, updating the first analysis record based on the loaded information of the service corresponding to the first configuration file;
Or,
the loading and analyzing the second configuration file under the second path, and obtaining a second analysis record of the second configuration file includes:
periodically executing a second loading analysis flow until all the second configuration files in the second path are analyzed, and obtaining a second analysis record;
the second loading analysis flow includes:
determining whether all the second configuration files under the second path are analyzed completely, if all the second configuration files are analyzed completely, executing the step of starting corresponding services according to the first analysis record and the second analysis record, and if not, loading the next second configuration file to be loaded under the second path based on a set sequence;
and determining whether the loaded information of the second configuration file corresponding service exists in the second analysis record, if not, adding the loaded information of the second configuration file corresponding service into the second analysis record, and if so, updating the second analysis record based on the loaded information of the second configuration file corresponding service.
2. The method of claim 1, wherein the updating the first resolution record based on the loaded information of the first profile corresponding service comprises:
Determining whether an overlay tag exists in the information of the loaded first configuration file corresponding service, if the overlay tag exists, replacing original corresponding information in the first analysis record with the information of the loaded first configuration file corresponding service, and if the overlay tag does not exist, deleting the information of the loaded first configuration file corresponding service in the first analysis record, and generating an exception report of the loaded first configuration file.
3. The method of claim 1, wherein the updating the second resolution record based on the loaded second profile corresponding service information comprises:
and determining whether an overlay tag exists in the information of the loaded second configuration file corresponding service, if the overlay tag exists, replacing original corresponding information in the second analysis record with the information of the loaded second configuration file corresponding service, and if the overlay tag does not exist, deleting the information of the loaded second configuration file corresponding service in the second analysis record, and generating an exception report of the loaded second configuration file.
4. The method of claim 1, wherein the electronic device is further configured with a default executive linked to the 64-bit service executive.
5. A system service switching control apparatus, the apparatus comprising:
a processor and a memory for storing at least one instruction which, when loaded and executed by the processor, implements the system service switching method of any of claims 1-4.
6. An electronic device comprising the system service switching control device according to claim 5.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the system service switching method according to any of claims 1-4.
CN202211008775.4A 2022-08-22 2022-08-22 System service switching method, control device, electronic equipment and storage medium Active CN116048629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211008775.4A CN116048629B (en) 2022-08-22 2022-08-22 System service switching method, control device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211008775.4A CN116048629B (en) 2022-08-22 2022-08-22 System service switching method, control device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116048629A CN116048629A (en) 2023-05-02
CN116048629B true CN116048629B (en) 2024-04-05

Family

ID=86114079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211008775.4A Active CN116048629B (en) 2022-08-22 2022-08-22 System service switching method, control device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116048629B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108199A (en) * 2017-12-21 2018-06-01 北京东土科技股份有限公司 Multiple operating system starts method and device on a kind of multi-core CPU
CN112313620A (en) * 2019-11-19 2021-02-02 深圳市大疆创新科技有限公司 Android system starting method, device, equipment and storage medium
CN112527403A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Application starting method and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108199A (en) * 2017-12-21 2018-06-01 北京东土科技股份有限公司 Multiple operating system starts method and device on a kind of multi-core CPU
CN112527403A (en) * 2019-09-19 2021-03-19 华为技术有限公司 Application starting method and electronic equipment
CN112313620A (en) * 2019-11-19 2021-02-02 深圳市大疆创新科技有限公司 Android system starting method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116048629A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
WO2020000448A1 (en) Flexible screen display method and terminal
CN113254409B (en) File sharing method, system and related equipment
CN113448382B (en) Multi-screen display electronic device and multi-screen display method of electronic device
CN113641271B (en) Application window management method, terminal device and computer readable storage medium
US20240095000A1 (en) Plug-In Installation Method, Apparatus, and Storage Medium
CN114579389A (en) Application management method, device, equipment and storage medium
CN113703894A (en) Display method and display device of notification message
CN114828098B (en) Data transmission method and electronic equipment
CN114691248B (en) Method, device, equipment and readable storage medium for displaying virtual reality interface
CN113645595B (en) Equipment interaction method and device
CN114079642B (en) Mail processing method and electronic equipment
CN113950045B (en) Subscription data downloading method and electronic equipment
CN117009005A (en) Display method, automobile and electronic equipment
CN116048629B (en) System service switching method, control device, electronic equipment and storage medium
CN114816973A (en) Method and device for debugging codes, electronic equipment and readable storage medium
CN114003241A (en) Interface adaptation display method and system of application program, electronic device and medium
CN116709609B (en) Message delivery method, electronic device and storage medium
CN116703689B (en) Method and device for generating shader program and electronic equipment
CN116048831B (en) Target signal processing method and electronic equipment
CN116233599B (en) Video mode recommendation method and electronic equipment
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN116795476B (en) Wallpaper deleting method and electronic equipment
CN116719376B (en) Voltage control method, device, equipment and storage medium
CN116662150B (en) Application starting time-consuming detection method and related device
CN116089057B (en) Resource scheduling method, device, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant