CN111338636B - Kernel preprocessing method, kernel preprocessing device and electronic equipment - Google Patents

Kernel preprocessing method, kernel preprocessing device and electronic equipment Download PDF

Info

Publication number
CN111338636B
CN111338636B CN202010108565.7A CN202010108565A CN111338636B CN 111338636 B CN111338636 B CN 111338636B CN 202010108565 A CN202010108565 A CN 202010108565A CN 111338636 B CN111338636 B CN 111338636B
Authority
CN
China
Prior art keywords
preprocessing
application program
kernel
terminal equipment
value
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
CN202010108565.7A
Other languages
Chinese (zh)
Other versions
CN111338636A (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.)
Beijing Xiaomi Pinecone Electronic Co Ltd
Original Assignee
Beijing Xiaomi Pinecone Electronic 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 Beijing Xiaomi Pinecone Electronic Co Ltd filed Critical Beijing Xiaomi Pinecone Electronic Co Ltd
Priority to CN202010108565.7A priority Critical patent/CN111338636B/en
Publication of CN111338636A publication Critical patent/CN111338636A/en
Application granted granted Critical
Publication of CN111338636B publication Critical patent/CN111338636B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The disclosure relates to a kernel preprocessing method and device, electronic equipment and a computer readable storage medium. The kernel preprocessing method is applied to the terminal equipment and comprises the following steps: monitoring whether a system of the terminal equipment is in a preprocessing triggering state; when the system is in a preprocessing triggering state, determining an application program corresponding to the preprocessing triggering state based on a preprocessing registry; judging whether the kernel data corresponding to the application program needs to be preprocessed or not; if the kernel data needs to be preprocessed, compiling codes of the kernel data; and parameters of the kernel data are adjusted based on the compiled code. The system starts compiling and parameter adjusting kernel data operator codes when meeting the preprocessing triggering state, so that the operator calculation performance of the first time after the open operation language drive is upgraded is greatly improved, the waiting time of an application program during starting is saved, the contention for terminal equipment resources is reduced, and the user experience is improved.

Description

Kernel preprocessing method, kernel preprocessing device and electronic equipment
Technical Field
The present disclosure relates to the field of audio processing technologies, and in particular, to a kernel preprocessing method, a kernel preprocessing device, an electronic device, and a computer readable storage medium.
Background
Various computing kernels are involved in high-performance computation such as a graphics processor (Graphics Processing Unit, GPU), each kernel function has huge efficiency difference on different inputs or devices, and code pre-compiling and relevant parameters of the kernel function are required to be dynamically adjusted according to input information and device computing power so as to realize optimal scheduling. For mobile devices such as mobile phones, it is difficult to adjust all devices in advance due to the numerous devices. After the open operation language (Open Computing Language, OPENCL) of the android system is driven to upgrade, operators (kernel) of the kernels need to be recompiled and parameters need to be optimized again, so that a great deal of time is required to be consumed when an Application (APP) is started, and user experience is greatly affected.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a core preprocessing method, a core preprocessing apparatus, an electronic device, and a computer readable storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided a kernel preprocessing method, applied to a terminal device, the method including: monitoring whether a system of the terminal equipment is in a preprocessing triggering state; when the system is in a preprocessing triggering state, determining an application program corresponding to the preprocessing triggering state based on a preprocessing registry; judging whether the kernel data corresponding to the application program needs to be preprocessed or not; if the kernel data needs to be preprocessed, compiling codes of the kernel data; and parameters of the kernel data are adjusted based on the compiled code.
In an embodiment, the method further comprises: and submitting the identification of the application program and the corresponding preprocessing trigger state of the application program to a preprocessing registry of the system.
In one embodiment, the identity of the application and the corresponding preprocessing trigger state of the application are submitted to the preprocessing registry of the system when either: the application program is installed when the system is completed, the application program is started for the first time, the version of the application program is updated, or an enabling instruction sent by a server corresponding to the application program is received.
In an embodiment, the method further comprises: deleting the identification of the application program in the preprocessing registry of the system and the preprocessing trigger state corresponding to the application program when any one of the following conditions is adopted: when the application program is deleted in the system or a disabling instruction sent by a server corresponding to the application program is received.
In one embodiment, the application includes an objective function value, and an initial value of the objective function value is a first value; judging whether the kernel data corresponding to the application program needs to be preprocessed or not, including: detecting whether an objective function value of an application program is a first value; when the objective function value is a first value, determining that the kernel data needs to be preprocessed; detecting whether the system has been upgraded when the objective function value is a second value: when the system is detected to be upgraded, determining that the kernel data needs to be preprocessed; after compiling the code of the kernel data, the kernel preprocessing method further comprises the following steps: the objective function value is updated to a second value.
In an embodiment, the preprocessing trigger state comprises at least one of: the method comprises the steps of enabling terminal equipment to be in an idle state, enabling the terminal equipment to be in a charging state, enabling the current electric quantity of the terminal equipment to be larger than a preset threshold value, enabling the terminal equipment to be in a preset network condition, and enabling the application program to be in a state that the time from the previous preprocessing exceeds a preset duration.
According to a second aspect of embodiments of the present disclosure, there is provided a kernel preprocessing apparatus, applied to a terminal device, the apparatus including: the monitoring unit is used for monitoring whether the system of the terminal equipment is in a preprocessing triggering state; the determining unit is used for determining an application program corresponding to the preprocessing trigger state based on the preprocessing registry when the system is in the preprocessing trigger state; the judging unit is used for judging whether the kernel data corresponding to the application program needs to be preprocessed or not; the preprocessing unit is used for compiling codes of the kernel data when the kernel data needs to be preprocessed; and for adjusting parameters of the kernel data based on the compiled code.
In an embodiment, the apparatus further comprises: the registration unit is used for submitting the identification of the application program and the preprocessing trigger state corresponding to the application program to a preprocessing registry of the system.
In an embodiment, the registration unit is configured to submit the identification of the application program and the corresponding preprocessing trigger state of the application program to a preprocessing registry of the system when any one of the following is used: the application program is installed when the system is completed, the application program is started for the first time, the version of the application program is updated, or an enabling instruction sent by a server corresponding to the application program is received.
In an embodiment, the registration unit is further configured to: deleting the identification of the application program in the preprocessing registry of the system and the preprocessing trigger state corresponding to the application program when any one of the following conditions is adopted: when the application program is deleted in the system or a disabling instruction sent by a server corresponding to the application program is received.
In one embodiment, the application includes an objective function value, and an initial value of the objective function value is a first value; the judging unit is used for: detecting whether an objective function value of an application program is a first value; when the objective function value is a first value, determining that the kernel data needs to be preprocessed; when the objective function value is the second value, detecting whether the system has been upgraded by the upgrade detection unit: when the system is detected to be upgraded, determining that the kernel data needs to be preprocessed; the apparatus further comprises: and the function updating unit is used for updating the objective function value to a second value after compiling the code of the kernel data.
In an embodiment, the preprocessing trigger state comprises at least one of: the method comprises the steps of enabling terminal equipment to be in an idle state, enabling the terminal equipment to be in a charging state, enabling the current electric quantity of the terminal equipment to be larger than a preset threshold value, enabling the terminal equipment to be in a preset network condition, and enabling the application program to be in a state that the time from the previous preprocessing exceeds a preset duration.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a memory for storing instructions; and a processor for invoking the memory-stored instructions to perform the kernel preprocessing method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium storing instructions that, when executed by a processor, perform the kernel preprocessing method of the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: the system starts compiling and parameter adjusting the kernel data operator (kernel) code when meeting the preprocessing triggering state, so that the operator computing performance of the first time after the open operation language (Open Computing Language, OPENCL) is driven to upgrade is greatly improved, the waiting time of starting an application program is saved, the contending of terminal equipment resources is reduced, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow diagram illustrating a method of kernel data update, according to an example embodiment;
FIG. 2 is a flow diagram illustrating another method of kernel data update, according to an example embodiment;
FIG. 3 is a schematic block diagram of a kernel data updating device, shown according to an exemplary embodiment;
FIG. 4 is a schematic block diagram of another kernel data updating device, shown in accordance with an exemplary embodiment;
fig. 5 is a schematic block diagram of an apparatus according to an example embodiment.
Fig. 6 is a schematic block diagram of an electronic device, shown according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
In some current technologies, some application programs are bound to the system and can be updated together with the system, for example, a high-pass neural network processing engine (Snapdragon Neural Processing Engine SDK, SNPE) can compile operator (kernel) codes and adjust kernel parameters when an open operation language (Open Computing Language, OPENCL) driving update is detected, and then update the SNPE together with the system update. Although the scheme can solve the problem of optimizing recompilation and parameter adjustment, the scheme can only be realized for software cooperated with mobile phone manufacturers, and for wider third party software, the scheme cannot be issued together with system upgrade, and the time point of system upgrade is not known, so the problem cannot be solved.
In other techniques, the operator code is compiled and parameter adjusted at the time of initializing the first run of the application or the first run after the open operation language driver is upgraded, and the framework only compiles the code and does not adjust the parameter (thus degrading performance) in order to increase the speed. The scheme needs to wait for a long running time after the application program is started, and the application program is started after each system upgrade, so that the user experience is greatly influenced.
In order to solve the above-mentioned problems, the present disclosure provides a kernel preprocessing method 10, which can be used for various terminal devices, such as a mobile phone, a tablet computer, etc., referring to fig. 1, the kernel preprocessing method 10 includes steps S11-S15, which are described in detail below:
step S11, monitoring whether a system of the terminal equipment is in a preprocessing triggering state.
Whether the current state of the system is in a preprocessing triggering state is monitored, so that the normal use of a user is prevented from being influenced by the update of kernel data, and the occupation of excessive system resources or the increase of the power consumption of excessive terminal equipment are also prevented.
In some embodiments, the preprocessing trigger state may include at least one of: the method comprises the steps of enabling terminal equipment to be in an idle state, enabling the terminal equipment to be in a charging state, enabling the current electric quantity of the terminal equipment to be larger than a preset threshold value, enabling the terminal equipment to be in a preset network condition, and enabling the application program to be in a state that the time from the previous preprocessing exceeds a preset duration. The preprocessing trigger state may be one of the above states or a combination state of several of the states according to actual settings.
The terminal device being in an idle state can mean that the screen of the current terminal device is in a screen-off state and lasts for a period of time, when the terminal device is in the idle state, the terminal device is generally not used by a user at present, and the preprocessing is performed at the moment, so that the use of the user is not influenced due to the occupation of system resources, and the contention of computing resources is avoided. .
The terminal equipment is in a charging state, namely the terminal copper equipment is currently charged in a wired or wireless mode; the state that the current electric quantity of the terminal equipment is greater than the preset threshold value can be that the current electric quantity is greater than 50% of the total electric quantity or other preset threshold values. When the terminal equipment is in charging or the electric quantity is larger than a preset threshold value, the core pretreatment is performed at the moment, so that the influence on the electric quantity loss of the terminal equipment can be avoided or reduced, and the power is prevented from being cut off in the pretreatment process.
The preset network condition in the state that the terminal device is in the preset network condition may be to connect to the network in any form, that is, the current network state of the terminal device is in: jobsinfo.NETWORK_TYPE_ANY, ANY kind of network connectivity, such as through a cellular network or WiFi connected; the preset network condition may also be that the terminal device is currently connected through a non-cellular network, i.e. the network state is in: jobInfo. NETWORK_TYPE_UNMETEREED, namely the current terminal equipment is networked in other modes, so that the data transmission rate and stability of the terminal equipment can be ensured, and the traffic transmission cost of data transmission in pretreatment is avoided.
The state that the time of the application program from the previous preprocessing exceeds the preset time length may be that a preset time length is set, and since the time of the application program from the previous preprocessing is long, preprocessing is often needed when running again, in order to avoid that one application program is not updated all the time, a preset time length is set, and when the time of the application program from the previous preprocessing is detected to exceed the preset time length, preprocessing is performed on the application program.
Step S12, when the system is in the preprocessing trigger state, determining an application program corresponding to the preprocessing trigger state based on the preprocessing registry.
After the system is monitored to be in the preprocessing trigger state, an application program corresponding to the current preprocessing trigger state can be determined through a preprocessing registry of the system. The preprocessing registry records the registered application programs and the preprocessing trigger states corresponding to the application programs, and the corresponding application programs can be found according to the preprocessing trigger states of the current system.
Step S13, judging whether the kernel data corresponding to the application program needs to be preprocessed or not.
After the system is in a preprocessing triggering state and the application program is determined according to the preprocessing registry, judging whether the kernel data corresponding to the application program needs to be preprocessed or not. If it is determined that the preprocessing is not necessary, no operation is performed, and if the preprocessing is necessary, step S14 and step S15 may be performed.
Step S14, if the kernel data needs to be preprocessed, compiling codes of the kernel data.
Under the condition that the system is in a preprocessing triggering state, if the corresponding application program kernel data is judged to need preprocessing, the operator code of the kernel data can be immediately started to be compiled, so that the direct operation can be ensured when the application program is started next time.
And step S15, adjusting parameters of the kernel data based on the compiled codes.
After the operator codes are compiled again, the system further adjusts parameters of the kernel based on the compiled codes, so that the kernel can meet the requirements of the current operator codes and achieve the best performance.
Through the embodiment, the kernel data can be preprocessed under the condition that the system is in a conditional state, so that the time for compiling operator codes and adjusting parameters when an application program is started is saved, the first operator computing performance after the open operation language driving is upgraded is greatly improved, and the user experience is greatly improved.
In one embodiment, as shown in fig. 2, the kernel preprocessing method 10 may further include: and S16, submitting the identification of the application program and the corresponding preprocessing trigger state of the application program to a preprocessing registry of the system.
The Android system provides a task scheduler (JobScheduler) mechanism for an application program (APP), so that the system can automatically trigger corresponding operation when the conditions are met according to registered conditions and operation. Therefore, the application program can register with a task scheduler (JobScheduler) of the system, wherein a preprocessing registry is established, the registered content comprises an identifier for submitting the application program, such as an application program name or other identifier capable of pointing to the application program, and the registered content also needs to submit a preprocessing trigger state corresponding to the application program, so that the application program to be executed can be determined based on the preprocessing condition state through preprocessing the content in the registry. Operations that need to be performed on the application after the preprocessing trigger state is satisfied may also be submitted, as in step S14 and so on. The system makes further decisions and updates when it is monitored that the system is in a pre-processing trigger state based on registration at the task scheduler.
Wherein, in some embodiments, step S16 may be performed when either: the application program is installed when the system is completed, the application program is started for the first time, the version of the application program is updated, or an enabling instruction sent by a server corresponding to the application program is received. The application program can be registered when the installation, the first start and each version updating are completed, or the information in the registry is updated, or the information in the registry can be registered or updated according to the instruction sent by the server corresponding to the application program.
In one embodiment, the kernel preprocessing method 10 may further include: deleting the identification of the application program in the preprocessing registry of the system and the preprocessing trigger state corresponding to the application program when any one of the following conditions is adopted: when the application program is deleted in the system or a disabling instruction sent by a server corresponding to the application program is received. In this embodiment, in the case that the application program has been deleted, there is no meaning in the corresponding information in the preprocessing registry, and if a system error in the case of newly selecting the preprocessing trigger state is possibly caused by retention, when the application program is deleted, the corresponding information in the preprocessing registry is deleted timely, so that stability of the system can be ensured, and the system space is solved. In other cases, a disabling instruction sent by the server corresponding to the application program is received, and the preprocessing function of the application program is closed, in which case, the information corresponding to the application program is deleted from the preprocessing registry, so that when the preprocessing trigger state is selected for the next time, the system traverses the preprocessing registry, and the application program is not determined again, that is, the kernel data corresponding to the application program is not preprocessed correspondingly. By means of submitting or deleting the application program related information in the preprocessing registry, the function of kernel preprocessing can be conveniently started or closed.
In an embodiment, the application program is provided with an objective function value of the objective function, and whether the update is needed or not can be judged based on the objective function value, wherein an initial value of the objective function value is a first value, such as false; when the objective function value is detected to be a first value, determining that the kernel data needs to be preprocessed; when the objective function value is detected to be a second value, such as true, whether the system is upgraded needs to be further judged, and when the system is detected to be upgraded, the kernel data is confirmed to need to be preprocessed. And if preprocessing is required according to the judgment result obtained by the judgment mode, further executing the step S14 to compile the operator code. And, after compiling the operator code, updating the objective function value to the second value. By means of the method, whether the kernel data is updated after the system is updated or not can be judged conveniently and efficiently, namely whether the kernel data is in a condition of needing preprocessing or not is judged.
Based on the same inventive concept, fig. 3 shows a core preprocessing apparatus 100, which can be applied to a terminal device, and as shown in fig. 3, the core preprocessing apparatus 100 includes: a monitoring unit 110, configured to monitor whether a system of the terminal device is in a preprocessing triggering state; a determining unit 120, configured to determine, when the system is in the preprocessing trigger state, an application program corresponding to the preprocessing trigger state based on the preprocessing registry; a judging unit 130, configured to judge whether the kernel data corresponding to the application program needs to be preprocessed; a preprocessing unit 140, configured to compile a code of the kernel data when the kernel data needs to be preprocessed; and for adjusting parameters of the kernel data based on the compiled code.
In one embodiment, as shown in fig. 4, the kernel preprocessing device 100 further includes: the registration unit 150 is configured to submit the identifier of the application program and the corresponding preprocessing trigger state of the application program to a preprocessing registry of the system.
In one embodiment, the registration unit 150 is configured to submit the identification of the application program and the corresponding preprocessing trigger state of the application program to the preprocessing registry of the system when any of the following is provided: the application program is installed when the system is completed, the application program is started for the first time, the version of the application program is updated, or an enabling instruction sent by a server corresponding to the application program is received.
In an embodiment, the registration unit 150 is further configured to: deleting the identification of the application program in the preprocessing registry of the system and the preprocessing trigger state corresponding to the application program when any one of the following conditions is adopted: when the application program is deleted in the system or a disabling instruction sent by a server corresponding to the application program is received.
In one embodiment, the application includes an objective function value, and an initial value of the objective function value is a first value; the judging unit 130 is configured to: detecting whether an objective function value of an application program is a first value; when the objective function value is a first value, determining that the kernel data needs to be preprocessed; when the objective function value is the second value, detecting whether the system has been upgraded by the upgrade detection unit: when the system is detected to be upgraded, determining that the kernel data needs to be preprocessed; the kernel preprocessing device 100 further includes: a function updating unit (not shown) for updating the objective function value to the second value after compiling the code of the kernel data.
In an embodiment, the preprocessing trigger state comprises at least one of: the method comprises the steps of enabling terminal equipment to be in an idle state, enabling the terminal equipment to be in a charging state, enabling the current electric quantity of the terminal equipment to be larger than a preset threshold value, enabling the terminal equipment to be in a preset network condition, and enabling the application program to be in a state that the time from the previous preprocessing exceeds a preset duration.
With respect to the core preprocessing apparatus 100 in the above embodiment, the specific manner in which each unit performs an operation has been described in detail in the embodiment regarding the method, and will not be explained in detail here.
Fig. 5 is a schematic block diagram of any of the foregoing embodiment apparatus according to an example embodiment. For example, apparatus 200 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 5, the apparatus 200 may include one or more of the following components: a processing component 202, a memory 204, a power supply component 206, a multimedia component 208, an audio component 210, an input/output (I/O) interface 212, a sensor component 214, and a communication component 216.
The processing component 202 generally controls overall operation of the apparatus 200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 202 can include one or more modules that facilitate interactions between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
The memory 204 is configured to store various types of data to support operations at the apparatus 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phonebook data, messages, pictures, videos, and the like. The memory 204 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 206 provides power to the various components of the device 200. The power supply components 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
The multimedia component 208 includes a screen between the device 200 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front-facing camera and/or a rear-facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 200 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 210 is configured to output and/or input audio signals. For example, the audio component 210 includes a Microphone (MIC) configured to receive external audio signals when the device 200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 204 or transmitted via the communication component 216. In some embodiments, audio component 210 further includes a speaker for outputting audio signals.
The I/O interface 212 provides an interface between the processing assembly 202 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 214 includes one or more sensors for providing status assessment of various aspects of the apparatus 200. For example, the sensor assembly 214 may detect the on/off state of the device 200, the relative positioning of the components, such as the display and keypad of the device 200, the sensor assembly 214 may also detect a change in position of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration/deceleration of the device 200, and a change in temperature of the device 200. The sensor assembly 214 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 216 is configured to facilitate communication between the apparatus 300 and other devices in a wired or wireless manner. The device 200 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 216 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a computer-readable storage medium is also provided, such as memory 204, comprising instructions executable by processor 220 of apparatus 200 to perform the above-described method. For example, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 6 is a block diagram of an electronic device 300, according to an example embodiment. For example, the apparatus 300 may be provided as a server. Referring to fig. 6, apparatus 300 includes a processing component 322 that further includes one or more processors, and memory resources represented by memory 342, for storing instructions, such as applications, executable by processing component 322. The application program stored in the memory 342 may include one or more modules each corresponding to a set of instructions. Further, the processing component 322 is configured to execute instructions to perform the above-described methods.
The apparatus 300 may also include a power component 326 configured to perform power management of the apparatus 300, a wired or wireless network interface 350 configured to connect the apparatus 300 to a network, and an input output (I/O) interface 358. The device 300 may operate based on an operating system stored in memory 342, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (12)

1. A method for preprocessing a kernel, which is applied to a terminal device, the method comprising:
monitoring whether a system of the terminal equipment is in a preprocessing triggering state, wherein the preprocessing triggering state comprises at least one of the following: the method comprises the steps that the terminal equipment is in an idle state, the terminal equipment is in a charging state, the current electric quantity of the terminal equipment is larger than a preset threshold value, the terminal equipment is in a preset network condition, and the application program is in a state that the time from the previous preprocessing exceeds a preset duration;
when the system is in the preprocessing trigger state, determining an application program corresponding to the preprocessing trigger state based on a preprocessing registry;
judging whether the kernel data corresponding to the application program needs to be preprocessed or not;
if the kernel data needs to be preprocessed, compiling codes of the kernel data; and is combined with
Adjusting parameters of the kernel data based on the compiled code;
the application program comprises an objective function value, and an initial value of the objective function value is a first value;
the judging whether the kernel data corresponding to the application program needs to be preprocessed or not includes:
detecting whether an objective function value of the application program is the first value;
when the objective function value is the first value, determining that the kernel data needs to be preprocessed;
detecting whether the system is upgraded when the objective function value is a second value, and determining that the kernel data needs to be preprocessed when the system is detected to be upgraded;
after compiling the code of the kernel data, the kernel preprocessing method further includes: and updating the objective function value to the second value.
2. The kernel preprocessing method as recited in claim 1, further comprising:
submitting the identification of the application program and the preprocessing trigger state corresponding to the application program to the preprocessing registry of the system.
3. The kernel preprocessing method as recited in claim 2, wherein the identification of the application program and the preprocessing trigger state corresponding to the application program are submitted to the preprocessing registry of the system when either:
the application program is installed when the system is completed, the application program is started for the first time, the version of the application program is updated, or an enabling instruction sent by a server corresponding to the application program is received.
4. The kernel preprocessing method as recited in claim 2, further comprising:
deleting the identification of the application program in the preprocessing registry of the system and the preprocessing trigger state corresponding to the application program when any one of the following conditions is adopted:
and when the application program is deleted in the system or a disabling instruction sent by a server corresponding to the application program is received.
5. The core preprocessing method according to any one of claims 1 to 4, wherein said preprocessing trigger state comprises at least one of:
the terminal equipment is in an idle state, the terminal equipment is in a charging state, the current electric quantity of the terminal equipment is larger than a preset threshold value, the terminal equipment is in a preset network condition, and the application program is in a state that the time from the previous preprocessing exceeds a preset duration.
6. A core preprocessing apparatus, applied to a terminal device, comprising:
the monitoring unit is used for monitoring whether the system of the terminal equipment is in a preprocessing triggering state, and the preprocessing triggering state comprises at least one of the following: the method comprises the steps that the terminal equipment is in an idle state, the terminal equipment is in a charging state, the current electric quantity of the terminal equipment is larger than a preset threshold value, the terminal equipment is in a preset network condition, and the application program is in a state that the time from the previous preprocessing exceeds a preset duration;
the determining unit is used for determining an application program corresponding to the preprocessing trigger state based on a preprocessing registry when the system is in the preprocessing trigger state;
the judging unit is used for judging whether the kernel data corresponding to the application program needs to be preprocessed or not;
the preprocessing unit is used for compiling codes of the kernel data when the kernel data needs to be preprocessed; and is configured to adjust parameters of the kernel data based on the compiled code;
the application program comprises an objective function value, and an initial value of the objective function value is a first value;
the judging unit is used for: detecting whether an objective function value of the application program is the first value; when the objective function value is the first value, determining that the kernel data needs to be preprocessed; detecting, by an upgrade detection unit, whether the system has been upgraded when the objective function value is a second value: when the system is detected to be upgraded, determining that the kernel data needs to be preprocessed;
the apparatus further comprises: and the function updating unit is used for updating the objective function value into the second value after compiling the code of the kernel data.
7. The core preprocessing apparatus of claim 6, wherein said apparatus further comprises:
and the registration unit is used for submitting the identification of the application program and the preprocessing trigger state corresponding to the application program to the preprocessing registry of the system.
8. The kernel preprocessing device as recited in claim 7, wherein the registration unit is configured to submit the identification of the application program and the preprocessing trigger state corresponding to the application program to the preprocessing registry of the system when either:
the application program is installed when the system is completed, the application program is started for the first time, the version of the application program is updated, or an enabling instruction sent by a server corresponding to the application program is received.
9. The kernel preprocessing device as recited in claim 7, wherein the registration unit is further configured to:
deleting the identification of the application program in the preprocessing registry of the system and the preprocessing trigger state corresponding to the application program when any one of the following conditions is adopted:
and when the application program is deleted in the system or a disabling instruction sent by a server corresponding to the application program is received.
10. The core preprocessing device as recited in any one of claims 6 to 9, wherein said preprocessing trigger state comprises at least one of: the terminal equipment is in an idle state, the terminal equipment is in a charging state, the current electric quantity of the terminal equipment is larger than a preset threshold value, the terminal equipment is in a preset network condition, and the application program is in a state that the time from the previous preprocessing exceeds a preset duration.
11. An electronic device, comprising:
a memory for storing instructions; and
a processor for invoking instructions stored in said memory to perform a core pre-processing method as claimed in any one of claims 1 to 5.
12. A computer readable storage medium storing instructions which, when executed by a processor, perform the kernel preprocessing method of any one of claims 1 to 5.
CN202010108565.7A 2020-02-21 2020-02-21 Kernel preprocessing method, kernel preprocessing device and electronic equipment Active CN111338636B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010108565.7A CN111338636B (en) 2020-02-21 2020-02-21 Kernel preprocessing method, kernel preprocessing device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010108565.7A CN111338636B (en) 2020-02-21 2020-02-21 Kernel preprocessing method, kernel preprocessing device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111338636A CN111338636A (en) 2020-06-26
CN111338636B true CN111338636B (en) 2023-09-26

Family

ID=71181831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010108565.7A Active CN111338636B (en) 2020-02-21 2020-02-21 Kernel preprocessing method, kernel preprocessing device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111338636B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3096224A1 (en) * 2015-05-22 2016-11-23 Xiaomi Inc. Method and apparatus for processing application installation package
CN107748680A (en) * 2017-09-28 2018-03-02 努比亚技术有限公司 A kind of kernel setup method, terminal and computer-readable recording medium
CN108388431A (en) * 2018-02-13 2018-08-10 广东欧珀移动通信有限公司 The newer control method of application program heat, device, storage medium and mobile terminal
CN109933381A (en) * 2019-03-06 2019-06-25 腾讯科技(深圳)有限公司 A kind of loading method and device of kernel
CN110569106A (en) * 2019-08-27 2019-12-13 Oppo广东移动通信有限公司 Code loading method and device, electronic equipment and computer readable medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180285139A1 (en) * 2017-04-02 2018-10-04 vEyE Security Ltd. Hypervisor-based containers

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3096224A1 (en) * 2015-05-22 2016-11-23 Xiaomi Inc. Method and apparatus for processing application installation package
CN107748680A (en) * 2017-09-28 2018-03-02 努比亚技术有限公司 A kind of kernel setup method, terminal and computer-readable recording medium
CN108388431A (en) * 2018-02-13 2018-08-10 广东欧珀移动通信有限公司 The newer control method of application program heat, device, storage medium and mobile terminal
CN109933381A (en) * 2019-03-06 2019-06-25 腾讯科技(深圳)有限公司 A kind of loading method and device of kernel
CN110569106A (en) * 2019-08-27 2019-12-13 Oppo广东移动通信有限公司 Code loading method and device, electronic equipment and computer readable medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
余颖,董旭源,高宏.C/S模式管理信息系统实现自动升级和维护的方法.佳木斯大学学报(自然科学版).2005,(第02期),全文. *
蒋煦 ; 张慧翔 ; 慕德俊 ; .一种动态监测安卓应用程序的方法.西北工业大学学报.2016,(第06期),全文. *

Also Published As

Publication number Publication date
CN111338636A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
EP3168745B1 (en) Method, device and system for application updating
EP3096224B1 (en) Method and apparatus for processing application installation package
EP2991275B1 (en) Making router management application compatible with router firmware
EP3306441A1 (en) Temperature control method and apparatus
US20170060566A1 (en) Method and device for installing plug-in of smart device
US9870239B2 (en) Method and device for running application program
EP3112979B1 (en) Method and device for waking up mcu
CN107463372B (en) Data-driven page updating method and device
CN109062625B (en) Application program loading method and device and readable storage medium
CN108037987B (en) Application program control method, device and storage medium
CN109901886B (en) Page language switching method, system, device and computer readable storage medium
CN111338636B (en) Kernel preprocessing method, kernel preprocessing device and electronic equipment
US11269699B2 (en) Method and device for processing an application
CN107819871B (en) Application state determination method and device
CN112083981A (en) Method and device for creating page view component
CN114489706A (en) Upgrading method, device and storage medium
CN112083841A (en) Information input method, device and storage medium
CN111597106A (en) Point burying management method and device
CN112181406A (en) Rendering engine sharing method and device
CN110377312B (en) Software upgrading method, device and medium
CN110990073B (en) Method and device for verifying customization requirements of application program
CN109726118B (en) Application program development method and device, electronic equipment and storage medium
CN112804399B (en) Verification code receiving method, device and medium
CN112256274A (en) Application program processing method and device and storage medium
CN112214254A (en) Method and device for accelerating starting of application program and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 100085 unit C, building C, lin66, Zhufang Road, Qinghe, Haidian District, Beijing

Applicant after: Beijing Xiaomi pinecone Electronic Co.,Ltd.

Address before: 100085 unit C, building C, lin66, Zhufang Road, Qinghe, Haidian District, Beijing

Applicant before: BEIJING PINECONE ELECTRONICS Co.,Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant