WO2022100141A1 - Plug-in management method, system and apparatus - Google Patents

Plug-in management method, system and apparatus Download PDF

Info

Publication number
WO2022100141A1
WO2022100141A1 PCT/CN2021/107524 CN2021107524W WO2022100141A1 WO 2022100141 A1 WO2022100141 A1 WO 2022100141A1 CN 2021107524 W CN2021107524 W CN 2021107524W WO 2022100141 A1 WO2022100141 A1 WO 2022100141A1
Authority
WO
WIPO (PCT)
Prior art keywords
plug
information
load
feature information
security level
Prior art date
Application number
PCT/CN2021/107524
Other languages
French (fr)
Chinese (zh)
Inventor
王恒铭
王众豪
孙京阳
黄振宇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022100141A1 publication Critical patent/WO2022100141A1/en

Links

Images

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/22Microcontrol or microprogram arrangements
    • G06F9/24Loading of the microprogram
    • 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
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a plug-in management method, system, and device.
  • Micro application refers to a small application that is highly focused on one function. It has the characteristics of easy access to services, no need to install and uninstall, and it can be used immediately. Micro application has become a new mode of mobile application development due to its advantages of lightness and ease of use. Micro-applications use a plug-in framework to load functions in a plug-in form, which is conducive to the decoupling, updating and expansion of functional modules. Based on the advantages of the micro-application plug-in framework, some complex applications and super-applications also generally use the micro-application plug-in framework to run multiple micro-applications in a plug-in form to provide users with multi-functional services.
  • the plug-in framework can schedule the plug-ins according to the number of plug-ins. Usually, in order to balance the number of plug-ins in the process, the plug-ins are scheduled to the process with a smaller number of current plug-ins. middle.
  • the embodiments of the present application provide a plug-in management method, system and device. After receiving request information for requesting to run a micro-application, the plug-in corresponding to the request information is determined, the characteristic information of the plug-in that affects the process operation is obtained, and the characteristic information of the plug-in is obtained according to the characteristic information of the plug-in.
  • the plug-in can be scheduled into the process.
  • the plug-in scheduling method in this micro-application considers the impact of the plug-in on the process operation, and the plug-in can be reasonably scheduled to achieve load balance when the process is running, so that the micro-application framework It can run smoothly and improve the user experience.
  • the first device includes a terminal device; the second device includes a cloud device.
  • an embodiment of the present application provides a plug-in management method, including: receiving request information for requesting to run a micro-application; determining a plug-in corresponding to the request information; wherein the plug-in is used to implement part or all of the functions of the micro-application; obtaining The feature information of the plug-in; wherein, the feature information includes the information that the plug-in affects the running of the process; the plug-in is scheduled according to the feature information.
  • the plug-in can be reasonably scheduled, so as to achieve load balancing when the process is running, so that the micro-application framework can run smoothly and improve the user's experience.
  • the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information. In this way, more reasonable scheduling of the plug-in can be performed according to different characteristic information of the plug-in.
  • the plug-in is set in a process adapted to the characteristic information of the plug-in; or, the plug-in is disabled according to the characteristic information. In this way, you can choose to disable some unsafe or inappropriate plug-ins according to different characteristic information of the plug-ins, so as to improve the security plug-ins of process running.
  • the characteristic information includes load information, and the predicted load of the first process that can be used to run the plug-in is calculated according to the load information; the predicted load of the first process is that when the plug-in is set in the first process, the first process The total load of the first process is multiple; the plug-in is set in the first target process; the first target process is the process of the first process whose predicted load does not exceed the first load threshold.
  • process scheduling it is possible to predict whether the first process exceeds the load threshold when the plug-in is scheduled to the first process.
  • the first process after scheduling can be avoided.
  • load balancing is realized when the process is running.
  • the feature information includes security level information, and when the security level information indicates that the plug-in is a security plug-in, the plug-in is allocated in a process that can be used to run the plug-in; or, when the security level information indicates that the plug-in is In the case of a risky plug-in, the plug-in is allocated in an independent process; or, when the security level information indicates that the plug-in is an abnormal plug-in, the plug-in is disabled.
  • a more appropriate scheduling policy can be implemented for the plug-ins according to plug-ins of different security levels, such as allocating risk plug-ins to independent processes or disabling abnormal plug-ins, etc., so as to improve the security of process operation.
  • the independent process for running the risk plug-in may be a preset process dedicated to running the risk plug-in.
  • the independent process may be a concept corresponding to the dependent process.
  • the independent process is dedicated to running risk plug-ins, and the dependent process may be used to run multiple types of plug-ins.
  • the independent process in the embodiments of the present application is used to represent the role of the process, and does not constitute a limitation on the process name or the like.
  • the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability; when the security level information is less than the first value , indicating that the plug-in is a safe plug-in; when the security level information is greater than or equal to the first value and less than or equal to the second value, it means that the plug-in is a risky plug-in; when the security level information is greater than the second value, it means that the plug-in is an abnormal plug-in.
  • the security level information is greater than the first value, it means that the plug-in is an abnormal plug-in; when the security level information is less than or equal to the first value and greater than or equal to the second value, it means that the plug-in is a risk plug-in; when the security level information is less than or equal to the second value
  • the second value indicates that the plug-in is a secure plug-in.
  • the embodiment of the present application does not specifically limit the determination of the plug-in type.
  • the code execution logic may be based on the result of comparing the specific value of the security level information with the first value and the second value to perform the assignment or disabling operation of the plug-in, without "indicating that the plug-in is a security plug-in", " Steps such as "Indicates that the plugin is a risky plugin” and "Indicates that the plugin is an abnormal plugin”.
  • the characteristic information further includes load information, and when the security level information indicates that the plug-in is a secure plug-in, the predicted load that can be used to run the second process of the security plug-in is calculated according to the load information of the security plug-in;
  • the predicted load of the second process is the total load of the second process when the security plug-in is set in the second process; the number of the second process is multiple; the security plug-in is set in the second target process, and the second target process is the second process.
  • the predicted load does not exceed the second load threshold of the process. In this way, abnormal plug-ins can be disabled, and normal plug-ins can be reasonably scheduled, so as to prevent abnormal plug-ins from affecting the normal operation of other plug-ins in the current process, and realize load balance when the process is running.
  • the feature information includes associated plug-in information
  • the plug-in is set in a third process
  • the third process is a process that runs a relevant plug-in related to the associated plug-in information.
  • the related plug-ins include: the same plug-ins as the resources read by the plug-ins.
  • a feature information file from the second device is received; the feature information file includes feature information of multiple plug-ins calculated by the second device; and the features of the plug-in are obtained from the feature information file according to the plug-in identifier information.
  • the service of computing the plug-in feature information can be handed over to a company with a stronger computing power.
  • Dedicated second equipment to perform Since the second device usually has powerful computing capabilities, the second device calculates the feature information of the plug-in, which can reduce the amount of computation of the first device and save the computing resources of the first device.
  • the method further includes: sending process-related information in the first device to the second device, where the process-related information is used to calculate the feature information file.
  • the second device can use the process-related information to calculate the feature information file more conveniently.
  • the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
  • the feature information is determined by using a machine learning model; wherein, the machine learning model is obtained by training using process-related sample information.
  • the process-related sample information can be fully trained, and the machine learning model can be used to obtain more accurate feature information.
  • the process-related sample information includes one or more of the following: process name, plug-in list, memory ratio, CPU usage rate of the central processing unit, or exception information.
  • an embodiment of the present application provides a plug-in management method, which acquires process-related information; calculates a feature information file according to the process-related information, the feature information file includes feature information of multiple plug-ins, and the feature information of the plug-in includes the process running by the plug-in. Affecting information; sending a feature information file to the first device.
  • the plug-in can be reasonably scheduled, so as to achieve load balancing when the process is running, so that the micro-application framework can run smoothly and improve the user's experience.
  • the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information. In this way, more reasonable scheduling of plug-ins can be performed according to different characteristic information.
  • the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability. In this way, more accurate security level information of the plug-in can be obtained.
  • the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
  • the machine learning model is trained according to the process-related information; the feature information file is output by using the machine learning model. In this way, the machine learning model can be used to obtain more accurate feature information.
  • the process-related information of the multiple devices is obtained from the multiple devices periodically; or, the process-related information sent by the multiple devices when the process is abnormal is obtained. In this way, more accurate feature information can be obtained based on more process-related information.
  • an embodiment of the present application provides a plug-in management apparatus, where the plug-in management apparatus may be a terminal device, or may be a chip or a chip system in the terminal device.
  • the plug-in management apparatus may include a processing unit and a communication unit.
  • the processing unit may be a processor
  • the communication unit may be a communication interface or an interface circuit.
  • the plug-in management apparatus may further include a storage unit, which may be a memory. The storage unit is used for storing instructions, and the processing unit executes the instructions stored in the storage unit, so that the terminal device implements the plug-in management method described in the first aspect or any possible implementation manner of the first aspect.
  • the processing unit may be a processor, and the communication unit may be a communication interface.
  • the communication interface may be an input/output interface, a pin or a circuit, or the like.
  • the processing unit executes the instructions stored in the storage unit, so that the terminal device implements the plug-in management method described in the first aspect or any possible implementation manner of the first aspect.
  • the storage unit may be a storage unit (eg, a register, a cache, etc.) in the chip, or a storage unit (eg, a read-only memory, a random access memory, etc.) located outside the chip in the terminal device.
  • the processing unit is used to receive request information for requesting to run the micro-application; the processing unit is used to determine the plug-in corresponding to the request information; wherein, the plug-in is used to implement part or all of the functions of the micro-application; for acquiring the feature information of the plug-in; wherein, the feature information includes the information that the plug-in affects the running of the process; the processing unit is used for scheduling the plug-in according to the feature information.
  • the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information.
  • the processing unit is specifically configured to set the plug-in in a process adapted to the characteristic information of the plug-in; or, disable the plug-in according to the characteristic information.
  • the characteristic information includes load information
  • the processing unit is specifically configured to calculate the predicted load of the first process that can be used to run the plug-in according to the load information; the predicted load of the first process is to set the plug-in in the first process, the total load of the first process; the number of the first process is multiple; the processing unit is specifically used to set the plug-in in the first target process; the first target process is the first process, and the predicted load does not exceed the first target process.
  • a load threshold process is specifically configured to calculate the predicted load of the first process that can be used to run the plug-in according to the load information
  • the predicted load of the first process is to set the plug-in in the first process, the total load of the first process
  • the number of the first process is multiple
  • the processing unit is specifically used to set the plug-in in the first target process
  • the first target process is the first process, and the predicted load does not exceed the first target process.
  • a load threshold process is specifically configured to calculate the predicted load of the first process that can be used to run the plug-
  • the feature information includes security level information
  • the processing unit when the security level information indicates that the plug-in is a security plug-in, the processing unit is specifically configured to allocate the plug-in to a process that can be used to run the plug-in;
  • the processing unit is specifically used to allocate the plug-in to an independent process; or, in the case where the security level information indicates that the plug-in is an abnormal plug-in, the processing unit is specifically used to disable the plug-in .
  • the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability; when the security level information is less than the first value , indicating that the plug-in is a safe plug-in; when the security level information is greater than or equal to the first value and less than or equal to the second value, it means that the plug-in is a risky plug-in; when the security level information is greater than the second value, it means that the plug-in is an abnormal plug-in.
  • the feature information further includes load information
  • the processing unit is specifically configured to calculate the second data that can be used to run the security plug-in according to the load information of the security plug-in.
  • the predicted load of the process; the predicted load of the second process is the total load of the second process when the security plug-in is set in the second process; the number of the second process is multiple; the processing unit is specifically used to set the security plug-in in the second process.
  • the second target process is a process in the second process whose predicted load does not exceed the second load threshold.
  • the feature information includes associated plug-in information
  • the processing unit is specifically configured to set the plug-in in a third process, where the third process is a process that runs a relevant plug-in related to the associated plug-in information.
  • the related plug-ins include: the same plug-ins as the resources read by the plug-ins.
  • the communication unit is specifically configured to receive a feature information file from the second device; the feature information file includes feature information of multiple plug-ins calculated by the second device; the processing unit is specifically configured to to obtain the feature information of the plug-in from the feature information file.
  • the method further includes: a communication unit, specifically configured to send the process-related information in the first device to the second device, where the process-related information is used to calculate the feature information file.
  • the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
  • the processing unit is specifically configured to use a machine learning model to determine feature information; wherein, the machine learning model is obtained by training with process-related sample information.
  • the process-related sample information includes one or more of the following: process name, plug-in list, memory ratio, CPU usage rate of the central processing unit, or exception information.
  • an embodiment of the present application provides a plug-in management apparatus.
  • the plug-in management apparatus may be a cloud device, or may be a chip or a chip system in the cloud device.
  • the plug-in management apparatus may include a processing unit and a communication unit.
  • the processing unit may be a processor
  • the communication unit may be a communication interface or an interface circuit.
  • the plug-in management apparatus may further include a storage unit, which may be a memory. The storage unit is used for storing instructions, and the processing unit executes the instructions stored in the storage unit, so that the cloud device implements the plug-in management method described in the second aspect or any possible implementation manner of the second aspect.
  • the processing unit may be a processor, and the communication unit may be a communication interface.
  • the communication interface may be an input/output interface, a pin or a circuit, or the like.
  • the processing unit executes the instructions stored in the storage unit, so that the cloud device implements the plug-in management method described in the second aspect or any possible implementation manner of the second aspect.
  • the storage unit may be a storage unit (eg, a register, a cache, etc.) in the chip, or a storage unit (eg, a read-only memory, a random access memory, etc.) located outside the chip in the cloud device.
  • the processing unit is used to obtain process-related information; the processing unit is used to calculate a feature information file according to the process-related information, the feature information file includes the feature information of multiple plug-ins, and the feature information of the plug-in includes the plug-in generated by the process running. Affected information; a communication unit for sending a feature information file to the first device.
  • the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information.
  • the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability.
  • the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
  • the processing unit is specifically configured to train a machine learning model according to process-related information; and output a feature information file by using the machine learning model.
  • the processing unit is specifically configured to periodically acquire process-related information of multiple devices from multiple devices; or, acquire process-related information sent by multiple devices when the processes are abnormal.
  • the embodiments of the present application provide a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer is made to execute the first aspect and the first aspect.
  • an embodiment of the present application provides a computer program product including instructions, which, when the instructions are executed on a computer, cause the computer to execute the plug-in management method described in any one of the implementation manners of the first aspect and the second aspect.
  • an embodiment of the present application provides a plug-in management system, and the system includes any one or more of the following: the third aspect and the plug-in management apparatus described in various possible implementations of the third aspect, and the fourth aspect and the plug-in management apparatus described in various possible implementation manners of the fourth aspect.
  • an embodiment of the present application provides a plug-in management device, the device includes a processor and a storage medium, the storage medium stores an instruction, and when the instruction is executed by the processor, any implementation manner of the first aspect and the second aspect is implemented. Describes the plugin management method.
  • the present application provides a chip or a chip system, the chip or chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used for running a computer program or instruction,
  • the plug-in management method described in any one of the implementation manners of the first aspect and the second aspect is performed.
  • the communication interface in the chip may be an input/output interface, a pin, a circuit, or the like.
  • the chip or chip system described above in this application further includes at least one memory, where instructions are stored in the at least one memory.
  • the memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (eg, a read-only memory, a random access memory, etc.).
  • the present application provides a computer program product, the computer program product stores instructions, and when the instructions are executed by one or more processors, implements the plug-in management method in any of the foregoing aspects or implementations.
  • FIG. 1 is a schematic structural diagram of a terminal device 100 according to an embodiment of the present application.
  • FIG. 2 is a software structural block diagram of a terminal device 100 provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a framework of an application program provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a plug-in management method provided by an embodiment of the present application.
  • FIG. 5 is a schematic interface diagram of a user-triggered micro-application plug-in provided by an embodiment of the present application
  • FIG. 6 is a schematic interface diagram of another user-triggered micro-application plug-in provided by an embodiment of the present application.
  • FIG. 7 is a schematic interface diagram of still another user-triggered micro-application plug-in provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a plug-in scheduling provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of acquiring feature information according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the framework of a plug-in management system provided by an embodiment of the present application.
  • FIG. 11 is a schematic flowchart of data collection and reporting provided by an embodiment of the present application.
  • FIG. 12 is a schematic flowchart of a plug-in feature analysis provided by an embodiment of the present application.
  • FIG. 13 is a schematic flowchart of a problem plug-in identification provided by an embodiment of the present application.
  • FIG. 14 is a schematic flowchart of implementing plug-in load balancing provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a plug-in management apparatus provided by an embodiment of the present application.
  • FIG. 16 is a schematic diagram of the hardware structure of a plug-in management apparatus provided by an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same function and effect.
  • the first value and the second value are only used to distinguish different values, and do not limit their order.
  • the words “first”, “second” and the like do not limit the quantity and execution order, and the words “first”, “second” and the like are not necessarily different.
  • At least one means one or more
  • plural means two or more.
  • And/or which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • the plug-in framework may be used to allocate processes for micro-application plug-ins, usually in order to balance the number of plug-ins in the process, the plug-in will be scheduled according to the number of plug-ins, and the plug-in can be scheduled to a process with a smaller number of plug-ins in the current process middle.
  • This coarse-grained plug-in scheduling method ignores the differences between plug-ins. Since different plug-ins consume different resources at runtime, this coarse-grained plug-in scheduling method may cause unbalanced intra-process load. question.
  • an embodiment of the present application provides a plug-in management method. After receiving request information for requesting to run a micro-application, the plug-in corresponding to the request information is determined, and the characteristic information of the plug-in that affects the process operation is obtained. The plug-in is scheduled into the process.
  • the plug-in scheduling method in this micro-application considers the impact of the plug-in on the process operation, and the plug-in can be reasonably scheduled to achieve load balancing when the process is running, so that the micro-application framework can be stable. run to enhance the user experience.
  • the embodiments of the present application are applied to a terminal device.
  • the following first introduces the structure of the terminal device to which the embodiments of the present application are applied.
  • FIG. 1 shows a schematic structural diagram of a terminal device 100 .
  • the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the terminal device 100 may include more or less components than those shown in the drawings, or combine some components, or separate some components, or arrange different 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, for example, 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), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface 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 transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface, so as to realize the shooting function of the terminal device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the terminal device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is a schematic illustration, and does not constitute a structural limitation of the terminal device 100 .
  • the terminal device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charge management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Antennas in terminal device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the 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 wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator 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 passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves
  • the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Broadband Code Division Multiple Access (CDMA) address (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 technology, etc.
  • GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou satellite navigation system (BDS), quasi-zenith satellite system (quasi-zenith satellite system) , QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou satellite navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 implements a display function 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 screen 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 alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed
  • quantum dot light-emitting diode quantum dot light emitting diodes, QLED
  • the terminal device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the terminal device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the terminal device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs.
  • the terminal device 100 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the terminal 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 playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C.
  • the terminal device 100 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals.
  • the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the terminal device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions.
  • the gyro sensor 180B may be used to determine the motion attitude of the terminal device 100 .
  • the angular velocity of the end device 100 about three axes ie, the x, y and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the terminal device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the terminal device 100 is stationary. It can also be used to identify the posture of terminal devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the terminal device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the terminal device 100 emits infrared light to the outside through the light emitting diode.
  • the terminal device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100 . When insufficient reflected light is detected, the terminal device 100 may determine that there is no object near the terminal device 100 .
  • the terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the terminal device 100 when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 caused by the low temperature.
  • the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “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, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the voice part vibrating bone mass obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the terminal device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the terminal device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communication.
  • the terminal device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
  • the software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, and the like.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the terminal device 100 .
  • FIG. 2 is a software structural block diagram of a terminal device 100 provided by an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, calendar, phone, map, phone, music, settings, mailbox, video, social, etc.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window managers, content providers, resource managers, view systems, notification managers, and so on.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, take a screenshot, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes.
  • the Android runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG and PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the plug-in management method provided by the embodiment of the present application may be executed at the application program layer and the application program architecture layer in FIG. 2 .
  • the workflow of the software and hardware of the terminal device 100 is exemplarily described below in conjunction with a scenario in which an application program is started or an interface switching occurs in an application program.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, touch strength, timestamps of touch operations, etc.).
  • Raw input events are stored at the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event.
  • the electronic device 100 may be used for split-screen display of multiple functions of an application.
  • the electronic device 100 may be a mobile phone, a tablet computer, a smart watch, a smart bracelet, a smart earphone, a smart glasses, or other terminal devices with a display screen, etc., which are not limited in this embodiment of the present application.
  • FIG. 3 is a schematic diagram of a framework of an application program provided by an embodiment of the present application.
  • the application 300 may include other micro-applications such as a micro-application 301 and a micro-application 302 .
  • the micro-application 301 may include: plug-in 3031, plug-in 3032, plug-in 3041, plug-in 3042 and other plug-ins.
  • the scenario shown in FIG. 3 can be understood as: the micro application may include other functions such as function 303 and function 304 .
  • one application may include multiple micro-applications, one micro-application may include multiple functions, and one function may correspond to one or more plug-ins.
  • a process is the basic unit of scheduling by the system.
  • the terminal device can schedule the plug-in corresponding to the trigger operation to the process to run.
  • the terminal device when the user triggers the function 303, the terminal device will schedule other plug-ins such as plug-ins 3031 and 3032 in the function 303; when the user triggers the function 304, the terminal device will schedule the plug-ins 3041 and 3042 in the function 304. Wait for other plug-ins for scheduling; the terminal device schedules the plug-in corresponding to the function to the corresponding process to run.
  • other plug-ins such as plug-ins 3031 and 3032 in the function 303
  • the terminal device when the user triggers the function 304, the terminal device will schedule the plug-ins 3041 and 3042 in the function 304. Wait for other plug-ins for scheduling; the terminal device schedules the plug-in corresponding to the function to the corresponding process to run.
  • the terminal device can load and run multiple micro-applications in the form of plug-ins, so as to provide users with diversified services.
  • the loading of micro-applications often needs to depend on the application framework environment.
  • micro-applications are run in the application in the form of one or more plug-ins.
  • the application framework runs on the end device.
  • the application framework can manage plugins in microapps and schedule plugins to run in processes.
  • the embodiments of the present application are applicable to the above application scenarios for micro-application plug-in management.
  • the embodiment of the present application uses a scenario in which the micro-application plug-in management method can be implemented as an example, and other specific application scenarios are not limited.
  • the micro-applications described in the embodiments of this application may be small-scale applications that are highly focused on one function, and their loading and running often depend on the framework environment.
  • the social application can be understood as a framework environment, and the operation of the applet must depend on the framework of the social application before it can be loaded and run. It is understandable that there is no way for this applet to run without social networking.
  • the plug-ins described in the embodiments of the present application may be functional components of the micro-application, and the micro-application runs in the framework in the form of one or more plug-ins.
  • the user has many functions that can be triggered, and the user can click any function to trigger the loading of the plug-in corresponding to the function.
  • the dynamic loading described in the embodiments of the present application may be a mechanism for allowing the system to load and use the software corresponding to the loading process at runtime.
  • the process described in the embodiments of the present application may be a running activity of a program in a computer on a certain data set, which is the basic unit of resource allocation and scheduling by the system, and the system may allocate resources to the process.
  • the framework described in the embodiments of the present application may be a framework in the context of Internet technology (internet technology, IT), and specifically refers to a support structure with certain constraints designed to solve an open problem. In this structure, more components can be expanded and placed according to specific problems, so that a complete solution to the problem can be constructed more quickly and easily.
  • the framework in this embodiment of the present application specifically refers to a container carrier responsible for loading, running, and managing micro-application plug-ins.
  • the framework is not only responsible for loading and running the micro-application plug-in, but also needs to provide the scheduling and management capabilities of the micro-application plug-in.
  • the framework can create several processes, and allocate each micro-application plug-in to different processes according to a certain allocation principle. Generally speaking, the number of micro-application plug-ins is much larger than the number of processes.
  • the plug-in framework described in the embodiments of the present application may be a container carrier dynamically loaded in the form of a plug-in using a plug-in technology, which may be an APP in essence.
  • a plug-in framework can realize the mutual call between plug-in code loading and the framework, the mutual access between plug-in resource loading and the framework, and the management of the plug-in life cycle.
  • plug-in frameworks enable dynamic loading of plug-ins in micro-apps.
  • the process allocation described in the embodiments of the present application may be that the terminal device allocates the micro-application plug-ins to different processes to run.
  • the process snapshot described in the embodiment of the present application may be a statistical snapshot that records the current process in the system and the data in the process.
  • the load described in the embodiment of the present application may be: measuring the resource consumption of the process in which the plug-in is running when it is running. For example, load is determined by two metrics, memory and power consumption.
  • the cloud computing platform (or cloud platform or cloud device, etc.) described in the embodiments of this application may be services based on hardware resources and software resources, and the cloud platform may provide other capabilities such as computing, network, and storage.
  • the machine learning described in the embodiments of the present application may be a mathematical model or a computational model that imitates the structure and function of a biological neural network, and is used to estimate or approximate a function.
  • the machine learning model needs to be trained with a large number of samples. After the model is trained, the machine learning model can be used to make predictions.
  • the installation-free running application package (android application package, APK) described in the embodiment of the present application can be understood as a plug-in, and the APP that supports the plug-in in the installation-free running APK loads and runs the plug-in at runtime, and some less commonly used APPs can be loaded and run.
  • the functional modules of APP are made into plug-ins, which reduces the size of the installation package, realizes the dynamic expansion of APP functions, and facilitates the decoupling and update expansion between functional modules.
  • FIG. 4 is a schematic flowchart of a plug-in management method provided by an embodiment of the present application. As shown in Figure 4, the method may include the following steps:
  • S401 Receive request information for requesting to run a micro-application.
  • the request information may be request information sent after the user triggers the micro-application through a trigger operation.
  • the terminal device can receive request information for requesting to run the micro-application.
  • request information for requesting to run the micro-application can be sent, and the terminal device receives the request information.
  • the user's trigger operation may include: single click operation, multiple click operation, touch operation (the touch information of the touch operation may include touch coordinates, touch force or time stamp of the touch operation and other types of touch information), sliding Other types of trigger actions such as actions, drag actions, and/or long-press actions. It can be understood that, the specific trigger operation is not limited in the embodiment of the present application.
  • FIG. 5 is a schematic interface diagram of a user-triggered micro-application plug-in according to an embodiment of the present application.
  • the interface may be the home screen of the terminal device, and the home screen may include one or more of the following application icons: setting icon, calendar icon, social icon 501, data icon and other types of application icons.
  • the terminal device responds to the user's operation to trigger the social icon 501, and the terminal device enters the interface as shown in b in Figure 5 .
  • the terminal device responds to the user triggering the operation of the discovery control 502, and the terminal device enters the The interface shown in c in Figure 5.
  • the interface may include one or more of the following functional controls: sweep controls, shake controls, nearby friend controls, game controls, applet controls 503 or other Type of functional control.
  • the terminal device enters the interface as shown in FIG. 6 in response to the user triggering the operation of the applet control 503 .
  • the interface may include one or more of the following applet controls: My applet control, video applet control, reading applet control, shopping applet control 601, takeaway applet controls or other types of applet controls.
  • the terminal device may receive request information for requesting to run the micro-application.
  • the terminal device when the user triggers the shopping applet control 601 through a trigger operation such as clicking, dragging, or long pressing in the interface, the terminal device responds to the trigger operation, and the terminal device receives the request information for running the micro-application, and the terminal device responds to the trigger operation.
  • the device schedules the plug-in corresponding to the opening shopping applet control 601 to a corresponding process to run, and the terminal device enters the interface shown in FIG. 7 .
  • the interface may include one or more of the following functional controls: a new control today, a supermarket control, a train ticket control, a coupon control, a recharge center control 701, a feature center control, and a pet control , category controls, or other types of functional controls.
  • the terminal device may receive request information for requesting to run the micro-application.
  • the terminal device when the user triggers the recharge center control 701 through a trigger operation such as clicking, dragging or long pressing in the interface, the request information for running the function in the micro-application is sent, and the terminal device responds to the trigger operation and receives the To run the function request information in the micro-application, the terminal device schedules the plug-in corresponding to the recharge center control 701 to a corresponding process to run, and the terminal device can enter the interface corresponding to the recharge center control 701 .
  • a trigger operation such as clicking, dragging or long pressing in the interface
  • the request information for requesting to run the micro application can be sent.
  • the plug-in management method provided in the embodiment performs plug-in scheduling.
  • entering the application opening scene or the page switching scene may also be automatically triggered by the terminal device, which is not specifically limited in this embodiment of the present application.
  • S402. Determine the plug-in corresponding to the request information.
  • the terminal device after receiving the request information for running the micro-application sent by the user triggering the micro-application, parses one or more plug-ins corresponding to the request information.
  • This plugin is used to implement some or all of the functionality of the microapp.
  • request information for requesting to run the micro-application can be sent, and the terminal device receives the request information and determines the plug-in corresponding to the request information.
  • the terminal device when the user triggers the recharge center function control 701, the terminal device responds to the request information, and the terminal device searches for one or more plug-ins corresponding to the recharge center function control 701, and subsequently the terminal device will One or more plug-ins corresponding to the function control are dispatched to the corresponding process to run, and the terminal device can display the interface corresponding to the function control.
  • the feature information is information that the plug-in affects the running of the process.
  • the association relationship between the plug-in and the feature information is obtained in advance, and after the plug-in is acquired, the feature information of the plug-in is searched according to the association relationship; After acquiring the plug-in, input the plug-in into the model, and use the model to output the feature information of the plug-in. It can be understood that, in this embodiment of the present application, the method for acquiring the feature information of the plug-in is not limited.
  • the characteristic information of the plug-in may include one or more of the following: load information, security level information, associated plug-in information, running time information, plug-in priority information or other types of characteristic information. It can be understood that the feature information of the plug-in may also include other contents according to the actual application scenario, and the feature information of the plug-in is not limited in this embodiment of the present application.
  • the load information of the plug-in is information that identifies the memory and power consumption of the plug-in when running.
  • the load information of each plug-in in the process is differentiated, and it can be understood that the load information of each plug-in may be the same or different.
  • the security level information of the plug-in is information identifying plug-ins with different risk levels of the plug-in, and a corresponding scheduling policy is executed according to the security level information of each plug-in.
  • the associated plug-in information of the plug-ins is information that identifies related plug-ins that have an association relationship between the plug-ins.
  • the related plug-ins are the plug-ins that read the same resources.
  • the running time information of the plug-in is information that identifies the time consumed by the plug-in when running.
  • the priority information of the plug-in is information that identifies the frequency at which the user runs the plug-in. The higher the frequency that the user runs the plug-in, the higher the priority of the plug-in.
  • the characteristic information of the plug-in may include load information of the plug-in.
  • the predicted load of the process that can be used to run the plug-in may be calculated, and the predicted load may be the prediction of the process assuming that the plug-in is set in the process.
  • the plugin can be set in any process whose predicted load does not exceed the load threshold set by the system.
  • the load threshold may be the highest load value allocated by the terminal device to the process running the micro-application.
  • the feature information of the plug-in may include the security level information of the plug-in.
  • the security level information may identify the plug-in as a security plug-in, a risk plug-in or an abnormal plug-in. In the process of the plug-in, or set the risk plug-in in a separate process set by the system, or disable the abnormal plug-in.
  • the feature information of the plug-in may include priority information of the plug-in, and according to the priority information of the plug-in, a plug-in with a high priority may be scheduled to a process with a current high priority.
  • plug-in scheduling according to the feature information of the plug-in may also include other contents according to the actual application scenario, and the method for scheduling the plug-in according to the feature information is not limited in this embodiment of the present application.
  • the plug-in management method provided by the embodiment of the present application can perform reasonable scheduling based on characteristic information between plug-ins, realize load balancing of process operation, enable the micro-application framework to run smoothly, and further improve the user's sense of experience.
  • S404 includes: setting the plug-in in a process adapted to the feature information of the plug-in.
  • the characteristic information includes load information
  • setting the plug-in in a process that is compatible with the characteristic information of the plug-in according to the characteristic information of the plug-in includes: calculating the first process that can be used to run the plug-in according to the load information of the plug-in.
  • Predicted load the predicted load of the first process is the total load of the first process when the plug-in is set in the first process; the number of the first process is multiple.
  • the plug-in is set in a first target process; the first target process is a process in the first process whose predicted load does not exceed the first load threshold.
  • running in process 801 are: plug-in 8011, plug-in 8012, plug-in 8013 and plug-in 8014; running in process 802: plug-in 8021, plug-in 8022 and plug-in 8023; running in process 803: plug-in 8031 and plugin 8032.
  • the micro-app contains plugins 804 , plugins 805 , plugins 806 , and plugins 807 that are not yet running.
  • the predicted load of the process 801 is the sum of the load information of the plug-in 804 and the total load of the four plug-ins running in the process 801; the predicted load of the process 802 is the load information of the plug-in 804 and the three plug-ins running in the process 802.
  • the predicted load of the process 803 is the sum of the load information of the plug-in 804 and the total load of the two plug-ins running in the process 803 . It can be understood that the predicted load is to estimate the total load of the process after the plug-in to be scheduled is scheduled to the process. In a specific application, there may be no execution steps for scheduling the plug-in to the process.
  • the plug-in 804 is scheduled to any one of the process 801 , the process 802 or the process 803 .
  • the plug-in 804 may be scheduled into the process 801 .
  • process scheduling it is possible to predict whether the first process exceeds the load threshold when the plug-in is scheduled to the first process. Setting the plug-in in the first target process whose predicted load does not exceed the load threshold can avoid the occurrence of the first process after scheduling.
  • the feature information includes associated plug-in information of the plug-in
  • setting the plug-in in a process adapted to the feature information of the plug-in according to the feature information of the plug-in includes: setting the plug-in in a third process, the third process For processes that run related plugins with associated plugin information.
  • the related plugins include: plugins that have the same resources as the plugins read.
  • the plug-in 804 can be scheduled to the process 802 where the plug-in 8021 is located.
  • the feature information includes the running time information of the plug-in, and setting the plug-in in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: obtaining the running time of each running plug-in in the process. , to set the plug-ins to be scheduled in a process whose running duration of each plug-in is similar to the running duration of the plug-in to be scheduled.
  • the plug-in 804 when the user performs scheduling according to the runtime information of the plug-in 804 .
  • the relationship between the running time of the plug-in 804 and the running time of each plug-in is determined.
  • the plug-in to be scheduled is scheduled to the process where the plug-in is located.
  • the plug-in 804 may be scheduled to the process 802 where the plug-in 8021 is located.
  • the process is running, multiple associated plug-ins can be run at the same time. Since the resources read between the associated plug-ins are the same, the energy consumption of performing multiple operations of reading the same resource can be reduced, thereby reducing the energy consumption of the process running. .
  • the feature information includes the priority information of the plug-in
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: obtaining the priority of each plug-in and each running process.
  • the priority of the plug-in with high priority is set in the corresponding process with high priority.
  • the priority of the plug-in may be determined according to the frequency of triggering the plug-in by the user, and the higher the frequency of triggering the plug-in by the user, the higher the priority of the plug-in; the priority of the process may be preset for the process by the terminal device.
  • the plug-in 804 when the user performs scheduling according to the priority information of the plug-in 804 , the plug-in 805 , or the plug-in 806 .
  • Get the priority of each running process When the priority of the plug-in 804 is higher, the plug-in 804 can be scheduled to the process 801 with the higher priority set by the system.
  • the plug-in 805 When the priority of the plug-in 805 is low, the plug-in can be scheduled to the process 802 with a low priority set by the system.
  • the priority information of the plug-in 806 meets neither the high priority nor the low priority, the plug-in may be scheduled to the process 803 with the default priority set by the system.
  • the plug-ins with high priority are preferentially scheduled to the corresponding processes to ensure the normal implementation of the more important functions in the micro-application.
  • S404 includes: disabling the plug-in according to the feature information.
  • the feature information includes security level information
  • the plugin is set in a process that is compatible with the feature information of the plugin according to the feature information of the plugin, including: when the security level information indicates that the plugin is a security plugin
  • the plug-in is allocated in a process that can be used to run the plug-in; or, in the case where the security level information indicates that the plug-in is a risk plug-in, the plug-in is allocated in a separate process; or, in the case where the security level information indicates that the plug-in is an abnormal plug-in, Disable plugins.
  • the security level information may include a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability.
  • the security level information is less than the first value, it means that the plug-in is a security plug-in; when the security level information is greater than or equal to the first value and less than or equal to the second value, it means that the plug-in is a risk plug-in; when the security level information is greater than or equal to the first value, it means the plug-in is a risk plug-in;
  • the second value indicates that the plug-in is an abnormal plug-in.
  • the probability of a process crash caused by the plugin is the ratio of the total number of times the plugin appears in the crash process to the total number of process crashes when the process crashes due to the exception of the plugin;
  • the probability of memory leak caused by the plugin is , when a memory leak occurs in a process due to an exception of the plug-in, the ratio of the total number of times the plug-in appears in the memory leak process to the total number of process memory leaks.
  • the first value and the second value are thresholds of the security level information set by the terminal device to identify the type of the plug-in.
  • the plug-in 805 or the plug-in 806 when the user performs scheduling according to the security level information of the plug-in 804 , the plug-in 805 or the plug-in 806 .
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 , the plug-in 805 or the plug-in 806 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is allocated to the process 801 that can run the plug-in.
  • the plug-in 805 is a risk plug-in
  • the plug-in is allocated to an independent process 802 set by the terminal device.
  • the plug-in 806 is an abnormal plug-in, the plug-in is disabled, and an error report of the plug-in 806 is sent to the terminal device. Execute a more appropriate scheduling policy for plug-ins according to plug-ins of different security levels.
  • S404 includes: according to the plurality of characteristic information of the plug-in, the plug-in may be set in a process suitable for the plurality of characteristic information of the plug-in.
  • the feature information includes load information and security level information
  • the plugin is set in a process that is compatible with the feature information of the plugin, including: when the security level information indicates that the plugin is a secure plugin. , calculate the predicted load of the second process that can be used to run the security plug-in according to the load information of the security plug-in; the predicted load of the second process is the total load of the second process when the security plug-in is set in the second process; The number is multiple; the security plug-in is set in the second target process, and the second target process is a process in the second process whose predicted load does not exceed the second load threshold.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in, the plug-in is scheduled using the load information of the plug-in. The process of scheduling the plug-in by using the load information of the plug-in will not be repeated.
  • the plug-in 804 When the plug-in 804 is a risk plug-in, the plug-in is allocated to an independent process 802 set by the terminal device. When the plug-in 804 is an abnormal plug-in, the plug-in is disabled, and an error report of the plug-in 804 can be sent to the terminal device.
  • the feature information includes the load information of the plug-in and the associated plug-in information
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: calculating the prediction of the process according to the load characteristics of the plug-in. Load, the plug-in is set in the process of running the relevant plug-in related to the associated plug-in information, and the predicted load of the process does not exceed the load threshold set by the terminal device.
  • the plug-in 804 when the user performs scheduling according to the load information of the plug-in 804 and the associated plug-in information. Obtain the related plug-ins with the same resources read by the plug-in 804 in the process.
  • the plug-in 804 is represented, and the plug-in 8011 or the plug-in 8021 is a related plug-in.
  • the plug-in 804 calculates the predicted load of the process 801 or process 802 where the plug-in 804 is located, and determine the relationship between the predicted load of the process 801 or the predicted load of the process 802 and the load threshold of the process.
  • the plug-in 804 can be scheduled to any process of the process 801 or the process 802.
  • the plug-in 804 is scheduled to the process 801 .
  • the feature information includes load information and running duration information of the plug-in
  • the plug-in is set in a process that is compatible with the feature information of the plug-in, including: according to the load information of the plug-in.
  • the predicted load of the process of the plug-in calculate the predicted running time of the process that can be used to run the plug-in according to the running time of the plug-in, and set the plug-in in the process where the product of the predicted load and the predicted running time does not exceed the threshold set by the system .
  • the plug-in is set in the process 801, the process 802 or the process 803, and the predicted load of each process of the process 801, the process 802 or the process 803 and the predicted running time of each process are calculated.
  • the predicted running duration of the process 801 is the sum of the running duration information of the plugin 804 and the total running duration of the four plugins running in the process 801 ;
  • the predicted running duration of the process 802 is the running duration information of the plugin 804 and the The sum of the total running time of the three running plug-ins;
  • the predicted running time of the process 803 is the sum of the running time information of the plug-in 804 and the total running time of the two plug-ins running in the process 803 . It can be understood that predicting the running time is to estimate the total running time of the process after the plug-in to be scheduled is scheduled to the process. In a specific application, there may be no execution steps for scheduling the plug-in to the process.
  • the plug-in 804 is scheduled to a process in which the product of the predicted load of the process and the predicted running time of the process does not exceed the threshold set by the system.
  • the plug-in 804 can be scheduled to any one of the process 801, the process 802 or the process 803. in progress.
  • the feature information includes load information and priority information of the plug-in
  • the plug-in is set in a process suitable for the feature information of the plug-in, including: obtaining the priority and running status of each plug-in.
  • the priority of each process is set, and the plug-in with high priority is set in the corresponding process with high priority, and the predicted load of the process does not exceed the load threshold set by the terminal device.
  • the plug-in 804 when the user performs scheduling according to the load information and priority information of the plug-in 804 .
  • the plug-in 804 is higher, the plug-in is scheduled to the process 801 or the process 802 with the higher priority set by the system.
  • the priority of the process 801 is the same as that of the process 802, the plug-in is scheduled using the load information of the plug-in.
  • the calculation places the plug-in 804 in the process 801 or the process 802, the predicted load of the process 801 or the predicted load of the process 802. Determine the relationship between the predicted load of the process 801 or the predicted load of the process 802 and the load threshold of the process.
  • the plug-in 804 is scheduled into the process 801 .
  • the feature information includes the security level information of the plug-in and the associated plug-in information, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: the security level information indicates that the plug-in is safe.
  • the plugin In the case of a plugin, set the plugin to run in the same process as the associated plugin associated with the associated plugin information.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled using the plug-in associated plug-in information.
  • the process of scheduling the plug-in using the associated plug-in information of the plug-in will not be repeated.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in
  • the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the security level information and runtime length information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: the security level information indicates that the plug-in is safe.
  • the plug-ins obtain the running duration of each running plug-in in the process, and set the plug-in to be scheduled in a process whose running duration is similar to that of the plug-in to be scheduled.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled by using the running time information of the plug-in.
  • the process of scheduling the plug-in by using the running time information of the plug-in will not be described again.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the security level information and priority information of the plug-in
  • the plug-in is set in a process suitable for the feature information of the plug-in, including: the security level information indicates that the plug-in is safe.
  • the plug-ins obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in, the plug-in is scheduled using the priority information of the plug-in. The process of scheduling the plug-in using the priority information of the plug-in will not be described again.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes plug-in associated plug-in information and running duration information
  • the plug-in is set in a process suitable for the plug-in feature information according to the plug-in feature information, including: in the acquisition process, each running The running time of the plug-in is set in the process of running the relevant plug-in related to the associated plug-in information, and the running time of each plug-in in the process is similar to the running time of the plug-in to be scheduled.
  • the user when the user performs scheduling according to the associated plug-in and runtime information of the plug-in 804 .
  • the resources read by the plug-in 8011 or the plug-in 8021 and the plug-in 804 are the same, it means that the plug-in 8011 or the plug-in 8021 and the plug-in 804 are related plug-ins.
  • plug-in 804 Use the plugin's runtime information to schedule plugins. Obtains the running time of each plug-in of plug-in 8011, plug-in 8012, plug-in 8013, plug-in 8014, plug-in 8021, plug-in 8022, and plug-in 8023 in the process where the relevant plug-in is located. The relationship between the running time of the plug-in 804 and the running time of each plug-in is determined. When the difference between the running duration of the plug-in to be scheduled and the running duration of one of the above plug-ins does not exceed the preset threshold set by the system, the plug-in to be scheduled is scheduled to the process where the plug-in is located. When the difference between the running time of the plug-in 804 and the running time of the plug-in 8021 does not exceed the preset threshold, the plug-in 804 is scheduled to the process 802 where the plug-in 8021 is located.
  • the feature information includes associated plugin information and priority information of the plugin
  • the plugin is set in a process that is compatible with the feature information of the plugin, including: obtaining the priority and ongoing status of each plugin.
  • the priority of each running process, the plug-in with high priority is set in the corresponding process with high priority, and the process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information run in the same process.
  • the user performs scheduling according to the associated plug-in information and priority information of the plug-in 804 .
  • the plug-in 804 is relatively high, and the priorities of the process 801 and the process 802 set by the terminal device are both relatively high, the related information of the plug-in is further used to schedule the plug-in.
  • the plug-in 804 and the plug-in 8013 in the process 801 are mutually related plug-ins, the plug-in is scheduled to the process 801 .
  • the feature information includes the runtime length information and priority information of the plug-in
  • the plug-in is set in a process suitable for the feature information of the plug-in, including: obtaining the priority and the current status of each plug-in.
  • the plug-in with high priority is set in the corresponding process with high priority, and the process with high priority satisfies that the running duration of each plug-in in the process is similar to that of the plug-in to be scheduled.
  • the plug-in is scheduled to the process 801 or the process 802 with a higher priority set by the system.
  • the plug-in is scheduled using the information of the running time of the plug-in.
  • the relationship between the running time of the plug-in 804 and the running time of each plug-in is determined.
  • the plug-in to be scheduled is scheduled to the process where the plug-in is located.
  • the plug-in 804 is scheduled to the process 802 where the plug-in 8021 is located.
  • the feature information includes the security level information, load information and associated plugin information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: indicating in the security level information.
  • the plug-in is a secure plug-in
  • the predicted load of the process is calculated according to the load characteristics of the plug-in, and the plug-in is set in the process of running the relevant plug-in related to the associated plug-in information, and the predicted load of the process does not exceed the load threshold set by the terminal device.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled using the load information of the plug-in and the associated plug-in information.
  • the process of scheduling the plug-in by using the load information of the plug-in and the associated plug-in information will not be described again.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the security level information, load information and running time information of the plug-in
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: indicating in the security level information. If the plug-in is a secure plug-in, calculate the predicted load of the process that can be used to run the plug-in according to the load information of the plug-in, calculate the predicted running time of the process that can be used to run the plug-in according to the running time of the plug-in, and set the plug-in to the predicted load. The product of the predicted running time does not exceed the threshold set by the system in the process.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled by using the load information and running time information of the plug-in.
  • the process of scheduling the plug-in by using the load information and the running time information of the plug-in will not be repeated.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the security level information, load information and priority information of the plug-in
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: indicating in the security level information. If the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority, and the predicted load of the process does not exceed the terminal The load threshold set by the device.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in, the plug-in is scheduled using the load information and priority information of the plug-in. The process of scheduling the plug-in by using the load information and priority information of the plug-in will not be repeated.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the security level information of the plug-in, the associated plug-in information and the running duration information
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: in the security level information Indicates that when the plug-in is a secure plug-in, obtain the running time of each plug-in running in the process, set the plug-in in the process of running the relevant plug-in related to the associated plug-in information, and the running time of each plug-in in the process is related to the to-be-scheduled plug-in.
  • the runtime of the plugin is similar.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled by using the plug-in associated plug-in information and runtime information of the plug-in.
  • the process of scheduling the plug-in using the plug-in associated plug-in information and runtime information of the plug-in will not be repeated.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the security level information of the plug-in, associated plug-in information and priority information, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: in the security level information Indicates that when the plug-in is a secure plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority, which satisfies the relationship between the plug-in to be scheduled and the Related plugins related to plugin information run in the same process.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in, the plug-in is scheduled using its associated plug-in information and priority information. The process of scheduling a plug-in by using the plug-in associated plug-in information and priority information of the plug-in will not be repeated.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the security level information, runtime information and priority information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: in the security level information Indicates that when the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority, and the process with high priority satisfies
  • the running duration of each plugin in the process is similar to the running duration of the plugin to be scheduled.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled by using the running time information and priority information of the plug-in.
  • the process of scheduling the plug-in by using the running time information and the priority information of the plug-in will not be repeated.
  • the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
  • the feature information includes the load information of the plug-in, the associated plug-in information and the running time length information, and according to the feature information of the plug-in, the plug-in is set in a process that is suitable for the feature information of the plug-in, including: setting the plug-in to run.
  • the relevant plug-in related to the relevant plug-in information is located in the process, and the product of the predicted load of the process and the predicted running time does not exceed the threshold set by the system.
  • the process 801 and process 802 schedule plugins. Use the load information and runtime information of the plug-in to schedule plug-ins. The process of scheduling the plug-in by using the load information and the running time information of the plug-in will not be repeated.
  • the feature information includes load information, priority information and running duration information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: obtaining the priority of each plug-in. and the priority of each running process, set the plug-in with high priority in the corresponding process with high priority, and the product of the predicted load of the process with high priority and the predicted running time does not exceed the system setting the threshold value.
  • the plug-in 804 when the user performs scheduling according to the load information, priority information and running duration information of the plug-in 804 .
  • the plug-in 804 is scheduled to the process 801 or the process 802 with a higher priority set by the system.
  • the plug-in is scheduled by using the load information and running time information of the plug-in.
  • the process of scheduling the plug-in by using the load information and the running time information of the plug-in will not be repeated.
  • the feature information includes load information of the plug-in, associated plug-in information and priority information
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: obtaining the priority of each plug-in. Rank and the priority of each running process, set the plug-in with high priority in the corresponding process with high priority, this process satisfies that the plug-in to be scheduled and the related plug-in related to the related plug-in information are running in the same process, the process It is also satisfied that the predicted load of the process does not exceed the load threshold set by the terminal device.
  • the plug-in 804 When the priority of the plug-in 804 is high, and the priorities of the process 801, the process 802 and the process 803 set by the terminal device are all high, the plug-in is scheduled by using the related information of the plug-in.
  • the plug-in 804 and the plug-in 8013 in the process 801 and the plug-in 8023 in the process 802 are mutually related plug-ins, the plug-in can be scheduled into the process 801 or the process 802 .
  • the plug-in 804 is set in the process 801 or the process 802 , the predicted load of the process 801 or the predicted load of the process 802 is calculated. Determine the relationship between the predicted load of the process 801 or the predicted load of the process 802 and the load threshold of the process. When the predicted load of the process 801 does not exceed the load threshold, and the predicted load of the process 802 exceeds the load threshold, the plug-in 804 is scheduled into the process 801 .
  • the process 802 and the process 803 can simultaneously satisfy the load information, associated plug-in information and priority information of the plug-in, the abnormal situation scheduled by the plug-in 804 is sent to the terminal device.
  • the feature information includes associated plugin information, runtime information and priority information of the plugin
  • the plugin is set in a process that is compatible with the feature information of the plugin according to the feature information of the plugin, including: obtaining the information of each plugin.
  • the priority and the priority of each running process, the plug-in with high priority is set in the corresponding process with high priority, the process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information are running in the same process, and The process also satisfies that the running duration of each plug-in in the process is similar to the running duration of the plug-in to be scheduled.
  • the user when the user performs scheduling according to the associated plug-in information, runtime information and priority information of the plug-in 804 .
  • the resources read by the plug-in 8011, the plug-in 8021 or the plug-in 8031 and the plug-in 804 are the same, it indicates that the plug-in 804 and the plug-in 8011, the plug-in 8021, or the plug-in 8031 are related plug-ins.
  • each plug-in running time is obtained.
  • the relationship between the running time of the plug-in 804 and the running time of each plug-in is determined.
  • the to-be-scheduled plug-in will be scheduled. into the process in which the plugin resides.
  • the plug-in 804 is scheduled to the process 803 where the plug-in 8031 is located.
  • the feature information includes the security level information of the plug-in, load information, associated plug-in information and runtime length information
  • the plug-in is set in a process that is compatible with the plug-in's feature information according to the plug-in's feature information, including:
  • the security level information indicates that the plug-in is a secure plug-in
  • the plug-in is set in the process where the relevant plug-in related to the associated plug-in information is running, and the product of the predicted load of the process and the predicted running time does not exceed the threshold set by the system.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled by using the security level information, associated plug-in information and running time information of the plug-in. The process of scheduling the plug-in by using the associated plug-in information, the associated plug-in information and the running time information of the plug-in will not be repeated.
  • the feature information includes the security level information, load information, priority information and runtime length information of the plug-in
  • the plug-in is set in a process that is compatible with the feature information of the plug-in according to the feature information of the plug-in, including:
  • the security level information indicates that when the plug-in is a security plug-in, the priority of each plug-in and the priority of each running process are obtained, and the plug-in with high priority is set in the corresponding process with high priority, and the priority is high.
  • the product of the predicted load of the process and the predicted running time does not exceed the threshold set by the system.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the load information, priority information and running time information of the plug-in. The process of scheduling the plug-in by using the load information, priority information and running time information of the plug-in will not be described again.
  • the feature information includes the security level information of the plug-in, load information, associated plug-in information and priority information
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including:
  • the security level information indicates that when the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority.
  • the plug-in and related plug-ins related to the associated plug-in information run in the same process, and the process also satisfies that the predicted load of the process does not exceed the load threshold set by the terminal device.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the load information, associated plug-in information and priority information of the plug-in. The process of scheduling the plug-in by using the load information, associated plug-in information and priority information of the plug-in will not be described again.
  • the feature information includes the security level information of the plug-in, the associated plug-in information, the running duration information and the priority information
  • the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including:
  • the security level information indicates that the plug-in is a security plug-in
  • obtain the priority of each plug-in and the priority of each running process and set the plug-in with high priority in the corresponding process with high priority.
  • the scheduling plugin and related plugins related to the associated plugin information run in the same process, and the process also satisfies that the running duration of each plugin in the process is similar to the running duration of the plugin to be scheduled.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in, the plug-in is used to associate plug-in information, runtime information and priority information to schedule the plug-in. The process of scheduling the plug-in by using the associated plug-in information, running time information and priority information of the plug-in will not be repeated.
  • the feature information includes the load information of the plug-in, associated plug-in information, running time information and priority information
  • the plug-in is set in a process suitable for the plug-in feature information according to the plug-in feature information, including: obtaining: The priority of each plug-in and the priority of each running process, the plug-in with high priority is set in the corresponding process with high priority, and the process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information are running in the same process.
  • the process also satisfies that the running duration of each plugin in the process is similar to the running duration of the plugin to be scheduled.
  • the plug-in 804 When the priority of the plug-in 804 is high, and the priorities of the process 801, the process 802 and the process 803 set by the terminal device are all high, the plug-in is scheduled by using the related information of the plug-in.
  • the plug-in 804 and the plug-in 8013 in the process 801 and the plug-in 8023 in the process 802 are mutually related plug-ins, the plug-in can be scheduled into the process 801 or the process 802 .
  • the Scheduled plugins are scheduled into the process where the plugin resides.
  • the plug-in 804 is scheduled to the process 801 where the plug-in 8013 is located.
  • the feature information includes the security level information of the plug-in, load information, associated plug-in information, runtime information and priority information, and the plug-in is set in a process that is compatible with the plug-in's feature information according to the plug-in's feature information. , including: when the security level information indicates that the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority.
  • the process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information run in the same process, and the process also satisfies that the running time of each plug-in in the process is similar to that of the plug-in to be scheduled.
  • the plug-in type of the plug-in is determined according to the security level information of the plug-in 804 .
  • the plug-in 804 is a normal plug-in
  • the plug-in is scheduled using the load information, associated plug-in information, running time information and priority information of the plug-in. The process of scheduling the plug-in by using the load information, associated plug-in information, running time information and priority information of the plug-in will not be repeated.
  • plug-in scheduling is performed according to security level information, load information, associated plug-in information, running duration information, and priority information. According to different feature information of the plug-in, more reasonable scheduling can be performed on the plug-in.
  • S403 includes: using a machine learning model to determine the feature information of the plug-in; wherein, the machine learning model is obtained by training using process-related sample information.
  • the terminal device may be used to calculate the feature information of the plug-in, or the cloud device may be used to calculate the feature information of the plug-in.
  • the feature information of the plug-in is determined by using a machine learning model.
  • the process includes but is not limited to the following steps:
  • the sample information related to the process includes one or more of the following: process name, plug-in list, memory ratio, CPU usage of the central processing unit, or abnormal information.
  • the process name can be the identification symbol set by the terminal device to identify different processes
  • the plug-in list can be the name list of the plug-ins currently running by the process
  • the memory ratio can be the amount of the memory of the terminal device occupied by the process. Percentage
  • the CPU usage rate of the central processing unit can be the percentage of the CPU of the process in the terminal device
  • the exception information can indicate whether the process information is collected when the process is abnormal, and when the process information is collected when the process is abnormal, The value of the exception information is true. When the process information is not collected when the process is abnormal, the value of the exception information is false.
  • the acquired process-related sample information may be obtained by acquiring process-related information from one terminal device multiple times; or may be obtained by acquiring process-related information from multiple terminal devices. It can be understood that the manner of acquiring process-related sample information may vary according to actual scenarios, and the manner of acquiring process-related sample information is not limited in this embodiment of the present application.
  • the process-related sample information is input into the machine learning model, and the load information of the plug-in is output; the loss function is used to compare the gap between the predicted load information of the plug-in output by the model and the actual load information of the plug-in; If the difference between the predicted load information and the plug-in's actual load information does not satisfy the loss function, adjust the parameters of the model and continue training; until the difference between the output plug-in's predicted load information and the plug-in's actual load information satisfies the loss function, the model training ends , and get a machine learning model that can determine the load information of the plug-in.
  • S4033 Input the process-related information into the machine learning model, and output the feature information of the plug-in.
  • Terminal devices use process snapshots to obtain process-related information.
  • the process-related information includes: one or more of the following: process name, plug-in list, memory ratio, CPU usage of the central processing unit, or abnormal information.
  • the feature information of the plug-in can be output.
  • the load information of the plug-in can be the weight corresponding to the plug-in in the machine learning model.
  • the load information Value load of the plug-in can be expressed as:
  • w n is the weight corresponding to the plug-in in the machine learning model
  • w n represents the load information of the plug-in x n when it is running.
  • the embodiment of the present application does not limit the manner of determining the feature information of the plug-in.
  • a statistical method can also be used to obtain the feature information of the plug-in.
  • the security level information of the plug-in is obtained by using a statistical method.
  • the terminal device acquires the process-related information of the process, and uses the process-related information to calculate the security level information of the plug-in.
  • the security level information may include: a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability.
  • the process crash probability P xn caused by the plug-in can be:
  • PNum xn is the total number of times the plugin appears in the crash process
  • PNum tatal is the total number of process crashes.
  • the memory leak probability L xn caused by this plugin can be:
  • LNum xn is the total number of plug-ins in the memory leak process
  • LNum tatal is the ratio of the total number of process memory leaks
  • the probability calculated according to the process crash probability and the memory leak probability may be the weight of the process crash probability and the memory leak probability. It can be understood that, in the embodiments of the present application, the value of the weight in the weighting and the manner of acquiring the plug-in feature information are not limited.
  • the powerful learning and computing capabilities of the machine learning model can fully train the process-related samples, and the machine learning model can be used to obtain more accurate feature information.
  • FIG. 9 is a schematic flowchart of acquiring feature information according to an embodiment of the present application.
  • the second device for example, a cloud device
  • the method may include but is not limited to the following steps:
  • the second device acquires process-related information in the first device (for example, a terminal device).
  • the timing for the second device to acquire the process-related information in the first device may be: periodically acquiring process-related information of multiple devices from multiple devices; or, process-related information sent when the process is abnormal.
  • the second device calculates the feature information file according to the process-related information.
  • the feature information file includes feature information of a plurality of plug-ins, and the feature information of the plug-ins includes information that the plug-ins affect the running of the process.
  • the method for calculating the feature information file may be to use machine learning, statistical methods or other types of computing methods to calculate the feature information of the plug-in, and store the feature information of the plug-in in the feature information file. The method for calculating feature information by using a machine learning model or a statistical model will not be described again.
  • the second device sends the feature information file to the first device.
  • the first device acquires the feature information of the plug-in from the feature information file according to the identifier of the plug-in.
  • the plug-in's identifier can represent the characteristic information of the plug-in.
  • the feature information of the plug-in can be calculated in the second device, and the feature information file containing the feature information of the plug-in can be sent to the first device.
  • the first device may perform scheduling of the plug-in using the characteristic information of the plug-in in the characteristic information file of the plug-in. In this embodiment of the present application, the scheduling method of the plug-in is not described again.
  • the plug-in feature information may also be calculated from the first device. Due to the limited computing capability of the first device and the reason that the first device still needs to perform tasks such as plug-in scheduling, in order not to affect other services of the first device, The business of calculating the feature information of the plug-in can be performed by a second device with stronger computing power and a special purpose. Since the second device usually has powerful computing capabilities, the feature information of the plug-in is calculated by the second device, which can reduce the amount of computation of the first device and save the computing resources of the first device.
  • FIG. 10 provides a schematic frame diagram of a plug-in management system.
  • the plug-in management system consists of an external request generation module 1001 , a request processing module 1002 , a plug-in scheduling module 1003 , an operation management module 1004 , a return call result 1005 , a cloud platform 1006 and an intelligent management module 1007 .
  • the steps performed by the external request generation module 1001 can be implemented in the application layer in FIG. 2
  • the request processing module 1002 , the plug-in scheduling module 1003 , the operation management module 1004 , and the return call result 1005 can be implemented in the application framework layer.
  • the steps performed by the cloud platform 1006 and the intelligent management module 1007 can be implemented in the application framework layer.
  • the cloud platform 1006 may not be in the terminal device shown in FIG. 2 .
  • the external request generating module 1001 is configured to generate request information for requesting to run the micro-application based on user triggering.
  • the request processing module 1002 is configured to determine a specific plug-in that needs to be scheduled for the request information.
  • the plug-in scheduling module 1003 is used to manage the plug-in scheduling.
  • the plug-in scheduling module 1003 may include: process allocation 1031 and plug-in loading 1032.
  • the process allocation 1031 is used for allocating plug-ins to processes, and the plug-in loading 1032 loads and runs the plug-in.
  • the operation management module 1004 is used to manage the process.
  • the operation management module 1004 may include: operation monitoring 1041 and data reporting 1042, the operation monitoring 1041 can obtain the operation information of each process, and the data reporting 1042 can report the operation information to the cloud platform 1006.
  • the cloud platform 1006 can be used for the feature analysis of the plug-in in the process.
  • the cloud platform can use the feature analysis 1061 to perform the feature analysis of the plug-in, so as to obtain the feature file 1062.
  • the cloud platform 1006 can send the feature file 1062 to the intelligent management module 1007 and store it locally.
  • the terminal device can use the feature file to perform intelligent management 1007 of plug-ins, for example, identification of problem plug-ins 1072 and load balancing plug-in process allocation 1073 .
  • the intelligent management module 1007 can store the feature file 1062 locally, and can use the feature file 1062 to perform feature file management 1071 , problem identification 1072 and load balancing 1073 subsequently.
  • FIG. 11 shows a schematic diagram that the operation monitoring 1041 can obtain the operation information of each process, and the data reporting 1042 can report the operation information to the cloud platform 1006 .
  • the operation monitoring 1041 may include a process snapshot 1105 and an operation monitoring 1107.
  • the terminal device uses the process snapshot 1105 to collect the process snapshot information (or process-related information) of the framework process 1106 when it is running, and the operation monitoring 1107 collects the process
  • the snapshot information is encapsulated based on the data encapsulation 1108, and the process snapshot information is reported to the cloud platform based on the data reporting 1109.
  • the process snapshot can be expressed as:
  • PName is the name of the process
  • PluginList is the list of plug-in names currently running in the process
  • %MEN is the percentage of memory used by the process
  • %CPU is the percentage of CPU occupied by the process
  • Exception is the exception information. The value is true or false. When the process snapshot is collected when an exception occurs, the value is true.
  • the reporting time of the process snapshot, Time report can be:
  • Time report k ⁇ Time collect (k ⁇ N and k>1)
  • Time collect is the collection time of the process snapshot.
  • FIG. 12 shows a schematic diagram of the cloud platform obtaining a feature file by using process snapshot information.
  • the cloud platform obtains the process name, plug-in list, memory ratio and CPU usage obtained by the process snapshot 1201 , and the cloud platform uses the feature analysis 1202 to analyze the features of the plug-ins.
  • signature analysis 1202 may include load signature analysis 1221 and anomaly signature analysis 1222.
  • the load characteristic analysis 1221 can analyze the process snapshot information to obtain the load information of the plug-in.
  • Value load can satisfy the following formula.
  • the value load of the load information of the plug-in is related to the memory ratio and CPU usage of the terminal device.
  • the abnormal feature analysis 1222 can analyze the process snapshot information to obtain the security level information of the plug-in.
  • the plug-in's security level information Strategy can be expressed as:
  • no meansure means normal allocation without additional measures
  • safe mode means safe mode
  • forbidden mode means disabled mode.
  • the calculation process of the security level information is not repeated here.
  • the cloud platform can analyze the feature information of the plug-in to obtain a feature file 1203, and the terminal device can download the feature file 1203 from the cloud platform. Furthermore, the terminal device can use the feature file 1203 to perform plug-in scheduling.
  • the terminal device after receiving the external request 1301 , the terminal device performs plug-in identification 1302 according to the characteristic information file of the plug-in and adopts different problem handling strategies 1303 .
  • the plugin is set to run in a process suitable for the feature information of the plugin; for a risk plugin whose security level information is between a% and b%, Assign the plug-in to an independent process set by the system to run; for the abnormal plug-in whose security level information is greater than b%, disable the plug-in, and send the plug-in error report to the terminal.
  • load balancing 1402 can be implemented according to load information of the plug-in, for example, plug-in allocation 1403 based on plug-in allocation 1403 to allocate plug-ins in the adaptive process. Further, the terminal device can execute the update process load 1404 to obtain the latest process information and the like.
  • FIG. 15 shows a schematic structural diagram of a plug-in management apparatus provided by an embodiment of the present application.
  • the plug-in management apparatus may be a terminal device or a cloud device in the embodiment of the present application, or may be applied to a terminal device or The chip of the cloud device.
  • the plug-in management apparatus includes: a processing unit 151 and a communication unit 152 .
  • the communication unit 152 is used for supporting the plug-in management apparatus to perform the steps of sending or receiving information
  • the processing unit 151 is used for supporting the plug-in management apparatus to perform the steps of information processing.
  • the plug-in management apparatus may further include: a storage unit 153 .
  • the processing unit 151, the communication unit 152, and the storage unit 153 are connected through a communication bus.
  • the storage unit 153 may include one or more memories, and the memories may be devices in one or more devices or circuits for storing programs or data.
  • the storage unit 153 may exist independently, and is connected to the processing unit 151 of the plug-in management apparatus through a communication bus.
  • the storage unit 153 may also be integrated with the processing unit.
  • the plug-in management apparatus may be used in a communication device, circuit, hardware component or chip.
  • the communication unit 152 may be an input or output interface, a pin, a circuit, or the like.
  • the storage unit 153 may store computer execution instructions of the method on the side of the terminal device or the cloud device, so that the processing unit 151 executes the method on the side of the terminal device or the cloud device in the foregoing embodiments.
  • the storage unit 153 may be a register, a cache or a RAM, etc., and the storage unit 153 may be integrated with the processing unit 151 .
  • the storage unit 153 may be a ROM or other types of static storage devices that may store static information and instructions, and the storage unit 153 may be independent of the processing unit 151 .
  • An embodiment of the present application provides a plug-in management apparatus, and the plug-in management apparatus includes one or more modules for implementing the methods in the steps included in the foregoing FIG. 4 to FIG. 14 , and the one or more modules may be combined with the foregoing The steps of the method in the steps contained in FIGS. 4-14 correspond.
  • FIG. 16 is a schematic diagram of a hardware structure of a plug-in management apparatus provided by an embodiment of the present application.
  • the plug-in management apparatus includes a processor 161, a communication line 164 and at least one communication interface (the communication interface 163 is exemplified in FIG. 16 for illustration).
  • the processor 161 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more processors for controlling the execution of the programs of the present application. integrated circuit.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • Communication line 164 may include a path to communicate information between the aforementioned components.
  • the communication interface 163 using any transceiver-like device, is used to communicate with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), RAN, and the like.
  • devices or communication networks such as Ethernet, wireless local area networks (WLAN), RAN, and the like.
  • the plug-in management apparatus may further include a memory 162 .
  • the memory 162 may be read-only memory (ROM) or other type of static storage device that can store static information and instructions, random access memory (RAM) or other type of static storage device that can store information and instructions It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, CD-ROM storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being executed by a computer Access any other medium without limitation.
  • the memory may exist independently and be connected to the processor through communication line 164 .
  • the memory can also be integrated with the processor.
  • the memory 162 is used for storing computer-executed instructions for executing the solutions of the present application, and the execution is controlled by the processor 161 .
  • the processor 161 is configured to execute the computer-executed instructions stored in the memory 162, thereby implementing the plug-in management methods provided by the following embodiments of the present application.
  • the computer-executed instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
  • the processor 161 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 16 .
  • the plug-in management apparatus may include multiple processors, such as the processor 161 and the processor 165 in FIG. 16 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • FIG. 17 is a schematic structural diagram of a chip 170 provided by an embodiment of the present invention.
  • the chip 170 includes one or more (including two) processors 1710 and a communication interface 1730 .
  • the chip 170 shown in FIG. 17 further includes a memory 1740, which may include a read-only memory and a random access memory, and provides the processor 1710 with operation instructions and data.
  • a portion of memory 1740 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • memory 1740 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set of them:
  • the corresponding operation is performed by calling the operation instruction stored in the memory 1740 (the operation instruction may be stored in the operating system).
  • a possible implementation manner is: the structure of the chips used by the terminal device or the cloud device is similar, and different devices may use different chips to realize their respective functions.
  • the processor 1710 controls the operation of the terminal device or the cloud device, and the processor 1710 may also be referred to as a central processing unit (central processing unit, CPU).
  • Memory 1740 may include read-only memory and random access memory, and provides instructions and data to processor 1710 .
  • a portion of memory 1740 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 1740, the communication interface 1730, and the memory 1740 are coupled together through the bus system 1720, wherein the bus system 1720 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus.
  • the various buses are labeled as bus system 1720 in FIG. 17 .
  • the above communication unit may be an interface circuit or a communication interface of the device for receiving signals from other devices.
  • the communication unit is an interface circuit or a communication interface used by the chip to receive or transmit signals from other chips or devices.
  • the methods disclosed in the above embodiments of the present invention may be applied to the processor 1710 or implemented by the processor 1710 .
  • the processor 1710 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method may be completed by an integrated logic circuit of hardware in the processor 1710 or an instruction in the form of software.
  • the above-mentioned processor 1710 may be a general-purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or Other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory 1740, and the processor 1710 reads the information in the memory 1740, and completes the steps of the above method in combination with its hardware.
  • the communication interface 1730 is used to perform the steps of receiving and sending the terminal device or the cloud device in the embodiments shown in FIGS. 4-14 .
  • the processor 1710 is configured to execute the processing steps of the terminal device or the cloud device in the embodiments shown in FIGS. 4-14 .
  • the instructions stored by the memory for execution by the processor may be implemented in the form of a computer program product.
  • the computer program product can be pre-written in the memory, or downloaded and installed in the memory in the form of software.
  • a computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored on or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g. coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) means to transmit to another website site, computer, server or data center.
  • a wire e.g. coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless e.g infrared, wireless, microwave, etc.
  • the computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated.
  • Useful media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, digital versatile disc (DVD)), or semiconductor media (eg, solid state disk (SSD)), etc. .
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
  • Computer-readable media can include both computer storage media and communication media and also include any medium that can transfer a computer program from one place to another.
  • the storage medium can be any target medium that can be accessed by a computer.
  • the computer readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry or in an instruction or data structure
  • the required program code is stored in the form and can be accessed by the computer.
  • any connection is properly termed a computer-readable medium.
  • coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave
  • coaxial cable, fiber optic cable , twisted pair, DSL or wireless technologies such as infrared, radio and microwave
  • Disk and disc includes compact disc (CD), laser disc, optical disc, DVD, floppy disk, and blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
  • the embodiments of the present application also provide a computer program product.
  • the methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware or any combination thereof. If implemented in software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the above-mentioned method embodiments are generated.
  • the aforementioned computer may be a general purpose computer, a special purpose computer, a computer network, a base station, a terminal, or other programmable devices.

Abstract

A plug-in management method, system and apparatus, which relate to the technical field of terminals. The method comprises: receiving request information for requesting to run a micro application (S401); determining a plug-in corresponding to the request information (S402); acquiring feature information of the plug-in (S403); and scheduling the plug-in according to the feature information (S404). In the means for scheduling a plug-in, the impact of a plug-in on process running is considered and the plug-in can be reasonably scheduled, and thus load balancing during process running is further implemented, such that a micro application framework can smoothly run, improving user experience.

Description

插件管理方法、系统及装置Plug-in management method, system and device
本申请要求于2020年11月11日提交中国国家知识产权局、申请号为202011255737.X、申请名称为“插件管理方法、系统及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011255737.X and the application name "plug-in management method, system and device" filed with the State Intellectual Property Office of China on November 11, 2020, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种插件管理方法、系统及装置。The present application relates to the field of terminal technologies, and in particular, to a plug-in management method, system, and device.
背景技术Background technique
随着智能手机使用的普及,手机应用(application,APP)的数量也呈现出爆炸性增长的趋势。手机界面和存储空间逐渐被越来越多的APP所占满,在此背景下微应用脱颖而出。微应用是指高度聚焦于一种功能的小型应用,具有获取服务便捷、无需安装卸载和即用即走的特点,微应用以其轻便和易用的优势成为手机应用发展的一种新模式。微应用采用插件化框架,将功能以插件化的形式加载起来,有利于功能模块间的解耦、更新和扩展。基于微应用插件化框架的优势,一些复杂应用和超级应用也普遍采用微应用插件化框架,将多个微应用以插件化的形式运行起来,为用户提供多功能化的服务。With the popularization of the use of smart phones, the number of mobile phone applications (applications, APPs) also shows an explosive growth trend. The mobile phone interface and storage space are gradually being occupied by more and more APPs. In this context, micro-apps stand out. Micro application refers to a small application that is highly focused on one function. It has the characteristics of easy access to services, no need to install and uninstall, and it can be used immediately. Micro application has become a new mode of mobile application development due to its advantages of lightness and ease of use. Micro-applications use a plug-in framework to load functions in a plug-in form, which is conducive to the decoupling, updating and expansion of functional modules. Based on the advantages of the micro-application plug-in framework, some complex applications and super-applications also generally use the micro-application plug-in framework to run multiple micro-applications in a plug-in form to provide users with multi-functional services.
在现有技术中,插件化框架在为微应用插件分配进程时,可以按照插件的个数进行调度,通常情况下为了平衡进程内的插件数量,会将插件调度到当前插件数量较少的进程中。In the prior art, when allocating processes to micro-application plug-ins, the plug-in framework can schedule the plug-ins according to the number of plug-ins. Usually, in order to balance the number of plug-ins in the process, the plug-ins are scheduled to the process with a smaller number of current plug-ins. middle.
然而,上述插件的调度方法,容易出现进程运行时耗能过快或响应缓慢等现象,影响用户的体验。However, the above-mentioned scheduling method of the plug-in is prone to phenomena such as excessively fast energy consumption or slow response when the process is running, which affects the user's experience.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种插件管理方法、系统及装置,接收到请求运行微应用的请求信息后,确定请求信息对应的插件,获取插件中对进程运行产生影响的特征信息,根据插件的特征信息就能够将插件调度到进程中,这种微应用中插件的调度方式因为考虑了插件对进程运行产生的影响,可以对插件进行合理的调度,进而实现进程运行时的负载平衡,使微应用框架能够平稳运行,提升用户的体验感。The embodiments of the present application provide a plug-in management method, system and device. After receiving request information for requesting to run a micro-application, the plug-in corresponding to the request information is determined, the characteristic information of the plug-in that affects the process operation is obtained, and the characteristic information of the plug-in is obtained according to the characteristic information of the plug-in. The plug-in can be scheduled into the process. The plug-in scheduling method in this micro-application considers the impact of the plug-in on the process operation, and the plug-in can be reasonably scheduled to achieve load balance when the process is running, so that the micro-application framework It can run smoothly and improve the user experience.
本申请实施例中,第一设备包括终端设备;第二设备包括云端设备。In this embodiment of the present application, the first device includes a terminal device; the second device includes a cloud device.
第一方面,本申请实施例提供一种插件管理方法,包括:接收用于请求运行微应用的请求信息;确定请求信息对应的插件;其中,插件用于实现微应用的部分或全部功能;获取插件的特征信息;其中,特征信息包括插件对进程运行产生影响的信息;根据特征信息调度插件。这样,由于考虑了插件对进程运行产生的影响,可以对插件进行合理的调度,进而实现进程运行时的负载平衡,使微应用框架能够平稳运行,提升用户的体验感。In a first aspect, an embodiment of the present application provides a plug-in management method, including: receiving request information for requesting to run a micro-application; determining a plug-in corresponding to the request information; wherein the plug-in is used to implement part or all of the functions of the micro-application; obtaining The feature information of the plug-in; wherein, the feature information includes the information that the plug-in affects the running of the process; the plug-in is scheduled according to the feature information. In this way, since the impact of the plug-in on the process operation is considered, the plug-in can be reasonably scheduled, so as to achieve load balancing when the process is running, so that the micro-application framework can run smoothly and improve the user's experience.
在一种可能的实现方式中,特征信息包括下述的一种或多种:负载信息、安全等级信息、关联插件信息、运行时长信息或插件优先级信息。这样,就可以根据插件的不同的特征信息对插件执行更加合理的调度。In a possible implementation manner, the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information. In this way, more reasonable scheduling of the plug-in can be performed according to different characteristic information of the plug-in.
在一种可能的实现方式中,将插件设置在与插件的特征信息相适应的进程中;或者,根据特征信息禁用插件。这样,就可以根据插件的不同的特征信息,选择禁用一些不安全或不合适的插件,提升进程运行的安全性插件。In a possible implementation manner, the plug-in is set in a process adapted to the characteristic information of the plug-in; or, the plug-in is disabled according to the characteristic information. In this way, you can choose to disable some unsafe or inappropriate plug-ins according to different characteristic information of the plug-ins, so as to improve the security plug-ins of process running.
在一种可能的实现方式中,特征信息包括负载信息,根据负载信息计算可用于运行插件的第一进程的预测负载;第一进程的预测负载为将插件设置在第一进程时,第一进程的总负载;第一进程的数量为多个;将插件设置在第一目标进程中;第一目标进程为第一进程中,预测负载不超过第一负载阈值的进程。这样,在进程调度中,可以预测将插件调度到第一进程时,第一进程是否超过负载阈值,将插件设置在预测负载不超过负载阈值第一目标进程中,就可以避免调度后第一进程中出现超出负载阈值的情况,实现进程运行时的负载均衡。In a possible implementation manner, the characteristic information includes load information, and the predicted load of the first process that can be used to run the plug-in is calculated according to the load information; the predicted load of the first process is that when the plug-in is set in the first process, the first process The total load of the first process is multiple; the plug-in is set in the first target process; the first target process is the process of the first process whose predicted load does not exceed the first load threshold. In this way, in process scheduling, it is possible to predict whether the first process exceeds the load threshold when the plug-in is scheduled to the first process. By setting the plug-in in the first target process whose predicted load does not exceed the load threshold, the first process after scheduling can be avoided. When the load threshold is exceeded in the process, load balancing is realized when the process is running.
在一种可能的实现方式中,特征信息包括安全等级信息,在安全等级信息表示插件为安全插件的情况下,将插件分配在可用于运行插件的进程中;或者,在安全等级信息表示插件为风险插件的情况下,将插件分配在独立的进程中;或者,在安全等级信息表示插件为异常插件的情况下,禁用插件。这样,就能够根据不同安全等级的插件对插件执行更加合适的调度策略,例如将风险插件分配在独立的进程中或者禁用异常插件等,提升进程运行的安全性。其中,运行风险插件的独立的进程可以是预设的专门用于运行风险插件的进程。In a possible implementation manner, the feature information includes security level information, and when the security level information indicates that the plug-in is a security plug-in, the plug-in is allocated in a process that can be used to run the plug-in; or, when the security level information indicates that the plug-in is In the case of a risky plug-in, the plug-in is allocated in an independent process; or, when the security level information indicates that the plug-in is an abnormal plug-in, the plug-in is disabled. In this way, a more appropriate scheduling policy can be implemented for the plug-ins according to plug-ins of different security levels, such as allocating risk plug-ins to independent processes or disabling abnormal plug-ins, etc., so as to improve the security of process operation. The independent process for running the risk plug-in may be a preset process dedicated to running the risk plug-in.
可以理解的是,独立的进程可以是与非独立的进程向对应的概念,例如,独立的进程专门用于运行风险插件,非独立的进程可以用于运行多种类型的插件。本申请实施例的独立的进程是用于表示进程的作用,并不构成对进程名称等的限定。It can be understood that the independent process may be a concept corresponding to the dependent process. For example, the independent process is dedicated to running risk plug-ins, and the dependent process may be used to run multiple types of plug-ins. The independent process in the embodiments of the present application is used to represent the role of the process, and does not constitute a limitation on the process name or the like.
在一种可能的实现方式中,安全等级信息包括插件引发的进程崩溃概率、插件引发的内存泄露概率、或根据进程崩溃概率和内存泄露概率计算得到的概率;在安全等级信息小于第一值时,表示插件为安全插件;在安全等级信息大于或等于第一值,且小于或等于第二值时,表示插件为风险插件;在安全等级信息大于第二值时,表示插件为异常插件。In a possible implementation manner, the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability; when the security level information is less than the first value , indicating that the plug-in is a safe plug-in; when the security level information is greater than or equal to the first value and less than or equal to the second value, it means that the plug-in is a risky plug-in; when the security level information is greater than the second value, it means that the plug-in is an abnormal plug-in.
可以理解的是,该实现方式中,是以安全等级信息的值越小越安全为例进行说明的,另一种可能的实现方式中,可以以安全等级信息的值越大越安全为例进行说明,例如,在安全等级信息大于第一值时,表示插件为异常插件;在安全等级信息小于或等于第一值,且大于或等于第二值时,表示插件为风险插件;在安全等级信息小于第二值时,表示插件为安全插件。本申请实施例对插件类型的判定不作具体限定。It can be understood that, in this implementation manner, the smaller the value of the security level information is, the safer it is for illustration, and in another possible implementation manner, the larger the value of the security level information, the more secure it is for illustration. , for example, when the security level information is greater than the first value, it means that the plug-in is an abnormal plug-in; when the security level information is less than or equal to the first value and greater than or equal to the second value, it means that the plug-in is a risk plug-in; when the security level information is less than or equal to the second value The second value indicates that the plug-in is a secure plug-in. The embodiment of the present application does not specifically limit the determination of the plug-in type.
需要说明的是,在上述步骤的关于“表示插件为安全插件”、“表示插件为风险插件”和“表示插件为异常插件”等的静态描述,是为了清晰地区分插件的类型,便于理解方案,并不构成对步骤的限定。例如,具体代码实现中,代码执行逻辑可以是根据安全等级信息的具体数值与第一值和第二值的比较的结果,执行插件的分配或禁用操作,没有“表示插件为安全插件”、“表示插件为风险插件”和“表示插件为异常插件”等的步骤。It should be noted that in the above steps, the static descriptions of "indicates that the plug-in is a safe plug-in", "indicates that the plug-in is a risk plug-in", and "indicates that the plug-in is an abnormal plug-in" are for the purpose of clearly distinguishing the types of plug-ins and facilitating the understanding of the solution. , and does not constitute a limitation on the steps. For example, in the specific code implementation, the code execution logic may be based on the result of comparing the specific value of the security level information with the first value and the second value to perform the assignment or disabling operation of the plug-in, without "indicating that the plug-in is a security plug-in", " Steps such as "Indicates that the plugin is a risky plugin" and "Indicates that the plugin is an abnormal plugin".
在一种可能的实现方式中,特征信息还包括负载信息,在安全等级信息表示插件为安全插件的情况下,根据安全插件的负载信息计算可用于运行安全插件的第二进程的预测负载;第二进程的预测负载为将安全插件设置在第二进程时,第二进程的总负载;第二进程的数量为多个;将安全插件设置在第二目标进程中,第二目标进程为第二进程中,预测负载不超过第二负载阈值的进程。这样,就可以既禁用异常插件,又能对正常插件进行合理 调度,防止异常插件影响当前进程内的其他插件的正常运行,实现进程运行时的负载平衡。In a possible implementation manner, the characteristic information further includes load information, and when the security level information indicates that the plug-in is a secure plug-in, the predicted load that can be used to run the second process of the security plug-in is calculated according to the load information of the security plug-in; The predicted load of the second process is the total load of the second process when the security plug-in is set in the second process; the number of the second process is multiple; the security plug-in is set in the second target process, and the second target process is the second process. In the process, the predicted load does not exceed the second load threshold of the process. In this way, abnormal plug-ins can be disabled, and normal plug-ins can be reasonably scheduled, so as to prevent abnormal plug-ins from affecting the normal operation of other plug-ins in the current process, and realize load balance when the process is running.
在一种可能的实现方式中,特征信息包括关联插件信息,将插件设置在第三进程中,第三进程为运行与关联插件信息相关的相关插件的进程。这样,将关联插件设置在同一进程中,在运行该进程时,就可以同时运行多个关联插件,由于关联插件间读取的资源是相同的,就可以减少执行多次读取相同资源操作的耗能,进而减少进程运行的耗能情况。In a possible implementation manner, the feature information includes associated plug-in information, the plug-in is set in a third process, and the third process is a process that runs a relevant plug-in related to the associated plug-in information. In this way, if the associated plug-ins are set in the same process, when the process is running, multiple associated plug-ins can be run at the same time. Since the resources read between the associated plug-ins are the same, the operation of reading the same resource multiple times can be reduced. Energy consumption, thereby reducing the energy consumption of the process running.
在一种可能的实现方式中,相关插件包括:与插件读取的资源相同的插件。In a possible implementation manner, the related plug-ins include: the same plug-ins as the resources read by the plug-ins.
在一种可能的实现方式中,接收来自第二设备的特征信息文件;特征信息文件中包括第二设备计算的多个插件的特征信息;根据插件的标识,从特征信息文件中获取插件的特征信息。这样,由于第一设备的计算能力有限以及第一设备还需要执行插件的调度等任务的原因,为不影响第一设备的其他业务,可以将计算插件特征信息的业务交由计算能力更强且专用的第二设备去执行。由于第二设备通常具有强大的计算能力,因此第二设备计算插件的特征信息,可以减少第一设备的计算量,节约第一设备的计算资源。In a possible implementation manner, a feature information file from the second device is received; the feature information file includes feature information of multiple plug-ins calculated by the second device; and the features of the plug-in are obtained from the feature information file according to the plug-in identifier information. In this way, due to the limited computing power of the first device and the reason that the first device also needs to perform tasks such as plug-in scheduling, in order not to affect other services of the first device, the service of computing the plug-in feature information can be handed over to a company with a stronger computing power. Dedicated second equipment to perform. Since the second device usually has powerful computing capabilities, the second device calculates the feature information of the plug-in, which can reduce the amount of computation of the first device and save the computing resources of the first device.
在一种可能的实现方式中,还包括:向第二设备发送第一设备中的进程相关信息,进程相关信息用于计算特征信息文件。这样,第二设备就可以更加便捷的利用进程相关信息计算特征信息文件。In a possible implementation manner, the method further includes: sending process-related information in the first device to the second device, where the process-related information is used to calculate the feature information file. In this way, the second device can use the process-related information to calculate the feature information file more conveniently.
在一种可能的实现方式中,进程相关信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。In a possible implementation manner, the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
在一种可能的实现方式中,利用机器学习模型确定特征信息;其中,机器学习模型是利用进程相关样本信息训练得到。这样,由于机器学习模型强大的学习和计算能力,能够对进程相关样本信息进行充分训练,就能够利用机器学习模型获得更加准确的特征信息。In a possible implementation manner, the feature information is determined by using a machine learning model; wherein, the machine learning model is obtained by training using process-related sample information. In this way, due to the powerful learning and computing capabilities of the machine learning model, the process-related sample information can be fully trained, and the machine learning model can be used to obtain more accurate feature information.
在一种可能的实现方式中,进程相关样本信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。In a possible implementation manner, the process-related sample information includes one or more of the following: process name, plug-in list, memory ratio, CPU usage rate of the central processing unit, or exception information.
第二方面,本申请实施例提供一种插件管理方法,获取进程相关信息;根据进程相关信息计算特征信息文件,特征信息文件中包括多个插件的特征信息,插件的特征信息包括插件对进程运行产生影响的信息;向第一设备发送特征信息文件。这样,由于考虑了插件对进程运行产生的影响,可以对插件进行合理的调度,进而实现进程运行时的负载平衡,使微应用框架能够平稳运行,提升用户的体验感。In a second aspect, an embodiment of the present application provides a plug-in management method, which acquires process-related information; calculates a feature information file according to the process-related information, the feature information file includes feature information of multiple plug-ins, and the feature information of the plug-in includes the process running by the plug-in. Affecting information; sending a feature information file to the first device. In this way, since the impact of the plug-in on the process operation is considered, the plug-in can be reasonably scheduled, so as to achieve load balancing when the process is running, so that the micro-application framework can run smoothly and improve the user's experience.
在一种可能的实现方式中,特征信息包括下述的一种或多种:负载信息、安全等级信息、关联插件信息、运行时长信息或插件优先级信息。这样,就可以根据不同的特征信息对插件执行更加合理的调度。In a possible implementation manner, the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information. In this way, more reasonable scheduling of plug-ins can be performed according to different characteristic information.
在一种可能的实现方式中,安全等级信息包括插件引发的进程崩溃概率、插件引发的内存泄露概率、或根据进程崩溃概率和内存泄露概率计算得到的概率。这样,就可以获得更为准确的插件的安全等级信息。In a possible implementation manner, the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability. In this way, more accurate security level information of the plug-in can be obtained.
在一种可能的实现方式中,进程相关信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。In a possible implementation manner, the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
在一种可能的实现方式中,根据进程相关信息训练机器学习模型;利用机器学习模型输出特征信息文件。这样,就能够利用机器学习模型获得更加准确的特征信息。In a possible implementation manner, the machine learning model is trained according to the process-related information; the feature information file is output by using the machine learning model. In this way, the machine learning model can be used to obtain more accurate feature information.
在一种可能的实现方式中,定时从多个设备获取多个设备的进程相关信息;或者,获 取多个设备在进程异常时发送的进程相关信息。这样,根据更多的进程相关信息就能够得到更加准确的特征信息。In a possible implementation manner, the process-related information of the multiple devices is obtained from the multiple devices periodically; or, the process-related information sent by the multiple devices when the process is abnormal is obtained. In this way, more accurate feature information can be obtained based on more process-related information.
第三方面,本申请实施例提供一种插件管理装置,该插件管理装置可以是终端设备,也可以是终端设备内的芯片或者芯片系统。该插件管理装置可以包括处理单元和通信单元。当该插件管理装置是终端设备时,该处理单元可以是处理器,该通信单元可以是通信接口或接口电路。该插件管理装置还可以包括存储单元,该存储单元可以是存储器。该存储单元用于存储指令,该处理单元执行该存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种插件管理方法。当该插件管理装置是终端设备内的芯片或者芯片系统时,该处理单元可以是处理器,该通信单元可以是通信接口。例如通信接口可以为输入/输出接口、管脚或电路等。该处理单元执行存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种插件管理方法。该存储单元可以是该芯片内的存储单元(例如,寄存器、缓存等),也可以是该终端设备内的位于该芯片外部的存储单元(例如,只读存储器、随机存取存储器等)。In a third aspect, an embodiment of the present application provides a plug-in management apparatus, where the plug-in management apparatus may be a terminal device, or may be a chip or a chip system in the terminal device. The plug-in management apparatus may include a processing unit and a communication unit. When the plug-in management apparatus is a terminal device, the processing unit may be a processor, and the communication unit may be a communication interface or an interface circuit. The plug-in management apparatus may further include a storage unit, which may be a memory. The storage unit is used for storing instructions, and the processing unit executes the instructions stored in the storage unit, so that the terminal device implements the plug-in management method described in the first aspect or any possible implementation manner of the first aspect. When the plug-in management apparatus is a chip or a chip system in the terminal device, the processing unit may be a processor, and the communication unit may be a communication interface. For example, the communication interface may be an input/output interface, a pin or a circuit, or the like. The processing unit executes the instructions stored in the storage unit, so that the terminal device implements the plug-in management method described in the first aspect or any possible implementation manner of the first aspect. The storage unit may be a storage unit (eg, a register, a cache, etc.) in the chip, or a storage unit (eg, a read-only memory, a random access memory, etc.) located outside the chip in the terminal device.
示例性的,处理单元,用于接收用于请求运行微应用的请求信息;处理单元,用于确定请求信息对应的插件;其中,插件用于实现微应用的部分或全部功能;处理单元,用于获取插件的特征信息;其中,特征信息包括插件对进程运行产生影响的信息;处理单元,用于根据特征信息调度插件。Exemplarily, the processing unit is used to receive request information for requesting to run the micro-application; the processing unit is used to determine the plug-in corresponding to the request information; wherein, the plug-in is used to implement part or all of the functions of the micro-application; for acquiring the feature information of the plug-in; wherein, the feature information includes the information that the plug-in affects the running of the process; the processing unit is used for scheduling the plug-in according to the feature information.
在一种可能的实现方式中,特征信息包括下述的一种或多种:负载信息、安全等级信息、关联插件信息、运行时长信息或插件优先级信息。In a possible implementation manner, the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information.
在一种可能的实现方式中,处理单元,具体用于将插件设置在与插件的特征信息相适应的进程中;或者,根据特征信息禁用插件。In a possible implementation manner, the processing unit is specifically configured to set the plug-in in a process adapted to the characteristic information of the plug-in; or, disable the plug-in according to the characteristic information.
在一种可能的实现方式中,特征信息包括负载信息,处理单元,具体用于根据负载信息计算可用于运行插件的第一进程的预测负载;第一进程的预测负载为将插件设置在第一进程时,第一进程的总负载;第一进程的数量为多个;处理单元,具体用于将插件设置在第一目标进程中;第一目标进程为第一进程中,预测负载不超过第一负载阈值的进程。In a possible implementation manner, the characteristic information includes load information, and the processing unit is specifically configured to calculate the predicted load of the first process that can be used to run the plug-in according to the load information; the predicted load of the first process is to set the plug-in in the first process, the total load of the first process; the number of the first process is multiple; the processing unit is specifically used to set the plug-in in the first target process; the first target process is the first process, and the predicted load does not exceed the first target process. A load threshold process.
在一种可能的实现方式中,特征信息包括安全等级信息,在安全等级信息表示插件为安全插件的情况下,处理单元,具体用于将插件分配在可用于运行插件的进程中;或者,在安全等级信息表示插件为风险插件的情况下,处理单元,具体用于将插件分配在独立的进程中;或者,在安全等级信息表示插件为异常插件的情况下,处理单元,具体用于禁用插件。In a possible implementation manner, the feature information includes security level information, and when the security level information indicates that the plug-in is a security plug-in, the processing unit is specifically configured to allocate the plug-in to a process that can be used to run the plug-in; When the security level information indicates that the plug-in is a risk plug-in, the processing unit is specifically used to allocate the plug-in to an independent process; or, in the case where the security level information indicates that the plug-in is an abnormal plug-in, the processing unit is specifically used to disable the plug-in .
在一种可能的实现方式中,安全等级信息包括插件引发的进程崩溃概率、插件引发的内存泄露概率、或根据进程崩溃概率和内存泄露概率计算得到的概率;在安全等级信息小于第一值时,表示插件为安全插件;在安全等级信息大于或等于第一值,且小于或等于第二值时,表示插件为风险插件;在安全等级信息大于第二值时,表示插件为异常插件。In a possible implementation manner, the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability; when the security level information is less than the first value , indicating that the plug-in is a safe plug-in; when the security level information is greater than or equal to the first value and less than or equal to the second value, it means that the plug-in is a risky plug-in; when the security level information is greater than the second value, it means that the plug-in is an abnormal plug-in.
在一种可能的实现方式中,特征信息还包括负载信息,在安全等级信息表示插件为安全插件的情况下,处理单元,具体用于根据安全插件的负载信息计算可用于运行安全插件的第二进程的预测负载;第二进程的预测负载为将安全插件设置在第二进程时,第二进程的总负载;第二进程的数量为多个;处理单元,具体用于将安全插件设置在第二目标进程 中,第二目标进程为第二进程中,预测负载不超过第二负载阈值的进程。In a possible implementation manner, the feature information further includes load information, and in the case that the security level information indicates that the plug-in is a security plug-in, the processing unit is specifically configured to calculate the second data that can be used to run the security plug-in according to the load information of the security plug-in. The predicted load of the process; the predicted load of the second process is the total load of the second process when the security plug-in is set in the second process; the number of the second process is multiple; the processing unit is specifically used to set the security plug-in in the second process. Among the two target processes, the second target process is a process in the second process whose predicted load does not exceed the second load threshold.
在一种可能的实现方式中,特征信息包括关联插件信息,处理单元,具体用于将插件设置在第三进程中,第三进程为运行与关联插件信息相关的相关插件的进程。In a possible implementation manner, the feature information includes associated plug-in information, and the processing unit is specifically configured to set the plug-in in a third process, where the third process is a process that runs a relevant plug-in related to the associated plug-in information.
在一种可能的实现方式中,相关插件包括:与插件读取的资源相同的插件。In a possible implementation manner, the related plug-ins include: the same plug-ins as the resources read by the plug-ins.
在一种可能的实现方式中,通信单元,具体用于接收来自第二设备的特征信息文件;特征信息文件中包括第二设备计算的多个插件的特征信息;处理单元,具体用于根据插件的标识,从特征信息文件中获取插件的特征信息。In a possible implementation manner, the communication unit is specifically configured to receive a feature information file from the second device; the feature information file includes feature information of multiple plug-ins calculated by the second device; the processing unit is specifically configured to to obtain the feature information of the plug-in from the feature information file.
在一种可能的实现方式中,还包括:通信单元,具体用于向第二设备发送第一设备中的进程相关信息,进程相关信息用于计算特征信息文件。In a possible implementation manner, the method further includes: a communication unit, specifically configured to send the process-related information in the first device to the second device, where the process-related information is used to calculate the feature information file.
在一种可能的实现方式中,进程相关信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。In a possible implementation manner, the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
在一种可能的实现方式中,处理单元,具体用于利用机器学习模型确定特征信息;其中,机器学习模型是利用进程相关样本信息训练得到。In a possible implementation manner, the processing unit is specifically configured to use a machine learning model to determine feature information; wherein, the machine learning model is obtained by training with process-related sample information.
在一种可能的实现方式中,进程相关样本信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。In a possible implementation manner, the process-related sample information includes one or more of the following: process name, plug-in list, memory ratio, CPU usage rate of the central processing unit, or exception information.
第四方面,本申请实施例提供一种插件管理装置。该插件管理装置可以是云端设备,也可以是云端设备内的芯片或者芯片系统。该插件管理装置可以包括处理单元和通信单元。当该插件管理装置是云端设备时,该处理单元可以是处理器,该通信单元可以是通信接口或接口电路。该插件管理装置还可以包括存储单元,该存储单元可以是存储器。该存储单元用于存储指令,该处理单元执行该存储单元所存储的指令,以使该云端设备实现第二方面或第二方面的任意一种可能的实现方式中描述的一种插件管理方法。当该插件管理装置是云端设备内的芯片或者芯片系统时,该处理单元可以是处理器,该通信单元可以是通信接口。例如通信接口可以为输入/输出接口、管脚或电路等。该处理单元执行存储单元所存储的指令,以使该云端设备实现第二方面或第二方面的任意一种可能的实现方式中描述的一种插件管理方法。该存储单元可以是该芯片内的存储单元(例如,寄存器、缓存等),也可以是该云端设备内的位于该芯片外部的存储单元(例如,只读存储器、随机存取存储器等)。In a fourth aspect, an embodiment of the present application provides a plug-in management apparatus. The plug-in management apparatus may be a cloud device, or may be a chip or a chip system in the cloud device. The plug-in management apparatus may include a processing unit and a communication unit. When the plug-in management apparatus is a cloud device, the processing unit may be a processor, and the communication unit may be a communication interface or an interface circuit. The plug-in management apparatus may further include a storage unit, which may be a memory. The storage unit is used for storing instructions, and the processing unit executes the instructions stored in the storage unit, so that the cloud device implements the plug-in management method described in the second aspect or any possible implementation manner of the second aspect. When the plug-in management apparatus is a chip or a chip system in the cloud device, the processing unit may be a processor, and the communication unit may be a communication interface. For example, the communication interface may be an input/output interface, a pin or a circuit, or the like. The processing unit executes the instructions stored in the storage unit, so that the cloud device implements the plug-in management method described in the second aspect or any possible implementation manner of the second aspect. The storage unit may be a storage unit (eg, a register, a cache, etc.) in the chip, or a storage unit (eg, a read-only memory, a random access memory, etc.) located outside the chip in the cloud device.
示例性的,处理单元,用于获取进程相关信息;处理单元,用于根据进程相关信息计算特征信息文件,特征信息文件中包括多个插件的特征信息,插件的特征信息包括插件对进程运行产生影响的信息;通信单元,用于向第一设备发送特征信息文件。Exemplarily, the processing unit is used to obtain process-related information; the processing unit is used to calculate a feature information file according to the process-related information, the feature information file includes the feature information of multiple plug-ins, and the feature information of the plug-in includes the plug-in generated by the process running. Affected information; a communication unit for sending a feature information file to the first device.
在一种可能的实现方式中,特征信息包括下述的一种或多种:负载信息、安全等级信息、关联插件信息、运行时长信息或插件优先级信息。In a possible implementation manner, the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information.
在一种可能的实现方式中,安全等级信息包括插件引发的进程崩溃概率、插件引发的内存泄露概率、或根据进程崩溃概率和内存泄露概率计算得到的概率。In a possible implementation manner, the security level information includes a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability.
在一种可能的实现方式中,进程相关信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。In a possible implementation manner, the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or exception information.
在一种可能的实现方式中,处理单元,具体用于根据进程相关信息训练机器学习模型;利用机器学习模型输出特征信息文件。In a possible implementation manner, the processing unit is specifically configured to train a machine learning model according to process-related information; and output a feature information file by using the machine learning model.
在一种可能的实现方式中,处理单元,具体用于定时从多个设备获取多个设备的进程 相关信息;或者,获取多个设备在进程异常时发送的进程相关信息。In a possible implementation manner, the processing unit is specifically configured to periodically acquire process-related information of multiple devices from multiple devices; or, acquire process-related information sent by multiple devices when the processes are abnormal.
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行如第一方面和第二方面的任意一种实现方式中描述的插件管理方法。In a fifth aspect, the embodiments of the present application provide a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer is made to execute the first aspect and the first aspect. The plug-in management method described in any one of the implementation manners of the second aspect.
第六方面,本申请实施例提供一种包括指令的计算机程序产品,当指令在计算机上运行时,使得计算机执行第一方面和第二方面的任意一种实现方式中描述的插件管理方法。In a sixth aspect, an embodiment of the present application provides a computer program product including instructions, which, when the instructions are executed on a computer, cause the computer to execute the plug-in management method described in any one of the implementation manners of the first aspect and the second aspect.
第七方面,本申请实施例提供一种插件管理系统,该系统包括如下中任一个或多个:第三方面及第三方面的各种可能的实现方式中描述的插件管理装置,第四方面及第四方面的各种可能的实现方式中描述的插件管理装置。In a seventh aspect, an embodiment of the present application provides a plug-in management system, and the system includes any one or more of the following: the third aspect and the plug-in management apparatus described in various possible implementations of the third aspect, and the fourth aspect and the plug-in management apparatus described in various possible implementation manners of the fourth aspect.
第八方面,本申请实施例提供一种插件管理装置,该装置包括处理器和存储介质,存储介质存储有指令,指令被处理器运行时,实现如第一方面和第二方面任意的实现方式描述的插件管理方法。In an eighth aspect, an embodiment of the present application provides a plug-in management device, the device includes a processor and a storage medium, the storage medium stores an instruction, and when the instruction is executed by the processor, any implementation manner of the first aspect and the second aspect is implemented. Describes the plugin management method.
第九方面,本申请提供一种芯片或者芯片系统,该芯片或者芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以进行第一方面和第二方面任意的实现方式中任一项所描述的插件管理方法。In a ninth aspect, the present application provides a chip or a chip system, the chip or chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used for running a computer program or instruction, The plug-in management method described in any one of the implementation manners of the first aspect and the second aspect is performed.
其中,芯片中的通信接口可以为输入/输出接口、管脚或电路等。Wherein, the communication interface in the chip may be an input/output interface, a pin, a circuit, or the like.
在一种可能的实现中,本申请中上述描述的芯片或者芯片系统还包括至少一个存储器,该至少一个存储器中存储有指令。该存储器可以为芯片内部的存储单元,例如,寄存器、缓存等,也可以是该芯片的存储单元(例如,只读存储器、随机存取存储器等)。In a possible implementation, the chip or chip system described above in this application further includes at least one memory, where instructions are stored in the at least one memory. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (eg, a read-only memory, a random access memory, etc.).
第十方面,本申请提供一种计算机程序产品,该计算机程序产品中存储有指令,当所述指令被一个或多个处理器运行时,实现前述任意方面或实现方式中的插件管理方法。In a tenth aspect, the present application provides a computer program product, the computer program product stores instructions, and when the instructions are executed by one or more processors, implements the plug-in management method in any of the foregoing aspects or implementations.
应当理解的是,本申请的第三方面至第十方面与本申请的第一方面至第二方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that the third to tenth aspects of the present application correspond to the technical solutions of the first to second aspects of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manner are similar, and will not be repeated here. .
附图说明Description of drawings
图1为本申请实施例提供的一种终端设备100的结构示意图;FIG. 1 is a schematic structural diagram of a terminal device 100 according to an embodiment of the present application;
图2为本申请实施例提供的一种终端设备100的软件结构框图;FIG. 2 is a software structural block diagram of a terminal device 100 provided by an embodiment of the present application;
图3为本申请实施例提供的一种应用程序的框架示意图;3 is a schematic diagram of a framework of an application program provided by an embodiment of the present application;
图4为本申请实施例提供的一种插件管理方法的流程示意图;4 is a schematic flowchart of a plug-in management method provided by an embodiment of the present application;
图5为本申请实施例提供的一种用户触发微应用插件的界面示意图;5 is a schematic interface diagram of a user-triggered micro-application plug-in provided by an embodiment of the present application;
图6为本申请实施例提供的另一种用户触发微应用插件的界面示意图;6 is a schematic interface diagram of another user-triggered micro-application plug-in provided by an embodiment of the present application;
图7为本申请实施例提供的再一种用户触发微应用插件的界面示意图;7 is a schematic interface diagram of still another user-triggered micro-application plug-in provided by an embodiment of the present application;
图8为本申请实施例提供的一种插件调度的示意图;FIG. 8 is a schematic diagram of a plug-in scheduling provided by an embodiment of the present application;
图9为本申请实施例提供的一种获取特征信息的流程示意图;FIG. 9 is a schematic flowchart of acquiring feature information according to an embodiment of the present application;
图10为本申请实施例提供的一种插件管理系统的框架示意图;10 is a schematic diagram of the framework of a plug-in management system provided by an embodiment of the present application;
图11为本申请实施例提供的一种数据采集上报的流程示意图;11 is a schematic flowchart of data collection and reporting provided by an embodiment of the present application;
图12为本申请实施例提供的一种插件特征分析的流程示意图;12 is a schematic flowchart of a plug-in feature analysis provided by an embodiment of the present application;
图13为本申请实施例提供的一种问题插件识别的流程示意图;13 is a schematic flowchart of a problem plug-in identification provided by an embodiment of the present application;
图14为本申请实施例提供的一种实现插件负载均衡的流程示意图;FIG. 14 is a schematic flowchart of implementing plug-in load balancing provided by an embodiment of the present application;
图15为本申请实施例提供的一种插件管理装置的结构示意图;15 is a schematic structural diagram of a plug-in management apparatus provided by an embodiment of the present application;
图16为本申请实施例提供的一种插件管理装置的硬件结构示意图;FIG. 16 is a schematic diagram of the hardware structure of a plug-in management apparatus provided by an embodiment of the present application;
图17为本申请实施例提供的一种芯片的结构示意图。FIG. 17 is a schematic structural diagram of a chip provided by an embodiment of the present application.
具体实施方式Detailed ways
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一值和第二值仅仅是为了区分不同的值,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. For example, the first value and the second value are only used to distinguish different values, and do not limit their order. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like are not necessarily different.
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in this application as "exemplary" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "plurality" means two or more. "And/or", which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
在可能利用插件化框架为微应用插件分配进程的场景中,通常情况下为了平衡进程内的插件数量,会按照插件的个数进行调度,可以将插件调度到当前进程内插件数量较少的进程中。这种粗粒度的插件调度方式,忽略了插件间的差异性,由于不同的插件在运行时所消耗的资源是不同的,因此这种粗粒度的插件调度方式可能会存在进程内负载不均衡的问题。另外,在上述插件调度过程中,没有考虑到正常插件和问题插件的隔离,使得运行问题插件的过程中,可能会影响到进程中其他正常插件的运行,这就造成微应用在运行中出现卡顿、响应缓慢等现象,影响用户的体验感受。In the scenario where the plug-in framework may be used to allocate processes for micro-application plug-ins, usually in order to balance the number of plug-ins in the process, the plug-in will be scheduled according to the number of plug-ins, and the plug-in can be scheduled to a process with a smaller number of plug-ins in the current process middle. This coarse-grained plug-in scheduling method ignores the differences between plug-ins. Since different plug-ins consume different resources at runtime, this coarse-grained plug-in scheduling method may cause unbalanced intra-process load. question. In addition, in the above plug-in scheduling process, the isolation of normal plug-ins and problem plug-ins is not considered, so that the operation of the problem plug-in may affect the operation of other normal plug-ins in the process, which causes the micro-application to appear stuck during operation. Symptoms such as pauses, slow response, etc., affect the user's experience.
因此,本申请实施例提供一种插件管理方法,接收到请求运行微应用的请求信息后,确定请求信息对应的插件,获取插件中对进程运行产生影响的特征信息,根据插件的特征信息就能够将插件调度到进程中,这种微应用中插件的调度方式因为考虑了插件对进程运行产生的影响,可以对插件进行合理的调度,进而实现进程运行时的负载平衡,使微应用框架能够平稳运行,提升用户的体验感。Therefore, an embodiment of the present application provides a plug-in management method. After receiving request information for requesting to run a micro-application, the plug-in corresponding to the request information is determined, and the characteristic information of the plug-in that affects the process operation is obtained. The plug-in is scheduled into the process. The plug-in scheduling method in this micro-application considers the impact of the plug-in on the process operation, and the plug-in can be reasonably scheduled to achieve load balancing when the process is running, so that the micro-application framework can be stable. run to enhance the user experience.
本申请实施例应用在终端设备中,为了更好的理解本申请实施例的方法,下面首先对本申请实施例适用的终端设备的结构进行介绍。The embodiments of the present application are applied to a terminal device. In order to better understand the methods of the embodiments of the present application, the following first introduces the structure of the terminal device to which the embodiments of the present application are applied.
示例性的,图1示出了一种终端设备100的结构示意图。终端设备100可以包括 处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 1 shows a schematic structural diagram of a terminal device 100 . The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal device 100 . In other embodiments of the present application, the terminal device 100 may include more or less components than those shown in the drawings, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, 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), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface 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 transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that 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 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。 处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding 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 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional 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 the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface, so as to realize the shooting function of the terminal device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the terminal device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is a schematic illustration, and does not constitute a structural limitation of the terminal device 100 . In other embodiments of the present application, the terminal device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管 理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some 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 also be provided in the same device.
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。终端设备100中的天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Antennas in terminal device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator 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 passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos 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 independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system, GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. Wireless communication technologies may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Broadband Code Division Multiple Access (CDMA) address (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 technology, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou satellite navigation system (BDS), quasi-zenith satellite system (quasi-zenith satellite system) , QZSS) and/or satellite based augmentation systems (SBAS).
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device 100 implements a display function 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 screen 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 alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). , AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the terminal device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the terminal device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备100的各种功能应用以及数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. The processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal 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 playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions.
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the terminal device 100 . In some embodiments, the angular velocity of the end device 100 about three axes (ie, the x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the terminal device 100 is a flip machine, the terminal device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用程序。The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the terminal device 100 is stationary. It can also be used to identify the posture of terminal devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The terminal device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The terminal device 100 emits infrared light to the outside through the light emitting diode. The terminal device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100 . When insufficient reflected light is detected, the terminal device 100 may determine that there is no object near the terminal device 100 . The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于 检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "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, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the voice part vibrating bone mass obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用程序(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the terminal device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The terminal device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the terminal device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构,等。本申请实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, and the like. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the terminal device 100 .
示例性的,图2是本申请实施例提供的一种终端设备100的软件结构框图。Exemplarily, FIG. 2 is a software structural block diagram of a terminal device 100 provided by an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,日历,电话,地图,电话,音乐,设置,邮箱,视频,社交等应用程序。As shown in Figure 2, the application package can include applications such as camera, calendar, phone, map, phone, music, settings, mailbox, video, social, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application  programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,资源管理器,视图系统,通知管理器等。As shown in Figure 2, the application framework layer can include window managers, content providers, resource managers, view systems, notification managers, and so on.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,触摸屏幕,拖拽屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, take a screenshot, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes.
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。The Android runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG和PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG and PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
需要说明的是,可以在图2中的应用程序层与应用程序架构层执行本申请实施例提供的插件管理方法。It should be noted that, the plug-in management method provided by the embodiment of the present application may be executed at the application program layer and the application program architecture layer in FIG. 2 .
下面结合应用程序启动或应用程序中发生界面切换的场景,示例性说明终端设备 100软件以及硬件的工作流程。The workflow of the software and hardware of the terminal device 100 is exemplarily described below in conjunction with a scenario in which an application program is started or an interface switching occurs in an application program.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸力度,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into raw input events (including touch coordinates, touch strength, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event.
下面结合附图对本申请实施例提供的应用程序中的应用功能分屏设置的操作过程及分屏功能界面的显示过程进行详细地介绍。需要说明的是,本申请实施例中的“在……时”,可以为在某种情况发生的瞬时,也可以为在某种情况发生后的一段时间内,本申请实施例对此不做限定。The following describes in detail the operation process of setting the application function split screen in the application program provided by the embodiments of the present application and the display process of the split screen function interface with reference to the accompanying drawings. It should be noted that, “at the time of” in the embodiments of the present application may be the moment when a certain situation occurs, or it may be within a period of time after the occurrence of a certain situation, and the embodiment of the present application does not do this. limited.
本申请实施例中,电子设备100可用于对应用程序的多个功能的分屏显示。具体而言,电子设备100可以为:手机、平板电脑、智能手表、智能手环、智能耳机、智能眼镜以及其他具备显示屏幕的终端设备等,本申请实施例对此不做限定。In this embodiment of the present application, the electronic device 100 may be used for split-screen display of multiple functions of an application. Specifically, the electronic device 100 may be a mobile phone, a tablet computer, a smart watch, a smart bracelet, a smart earphone, a smart glasses, or other terminal devices with a display screen, etc., which are not limited in this embodiment of the present application.
现以电子设备100为终端设备为例,对终端设备实现对于应用程序(application,APP)(或者可能称为应用)框架下的微应用插件管理方法进行说明。Now, taking the electronic device 100 as a terminal device as an example, the implementation of a micro-application plug-in management method under the framework of an application (application, APP) (or possibly called an application) by the terminal device will be described.
示例性的,图3为本申请实施例提供的一种应用程序的框架示意图。Exemplarily, FIG. 3 is a schematic diagram of a framework of an application program provided by an embodiment of the present application.
如图3所示,应用程序300可以包括:微应用301和微应用302等其他微应用。微应用301中可以包括:插件3031、插件3032、插件3041、插件3042等其他插件。如图3所示的场景可以理解为:微应用中可以包括功能303和功能304等其他功能。As shown in FIG. 3 , the application 300 may include other micro-applications such as a micro-application 301 and a micro-application 302 . The micro-application 301 may include: plug-in 3031, plug-in 3032, plug-in 3041, plug-in 3042 and other plug-ins. The scenario shown in FIG. 3 can be understood as: the micro application may include other functions such as function 303 and function 304 .
可以理解的是,一个应用程序可以包括多个微应用,一个微应用中可以包括多个功能,一个功能可以对应一个或多个插件。在运行微应用的场景中,进程是系统进行调度的基本单位。当用户触发微应用的运行时,终端设备可以将该触发操作对应的插件调度到进程中运行。It can be understood that one application may include multiple micro-applications, one micro-application may include multiple functions, and one function may correspond to one or more plug-ins. In the scenario of running micro-applications, a process is the basic unit of scheduling by the system. When the user triggers the running of the micro-application, the terminal device can schedule the plug-in corresponding to the trigger operation to the process to run.
示例性的,当用户触发功能303时,终端设备将对功能303中的插件3031和插件3032等其他插件进行调度;当用户触发功能304中,终端设备将对功能304中的插件3041和插件3042等其他插件进行调度;终端设备将该功能对应的插件调度到相应的进程中运行。Exemplarily, when the user triggers the function 303, the terminal device will schedule other plug-ins such as plug-ins 3031 and 3032 in the function 303; when the user triggers the function 304, the terminal device will schedule the plug-ins 3041 and 3042 in the function 304. Wait for other plug-ins for scheduling; the terminal device schedules the plug-in corresponding to the function to the corresponding process to run.
在本申请实施例提供的场景中,终端设备可以将多个微应用以插件化的形式加载运行起来,为用户提供多样化的服务。同时,微应用的加载往往需要依赖于应用程序框架环境。其中,微应用是以一个或多个插件的形式在应用程序中运行的。可以理解的是,应用程序框架运行在终端设备中。应用程序框架可以管理微应用中的插件,并将插件调度到进程中运行。In the scenario provided by the embodiment of the present application, the terminal device can load and run multiple micro-applications in the form of plug-ins, so as to provide users with diversified services. At the same time, the loading of micro-applications often needs to depend on the application framework environment. Among them, micro-applications are run in the application in the form of one or more plug-ins. Understandably, the application framework runs on the end device. The application framework can manage plugins in microapps and schedule plugins to run in processes.
可以理解的是,本申请实施例是适用于上述应用场景进行微应用插件管理的。其中,本申请实施例以一种可以实现微应用插件管理方法的场景进行示例,对于其他具体的应用场景不做限定。It can be understood that the embodiments of the present application are applicable to the above application scenarios for micro-application plug-in management. Wherein, the embodiment of the present application uses a scenario in which the micro-application plug-in management method can be implemented as an example, and other specific application scenarios are not limited.
下面对本申请实施例中所描述的词汇进行说明。可以理解,该说明是为更加清楚的解释本申请实施例,并不必然构成对本申请实施例的限定。The vocabulary described in the embodiments of the present application will be described below. It can be understood that the description is for explaining the embodiments of the present application more clearly, and does not necessarily constitute a limitation on the embodiments of the present application.
本申请实施例所描述的微应用可以是,高度聚焦于一种功能的小型应用,其加载运行往往依赖于框架环境。例如,在社交应用中运行社交应用的小程序,可以将社交应用理解为框架环境,该小程序的运行必须要依赖于社交应用这一框架才能够被加载运 行。可以理解的是,该小程序离开社交是没有办法运行的。The micro-applications described in the embodiments of this application may be small-scale applications that are highly focused on one function, and their loading and running often depend on the framework environment. For example, when running a social application applet in a social application, the social application can be understood as a framework environment, and the operation of the applet must depend on the framework of the social application before it can be loaded and run. It is understandable that there is no way for this applet to run without social networking.
本申请实施例所描述的插件可以是,微应用的功能组件,微应用以一个或多个插件的形式在框架中运行。例如,在微应用中,用户有很多可以触发的功能,用户点击任一功能都可以触发该功能对应的插件的加载。The plug-ins described in the embodiments of the present application may be functional components of the micro-application, and the micro-application runs in the framework in the form of one or more plug-ins. For example, in a micro-app, the user has many functions that can be triggered, and the user can click any function to trigger the loading of the plug-in corresponding to the function.
本申请实施例所描述的动态加载可以为,一种让系统在运行时加载并使用其加载过程对应的软件的机制。The dynamic loading described in the embodiments of the present application may be a mechanism for allowing the system to load and use the software corresponding to the loading process at runtime.
本申请实施例所描述的进程可以为,计算机中的程序关于某个数据集合上的一次运行活动,是系统进行资源分配和调度的基本单位,系统可以为进程分配资源。The process described in the embodiments of the present application may be a running activity of a program in a computer on a certain data set, which is the basic unit of resource allocation and scheduling by the system, and the system may allocate resources to the process.
本申请实施例所描述的框架可以是,互联网技术(internet technology,IT)语境中的框架,特指为解决一个开放性问题而设计的具有一定约束性的支撑结构。在此结构上可以根据具体问题扩展、安插更多的组成部分,从而更迅速和方便地构建完整的解决问题的方案。例如,本申请实施例中的框架,具体指负责微应用插件加载、运行和管理的容器载体。框架不仅负责将微应用插件加载运行起来,还需要提供微应用插件的调度与管理能力。另外,框架可以创建若干进程,并依据一定的分配原理将各微应用插件分配到不同的进程中去,一般来说,微应用插件数量远大于进程数量。The framework described in the embodiments of the present application may be a framework in the context of Internet technology (internet technology, IT), and specifically refers to a support structure with certain constraints designed to solve an open problem. In this structure, more components can be expanded and placed according to specific problems, so that a complete solution to the problem can be constructed more quickly and easily. For example, the framework in this embodiment of the present application specifically refers to a container carrier responsible for loading, running, and managing micro-application plug-ins. The framework is not only responsible for loading and running the micro-application plug-in, but also needs to provide the scheduling and management capabilities of the micro-application plug-in. In addition, the framework can create several processes, and allocate each micro-application plug-in to different processes according to a certain allocation principle. Generally speaking, the number of micro-application plug-ins is much larger than the number of processes.
本申请实施例所描述的插件化框架可以为,采用插件化技术,以插件的形式动态加载的容器载体,其本质上可以是APP。实现插件化框架可以实现插件代码加载与框架间的互相调用,插件资源加载与框架间的互相访问,和插件生命周期的管理。例如,插件化框架能够实现微应用中插件的动态加载。The plug-in framework described in the embodiments of the present application may be a container carrier dynamically loaded in the form of a plug-in using a plug-in technology, which may be an APP in essence. Implementing a plug-in framework can realize the mutual call between plug-in code loading and the framework, the mutual access between plug-in resource loading and the framework, and the management of the plug-in life cycle. For example, plug-in frameworks enable dynamic loading of plug-ins in micro-apps.
本申请实施例所描述的进程分配可以为,终端设备将微应用插件分配到不同的进程中运行。The process allocation described in the embodiments of the present application may be that the terminal device allocates the micro-application plug-ins to different processes to run.
本申请实施例所描述的进程快照可以为,记录当前系统内进程及进程内数据的统计快照。The process snapshot described in the embodiment of the present application may be a statistical snapshot that records the current process in the system and the data in the process.
本申请实施例所描述的负载可以为:衡量插件运行时对所在进程的资源消耗。例如,负载是由内存和功耗两种指标确定的。The load described in the embodiment of the present application may be: measuring the resource consumption of the process in which the plug-in is running when it is running. For example, load is determined by two metrics, memory and power consumption.
本申请实施例所描述的云计算平台(或称云平台或云端设备等)可以是,基于硬件资源和软件资源的服务,云平台可以提供计算、网络和存储等其他能力。The cloud computing platform (or cloud platform or cloud device, etc.) described in the embodiments of this application may be services based on hardware resources and software resources, and the cloud platform may provide other capabilities such as computing, network, and storage.
本申请实施例所描述的机器学习可以为,一种模仿生物神经网络的结构和功能的数学模型或计算模型,用于对函数进行估计或近似。机器学习模型需要利用大量样本进行训练,训练好模型后,就可以利用该机器学习模型进行预测。The machine learning described in the embodiments of the present application may be a mathematical model or a computational model that imitates the structure and function of a biological neural network, and is used to estimate or approximate a function. The machine learning model needs to be trained with a large number of samples. After the model is trained, the machine learning model can be used to make predictions.
本申请实施例所描述的免安装运行应用程序包(android application package,APK)可以理解为插件,在免安装运行APK支持插件化的APP在运行时加载和运行插件,可以将APP中一些不常用的功能模块做成插件,减小了安装包的大小,实现APP功能的动态扩展,并有利于功能模块间的解耦与更新扩展。The installation-free running application package (android application package, APK) described in the embodiment of the present application can be understood as a plug-in, and the APP that supports the plug-in in the installation-free running APK loads and runs the plug-in at runtime, and some less commonly used APPs can be loaded and run. The functional modules of APP are made into plug-ins, which reduces the size of the installation package, realizes the dynamic expansion of APP functions, and facilitates the decoupling and update expansion between functional modules.
下面,通过具体实施例对本申请的技术方案进行详细说明。需要说明的是,下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。Hereinafter, the technical solutions of the present application will be described in detail through specific embodiments. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
示例性的,图4为本申请实施例提供的一种插件管理方法的流程示意图。如图4所示,该方法可以包括如下步骤:Exemplarily, FIG. 4 is a schematic flowchart of a plug-in management method provided by an embodiment of the present application. As shown in Figure 4, the method may include the following steps:
S401、接收用于请求运行微应用的请求信息。S401. Receive request information for requesting to run a micro-application.
本申请实施例中,请求信息可以为用户通过触发操作触发微应用后发出的请求信息。终端设备能够接收到用于请求运行微应用的请求信息。示例性的,当用户触发开启微应用时,或者,触发微应用中的某个功能时都能够发出请求运行微应用的请求信息,终端设备接收到该请求信息。In this embodiment of the present application, the request information may be request information sent after the user triggers the micro-application through a trigger operation. The terminal device can receive request information for requesting to run the micro-application. Exemplarily, when the user triggers to start the micro-application, or when a certain function in the micro-application is triggered, request information for requesting to run the micro-application can be sent, and the terminal device receives the request information.
其中,用户的触发操作可以包括:单次点击操作、多次点击操作、触摸操作(其触摸操作的触摸信息可以包括触摸坐标、触摸力度或触摸操作的时间戳等其他类型的触摸信息)、滑动操作、拖拽操作和/或长按操作等其他类型的触发操作。可以理解的是,本申请实施例中对具体的触发操作不做限定。Wherein, the user's trigger operation may include: single click operation, multiple click operation, touch operation (the touch information of the touch operation may include touch coordinates, touch force or time stamp of the touch operation and other types of touch information), sliding Other types of trigger actions such as actions, drag actions, and/or long-press actions. It can be understood that, the specific trigger operation is not limited in the embodiment of the present application.
示例性的,图5为本申请实施例提供的一种用户触发微应用插件的界面示意图。Exemplarily, FIG. 5 is a schematic interface diagram of a user-triggered micro-application plug-in according to an embodiment of the present application.
如图5中的a所示的界面,该界面可以为终端设备的主屏幕,该主屏幕中可以包括下述的一种或多种应用图标:设置图标、日历图标、社交图标501、数据图标等其他类型的应用图标。当用户在主屏幕下,通过点击、拖拽或长按等触发操作触发社交图标501时,终端设备响应于用户触发社交图标501的操作,终端设备进入到如图5中的b所示的界面。As shown in a in FIG. 5, the interface may be the home screen of the terminal device, and the home screen may include one or more of the following application icons: setting icon, calendar icon, social icon 501, data icon and other types of application icons. When the user triggers the social icon 501 through a trigger operation such as clicking, dragging or long pressing on the home screen, the terminal device responds to the user's operation to trigger the social icon 501, and the terminal device enters the interface as shown in b in Figure 5 .
如图5中的b所示的界面,当用户在该界面中通过点击、拖拽或长按等触发操作触发发现控件502时,终端设备响应于用户触发发现控件502的操作,终端设备进入到如图5中的c所示的界面。In the interface shown in b in FIG. 5 , when the user triggers the discovery control 502 by clicking, dragging, or long pressing in the interface, the terminal device responds to the user triggering the operation of the discovery control 502, and the terminal device enters the The interface shown in c in Figure 5.
如图5中的c所示的界面,该界面中可以包括下述的一种或多种功能控件:扫一扫控件、摇一摇控件、附近好友控件、游戏控件、小程序控件503或其他类型的功能控件。当用户在该界面中通过点击、拖拽或长按等触发操作触发小程序控件503时,终端设备响应于用户触发小程序控件503的操作,终端设备进入到如图6所示的界面。As shown in c in Figure 5, the interface may include one or more of the following functional controls: sweep controls, shake controls, nearby friend controls, game controls, applet controls 503 or other Type of functional control. When the user triggers the applet control 503 by clicking, dragging or long pressing in the interface, the terminal device enters the interface as shown in FIG. 6 in response to the user triggering the operation of the applet control 503 .
如图6所示的界面,该界面中可以包括下述的一种或多种小程序控件:我的小程序控件、视频小程序控件、读书小程序控件、购物小程序控件601、外卖小程序控件或其他类型的小程序控件。在用户开启如图6中任一小程序的过程中,终端设备可以接收用于请求运行微应用的请求信息。As shown in FIG. 6, the interface may include one or more of the following applet controls: My applet control, video applet control, reading applet control, shopping applet control 601, takeaway applet controls or other types of applet controls. During the process of the user opening any applet as shown in FIG. 6 , the terminal device may receive request information for requesting to run the micro-application.
示例性的,当用户在该界面中通过点击、拖拽或长按等触发操作触发购物小程序控件601时,终端设备响应于该触发操作,终端设备接收到该运行微应用的请求信息,终端设备将该开启购物小程序控件601对应的插件调度到相应的进程中运行,终端设备进入到图7所示的界面。Exemplarily, when the user triggers the shopping applet control 601 through a trigger operation such as clicking, dragging, or long pressing in the interface, the terminal device responds to the trigger operation, and the terminal device receives the request information for running the micro-application, and the terminal device responds to the trigger operation. The device schedules the plug-in corresponding to the opening shopping applet control 601 to a corresponding process to run, and the terminal device enters the interface shown in FIG. 7 .
如图7所示的界面,该界面可以包括下述的一种或多种功能控件:今日上新控件、超市控件、火车机票控件、领劵控件、充值中心控件701、特征中心控件、宠物控件、分类控件或其他类型的功能控件。在用户触发如图7中的小程序的任一功能的过程中,终端设备可以接收用于请求运行微应用的请求信息。As shown in Figure 7, the interface may include one or more of the following functional controls: a new control today, a supermarket control, a train ticket control, a coupon control, a recharge center control 701, a feature center control, and a pet control , category controls, or other types of functional controls. During the process of the user triggering any function of the applet as shown in FIG. 7 , the terminal device may receive request information for requesting to run the micro-application.
示例性的,当用户在该界面中通过点击、拖拽或长按等触发操作触发充值中心控件701时发出运行微应用中的功能的请求信息,终端设备响应于该触发操作,终端设备接收到该运行微应用中的功能请求信息,终端设备将该充值中心控件701对应的插件调度到相应的进程中运行,终端设备可以进入到该充值中心控件701对应的界面。Exemplarily, when the user triggers the recharge center control 701 through a trigger operation such as clicking, dragging or long pressing in the interface, the request information for running the function in the micro-application is sent, and the terminal device responds to the trigger operation and receives the To run the function request information in the micro-application, the terminal device schedules the plug-in corresponding to the recharge center control 701 to a corresponding process to run, and the terminal device can enter the interface corresponding to the recharge center control 701 .
综上所述,当用户触发开启微应用时,或者,触发微应用中的某个功能时都能够 发出请求运行微应用的请求信息,终端设备接收到该请求信息,终端设备就能够利用本申请实施例中提供的插件管理方法进行插件的调度。To sum up, when the user triggers the opening of the micro application, or when triggering a function in the micro application, the request information for requesting to run the micro application can be sent. The plug-in management method provided in the embodiment performs plug-in scheduling.
需要说明的是,上述图5至图7所示的终端设备的用户界面仅用于举例,并不构成对本申请实施例的限定,在其他可行的实现方式中,用于触发进入应用开启场景或页面切换场景的操作均为本申请实施例中的用户操作。It should be noted that the user interfaces of the terminal equipment shown in the above Figures 5 to 7 are only used for examples, and do not constitute a limitation to the embodiments of the present application. The operations in the page switching scene are all user operations in the embodiments of the present application.
可能的实现方式中,进入应用开启场景或页面切换场景也可以是终端设备自动触发的,本申请实施例对此不作具体限定。In a possible implementation manner, entering the application opening scene or the page switching scene may also be automatically triggered by the terminal device, which is not specifically limited in this embodiment of the present application.
S402、确定请求信息对应的插件。S402. Determine the plug-in corresponding to the request information.
本申请实施例中,终端设备接收到用户触发微应用发来的运行微应用的请求信息后,解析该请求信息对应的一个或多个插件。该插件用于实现微应用的部分或全部功能。In this embodiment of the present application, after receiving the request information for running the micro-application sent by the user triggering the micro-application, the terminal device parses one or more plug-ins corresponding to the request information. This plugin is used to implement some or all of the functionality of the microapp.
示例性的,当用户开启微应用时,或者,触发微应用中的某个功能时都能够发出请求运行微应用的请求信息,终端设备接收到该请求信息并确定该请求信息对应的插件。Exemplarily, when the user opens the micro-application, or triggers a function in the micro-application, request information for requesting to run the micro-application can be sent, and the terminal device receives the request information and determines the plug-in corresponding to the request information.
例如,如图7中所示的界面,当用户触发充值中心功能控件701时,终端设备响应于该请求信息,终端设备查找该充值中心功能控件701对应的一个或多个插件,后续终端设备将该功能控件对应的一个或多个插件调度到相应的进程中运行,终端设备就能显示出该功能控件对应的界面。For example, as shown in the interface shown in FIG. 7 , when the user triggers the recharge center function control 701, the terminal device responds to the request information, and the terminal device searches for one or more plug-ins corresponding to the recharge center function control 701, and subsequently the terminal device will One or more plug-ins corresponding to the function control are dispatched to the corresponding process to run, and the terminal device can display the interface corresponding to the function control.
S403、获取插件的特征信息。S403. Obtain feature information of the plug-in.
本申请实施例中,特征信息为插件对进程运行产生影响的信息。In this embodiment of the present application, the feature information is information that the plug-in affects the running of the process.
示例性的,预先得到插件与特征信息之间的关联关系,在获取插件之后,根据该关联关系,查找该插件的特征信息;或者,预先训练能够利用插件输出该插件的特征信息的模型,在获取插件之后,将插件输入该模型,利用该模型输出该插件的特征信息。可以理解的是,本申请实施例中,对获取插件的特征信息的方法不做限定。Exemplarily, the association relationship between the plug-in and the feature information is obtained in advance, and after the plug-in is acquired, the feature information of the plug-in is searched according to the association relationship; After acquiring the plug-in, input the plug-in into the model, and use the model to output the feature information of the plug-in. It can be understood that, in this embodiment of the present application, the method for acquiring the feature information of the plug-in is not limited.
一种可能的实现方式中,插件的特征信息可以包括下述的一种或多种:负载信息、安全等级信息、关联插件信息、运行时长信息、插件优先级信息或其他类型的特征信息。可以理解的是,插件的特征信息也可以根据实际应用场景包括其他内容,本申请实施例中对插件的特征信息不做限定。In a possible implementation manner, the characteristic information of the plug-in may include one or more of the following: load information, security level information, associated plug-in information, running time information, plug-in priority information or other types of characteristic information. It can be understood that the feature information of the plug-in may also include other contents according to the actual application scenario, and the feature information of the plug-in is not limited in this embodiment of the present application.
示例性的,插件的负载信息为标识插件在运行时所消耗的内存和功耗的信息。其中,进程中各插件的负载信息呈现差异化,可以理解的是,各插件的负载信息可以相同也可以不同。Exemplarily, the load information of the plug-in is information that identifies the memory and power consumption of the plug-in when running. The load information of each plug-in in the process is differentiated, and it can be understood that the load information of each plug-in may be the same or different.
示例性的,插件的安全等级信息为标识插件不同风险等级的插件的信息,根据各插件的安全等级信息执行相应的调度策略。Exemplarily, the security level information of the plug-in is information identifying plug-ins with different risk levels of the plug-in, and a corresponding scheduling policy is executed according to the security level information of each plug-in.
示例性的,插件的关联插件信息为标识插件间存在关联关系的相关插件的信息。其中,相关插件为读取的资源相同的插件。Exemplarily, the associated plug-in information of the plug-ins is information that identifies related plug-ins that have an association relationship between the plug-ins. The related plug-ins are the plug-ins that read the same resources.
示例性的,插件的运行时长信息为标识插件在运行时所消耗的时间的信息。Exemplarily, the running time information of the plug-in is information that identifies the time consumed by the plug-in when running.
示例性的,插件的优先级信息为标识用户运行该插件的频率的信息。其中,用户运行插件的频率越高,该插件的优先等级越高。Exemplarily, the priority information of the plug-in is information that identifies the frequency at which the user runs the plug-in. The higher the frequency that the user runs the plug-in, the higher the priority of the plug-in.
S404、根据特征信息调度插件。S404. Schedule the plug-in according to the feature information.
本申请实施例中,根据插件不同的特征信息执行不同的插件调度策略。In the embodiment of the present application, different plug-in scheduling policies are executed according to different feature information of the plug-in.
示例性的,插件的特征信息可以包括插件的负载信息,根据特征信息调度插件时,可以计算可用于运行该插件的进程的预测负载,预测负载可以是假设将该插件设置在进程时进程的预测总负载,可以将插件设置在预测负载不超过系统设定的负载阈值的任一进程中。其中,该负载阈值可以为,终端设备为运行微应用的进程所分配的最高负载值。Exemplarily, the characteristic information of the plug-in may include load information of the plug-in. When scheduling the plug-in according to the characteristic information, the predicted load of the process that can be used to run the plug-in may be calculated, and the predicted load may be the prediction of the process assuming that the plug-in is set in the process. Total load, the plugin can be set in any process whose predicted load does not exceed the load threshold set by the system. The load threshold may be the highest load value allocated by the terminal device to the process running the micro-application.
示例性的,插件的特征信息可以包括插件的安全等级信息,例如,安全等级信息可以标识插件为安全插件、风险插件或异常插件,根据插件的安全等级信息可以将安全插件设置在可用于运行该插件的进程中,或者将风险插件设置在系统设定的独立的进程中,或者禁用异常插件。Exemplarily, the feature information of the plug-in may include the security level information of the plug-in. For example, the security level information may identify the plug-in as a security plug-in, a risk plug-in or an abnormal plug-in. In the process of the plug-in, or set the risk plug-in in a separate process set by the system, or disable the abnormal plug-in.
示例性的,插件的特征信息可以包括插件的优先级信息,根据插件的优先级信息可以将优先级高的插件调度到当前优先级高的进程中。Exemplarily, the feature information of the plug-in may include priority information of the plug-in, and according to the priority information of the plug-in, a plug-in with a high priority may be scheduled to a process with a current high priority.
可以理解的是,根据插件的特征信息调度插件也可以根据实际应用场景包括其他内容,本申请实施例中对根据特征信息调度插件的方法不做限定。It can be understood that the plug-in scheduling according to the feature information of the plug-in may also include other contents according to the actual application scenario, and the method for scheduling the plug-in according to the feature information is not limited in this embodiment of the present application.
本申请实施例提供的一种插件管理方法,能够基于插件间的特征信息进行合理调度,实现进程运行的负载平衡,使得微应用框架能够平稳运行,进而提升用户的体验感。The plug-in management method provided by the embodiment of the present application can perform reasonable scheduling based on characteristic information between plug-ins, realize load balancing of process operation, enable the micro-application framework to run smoothly, and further improve the user's sense of experience.
在图4对应的实施例的基础上,一种可能的实现方式中,S404包括:将插件设置在与插件的特征信息相适应的进程中。On the basis of the embodiment corresponding to FIG. 4 , in a possible implementation manner, S404 includes: setting the plug-in in a process adapted to the feature information of the plug-in.
一种可能的实现方式中,特征信息包括负载信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:根据插件的负载信息计算可用于运行插件的第一进程的预测负载;该第一进程的预测负载为将插件设置在第一进程时,该第一进程的总负载;该第一进程的数量为多个。将插件设置在第一目标进程中;该第一目标进程为第一进程中,预测负载不超过第一负载阈值的进程。In a possible implementation manner, the characteristic information includes load information, and setting the plug-in in a process that is compatible with the characteristic information of the plug-in according to the characteristic information of the plug-in includes: calculating the first process that can be used to run the plug-in according to the load information of the plug-in. Predicted load; the predicted load of the first process is the total load of the first process when the plug-in is set in the first process; the number of the first process is multiple. The plug-in is set in a first target process; the first target process is a process in the first process whose predicted load does not exceed the first load threshold.
示例性的,如图8所示,进程801中运行着:插件8011、插件8012、插件8013和插件8014;进程802中运行着:插件8021、插件8022和插件8023;进程803中运行着:插件8031和插件8032。微应用中包含还未运行的插件804、插件805、插件806和插件807。Exemplarily, as shown in FIG. 8 , running in process 801 are: plug-in 8011, plug-in 8012, plug-in 8013 and plug-in 8014; running in process 802: plug-in 8021, plug-in 8022 and plug-in 8023; running in process 803: plug-in 8031 and plugin 8032. The micro-app contains plugins 804 , plugins 805 , plugins 806 , and plugins 807 that are not yet running.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息进行调度时。计算将插件804设置在进程801、进程802或进程803中,进程801、进程802或进程803的预测负载。其中,进程801的预测负载为,插件804的负载信息与进程801中运行的四个插件的总负载的和;进程802的预测负载为,插件804的负载信息与进程802中运行的三个插件的总负载的和;进程803的预测负载为,插件804的负载信息与进程803中运行的两个插件的总负载的和。可以理解的是,预测负载是预估将所要调度的插件,调度到进程后进程的总负载,具体应用中,可以没有将插件调度到进程的执行步骤。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information of the plug-in 804 . Calculate the predicted load of the process 801 , the process 802 or the process 803 by placing the plug-in 804 in the process 801 , the process 802 or the process 803 . The predicted load of the process 801 is the sum of the load information of the plug-in 804 and the total load of the four plug-ins running in the process 801; the predicted load of the process 802 is the load information of the plug-in 804 and the three plug-ins running in the process 802. The predicted load of the process 803 is the sum of the load information of the plug-in 804 and the total load of the two plug-ins running in the process 803 . It can be understood that the predicted load is to estimate the total load of the process after the plug-in to be scheduled is scheduled to the process. In a specific application, there may be no execution steps for scheduling the plug-in to the process.
判断进程801的预测负载、进程802的预测负载或进程803的预测负载与进程的第一负载阈值的关系。当进程801的预测负载、进程802的预测负载或进程803的预测负载均不超过第一负载阈值时,则将插件804调度到进程801、进程802或进程803的任一进程中。当进程801的预测负载不超过第一负载阈值,进程802的预测负载和进程803的预测负载均超过第一负载阈值时,可以将插件804调度到进程801中。在进程调度中,可以预测将插件调度到第一进程时,第一进程是否超过负载阈值,将插件设置在预测负载不超过 负载阈值第一目标进程中,就可以避免调度后第一进程中出现超出负载阈值的情况,实现进程运行时的负载均衡。Determine the relationship between the predicted load of the process 801, the predicted load of the process 802, or the predicted load of the process 803 and the first load threshold of the process. When the predicted load of the process 801 , the predicted load of the process 802 or the predicted load of the process 803 does not exceed the first load threshold, the plug-in 804 is scheduled to any one of the process 801 , the process 802 or the process 803 . When the predicted load of the process 801 does not exceed the first load threshold, and the predicted load of the process 802 and the predicted load of the process 803 both exceed the first load threshold, the plug-in 804 may be scheduled into the process 801 . In process scheduling, it is possible to predict whether the first process exceeds the load threshold when the plug-in is scheduled to the first process. Setting the plug-in in the first target process whose predicted load does not exceed the load threshold can avoid the occurrence of the first process after scheduling. When the load threshold is exceeded, load balancing is realized when the process is running.
一种可能的实现方式中,特征信息包括插件的关联插件信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:将插件设置在第三进程中,第三进程为运行与关联插件信息相关的相关插件的进程。该相关插件包括:与插件读取的资源相同的插件。In a possible implementation manner, the feature information includes associated plug-in information of the plug-in, and setting the plug-in in a process adapted to the feature information of the plug-in according to the feature information of the plug-in includes: setting the plug-in in a third process, the third process For processes that run related plugins with associated plugin information. The related plugins include: plugins that have the same resources as the plugins read.
示例性的,在图8所示的调度场景中,当用户根据插件804的关联插件信息进行调度时。获取进程内与插件804读取资源相同的相关插件。当插件8021与插件804读取的资源相同时,可以将插件804调度到插件8021所在的进程802中。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the associated plug-in information of the plug-in 804 . Get the related plugins in the process that read the same resources as plugin 804. When the resources read by the plug-in 8021 and the plug-in 804 are the same, the plug-in 804 can be scheduled to the process 802 where the plug-in 8021 is located.
一种可能的实现方式中,特征信息包括插件的运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取进程中,正在运行的各插件的运行时长,将待调度的插件,设置在各插件的运行时长与待调度的插件的运行时长相近的进程中。In a possible implementation manner, the feature information includes the running time information of the plug-in, and setting the plug-in in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: obtaining the running time of each running plug-in in the process. , to set the plug-ins to be scheduled in a process whose running duration of each plug-in is similar to the running duration of the plug-in to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的运行时长信息进行调度时。获取进程中插件8011、插件8012、插件8013、插件8014、插件8021、插件8022、插件8023、插件8031和插件8032的运行时长。判断该插件804的运行时长与各插件的运行时长的关系。当待调度插件的运行时长与上述插件中的其中一个插件的运行时长的差值不超过系统设定的预设阈值时,则将待调度插件调度到该插件所在的进程中。当插件804的运行时长与插件8021的运行时长的差值不超过该预设阈值时,可以将插件804调度到插件8021所在的进程802中。在运行该进程时,就可以同时运行多个关联插件,由于关联插件间读取的资源是相同的,就可以减少执行多次读取相同资源操作的耗能,进而减少进程运行的耗能情况。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the runtime information of the plug-in 804 . Get the running time of plugin 8011, plugin 8012, plugin 8013, plugin 8014, plugin 8021, plugin 8022, plugin 8023, plugin 8031, and plugin 8032 in the process. The relationship between the running time of the plug-in 804 and the running time of each plug-in is determined. When the difference between the running duration of the plug-in to be scheduled and the running duration of one of the above plug-ins does not exceed the preset threshold set by the system, the plug-in to be scheduled is scheduled to the process where the plug-in is located. When the difference between the running time of the plug-in 804 and the running time of the plug-in 8021 does not exceed the preset threshold, the plug-in 804 may be scheduled to the process 802 where the plug-in 8021 is located. When the process is running, multiple associated plug-ins can be run at the same time. Since the resources read between the associated plug-ins are the same, the energy consumption of performing multiple operations of reading the same resource can be reduced, thereby reducing the energy consumption of the process running. .
一种可能的实现方式中,特征信息包括插件的优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中。其中,插件的优先级可以根据用户触发该插件的频率确定,当用户触发该插件的频率越高,插件的优先级越高;进程的优先级可以为终端设备对进程预先设定的。In a possible implementation manner, the feature information includes the priority information of the plug-in, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: obtaining the priority of each plug-in and each running process. The priority of the plug-in with high priority is set in the corresponding process with high priority. The priority of the plug-in may be determined according to the frequency of triggering the plug-in by the user, and the higher the frequency of triggering the plug-in by the user, the higher the priority of the plug-in; the priority of the process may be preset for the process by the terminal device.
示例性的,在图8所示的调度场景中,当用户根据插件804、插件805、或插件806的优先级信息进行调度时。获取正在运行的各进程的优先级。当插件804的优先级较高时,可以将插件804调度到系统设定的优先级高的进程801中。当插件805的优先级较低时,可以将插件调度到系统设定的优先级低的进程802中。当插件806的优先级信息既不满足高优先级也不满足低优先级时,可以将插件调度到系统设定的默认优先级的进程803中。将优先级高的插件优先调度到相应的进程中,保证微应用中较为重要的功能的正常实现。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the priority information of the plug-in 804 , the plug-in 805 , or the plug-in 806 . Get the priority of each running process. When the priority of the plug-in 804 is higher, the plug-in 804 can be scheduled to the process 801 with the higher priority set by the system. When the priority of the plug-in 805 is low, the plug-in can be scheduled to the process 802 with a low priority set by the system. When the priority information of the plug-in 806 meets neither the high priority nor the low priority, the plug-in may be scheduled to the process 803 with the default priority set by the system. The plug-ins with high priority are preferentially scheduled to the corresponding processes to ensure the normal implementation of the more important functions in the micro-application.
在图4对应的实施例的基础上,一种可能的实现方式中,S404包括:根据该特征信息禁用插件。On the basis of the embodiment corresponding to FIG. 4 , in a possible implementation manner, S404 includes: disabling the plug-in according to the feature information.
一种可能的实现方式中,特征信息包括安全等级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,将插件分配在可用于运行插件的进程中;或者,在安全等级信息表示插件为风险插件的情况下,将插件分配在独立的进程中;或者,在安全等级信息表示插件为异常插件的情 况下,禁用插件。In a possible implementation, the feature information includes security level information, and the plugin is set in a process that is compatible with the feature information of the plugin according to the feature information of the plugin, including: when the security level information indicates that the plugin is a security plugin The plug-in is allocated in a process that can be used to run the plug-in; or, in the case where the security level information indicates that the plug-in is a risk plug-in, the plug-in is allocated in a separate process; or, in the case where the security level information indicates that the plug-in is an abnormal plug-in, Disable plugins.
其中,该安全等级信息可以包括插件引发的进程崩溃概率、插件引发的内存泄露概率、或根据进程崩溃概率和内存泄露概率计算得到的概率。在该安全等级信息小于第一值时,表示插件为安全插件;在该安全等级信息大于或等于第一值,且小于或等于第二值时,表示插件为风险插件;在该安全等级信息大于第二值时,表示插件为异常插件。其中,该插件引发的进程崩溃概率为,由于该插件的异常而引发进程出现崩溃情况时,崩溃进程中该插件出现的总次数与总的进程崩溃次数的比值;该插件引发的内存泄露概率为,由于该插件的异常而引发进程出现内存泄漏情况时,内存泄漏进程中插件出现的总次数与总的进程内存泄漏次数的比值。第一值和第二值为终端设备为标识插件的类型所设定的安全等级信息的阈值。The security level information may include a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability. When the security level information is less than the first value, it means that the plug-in is a security plug-in; when the security level information is greater than or equal to the first value and less than or equal to the second value, it means that the plug-in is a risk plug-in; when the security level information is greater than or equal to the first value, it means the plug-in is a risk plug-in; The second value indicates that the plug-in is an abnormal plug-in. Among them, the probability of a process crash caused by the plugin is the ratio of the total number of times the plugin appears in the crash process to the total number of process crashes when the process crashes due to the exception of the plugin; the probability of memory leak caused by the plugin is , when a memory leak occurs in a process due to an exception of the plug-in, the ratio of the total number of times the plug-in appears in the memory leak process to the total number of process memory leaks. The first value and the second value are thresholds of the security level information set by the terminal device to identify the type of the plug-in.
示例性的,在图8所示的调度场景中,当用户根据插件804、插件805或插件806的安全等级信息进行调度时。根据插件804、插件805或插件806的安全等级信息确定该插件的插件类型。当插件804为正常插件时,将该插件分配到可以运行该插件的进程801中。当插件805为风险插件时,将插件分配到终端设备设定的独立的进程802中。当插件806为异常插件时,禁用该插件,并将该插件806的错误报告发送给终端设备。根据不同安全等级的插件对插件执行更加合适的调度策略。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information of the plug-in 804 , the plug-in 805 or the plug-in 806 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 , the plug-in 805 or the plug-in 806 . When the plug-in 804 is a normal plug-in, the plug-in is allocated to the process 801 that can run the plug-in. When the plug-in 805 is a risk plug-in, the plug-in is allocated to an independent process 802 set by the terminal device. When the plug-in 806 is an abnormal plug-in, the plug-in is disabled, and an error report of the plug-in 806 is sent to the terminal device. Execute a more appropriate scheduling policy for plug-ins according to plug-ins of different security levels.
在图4对应的实施例的基础上,一种可能的实现方式中,S404包括:根据插件的多个特征信息可以将插件设置在与该插件的多个特征信息相适应的进程。On the basis of the embodiment corresponding to FIG. 4 , in a possible implementation manner, S404 includes: according to the plurality of characteristic information of the plug-in, the plug-in may be set in a process suitable for the plurality of characteristic information of the plug-in.
一种可能的实现方式中,特征信息包括负载信息和安全等级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,根据安全插件的负载信息计算可用于运行安全插件的第二进程的预测负载;第二进程的预测负载为将安全插件设置在第二进程时,第二进程的总负载;第二进程的数量为多个;将安全插件设置在第二目标进程中,第二目标进程为第二进程中,预测负载不超过第二负载阈值的进程。In a possible implementation, the feature information includes load information and security level information, and according to the feature information of the plugin, the plugin is set in a process that is compatible with the feature information of the plugin, including: when the security level information indicates that the plugin is a secure plugin. , calculate the predicted load of the second process that can be used to run the security plug-in according to the load information of the security plug-in; the predicted load of the second process is the total load of the second process when the security plug-in is set in the second process; The number is multiple; the security plug-in is set in the second target process, and the second target process is a process in the second process whose predicted load does not exceed the second load threshold.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息和安全等级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的负载信息调度插件。利用该插件的负载信息调度插件过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information and security level information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled using the load information of the plug-in. The process of scheduling the plug-in by using the load information of the plug-in will not be repeated.
当插件804为风险插件时,将插件分配到终端设备设定的独立的进程802中。当插件804为异常插件时,禁用该插件,可以将该插件804的错误报告发送给终端设备。When the plug-in 804 is a risk plug-in, the plug-in is allocated to an independent process 802 set by the terminal device. When the plug-in 804 is an abnormal plug-in, the plug-in is disabled, and an error report of the plug-in 804 can be sent to the terminal device.
一种可能的实现方式中,特征信息包括插件的负载信息和关联插件信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:根据插件的负载特征计算进程的预测负载,将插件设置在运行与关联插件信息相关的相关插件的进程,且该进程的预测负载不超终端设备设定的负载阈值。In a possible implementation, the feature information includes the load information of the plug-in and the associated plug-in information, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: calculating the prediction of the process according to the load characteristics of the plug-in. Load, the plug-in is set in the process of running the relevant plug-in related to the associated plug-in information, and the predicted load of the process does not exceed the load threshold set by the terminal device.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息和关联插件信息进行调度时。获取进程内与插件804读取资源相同的相关插件,当插件8011或插件8021与插件804读取的资源相同时,表征插件804,与插件8011或插件8021为相关插件。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information of the plug-in 804 and the associated plug-in information. Obtain the related plug-ins with the same resources read by the plug-in 804 in the process. When the resources read by the plug-in 8011 or the plug-in 8021 and the plug-in 804 are the same, the plug-in 804 is represented, and the plug-in 8011 or the plug-in 8021 is a related plug-in.
计算将插件804设置在该相关插件所在的进程801或进程802的预测负载,判断进程801的预测负载或进程802的预测负载与进程的负载阈值的关系。当进程801、进程802的预测负载不超过该负载阈值时,可以将插件804调度到进程801或进程802的任一进程 中。当进程801的预测负载不超过该负载阈值,且进程803的预测负载超过该负载阈值时,则将插件804调度到进程801中。Calculate the predicted load of the process 801 or process 802 where the plug-in 804 is located, and determine the relationship between the predicted load of the process 801 or the predicted load of the process 802 and the load threshold of the process. When the predicted load of the process 801 and the process 802 does not exceed the load threshold, the plug-in 804 can be scheduled to any process of the process 801 or the process 802. When the predicted load of the process 801 does not exceed the load threshold, and the predicted load of the process 803 exceeds the load threshold, the plug-in 804 is scheduled to the process 801 .
一种可能的实现方式中,特征信息包括插件的负载信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:根据插件的负载信息计算可用于运行该插件的进程的预测负载,根据插件的运行时长计算可用于运行该插件的进程的预测运行时长,将插件设置在该预测负载与该预测运行时长的乘积不超过系统设定的阈值的进程中。In a possible implementation, the feature information includes load information and running duration information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process that is compatible with the feature information of the plug-in, including: according to the load information of the plug-in. The predicted load of the process of the plug-in, calculate the predicted running time of the process that can be used to run the plug-in according to the running time of the plug-in, and set the plug-in in the process where the product of the predicted load and the predicted running time does not exceed the threshold set by the system .
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息和运行时长信息进行调度时。计算将该插件设置在进程801、进程802或进程803中,进程801、进程802或进程803的各进程的预测负载与各进程的预测运行时长。其中,进程801的预测运行时长为,插件804的运行时长信息与进程801中运行的四个插件的总运行时长的和;进程802的预测运行时长为,插件804的运行时长信息与进程802中运行的三个插件的总运行时长的和;进程803的预测运行时长为,插件804的运行时长信息与进程803中运行的两个插件的总运行时长的和。可以理解的是,预测运行时长是预估将所要调度的插件,调度到进程后,该进程的总运行时长,具体应用中,可以没有将插件调度到进程的执行步骤。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information and the running duration information of the plug-in 804 . The plug-in is set in the process 801, the process 802 or the process 803, and the predicted load of each process of the process 801, the process 802 or the process 803 and the predicted running time of each process are calculated. The predicted running duration of the process 801 is the sum of the running duration information of the plugin 804 and the total running duration of the four plugins running in the process 801 ; the predicted running duration of the process 802 is the running duration information of the plugin 804 and the The sum of the total running time of the three running plug-ins; the predicted running time of the process 803 is the sum of the running time information of the plug-in 804 and the total running time of the two plug-ins running in the process 803 . It can be understood that predicting the running time is to estimate the total running time of the process after the plug-in to be scheduled is scheduled to the process. In a specific application, there may be no execution steps for scheduling the plug-in to the process.
判断进程801、进程802或进程803的各进程的预测负载与各进程的预测运行时长的乘积与系统设定的阈值的关系。将插件804调度到进程的预测负载与进程的预测运行时长的乘积不超过系统设定的阈值的进程中。当进程801、进程802或进程803的各进程的预测负载与各进程的预测运行时长的乘积不超过系统设定的阈值时,可以将插件804调度到进程801、进程802或进程803的任一进程中。Determine the relationship between the product of the predicted load of each of the process 801, the process 802 or the process 803 and the predicted running time of each process and the threshold value set by the system. The plug-in 804 is scheduled to a process in which the product of the predicted load of the process and the predicted running time of the process does not exceed the threshold set by the system. When the product of the predicted load of each process of the process 801, the process 802 or the process 803 and the predicted running time of each process does not exceed the threshold set by the system, the plug-in 804 can be scheduled to any one of the process 801, the process 802 or the process 803. in progress.
一种可能的实现方式中,特征信息包括插件的负载信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,且该进程的预测负载不超终端设备设定的负载阈值。In a possible implementation manner, the feature information includes load information and priority information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: obtaining the priority and running status of each plug-in. The priority of each process is set, and the plug-in with high priority is set in the corresponding process with high priority, and the predicted load of the process does not exceed the load threshold set by the terminal device.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息和优先级信息进行调度时。当插件804的优先级较高时,则将插件调度到系统设定的优先级较高的进程801或进程802中。当该进程801与进程802的优先等级相同时,利用插件的负载信息调度插件。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information and priority information of the plug-in 804 . When the priority of the plug-in 804 is higher, the plug-in is scheduled to the process 801 or the process 802 with the higher priority set by the system. When the priority of the process 801 is the same as that of the process 802, the plug-in is scheduled using the load information of the plug-in.
计算将插件804设置在进程801或进程802中,进程801的预测负载或进程802的预测负载。判断进程801的预测负载或进程802的预测负载与进程的负载阈值的关系。当进程801的预测负载不超过负载阈值,且进程802的预测负载超过负载阈值时,则将插件804调度到进程801中。The calculation places the plug-in 804 in the process 801 or the process 802, the predicted load of the process 801 or the predicted load of the process 802. Determine the relationship between the predicted load of the process 801 or the predicted load of the process 802 and the load threshold of the process. When the predicted load of the process 801 does not exceed the load threshold, and the predicted load of the process 802 exceeds the load threshold, the plug-in 804 is scheduled into the process 801 .
一种可能的实现方式中,特征信息包括插件的安全等级信息和关联插件信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,将插件设置在运行与关联插件信息相关的相关插件所在的进程中。In a possible implementation, the feature information includes the security level information of the plug-in and the associated plug-in information, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: the security level information indicates that the plug-in is safe. In the case of a plugin, set the plugin to run in the same process as the associated plugin associated with the associated plugin information.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息和关联插件信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的关联插件信息调度插件。该利用插件的关联插件信息调度插件 的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information of the plug-in 804 and the associated plug-in information. The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled using the plug-in associated plug-in information. The process of scheduling the plug-in using the associated plug-in information of the plug-in will not be repeated. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取进程中,正在运行的各插件的运行时长,将待调度的插件,设置在各插件的运行时长与待调度的插件的运行时长相近的进程中。In a possible implementation manner, the feature information includes the security level information and runtime length information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: the security level information indicates that the plug-in is safe. In the case of plug-ins, obtain the running duration of each running plug-in in the process, and set the plug-in to be scheduled in a process whose running duration is similar to that of the plug-in to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息和运行时长信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的运行时长信息调度插件。该利用插件的运行时长信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information and the running duration information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the running time information of the plug-in. The process of scheduling the plug-in by using the running time information of the plug-in will not be described again. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中。In a possible implementation manner, the feature information includes the security level information and priority information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: the security level information indicates that the plug-in is safe. In the case of plug-ins, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息和优先级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的优先级信息调度插件。该利用插件的优先级信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information and priority information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled using the priority information of the plug-in. The process of scheduling the plug-in using the priority information of the plug-in will not be described again. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的关联插件信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取进程中,正在运行的各插件的运行时长,将插件设置在运行与关联插件信息相关的相关插件的进程,且该进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation manner, the feature information includes plug-in associated plug-in information and running duration information, and the plug-in is set in a process suitable for the plug-in feature information according to the plug-in feature information, including: in the acquisition process, each running The running time of the plug-in is set in the process of running the relevant plug-in related to the associated plug-in information, and the running time of each plug-in in the process is similar to the running time of the plug-in to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的关联插件和运行时长信息进行调度时。获取进程内与插件804读取资源相同的相关插件,以及当前进程中插件8011、插件8012、插件8013、插件8014、插件8021、插件8022、插件8023、插件8031和插件8032的各插件的运行时长。当插件8011或插件8021与插件804读取的资源相同时,则表示插件8011或插件8021与插件804为相关插件。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the associated plug-in and runtime information of the plug-in 804 . Get the related plugins in the process that read the same resources as plugin 804, and the running time of plugins 8011, 8012, 8013, 8014, 8021, 8022, 8023, 8031, and 8032 in the current process . When the resources read by the plug-in 8011 or the plug-in 8021 and the plug-in 804 are the same, it means that the plug-in 8011 or the plug-in 8021 and the plug-in 804 are related plug-ins.
利用插件的运行时长信息调度插件。获取相关插件所在的进程中插件8011、插件8012、插件8013、插件8014、插件8021、插件8022和插件8023的各插件的运行时长。判断该插件804的运行时长与各插件的运行时长的关系。当待调度插件的运行时长与上述插件中的其中一个插件的运行时长的差值不超过系统设定的预设阈值时,则将待调度插件调度到该插件所在的进程中。当插件804的运行时长与插件8021的运行时长的差值不超过该预设阈值,则将插件804调度到插件8021所在的进程802中。Use the plugin's runtime information to schedule plugins. Obtains the running time of each plug-in of plug-in 8011, plug-in 8012, plug-in 8013, plug-in 8014, plug-in 8021, plug-in 8022, and plug-in 8023 in the process where the relevant plug-in is located. The relationship between the running time of the plug-in 804 and the running time of each plug-in is determined. When the difference between the running duration of the plug-in to be scheduled and the running duration of one of the above plug-ins does not exceed the preset threshold set by the system, the plug-in to be scheduled is scheduled to the process where the plug-in is located. When the difference between the running time of the plug-in 804 and the running time of the plug-in 8021 does not exceed the preset threshold, the plug-in 804 is scheduled to the process 802 where the plug-in 8021 is located.
一种可能的实现方式中,特征信息包括插件的关联插件信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中。In a possible implementation manner, the feature information includes associated plugin information and priority information of the plugin, and according to the feature information of the plugin, the plugin is set in a process that is compatible with the feature information of the plugin, including: obtaining the priority and ongoing status of each plugin. The priority of each running process, the plug-in with high priority is set in the corresponding process with high priority, and the process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information run in the same process.
示例性的,在图8所示的调度场景中,用户根据插件804的关联插件信息和优先级信息进行调度。Exemplarily, in the scheduling scenario shown in FIG. 8 , the user performs scheduling according to the associated plug-in information and priority information of the plug-in 804 .
可以先根据插件的关联插件信息确定进程的范围,再利用插件的优先级信息选择合适的进程进行调度。获取进程内与插件804读取资源相同的相关插件,当插件8011或插件8021与插件804读取的资源相同时,表征插件804与插件8011或插件8021为相关插件。确定可以在满足关联插件信息的进程801或进程802中调度插件。再利用插件的优先级信息调度插件。将插件804调度到系统设定的进程的优先级较高的进程801中。You can first determine the scope of the process according to the plug-in's associated plug-in information, and then use the plug-in priority information to select an appropriate process for scheduling. Obtain the related plug-ins that have the same resources read by the plug-in 804 in the process. When the resources read by the plug-in 8011 or the plug-in 8021 and the plug-in 804 are the same, the plug-in 804 and the plug-in 8011 or the plug-in 8021 are represented as related plug-ins. It is determined that the plug-in can be scheduled in process 801 or process 802 that satisfies the associated plug-in information. Reuse the priority information of the plug-in to schedule the plug-in. The plug-in 804 is scheduled to the process 801 with a higher priority of the process set by the system.
也可以先根据插件的优先级信息确定进程的范围,再利用插件的关联插信息选择合适的进程进行调度。当插件804的优先级较高时,且终端设备设定的进程801与进程802的优先级都较高时,再进一步利用插件的关联信息调度插件。当插件804与进程801中的插件8013互为相关插件,则将插件调度到进程801中。It is also possible to first determine the scope of the process according to the priority information of the plug-in, and then use the associated plug-in information of the plug-in to select an appropriate process for scheduling. When the priority of the plug-in 804 is relatively high, and the priorities of the process 801 and the process 802 set by the terminal device are both relatively high, the related information of the plug-in is further used to schedule the plug-in. When the plug-in 804 and the plug-in 8013 in the process 801 are mutually related plug-ins, the plug-in is scheduled to the process 801 .
一种可能的实现方式中,特征信息包括插件的运行时长信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,且该优先级高的进程满足进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation manner, the feature information includes the runtime length information and priority information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: obtaining the priority and the current status of each plug-in. For the priority of each running process, the plug-in with high priority is set in the corresponding process with high priority, and the process with high priority satisfies that the running duration of each plug-in in the process is similar to that of the plug-in to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的运行时长信息和插件的优先级信息进行调度时。该进程中。当插件804的优先级较高时,则将插件调度到系统设定的优先级较高的进程801或进程802中。当该进程801与进程802的优先等级相同时,利用插件的运行时长信息调度插件。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the runtime information of the plug-in 804 and the priority information of the plug-in. in the process. When the priority of the plug-in 804 is higher, the plug-in is scheduled to the process 801 or the process 802 with a higher priority set by the system. When the priority of the process 801 is the same as that of the process 802, the plug-in is scheduled using the information of the running time of the plug-in.
获取相关插件所在的进程中插件8011、插件8012、插件8013、插件8014、插件8021、插件8022和插件8023的各插件运行时长。判断该插件804的运行时长与各插件的运行时长的关系。当待调度插件的运行时长与上述插件中的其中一个插件的运行时长的差值不超过系统设定的预设阈值时,则将待调度插件调度到该插件所在的进程中。当插件804的运行时长与插件8021的运行时长的差值不超过该预设阈值,则将插件804调度到插件8021所在的进程802中。Obtains the running time of each plug-in 8011, plug-in 8012, plug-in 8013, plug-in 8014, plug-in 8021, plug-in 8022, and plug-in 8023 in the process where the relevant plug-in is located. The relationship between the running time of the plug-in 804 and the running time of each plug-in is determined. When the difference between the running duration of the plug-in to be scheduled and the running duration of one of the above plug-ins does not exceed the preset threshold set by the system, the plug-in to be scheduled is scheduled to the process where the plug-in is located. When the difference between the running time of the plug-in 804 and the running time of the plug-in 8021 does not exceed the preset threshold, the plug-in 804 is scheduled to the process 802 where the plug-in 8021 is located.
一种可能的实现方式中,特征信息包括插件的安全等级信息、负载信息和关联插件信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,根据插件的负载特征计算进程的预测负载,将插件设置在运行与关联插件信息相关的相关插件的进程,且该进程的预测负载不超终端设备设定的负载阈值。In a possible implementation, the feature information includes the security level information, load information and associated plugin information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: indicating in the security level information. When the plug-in is a secure plug-in, the predicted load of the process is calculated according to the load characteristics of the plug-in, and the plug-in is set in the process of running the relevant plug-in related to the associated plug-in information, and the predicted load of the process does not exceed the load threshold set by the terminal device. .
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息和关联插件信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的负载信息和关联插件信息调度插件。该利用该插件的负载信息和关联插件信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information of the plug-in 804 and the associated plug-in information. The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled using the load information of the plug-in and the associated plug-in information. The process of scheduling the plug-in by using the load information of the plug-in and the associated plug-in information will not be described again. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息、负载信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,根据插件的负载信息计算可用于运行该插件的进程的预测负载,根据插件的运行时长计算可用于运行该插件的进程的预测运行时长,将插件 设置在该预测负载与该预测运行时长的乘积不超过系统设定的阈值的进程中。In a possible implementation manner, the feature information includes the security level information, load information and running time information of the plug-in, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: indicating in the security level information. If the plug-in is a secure plug-in, calculate the predicted load of the process that can be used to run the plug-in according to the load information of the plug-in, calculate the predicted running time of the process that can be used to run the plug-in according to the running time of the plug-in, and set the plug-in to the predicted load. The product of the predicted running time does not exceed the threshold set by the system in the process.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、负载信息和运行时长信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的负载信息和运行时长信息调度插件。该利用该插件的负载信息和运行时长信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, load information and running duration information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the load information and running time information of the plug-in. The process of scheduling the plug-in by using the load information and the running time information of the plug-in will not be repeated. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息、负载信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,且该进程的预测负载不超终端设备设定的负载阈值。In a possible implementation manner, the feature information includes the security level information, load information and priority information of the plug-in, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: indicating in the security level information. If the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority, and the predicted load of the process does not exceed the terminal The load threshold set by the device.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、负载信息和优先级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的负载信息和优先级信息调度插件。该利用该插件的负载信息和优先级信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, load information and priority information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled using the load information and priority information of the plug-in. The process of scheduling the plug-in by using the load information and priority information of the plug-in will not be repeated. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息、关联插件信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取进程中,正在运行的各插件的运行时长,将插件设置在运行与关联插件信息相关的相关插件的进程,且该进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation manner, the feature information includes the security level information of the plug-in, the associated plug-in information and the running duration information, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: in the security level information Indicates that when the plug-in is a secure plug-in, obtain the running time of each plug-in running in the process, set the plug-in in the process of running the relevant plug-in related to the associated plug-in information, and the running time of each plug-in in the process is related to the to-be-scheduled plug-in. The runtime of the plugin is similar.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、关联插件信息和运行时长信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的关联插件信息和运行时长信息调度插件。该利用该插件的关联插件信息和运行时长信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information of the plug-in 804 , the associated plug-in information and the running duration information. The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the plug-in associated plug-in information and runtime information of the plug-in. The process of scheduling the plug-in using the plug-in associated plug-in information and runtime information of the plug-in will not be repeated. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息、关联插件信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中。In a possible implementation, the feature information includes the security level information of the plug-in, associated plug-in information and priority information, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: in the security level information Indicates that when the plug-in is a secure plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority, which satisfies the relationship between the plug-in to be scheduled and the Related plugins related to plugin information run in the same process.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、关联插件信息和优先级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的关联插件信息和优先级信息调度插件。该利用该插件的关联插件信息和优先级信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, associated plug-in information and priority information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled using its associated plug-in information and priority information. The process of scheduling a plug-in by using the plug-in associated plug-in information and priority information of the plug-in will not be repeated. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息、运行时长信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,且该优先级高的进程满足进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation, the feature information includes the security level information, runtime information and priority information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: in the security level information Indicates that when the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority, and the process with high priority satisfies The running duration of each plugin in the process is similar to the running duration of the plugin to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、运行时长信息和优先级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的运行时长信息和优先级信息调度插件。该利用该插件的运行时长信息和优先级信息调度插件的过程不再赘述。当识别插件804为风险插件或异常插件时,利用插件的安全等级信息进行调度,该利用插件的安全等级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, running duration information and priority information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the running time information and priority information of the plug-in. The process of scheduling the plug-in by using the running time information and the priority information of the plug-in will not be repeated. When the plug-in 804 is identified as a risk plug-in or an abnormal plug-in, the security level information of the plug-in is used for scheduling, and the process of scheduling the plug-in using the security level information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的负载信息、关联插件信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:将插件设置在运行与关联插件信息相关的相关插件所在的进程中,且该进程的预测负载与该预测运行时长的乘积不超过系统设定的阈值。In a possible implementation manner, the feature information includes the load information of the plug-in, the associated plug-in information and the running time length information, and according to the feature information of the plug-in, the plug-in is set in a process that is suitable for the feature information of the plug-in, including: setting the plug-in to run. The relevant plug-in related to the relevant plug-in information is located in the process, and the product of the predicted load of the process and the predicted running time does not exceed the threshold set by the system.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息、关联插件信息和运行时长信息进行调度时。获取进程内与插件804读取资源相同的相关插件,当插件8011或插件8021与插件804读取的资源相同时,表征插件804与插件8011或插件8021为相关插件,确定可以在满足关联插件信息的进程801和进程802中调度插件。利用插件的负载信息和运行时长信息调度插件。该利用插件的负载信息和运行时长信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information of the plug-in 804 , the associated plug-in information and the running duration information. Obtain the related plug-ins that have the same resources read by plug-in 804 in the process. When the resources read by plug-in 8011 or plug-in 8021 and plug-in 804 are the same, it indicates that plug-in 804 and plug-in 8011 or plug-in 8021 are related plug-ins. The process 801 and process 802 schedule plugins. Use the load information and runtime information of the plug-in to schedule plug-ins. The process of scheduling the plug-in by using the load information and the running time information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的负载信息、优先级信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,且该优先级高的进程的预测负载与该预测运行时长的乘积不超过系统设定的阈值。In a possible implementation, the feature information includes load information, priority information and running duration information of the plug-in, and according to the feature information of the plug-in, the plug-in is set in a process suitable for the feature information of the plug-in, including: obtaining the priority of each plug-in. and the priority of each running process, set the plug-in with high priority in the corresponding process with high priority, and the product of the predicted load of the process with high priority and the predicted running time does not exceed the system setting the threshold value.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息、优先级信息和运行时长信息进行调度时。当插件804的优先级较高时,则将插件调度到系统设定的优先级较高的进程801或进程802中。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information, priority information and running duration information of the plug-in 804 . When the priority of the plug-in 804 is higher, the plug-in is scheduled to the process 801 or the process 802 with a higher priority set by the system.
当该进程801与进程802的优先等级相同时,利用插件的负载信息和运行时长信息调度插件。该利用插件的负载信息和运行时长信息调度插件的过程不再赘述。When the priority of the process 801 is the same as that of the process 802, the plug-in is scheduled by using the load information and running time information of the plug-in. The process of scheduling the plug-in by using the load information and the running time information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的负载信息、关联插件信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中,该进程还满足该进程的预测负载不超终端设备设定的负载阈值。In a possible implementation, the feature information includes load information of the plug-in, associated plug-in information and priority information, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: obtaining the priority of each plug-in. Rank and the priority of each running process, set the plug-in with high priority in the corresponding process with high priority, this process satisfies that the plug-in to be scheduled and the related plug-in related to the related plug-in information are running in the same process, the process It is also satisfied that the predicted load of the process does not exceed the load threshold set by the terminal device.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息、关联插件信息和优先级信息进行调度时。获取进程内与插件804读取资源相同的相关插件,获取正在运行的各进程的优先级。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information, associated plug-in information and priority information of the plug-in 804 . Obtain the relevant plug-ins in the process with the same resources read by the plug-in 804, and obtain the priority of each running process.
当插件804的优先级较高时,且终端设备设定的进程801、进程802和进程803的优先 级都较高时,利用插件的关联信息调度插件。当插件804与进程801中的插件8013以及进程802中的插件8023互为相关插件,则可以将插件调度到进程801中或进程802中。When the priority of the plug-in 804 is high, and the priorities of the process 801, the process 802 and the process 803 set by the terminal device are all high, the plug-in is scheduled by using the related information of the plug-in. When the plug-in 804 and the plug-in 8013 in the process 801 and the plug-in 8023 in the process 802 are mutually related plug-ins, the plug-in can be scheduled into the process 801 or the process 802 .
利用插件的负载信息,计算将插件804设置在进程801或进程802中,进程801的预测负载或进程802的预测负载。判断进程801的预测负载或进程802的预测负载与进程的负载阈值的关系。当进程801的预测负载不超过负载阈值,且进程802的预测负载超过负载阈值时,则将插件804调度到进程801中。Using the load information of the plug-in, the plug-in 804 is set in the process 801 or the process 802 , the predicted load of the process 801 or the predicted load of the process 802 is calculated. Determine the relationship between the predicted load of the process 801 or the predicted load of the process 802 and the load threshold of the process. When the predicted load of the process 801 does not exceed the load threshold, and the predicted load of the process 802 exceeds the load threshold, the plug-in 804 is scheduled into the process 801 .
当进程801、进程802和进程803均不能够同时满足插件的负载信息、关联插件信息和优先级信息,则将插件804调度的异常情况发送给终端设备。When none of the process 801, the process 802 and the process 803 can simultaneously satisfy the load information, associated plug-in information and priority information of the plug-in, the abnormal situation scheduled by the plug-in 804 is sent to the terminal device.
一种可能的实现方式中,特征信息包括插件的关联插件信息、运行时长信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中,且该进程还满足进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation, the feature information includes associated plugin information, runtime information and priority information of the plugin, and the plugin is set in a process that is compatible with the feature information of the plugin according to the feature information of the plugin, including: obtaining the information of each plugin. The priority and the priority of each running process, the plug-in with high priority is set in the corresponding process with high priority, the process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information are running in the same process, and The process also satisfies that the running duration of each plug-in in the process is similar to the running duration of the plug-in to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的关联插件信息、运行时长信息和优先级信息进行调度时。获取进程内与插件804读取资源相同的相关插件,当插件8011、插件8021或插件8031与插件804读取的资源相同时,表征插件804与插件8011、插件8021、或插件8031为相关插件。确定可以在满足关联插件信息的进程801、进程802或进程803中调度插件Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the associated plug-in information, runtime information and priority information of the plug-in 804 . Obtain the related plug-ins that have the same resources read by the plug-in 804 in the process. When the resources read by the plug-in 8011, the plug-in 8021 or the plug-in 8031 and the plug-in 804 are the same, it indicates that the plug-in 804 and the plug-in 8011, the plug-in 8021, or the plug-in 8031 are related plug-ins. Determine that the plug-in can be scheduled in process 801, process 802, or process 803 that satisfies the associated plug-in information
利用插件的优先级信息调度插件。当插件804的优先级较高,且终端设备设定的进程801和进程803的优先级都较高时,再进一步利用插件的运行时长信息调度插件。Schedule plugins using the plugin's priority information. When the priority of the plug-in 804 is relatively high, and the priorities of the process 801 and the process 803 set by the terminal device are both relatively high, the plug-in is further scheduled by using the running time information of the plug-in.
获取满足关联插件信息和优先级信息的进程801和进程803中:插件8011、插件8012、插件8013、插件8014、插件8031和插件8032的各插件运行时长。判断该插件804的运行时长与各插件的运行时长的关系。当待调度插件的运行时长与上述插件8011、插件8012、插件8013、插件8014、插件8031和插件8032中的其中一个插件的运行时长的差值不超过预设阈值时,则将待调度插件调度到该插件所在的进程中。当插件804的运行时长与插件8031的运行时长的差值不超过该预设阈值,则将插件804调度到插件8031所在的进程803中。In the process 801 and the process 803 that satisfy the associated plug-in information and priority information: the plug-in 8011 , the plug-in 8012 , the plug-in 8013 , the plug-in 8014 , the plug-in 8031 , and the plug-in 8032 each plug-in running time is obtained. The relationship between the running time of the plug-in 804 and the running time of each plug-in is determined. When the difference between the running duration of the plug-in to be scheduled and the running duration of one of the above plug-ins 8011, 8012, 8013, 8014, 8031 and 8032 does not exceed the preset threshold, the to-be-scheduled plug-in will be scheduled. into the process in which the plugin resides. When the difference between the running time of the plug-in 804 and the running time of the plug-in 8031 does not exceed the preset threshold, the plug-in 804 is scheduled to the process 803 where the plug-in 8031 is located.
一种可能的实现方式中,特征信息包括插件的安全等级信息、负载信息、关联插件信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,将插件设置在运行与关联插件信息相关的相关插件所在的进程中,且该进程的预测负载与该预测运行时长的乘积不超过系统设定的阈值。In a possible implementation, the feature information includes the security level information of the plug-in, load information, associated plug-in information and runtime length information, and the plug-in is set in a process that is compatible with the plug-in's feature information according to the plug-in's feature information, including: When the security level information indicates that the plug-in is a secure plug-in, the plug-in is set in the process where the relevant plug-in related to the associated plug-in information is running, and the product of the predicted load of the process and the predicted running time does not exceed the threshold set by the system. .
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、负载信息、关联插件信息和运行时长信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的安全等级信息、关联插件信息和运行时长信息调度插件。该利用该插件的关联插件信息、关联插件信息和运行时长信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, load information, associated plug-in information and running duration information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the security level information, associated plug-in information and running time information of the plug-in. The process of scheduling the plug-in by using the associated plug-in information, the associated plug-in information and the running time information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的安全等级信息、负载信息、优先级信息和运行时长信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包 括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,且该优先级高的进程的预测负载与该预测运行时长的乘积不超过系统设定的阈值。In a possible implementation manner, the feature information includes the security level information, load information, priority information and runtime length information of the plug-in, and the plug-in is set in a process that is compatible with the feature information of the plug-in according to the feature information of the plug-in, including: The security level information indicates that when the plug-in is a security plug-in, the priority of each plug-in and the priority of each running process are obtained, and the plug-in with high priority is set in the corresponding process with high priority, and the priority is high. The product of the predicted load of the process and the predicted running time does not exceed the threshold set by the system.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、负载信息、优先级信息和运行时长信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的负载信息、优先级信息和运行时长信息调度插件。该利用该插件的负载信息、优先级信息和运行时长信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, load information, priority information and running duration information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the load information, priority information and running time information of the plug-in. The process of scheduling the plug-in by using the load information, priority information and running time information of the plug-in will not be described again.
一种可能的实现方式中,特征信息包括插件的安全等级信息、负载信息、关联插件信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中,该进程还满足该进程的预测负载不超终端设备设定的负载阈值。In a possible implementation, the feature information includes the security level information of the plug-in, load information, associated plug-in information and priority information, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: The security level information indicates that when the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority. The plug-in and related plug-ins related to the associated plug-in information run in the same process, and the process also satisfies that the predicted load of the process does not exceed the load threshold set by the terminal device.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、负载信息、关联插件信息和优先级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的负载信息、关联插件信息和优先级信息调度插件。该利用该插件的负载信息、关联插件信息和优先级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, load information, associated plug-in information and priority information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled by using the load information, associated plug-in information and priority information of the plug-in. The process of scheduling the plug-in by using the load information, associated plug-in information and priority information of the plug-in will not be described again.
一种可能的实现方式中,特征信息包括插件的安全等级信息、关联插件信息、运行时长信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中,且该进程还满足进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation, the feature information includes the security level information of the plug-in, the associated plug-in information, the running duration information and the priority information, and the plug-in is set in a process suitable for the feature information of the plug-in according to the feature information of the plug-in, including: When the security level information indicates that the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority. The scheduling plugin and related plugins related to the associated plugin information run in the same process, and the process also satisfies that the running duration of each plugin in the process is similar to the running duration of the plugin to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、关联插件信息、运行时长信息和优先级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件关联插件信息、运行时长信息和优先级信息调度插件。该利用该插件的关联插件信息、运行时长信息和优先级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, associated plug-in information, runtime information and priority information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is used to associate plug-in information, runtime information and priority information to schedule the plug-in. The process of scheduling the plug-in by using the associated plug-in information, running time information and priority information of the plug-in will not be repeated.
一种可能的实现方式中,特征信息包括插件的负载信息、关联插件信息、运行时长信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中,且该进程还满足进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation manner, the feature information includes the load information of the plug-in, associated plug-in information, running time information and priority information, and the plug-in is set in a process suitable for the plug-in feature information according to the plug-in feature information, including: obtaining: The priority of each plug-in and the priority of each running process, the plug-in with high priority is set in the corresponding process with high priority, and the process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information are running in the same process. , and the process also satisfies that the running duration of each plugin in the process is similar to the running duration of the plugin to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的负载信息、关联插件信息、运行时长信息和优先级信息进行调度时。获取进程内与插件804读取资源相同的相关插件,获取正在运行的各进程的优先级。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the load information of the plug-in 804 , the associated plug-in information, the running time information and the priority information. Obtain the relevant plug-ins in the process with the same resources read by the plug-in 804, and obtain the priority of each running process.
当插件804的优先级较高时,且终端设备设定的进程801、进程802和进程803的优先 级都较高时,利用插件的关联信息调度插件。当插件804与进程801中的插件8013以及进程802中的插件8023互为相关插件,则可以将插件调度到进程801中或进程802中。When the priority of the plug-in 804 is high, and the priorities of the process 801, the process 802 and the process 803 set by the terminal device are all high, the plug-in is scheduled by using the related information of the plug-in. When the plug-in 804 and the plug-in 8013 in the process 801 and the plug-in 8023 in the process 802 are mutually related plug-ins, the plug-in can be scheduled into the process 801 or the process 802 .
利用插件的负载信息和插件的运行时长调度插件。获取满足关联插件信息和优先级信息的进程801和进程802中:插件8011、插件8012、插件8013、插件8014、插件8021、插件8022和插件8023的各进程的运行时长。判断该插件804的运行时长与各插件的运行时长的关系。当待调度插件的运行时长与上述插件8011、插件8012、插件8013、插件8014、插件8021、插件8022和插件8023中的其中一个插件的运行时长的差值不超过预设阈值时,则将待调度插件调度到该插件所在的进程中。当插件804的运行时长与插件8013的运行时长的差值不超过该预设阈值,则将插件804调度到插件8013所在的进程801中。Schedule plugins using the plugin's load information and the plugin's runtime. In the process 801 and the process 802 satisfying the associated plug-in information and priority information, the running time of each process of the plug-in 8011 , the plug-in 8012 , the plug-in 8013 , the plug-in 8014 , the plug-in 8021 , the plug-in 8022 and the plug-in 8023 is obtained. The relationship between the running time of the plug-in 804 and the running time of each plug-in is determined. When the difference between the running duration of the plug-in to be scheduled and the running duration of one of the above plug-ins 8011, 8012, 8013, 8014, 8021, 8022 and 8023 does not exceed the preset threshold, the Scheduled plugins are scheduled into the process where the plugin resides. When the difference between the running time of the plug-in 804 and the running time of the plug-in 8013 does not exceed the preset threshold, the plug-in 804 is scheduled to the process 801 where the plug-in 8013 is located.
一种可能的实现方式中,特征信息包括插件的安全等级信息、负载信息、关联插件信息、运行时长信息和优先级信息,根据插件的特征信息将插件设置在与插件的特征信息相适应的进程,包括:在安全等级信息表示插件为安全插件的情况下,获取各插件的优先级和正在运行的各进程的优先级,将优先级高的插件设置在相应的优先级高的进程中,该进程满足待调度插件与关联插件信息相关的相关插件运行在同一进程中,且该进程还满足进程中各插件的运行时长与待调度的插件的运行时长相近。In a possible implementation, the feature information includes the security level information of the plug-in, load information, associated plug-in information, runtime information and priority information, and the plug-in is set in a process that is compatible with the plug-in's feature information according to the plug-in's feature information. , including: when the security level information indicates that the plug-in is a security plug-in, obtain the priority of each plug-in and the priority of each running process, and set the plug-in with high priority in the corresponding process with high priority. The process satisfies that the plug-in to be scheduled and the related plug-in related to the associated plug-in information run in the same process, and the process also satisfies that the running time of each plug-in in the process is similar to that of the plug-in to be scheduled.
示例性的,在图8所示的调度场景中,当用户根据插件804的安全等级信息、负载信息、关联插件信息、运行时长信息和优先级信息进行调度时。根据插件804的安全等级信息确定该插件的插件类型。当插件804为正常插件时,利用该插件的负载信息、关联插件信息、运行时长信息和优先级信息调度插件。该利用该插件的负载信息、关联插件信息、运行时长信息和优先级信息调度插件的过程不再赘述。Exemplarily, in the scheduling scenario shown in FIG. 8 , when the user performs scheduling according to the security level information, load information, associated plug-in information, runtime information and priority information of the plug-in 804 . The plug-in type of the plug-in is determined according to the security level information of the plug-in 804 . When the plug-in 804 is a normal plug-in, the plug-in is scheduled using the load information, associated plug-in information, running time information and priority information of the plug-in. The process of scheduling the plug-in by using the load information, associated plug-in information, running time information and priority information of the plug-in will not be repeated.
可以理解的是,在本申请实施例提供的利用上述插件的特征信息间的相互结合得到的信息调度插件的场景中,当进程801、进程802和进程803均不能够同时满足上述插件的特征信息间的相互结合的信息,则将插件804调度的异常情况发送给终端设备。It can be understood that, in the information scheduling plug-in scenario provided by the embodiment of the present application using the combination of the feature information of the above plug-ins, when the process 801, the process 802, and the process 803 cannot satisfy the feature information of the above plug-ins at the same time. If the information is combined with each other, the abnormal situation scheduled by the plug-in 804 is sent to the terminal device.
可以理解的是,本申请实施例中对根据安全等级信息、负载信息、关联插件信息、运行时长信息和优先级信息执行插件调度的先后不作限定。根据插件的不同的特征信息,可以对插件执行更加合理的调度。It can be understood that, in this embodiment of the present application, there is no limitation on the order in which plug-in scheduling is performed according to security level information, load information, associated plug-in information, running duration information, and priority information. According to different feature information of the plug-in, more reasonable scheduling can be performed on the plug-in.
在图4对应的实施例的基础上,一种可能的实现方式中,S403包括:利用机器学习模型确定插件的特征信息;其中,机器学习模型是利用进程相关样本信息训练得到。本申请实施例中,可以利用终端设备计算插件的特征信息,也可以利用云端设备计算插件的特征信息。On the basis of the embodiment corresponding to FIG. 4 , in a possible implementation manner, S403 includes: using a machine learning model to determine the feature information of the plug-in; wherein, the machine learning model is obtained by training using process-related sample information. In this embodiment of the present application, the terminal device may be used to calculate the feature information of the plug-in, or the cloud device may be used to calculate the feature information of the plug-in.
一种可能的实现方式中,在终端设备中,利用机器学习模型确定插件的特征信息。In a possible implementation manner, in the terminal device, the feature information of the plug-in is determined by using a machine learning model.
示例性的,利用机器学习模型确定插件的特征信息,其过程包括但不限于下述步骤:Exemplarily, using the machine learning model to determine the feature information of the plug-in, the process includes but is not limited to the following steps:
S4031、获取进程相关样本信息。S4031. Obtain process-related sample information.
该进程相关样本信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。示例性的,进程名称可以为终端设备为标识不同的进程,为进程设置的标识符号;插件列表可以为该进程当前运行的插件的名称列表;内存占比可以为该进程占终端设备的内存的百分比;中央处理器CPU使用率可以为该进程占终端设备的CPU的百分比;异常信息可以表示该进程信息是否是在进程发生异常时采集的,当该进 程信息是在进程发生异常时采集的,异常信息的取值为真,当该进程信息不是在进程发生异常时采集的,异常信息的取值为假。The sample information related to the process includes one or more of the following: process name, plug-in list, memory ratio, CPU usage of the central processing unit, or abnormal information. Exemplarily, the process name can be the identification symbol set by the terminal device to identify different processes; the plug-in list can be the name list of the plug-ins currently running by the process; the memory ratio can be the amount of the memory of the terminal device occupied by the process. Percentage; the CPU usage rate of the central processing unit can be the percentage of the CPU of the process in the terminal device; the exception information can indicate whether the process information is collected when the process is abnormal, and when the process information is collected when the process is abnormal, The value of the exception information is true. When the process information is not collected when the process is abnormal, the value of the exception information is false.
该获取进程相关样本信息,可以是从一个终端设备中多次获取进程相关信息得到的;也可以是从多个终端设备中获取进程相关信息得到的。可以理解的是,获取进程相关样本信息的方式可以根据实际场景有所不同,本申请实施例中对获取进程相关样本信息的方式不做限定。The acquired process-related sample information may be obtained by acquiring process-related information from one terminal device multiple times; or may be obtained by acquiring process-related information from multiple terminal devices. It can be understood that the manner of acquiring process-related sample information may vary according to actual scenarios, and the manner of acquiring process-related sample information is not limited in this embodiment of the present application.
S4032、将该进程相关样本信息输入到机器学习模型中训练。S4032. Input the process-related sample information into a machine learning model for training.
示例性的,将进程相关样本信息输入到机器学习模型中,输出插件的负载信息;利用损失函数,比较模型输出的插件的预测负载信息与插件的真实负载信息的差距;当该输出的插件的预测负载信息与插件的真实负载信息的差距不满足损失函数,则调整该模型的参数,继续训练;直到输出插件的预测负载信息与插件的真实负载信息的差值满足损失函数,则模型训练结束,得到能够确定插件的负载信息的机器学习模型。Exemplarily, the process-related sample information is input into the machine learning model, and the load information of the plug-in is output; the loss function is used to compare the gap between the predicted load information of the plug-in output by the model and the actual load information of the plug-in; If the difference between the predicted load information and the plug-in's actual load information does not satisfy the loss function, adjust the parameters of the model and continue training; until the difference between the output plug-in's predicted load information and the plug-in's actual load information satisfies the loss function, the model training ends , and get a machine learning model that can determine the load information of the plug-in.
S4033、将进程相关信息输入到机器学习模型中,输出插件的特征信息。S4033: Input the process-related information into the machine learning model, and output the feature information of the plug-in.
终端设备利用进程快照获取进程相关信息。该进程相关信息包括:下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。Terminal devices use process snapshots to obtain process-related information. The process-related information includes: one or more of the following: process name, plug-in list, memory ratio, CPU usage of the central processing unit, or abnormal information.
将进程相关信息输入到训练好的机器学习模型中,就能够输出插件的特征信息,以特征信息包括负载信息为例,该插件的负载信息可以为机器学习模型中插件对应的权重。By inputting process-related information into the trained machine learning model, the feature information of the plug-in can be output. Taking the feature information including load information as an example, the load information of the plug-in can be the weight corresponding to the plug-in in the machine learning model.
示例性的,该插件的负载信息Value load可以表示为: Exemplarily, the load information Value load of the plug-in can be expressed as:
Value load=w 1x 1+w 2x 2+…+w nx n Value load = w 1 x 1 +w 2 x 2 +…+w n x n
其中,w n为机器学习模型中插件对应的权重,w n代表插件x n运行时的负载信息。 Among them, w n is the weight corresponding to the plug-in in the machine learning model, and w n represents the load information of the plug-in x n when it is running.
可以理解的是,本申请实施例对确定该插件的特征信息的方式不做限定。It can be understood that, the embodiment of the present application does not limit the manner of determining the feature information of the plug-in.
一种可能的实现方式中,除上述利用机器学习模型确定特征信息外,还可以利用统计学方法获取插件的特征信息。In a possible implementation manner, in addition to the above-mentioned use of the machine learning model to determine the feature information, a statistical method can also be used to obtain the feature information of the plug-in.
示例性的,利用统计学方法获得插件的安全等级信息。终端设备获取进程的进程相关信息,利用该进程相关信息计算插件的安全等级信息。该安全等级信息可以包括:插件引发的进程崩溃概率、插件引发的内存泄露概率、或根据进程崩溃概率和内存泄露概率计算得到的概率。Exemplarily, the security level information of the plug-in is obtained by using a statistical method. The terminal device acquires the process-related information of the process, and uses the process-related information to calculate the security level information of the plug-in. The security level information may include: a process crash probability caused by a plug-in, a memory leak probability caused by a plug-in, or a probability calculated according to the process crash probability and the memory leak probability.
该插件引发的进程崩溃概率P xn可以为: The process crash probability P xn caused by the plug-in can be:
P xn=PNum xn/PNum tatal P xn =PNum xn /PNum tatal
其中,PNum xn为崩溃进程中该插件出现的总次数,PNum tatal为总的进程崩溃次数。 Among them, PNum xn is the total number of times the plugin appears in the crash process, and PNum tatal is the total number of process crashes.
该插件引发的内存泄露概率L xn可以为: The memory leak probability L xn caused by this plugin can be:
L xn=LNum xn/LNum tatal L xn =LNum xn /LNum tatal
其中,LNum xn为内存泄漏进程中插件出现的总次数,LNum tatal为总的进程内存泄漏次数的比值; Among them, LNum xn is the total number of plug-ins in the memory leak process, and LNum tatal is the ratio of the total number of process memory leaks;
该根据进程崩溃概率和内存泄露概率计算得到的概率可以为,该进程崩溃概率和该内存泄露概率的加权。可以理解的是,本申请实施例中对该加权中权重的数值以及获取插件特征信息的方式不做限定。机器学习模型强大的学习和计算能力,能够对进程相关样本进行充分训练,就能够利用机器学习模型获得更加准确的特征信息。The probability calculated according to the process crash probability and the memory leak probability may be the weight of the process crash probability and the memory leak probability. It can be understood that, in the embodiments of the present application, the value of the weight in the weighting and the manner of acquiring the plug-in feature information are not limited. The powerful learning and computing capabilities of the machine learning model can fully train the process-related samples, and the machine learning model can be used to obtain more accurate feature information.
示例性的,图9为本申请实施例提供的一种获取特征信息的流程示意图。第二设备(例如云端设备)可以利用机器学习模型或统计学方法等其他类型的方法计算插件 的特征信息。如图9所示,该方法可以包括但不限于如下步骤:Exemplarily, FIG. 9 is a schematic flowchart of acquiring feature information according to an embodiment of the present application. The second device (for example, a cloud device) can use other types of methods such as machine learning models or statistical methods to calculate the feature information of the plug-in. As shown in Figure 9, the method may include but is not limited to the following steps:
S901、第二设备获取第一设备(例如终端设备)中的进程相关信息。S901. The second device acquires process-related information in the first device (for example, a terminal device).
本申请实施例中,第二设备获取第一设备中的进程相关信息的时机可以为:定时从多个设备获取多个设备的进程相关信息;或者,在进程异常时发送的进程相关信息。In this embodiment of the present application, the timing for the second device to acquire the process-related information in the first device may be: periodically acquiring process-related information of multiple devices from multiple devices; or, process-related information sent when the process is abnormal.
S902、第二设备根据进程相关信息计算特征信息文件。S902. The second device calculates the feature information file according to the process-related information.
本申请实施例中,该特征信息文件中包括多个插件的特征信息,该插件的特征信息包括插件对进程运行产生影响的信息。该计算特征信息文件的方法可以为利用机器学习、统计学方法或其他类型的计算方法计算插件的特征信息,并将该插件的特征信息存储到特征信息文件中。其中,利用机器学习模型或统计学模型计算特征信息的方法不再赘述。In this embodiment of the present application, the feature information file includes feature information of a plurality of plug-ins, and the feature information of the plug-ins includes information that the plug-ins affect the running of the process. The method for calculating the feature information file may be to use machine learning, statistical methods or other types of computing methods to calculate the feature information of the plug-in, and store the feature information of the plug-in in the feature information file. The method for calculating feature information by using a machine learning model or a statistical model will not be described again.
S903、第二设备向第一设备发送特征信息文件。S903. The second device sends the feature information file to the first device.
S904、第一设备根据插件的标识从特征信息文件中获取插件的特征信息。S904. The first device acquires the feature information of the plug-in from the feature information file according to the identifier of the plug-in.
该插件的标识能够表征插件的特征信息。The plug-in's identifier can represent the characteristic information of the plug-in.
通过上述S901-S904可以在第二设备中计算插件的特征信息,将包含插件的特征信息的特征信息文件发送至第一设备。第一设备可以利用插件的特征信息文件中插件的特征信息执行插件的调度。本申请实施例中对该插件的调度方式不再赘述。Through the above S901-S904, the feature information of the plug-in can be calculated in the second device, and the feature information file containing the feature information of the plug-in can be sent to the first device. The first device may perform scheduling of the plug-in using the characteristic information of the plug-in in the characteristic information file of the plug-in. In this embodiment of the present application, the scheduling method of the plug-in is not described again.
本申请实施例中,也可以从第一设备计算插件特征信息,由于第一设备的计算能力有限以及第一设备还需要执行插件的调度等任务的原因,为不影响第一设备的其他业务,可以将计算插件特征信息的业务交由计算能力更强且专用的第二设备去执行。由于第二设备通常具有强大的计算能力,由第二设备计算插件的特征信息,可以减少第一设备的计算量,节约第一设备的计算资源。In this embodiment of the present application, the plug-in feature information may also be calculated from the first device. Due to the limited computing capability of the first device and the reason that the first device still needs to perform tasks such as plug-in scheduling, in order not to affect other services of the first device, The business of calculating the feature information of the plug-in can be performed by a second device with stronger computing power and a special purpose. Since the second device usually has powerful computing capabilities, the feature information of the plug-in is calculated by the second device, which can reduce the amount of computation of the first device and save the computing resources of the first device.
对应于图9的实施例,示例性的,图10提供了一种插件管理系统的框架示意图。如图10所示,该插件管理系统,由外部请求产生模块1001、请求处理模块1002、插件调度模块1003、运行管理模块1004、返回调用结果1005、云平台1006和智能管理模块1007构成。Corresponding to the embodiment of FIG. 9, exemplarily, FIG. 10 provides a schematic frame diagram of a plug-in management system. As shown in FIG. 10 , the plug-in management system consists of an external request generation module 1001 , a request processing module 1002 , a plug-in scheduling module 1003 , an operation management module 1004 , a return call result 1005 , a cloud platform 1006 and an intelligent management module 1007 .
需要说明的是,可以在图2中的应用程序层实现外部请求产生模块1001所执行的步骤,在应用程序框架层实现请求处理模块1002、插件调度模块1003、运行管理模块1004、返回调用结果1005、云平台1006和智能管理模块1007所执行的步骤。可能的实现方式中,云平台1006也可以不在图2所示的终端设备中。It should be noted that the steps performed by the external request generation module 1001 can be implemented in the application layer in FIG. 2 , and the request processing module 1002 , the plug-in scheduling module 1003 , the operation management module 1004 , and the return call result 1005 can be implemented in the application framework layer. , the steps performed by the cloud platform 1006 and the intelligent management module 1007 . In a possible implementation manner, the cloud platform 1006 may not be in the terminal device shown in FIG. 2 .
其中,外部请求产生模块1001用于,基于用户触发产生请求运行微应用的请求信息。The external request generating module 1001 is configured to generate request information for requesting to run the micro-application based on user triggering.
请求处理模块1002用于确定该请求信息需要调度的具体插件。The request processing module 1002 is configured to determine a specific plug-in that needs to be scheduled for the request information.
插件调度模块1003用于管理插件的调度,例如,插件调度模块1003可以包括:进程分配1031和插件加载1032,进程分配1031用于将插件分配到进程,插件加载1032将该插件加载运行。The plug-in scheduling module 1003 is used to manage the plug-in scheduling. For example, the plug-in scheduling module 1003 may include: process allocation 1031 and plug-in loading 1032. The process allocation 1031 is used for allocating plug-ins to processes, and the plug-in loading 1032 loads and runs the plug-in.
运行管理模块1004用于对进程进行管理,例如,运行管理模块1004可以包括:运行监控1041和数据上报1042,运行监控1041可以获取各进程的运行信息,数据上报1042可以将运行信息上报至云平台1006。The operation management module 1004 is used to manage the process. For example, the operation management module 1004 may include: operation monitoring 1041 and data reporting 1042, the operation monitoring 1041 can obtain the operation information of each process, and the data reporting 1042 can report the operation information to the cloud platform 1006.
云平台1006可以用于进程中插件的特征分析,例如,云平台可以利用特征分析 1061进行插件的特征分析,从而获得特征文件1062。The cloud platform 1006 can be used for the feature analysis of the plug-in in the process. For example, the cloud platform can use the feature analysis 1061 to perform the feature analysis of the plug-in, so as to obtain the feature file 1062.
云平台1006可以将特征文件1062发送给智能管理模块1007,并存储到本地。终端设备可以利用特征文件进行插件的智能管理1007,例如,问题插件的识别1072和负载均衡的插件进程分配1073。The cloud platform 1006 can send the feature file 1062 to the intelligent management module 1007 and store it locally. The terminal device can use the feature file to perform intelligent management 1007 of plug-ins, for example, identification of problem plug-ins 1072 and load balancing plug-in process allocation 1073 .
智能管理模块1007可以将特征文件1062存储到本地,后续可以利用特征文件1062进行特征文件管理1071、问题识别1072和负载均衡1073。The intelligent management module 1007 can store the feature file 1062 locally, and can use the feature file 1062 to perform feature file management 1071 , problem identification 1072 and load balancing 1073 subsequently.
在图10对应的框架示意图的基础上,如图11所示,示出了运行监控1041可以获取各进程的运行信息,数据上报1042可以将运行信息上报至云平台1006的示意图。Based on the schematic diagram of the framework corresponding to FIG. 10 , as shown in FIG. 11 , it shows a schematic diagram that the operation monitoring 1041 can obtain the operation information of each process, and the data reporting 1042 can report the operation information to the cloud platform 1006 .
如图11所示,运行监控1041可以包括进程快照1105和运行监控1107,终端设备利用进程快照1105采集框架进程1106在运行时的进程快照信息(或称为进程相关信息),运行监控1107采集进程快照信息并基于数据封装1108进行数据封装,基于数据上报1109将进程快照信息上报至云平台。As shown in FIG. 11 , the operation monitoring 1041 may include a process snapshot 1105 and an operation monitoring 1107. The terminal device uses the process snapshot 1105 to collect the process snapshot information (or process-related information) of the framework process 1106 when it is running, and the operation monitoring 1107 collects the process The snapshot information is encapsulated based on the data encapsulation 1108, and the process snapshot information is reported to the cloud platform based on the data reporting 1109.
其中,该进程快照可以表示为:Among them, the process snapshot can be expressed as:
ProcessSnopshot={PName,PluginList,%MEN,%CPU,Exception}ProcessSnopshot={PName, PluginList, %MEN, %CPU, Exception}
其中,PName为进程的名称,PluginList为该进程当前运行的插件名称列表,%MEN为该进程战用内存的百分比,%CPU为该进程占用CPU的百分比,该Exception为异常信息,该Exception的取值为true或者false,当该进程快照是在发生异常时采集的时,该的取值为true。Among them, PName is the name of the process, PluginList is the list of plug-in names currently running in the process, %MEN is the percentage of memory used by the process, %CPU is the percentage of CPU occupied by the process, and the Exception is the exception information. The value is true or false. When the process snapshot is collected when an exception occurs, the value is true.
进程快照的上报时间Time report可以为: The reporting time of the process snapshot, Time report , can be:
Time report=k×Time collect(k∈N and k>1) Time report = k×Time collect (k∈N and k>1)
其中,Time collect为进程快照的采集时间。 Among them, Time collect is the collection time of the process snapshot.
在图10对应的框架示意图的基础上,示例性的,图12示出了云平台利用进程快照信息得到特征文件的示意图。Based on the schematic diagram of the framework corresponding to FIG. 10 , exemplarily, FIG. 12 shows a schematic diagram of the cloud platform obtaining a feature file by using process snapshot information.
如图12所示,云平台获取进程快照1201得到的进程名、插件列表、内存占比和CPU使用率,云平台利用特征分析1202进行插件的特征分析。例如,特征分析1202可以包括负载特征分析1221和异常特征分析1222。负载特征分析1221可以对进程快照信息分析,得到插件的负载信息。例如,Value load可以满足下述公式。 As shown in FIG. 12 , the cloud platform obtains the process name, plug-in list, memory ratio and CPU usage obtained by the process snapshot 1201 , and the cloud platform uses the feature analysis 1202 to analyze the features of the plug-ins. For example, signature analysis 1202 may include load signature analysis 1221 and anomaly signature analysis 1222. The load characteristic analysis 1221 can analyze the process snapshot information to obtain the load information of the plug-in. For example, Value load can satisfy the following formula.
Value load=f(%MEN,%CPU) Value load =f(%MEN,%CPU)
或者可以理解为,插件的负载信息Value load与终端设备的内存占比和CPU使用率相关。 Or it can be understood that the value load of the load information of the plug-in is related to the memory ratio and CPU usage of the terminal device.
异常特征分析1222可以对进程快照信息分析,得到插件的安全等级信息。The abnormal feature analysis 1222 can analyze the process snapshot information to obtain the security level information of the plug-in.
例如,插件的安全等级信息Strategy可以表示为:For example, the plug-in's security level information Strategy can be expressed as:
Figure PCTCN2021107524-appb-000001
Figure PCTCN2021107524-appb-000001
其中,no meansure表示不采取额外措施的正常分配,safe mode表示安全模式,forbidden mode表示禁用模式。该安全等级信息的计算过程不再赘述。Among them, no meansure means normal allocation without additional measures, safe mode means safe mode, forbidden mode means disabled mode. The calculation process of the security level information is not repeated here.
云平台分析插件的特征信息可以得到特征文件1203,终端设备可以从云平台下载该特征文件1203。进而终端设备可以利用特征文件1203进行插件调度。The cloud platform can analyze the feature information of the plug-in to obtain a feature file 1203, and the terminal device can download the feature file 1203 from the cloud platform. Furthermore, the terminal device can use the feature file 1203 to perform plug-in scheduling.
示例性的,如图13所示,在终端设备接收到外部请求1301后,根据插件的特征信息文件进行插件识别1302并采取不同的问题处理策略1303。Exemplarily, as shown in FIG. 13 , after receiving the external request 1301 , the terminal device performs plug-in identification 1302 according to the characteristic information file of the plug-in and adopts different problem handling strategies 1303 .
例如,对于插件的安全等级信息小于a%的安全插件,将该插件设置在与插件的特 征信息相适应的进程中运行;对于插件的安全等级信息在a%到b%之间的风险插件,将插件分配到系统设定的独立的进程中运行;对于插件的安全等级信息大于b%的异常插件,禁用该插件,还可以将插件的错误报告发送给终端。For example, for a security plugin whose security level information is less than a%, the plugin is set to run in a process suitable for the feature information of the plugin; for a risk plugin whose security level information is between a% and b%, Assign the plug-in to an independent process set by the system to run; for the abnormal plug-in whose security level information is greater than b%, disable the plug-in, and send the plug-in error report to the terminal.
示例性的,如图14所示,在终端设备识别插件为安全插件的情况下,可以依据插件的负载信息等实现负载均衡1402,例如,基于将插件分配1403将插件分配在适应的进程中。进一步的,终端设备可以用执行更新进程负载1404,以得到最新的进程信息等。Exemplarily, as shown in FIG. 14 , when the terminal device identifies the plug-in as a secure plug-in, load balancing 1402 can be implemented according to load information of the plug-in, for example, plug-in allocation 1403 based on plug-in allocation 1403 to allocate plug-ins in the adaptive process. Further, the terminal device can execute the update process load 1404 to obtain the latest process information and the like.
上面结合图4-图14,对本申请实施例的方法进行了说明,下面对本申请实施例提供的执行上述方法的插件管理装置进行描述。本领域技术人员可以理解,方法和装置可以相互结合和引用,本申请实施例提供的一种插件管理装置可以执行上述插件管理方法中终端设备所执行的步骤。另一种插件管理装置可以执行上述实施例中的插件管理方法中云端设备所执行的步骤。The methods of the embodiments of the present application have been described above with reference to FIG. 4 to FIG. 14 , and the following describes the plug-in management apparatuses provided by the embodiments of the present application for executing the above methods. Those skilled in the art can understand that the methods and apparatuses can be combined and referenced with each other, and a plug-in management apparatus provided by the embodiments of the present application can perform the steps performed by the terminal device in the above-mentioned plug-in management method. Another plug-in management apparatus may perform the steps performed by the cloud device in the plug-in management method in the above embodiment.
如图15所示,图15示出了本申请实施例提供的插件管理装置的结构示意图,该插件管理装置可以是本申请实施例中的终端设备或云端设备,也可以为应用于终端设备或云端设备的芯片。该插件管理装置包括:处理单元151和通信单元152。其中,通信单元152用于支持插件管理装置执行信息发送或接收的步骤,处理单元151用于支持插件管理装置执行信息处理的步骤。As shown in FIG. 15 , FIG. 15 shows a schematic structural diagram of a plug-in management apparatus provided by an embodiment of the present application. The plug-in management apparatus may be a terminal device or a cloud device in the embodiment of the present application, or may be applied to a terminal device or The chip of the cloud device. The plug-in management apparatus includes: a processing unit 151 and a communication unit 152 . The communication unit 152 is used for supporting the plug-in management apparatus to perform the steps of sending or receiving information, and the processing unit 151 is used for supporting the plug-in management apparatus to perform the steps of information processing.
在一种可能的实施例中,插件管理装置还可以包括:存储单元153。处理单元151、通信单元152、存储单元153通过通信总线相连。In a possible embodiment, the plug-in management apparatus may further include: a storage unit 153 . The processing unit 151, the communication unit 152, and the storage unit 153 are connected through a communication bus.
存储单元153可以包括一个或者多个存储器,存储器可以是一个或者多个设备、电路中用于存储程序或者数据的器件。The storage unit 153 may include one or more memories, and the memories may be devices in one or more devices or circuits for storing programs or data.
存储单元153可以独立存在,通过通信总线与插件管理装置具有的处理单元151相连。存储单元153也可以和处理单元集成在一起。The storage unit 153 may exist independently, and is connected to the processing unit 151 of the plug-in management apparatus through a communication bus. The storage unit 153 may also be integrated with the processing unit.
插件管理装置可以用于通信设备、电路、硬件组件或者芯片中。The plug-in management apparatus may be used in a communication device, circuit, hardware component or chip.
以插件管理装置可以是本申请实施例中终端设备或云端设备的芯片或芯片系统为例,则通信单元152可以是输入或者输出接口、管脚或者电路等。示例性的,存储单元153可以存储终端设备或云端设备侧的方法的计算机执行指令,以使处理单元151执行上述实施例中终端设备或云端设备侧的方法。存储单元153可以是寄存器、缓存或者RAM等,存储单元153可以和处理单元151集成在一起。存储单元153可以是ROM或者可存储静态信息和指令的其他类型的静态存储设备,存储单元153可以与处理单元151相独立。Taking the plug-in management apparatus as an example of a chip or a chip system of a terminal device or a cloud device in the embodiment of the present application, the communication unit 152 may be an input or output interface, a pin, a circuit, or the like. Exemplarily, the storage unit 153 may store computer execution instructions of the method on the side of the terminal device or the cloud device, so that the processing unit 151 executes the method on the side of the terminal device or the cloud device in the foregoing embodiments. The storage unit 153 may be a register, a cache or a RAM, etc., and the storage unit 153 may be integrated with the processing unit 151 . The storage unit 153 may be a ROM or other types of static storage devices that may store static information and instructions, and the storage unit 153 may be independent of the processing unit 151 .
本申请实施例提供了一种插件管理装置,该插件管理装置包括一个或者多个模块,用于实现上述图4-图14中所包含的步骤中的方法,该一个或者多个模块可以与上述图4-图14中所包含的步骤中的方法的步骤相对应。An embodiment of the present application provides a plug-in management apparatus, and the plug-in management apparatus includes one or more modules for implementing the methods in the steps included in the foregoing FIG. 4 to FIG. 14 , and the one or more modules may be combined with the foregoing The steps of the method in the steps contained in FIGS. 4-14 correspond.
图16所示为本申请实施例提供的插件管理装置的硬件结构示意图。本申请实施例中的终端设备或云端设备的硬件结构均可以参考如图16所示的插件管理装置的硬件结构示意图。该插件管理装置包括处理器161,通信线路164以及至少一个通信接口(图16中示例性的以通信接口163为例进行说明)。FIG. 16 is a schematic diagram of a hardware structure of a plug-in management apparatus provided by an embodiment of the present application. For the hardware structure of the terminal device or the cloud device in the embodiments of the present application, reference may be made to the schematic diagram of the hardware structure of the plug-in management apparatus shown in FIG. 16 . The plug-in management apparatus includes a processor 161, a communication line 164 and at least one communication interface (the communication interface 163 is exemplified in FIG. 16 for illustration).
处理器161可以是一个通用中央处理器(central processing unit,CPU),微处理 器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。The processor 161 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more processors for controlling the execution of the programs of the present application. integrated circuit.
通信线路164可包括一通路,在上述组件之间传送信息。 Communication line 164 may include a path to communicate information between the aforementioned components.
通信接口163,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线局域网(wireless local area networks,WLAN),RAN等。The communication interface 163, using any transceiver-like device, is used to communicate with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), RAN, and the like.
可能的,该插件管理装置还可以包括存储器162。Possibly, the plug-in management apparatus may further include a memory 162 .
存储器162可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路164与处理器相连接。存储器也可以和处理器集成在一起。The memory 162 may be read-only memory (ROM) or other type of static storage device that can store static information and instructions, random access memory (RAM) or other type of static storage device that can store information and instructions It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, CD-ROM storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being executed by a computer Access any other medium without limitation. The memory may exist independently and be connected to the processor through communication line 164 . The memory can also be integrated with the processor.
其中,存储器162用于存储执行本申请方案的计算机执行指令,并由处理器161来控制执行。处理器161用于执行存储器162中存储的计算机执行指令,从而实现本申请下述实施例提供的插件管理方法。The memory 162 is used for storing computer-executed instructions for executing the solutions of the present application, and the execution is controlled by the processor 161 . The processor 161 is configured to execute the computer-executed instructions stored in the memory 162, thereby implementing the plug-in management methods provided by the following embodiments of the present application.
可能的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。Possibly, the computer-executed instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
在具体实现中,作为一种实施例,处理器161可以包括一个或多个CPU,例如图16中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 161 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 16 .
在具体实现中,作为一种实施例,插件管理装置可以包括多个处理器,例如图16中的处理器161和处理器165。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the plug-in management apparatus may include multiple processors, such as the processor 161 and the processor 165 in FIG. 16 . Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
图17是本发明实施例提供的芯片170的结构示意图。芯片170包括一个或两个以上(包括两个)处理器1710和通信接口1730。FIG. 17 is a schematic structural diagram of a chip 170 provided by an embodiment of the present invention. The chip 170 includes one or more (including two) processors 1710 and a communication interface 1730 .
在一种可能的实施例中,如图17所示的芯片170还包括存储器1740,存储器1740可以包括只读存储器和随机存取存储器,并向处理器1710提供操作指令和数据。存储器1740的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。In a possible embodiment, the chip 170 shown in FIG. 17 further includes a memory 1740, which may include a read-only memory and a random access memory, and provides the processor 1710 with operation instructions and data. A portion of memory 1740 may also include non-volatile random access memory (NVRAM).
在一些实施方式中,存储器1740存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:In some embodiments, memory 1740 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set of them:
在本发明实施例中,通过调用存储器1740存储的操作指令(该操作指令可存储在操作系统中),执行相应的操作。In this embodiment of the present invention, the corresponding operation is performed by calling the operation instruction stored in the memory 1740 (the operation instruction may be stored in the operating system).
一种可能的实现方式中为:终端设备或云端设备所用的芯片的结构类似,不同的装置可以使用不同的芯片以实现各自的功能。A possible implementation manner is: the structure of the chips used by the terminal device or the cloud device is similar, and different devices may use different chips to realize their respective functions.
处理器1710控制终端设备或云端设备的操作,处理器1710还可以称为中央处理 单元(central processing unit,CPU)。存储器1740可以包括只读存储器和随机存取存储器,并向处理器1710提供指令和数据。存储器1740的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。例如应用中存储器1740、通信接口1730以及存储器1740通过总线系统1720耦合在一起,其中总线系统1720除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图17中将各种总线都标为总线系统1720。The processor 1710 controls the operation of the terminal device or the cloud device, and the processor 1710 may also be referred to as a central processing unit (central processing unit, CPU). Memory 1740 may include read-only memory and random access memory, and provides instructions and data to processor 1710 . A portion of memory 1740 may also include non-volatile random access memory (NVRAM). For example, the memory 1740, the communication interface 1730, and the memory 1740 are coupled together through the bus system 1720, wherein the bus system 1720 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. However, for clarity of illustration, the various buses are labeled as bus system 1720 in FIG. 17 .
以上通信单元可以是一种该装置的接口电路或通信接口,用于从其它装置接收信号。例如,当该装置以芯片的方式实现时,该通信单元是该芯片用于从其它芯片或装置接收信号或发送信号的接口电路或通信接口。The above communication unit may be an interface circuit or a communication interface of the device for receiving signals from other devices. For example, when the device is implemented in the form of a chip, the communication unit is an interface circuit or a communication interface used by the chip to receive or transmit signals from other chips or devices.
上述本发明实施例揭示的方法可以应用于处理器1710中,或者由处理器1710实现。处理器1710可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1710中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1710可以是通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1740,处理器1710读取存储器1740中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the above embodiments of the present invention may be applied to the processor 1710 or implemented by the processor 1710 . The processor 1710 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method may be completed by an integrated logic circuit of hardware in the processor 1710 or an instruction in the form of software. The above-mentioned processor 1710 may be a general-purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or Other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory 1740, and the processor 1710 reads the information in the memory 1740, and completes the steps of the above method in combination with its hardware.
一种可能的实现方式中,通信接口1730用于执行图4-图14所示的实施例中的终端设备或云端设备的接收和发送的步骤。处理器1710用于执行图4-图14所示的实施例中的终端设备或云端设备的处理的步骤。In a possible implementation manner, the communication interface 1730 is used to perform the steps of receiving and sending the terminal device or the cloud device in the embodiments shown in FIGS. 4-14 . The processor 1710 is configured to execute the processing steps of the terminal device or the cloud device in the embodiments shown in FIGS. 4-14 .
在上述实施例中,存储器存储的供处理器执行的指令可以以计算机程序产品的形式实现。计算机程序产品可以是事先写入在存储器中,也可以是以软件形式下载并安装在存储器中。In the above-described embodiments, the instructions stored by the memory for execution by the processor may be implemented in the form of a computer program product. The computer program product can be pre-written in the memory, or downloaded and installed in the memory in the form of software.
计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored on or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g. coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) means to transmit to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated. Useful media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, digital versatile disc (DVD)), or semiconductor media (eg, solid state disk (SSD)), etc. .
本申请实施例还提供了一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,则功能可以作为一个或多个指令或代码存储在计算机可读介质上或者在计算机可读介质上传输。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。Embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media can include both computer storage media and communication media and also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.
作为一种可能的设计,计算机可读介质可以包括RAM,ROM,EEPROM,CD-ROM或其它光盘存储器,磁盘存储器或其它磁存储设备,或目标于承载的任何其它介质或以指令或数据结构的形式存储所需的程序代码,并且可由计算机访问。而且,任何连接被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,数字用户线(DSL)或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘(CD),激光盘,光盘,DVD,软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。上述的组合也应包括在计算机可读介质的范围内。As one possible design, the computer readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry or in an instruction or data structure The required program code is stored in the form and can be accessed by the computer. Also, any connection is properly termed a computer-readable medium. For example, if you use coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies (such as infrared, radio, and microwave) to transmit software from a website, server, or other remote source, coaxial cable, fiber optic cable , twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, DVD, floppy disk, and blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
本申请实施例还提供了一种计算机程序产品。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,可以全部或者部分得通过计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行上述计算机程序指令时,全部或部分地产生按照上述方法实施例中描述的流程或功能。上述计算机可以是通用计算机、专用计算机、计算机网络、基站、终端或者其它可编程装置。The embodiments of the present application also provide a computer program product. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware or any combination thereof. If implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the above-mentioned method embodiments are generated. The aforementioned computer may be a general purpose computer, a special purpose computer, a computer network, a base station, a terminal, or other programmable devices.
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。It can be understood that, the various numbers and numbers involved in the embodiments of the present application are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application. In the embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not imply the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not constitute the implementation process of the embodiments of the present application. any restrictions.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例中所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application. range.

Claims (24)

  1. 一种插件管理方法,其特征在于,应用于第一设备,包括:A plug-in management method, characterized in that, applied to a first device, comprising:
    接收用于请求运行微应用的请求信息;Receive request information for requesting to run the micro-application;
    确定所述请求信息对应的插件;所述插件用于实现所述微应用的部分或全部功能;Determine the plug-in corresponding to the request information; the plug-in is used to implement part or all of the functions of the micro-application;
    获取所述插件的特征信息;所述特征信息包括所述插件对进程运行产生影响的信息;Acquiring feature information of the plug-in; the feature information includes the information that the plug-in affects the running of the process;
    根据所述特征信息调度所述插件。The plug-in is scheduled according to the feature information.
  2. 根据权利要求1所述的方法,其特征在于,所述特征信息包括下述的一种或多种:负载信息、安全等级信息、关联插件信息、运行时长信息或插件优先级信息。The method according to claim 1, wherein the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述特征信息调度所述插件,包括:The method according to claim 1 or 2, wherein the scheduling the plug-in according to the characteristic information comprises:
    将所述插件设置在与所述插件的特征信息相适应的进程中;setting the plug-in in a process adapted to the characteristic information of the plug-in;
    或者,根据所述特征信息禁用所述插件。Alternatively, the plug-in is disabled according to the feature information.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述特征信息包括负载信息,所述根据所述特征信息调度所述插件,包括:The method according to any one of claims 1-3, wherein the characteristic information includes load information, and the scheduling the plug-in according to the characteristic information comprises:
    根据所述负载信息计算可用于运行所述插件的第一进程的预测负载;所述第一进程的预测负载为将所述插件设置在所述第一进程时,所述第一进程的总负载;所述第一进程的数量为多个;Calculate the predicted load of the first process that can be used to run the plug-in according to the load information; the predicted load of the first process is the total load of the first process when the plug-in is set in the first process ; the number of the first process is multiple;
    将所述插件设置在第一目标进程中;所述第一目标进程为所述第一进程中,所述预测负载不超过第一负载阈值的进程。The plug-in is set in a first target process; the first target process is a process in the first process whose predicted load does not exceed a first load threshold.
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述特征信息包括安全等级信息,所述根据所述特征信息调度所述插件,包括:The method according to any one of claims 1-3, wherein the feature information includes security level information, and the scheduling the plug-in according to the feature information includes:
    当所述安全等级信息表示所述插件为安全插件时,将所述插件分配在可用于运行所述插件的进程中;When the security level information indicates that the plug-in is a security plug-in, assigning the plug-in to a process that can be used to run the plug-in;
    或者,当所述安全等级信息表示所述插件为风险插件时,将所述插件分配在独立的进程中;所述独立的进程为预设的用于运行所述风险插件的进程;Or, when the security level information indicates that the plug-in is a risk plug-in, the plug-in is allocated in an independent process; the independent process is a preset process for running the risk plug-in;
    或者,当所述安全等级信息表示所述插件为异常插件时,禁用所述插件。Alternatively, when the security level information indicates that the plug-in is an abnormal plug-in, the plug-in is disabled.
  6. 根据权利要求5所述的方法,其特征在于,所述安全等级信息包括所述插件引发的进程崩溃概率、所述插件引发的内存泄露概率、或根据所述进程崩溃概率和所述内存泄露概率计算得到的概率;The method according to claim 5, wherein the security level information comprises a process crash probability caused by the plug-in, a memory leak probability caused by the plug-in, or according to the process crash probability and the memory leak probability the calculated probability;
    在所述安全等级信息小于第一值时,表示所述插件为安全插件;When the security level information is less than the first value, it indicates that the plug-in is a security plug-in;
    在所述安全等级信息大于或等于所述第一值,且小于或等于第二值时,表示所述插件为风险插件;When the security level information is greater than or equal to the first value and less than or equal to the second value, it indicates that the plug-in is a risk plug-in;
    在所述安全等级信息大于所述第二值时,表示所述插件为异常插件。When the security level information is greater than the second value, it indicates that the plug-in is an abnormal plug-in.
  7. 根据权利要求5或6所述的方法,其特征在于,所述特征信息还包括负载信息,所述根据所述特征信息调度所述插件,包括:The method according to claim 5 or 6, wherein the characteristic information further includes load information, and the scheduling the plug-in according to the characteristic information comprises:
    在所述安全等级信息表示所述插件为所述安全插件的情况下,根据所述安全插件的负载信息计算可用于运行所述安全插件的第二进程的预测负载;所述第二进程的预测负载为将所述安全插件设置在所述第二进程时,所述第二进程的总负载;所述第二进程的数量为 多个;In the case that the security level information indicates that the plug-in is the security plug-in, the predicted load of the second process that can be used to run the security plug-in is calculated according to the load information of the security plug-in; the prediction of the second process The load is the total load of the second process when the security plug-in is set in the second process; the number of the second process is multiple;
    将所述安全插件设置在第二目标进程中,所述第二目标进程为所述第二进程中,所述预测负载不超过第二负载阈值的进程。The security plug-in is set in a second target process, where the second target process is a process in the second process whose predicted load does not exceed a second load threshold.
  8. 根据权利要求1-3任一项所述的方法,其特征在于,所述特征信息包括关联插件信息,所述根据所述特征信息调度所述插件,包括:The method according to any one of claims 1-3, wherein the characteristic information includes associated plug-in information, and the scheduling the plug-in according to the characteristic information comprises:
    将所述插件设置在第三进程中,所述第三进程为运行与所述关联插件信息相关的相关插件的进程。The plug-in is set in a third process, where the third process is a process for running a related plug-in related to the associated plug-in information.
  9. 根据权利要求8所述的方法,其特征在于,所述相关插件包括:与所述插件读取的资源相同的插件。The method according to claim 8, wherein the related plug-in comprises: the same plug-in as the resource read by the plug-in.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述获取所述插件的特征信息,包括:The method according to any one of claims 1-9, wherein the acquiring feature information of the plug-in comprises:
    接收来自第二设备的特征信息文件;所述特征信息文件中包括所述第二设备计算的多个插件的特征信息;receiving a feature information file from a second device; the feature information file includes feature information of multiple plug-ins calculated by the second device;
    根据所述插件的标识,从所述特征信息文件中获取所述插件的特征信息。According to the identification of the plug-in, the characteristic information of the plug-in is obtained from the characteristic information file.
  11. 根据权利要求10所述的方法,其特征在于,还包括:The method of claim 10, further comprising:
    向所述第二设备发送所述第一设备中的进程相关信息,所述进程相关信息用于计算所述特征信息文件。Sending process-related information in the first device to the second device, where the process-related information is used to calculate the feature information file.
  12. 根据权利要求11所述的方法,其特征在于,所述进程相关信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。The method according to claim 11, wherein the process-related information includes one or more of the following: process name, plug-in list, memory ratio, CPU usage rate of central processing unit, or exception information.
  13. 根据权利要求1-9任一项所述的方法,其特征在于,所述获取所述插件的特征信息,包括:The method according to any one of claims 1-9, wherein the acquiring feature information of the plug-in comprises:
    利用机器学习模型确定所述特征信息;其中,所述机器学习模型是利用进程相关样本信息训练得到。The feature information is determined by using a machine learning model; wherein, the machine learning model is obtained by training using process-related sample information.
  14. 根据权利要求13所述的方法,其特征在于,所述进程相关样本信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。The method according to claim 13, wherein the process-related sample information includes one or more of the following: process name, plug-in list, memory ratio, central processing unit (CPU) usage rate, or exception information.
  15. 一种插件管理方法,其特征在于,应用于第二设备,所述方法包括:A plug-in management method, characterized in that, applied to a second device, the method comprising:
    获取进程相关信息;Get process related information;
    根据所述进程相关信息计算特征信息文件,所述特征信息文件中包括多个插件的特征信息,所述插件的特征信息包括所述插件对进程运行产生影响的信息;Calculate a feature information file according to the process-related information, where the feature information file includes feature information of a plurality of plug-ins, and the feature information of the plug-ins includes the information that the plug-in affects the running of the process;
    向第一设备发送所述特征信息文件。Send the feature information file to the first device.
  16. 根据权利要求15所述的方法,其特征在于,所述特征信息包括下述的一种或多种:负载信息、安全等级信息、关联插件信息、运行时长信息或插件优先级信息。The method according to claim 15, wherein the feature information includes one or more of the following: load information, security level information, associated plug-in information, runtime information or plug-in priority information.
  17. 根据权利要求16所述的方法,其特征在于,所述安全等级信息包括所述插件引发的进程崩溃概率、所述插件引发的内存泄露概率、或根据所述进程崩溃概率和所述内存泄露概率计算得到的概率。The method according to claim 16, wherein the security level information comprises a process crash probability caused by the plug-in, a memory leak probability caused by the plug-in, or according to the process crash probability and the memory leak probability Calculated probability.
  18. 根据权利要求15-17任一项所述的方法,其特征在于,所述进程相关信息包括下述的一种或多种:进程名称、插件列表、内存占比、中央处理器CPU使用率或异常信息。The method according to any one of claims 15-17, wherein the process-related information includes one or more of the following: a process name, a list of plug-ins, a memory ratio, a CPU usage rate of a central processing unit, or Exception information.
  19. 根据权利要求15-18任一项所述的方法,其特征在于,所述根据所述进程相关信息计算特征信息文件,包括:The method according to any one of claims 15-18, wherein the calculating the feature information file according to the process-related information comprises:
    根据所述进程相关信息训练机器学习模型;Train a machine learning model according to the process-related information;
    利用所述机器学习模型输出所述特征信息文件。The feature information file is output using the machine learning model.
  20. 根据权利要求15-19任一项所述的方法,其特征在于,所述获取进程相关信息,包括:The method according to any one of claims 15-19, wherein the acquiring process-related information comprises:
    定时从多个设备获取所述多个设备的进程相关信息;Periodically obtain process-related information of the multiple devices from multiple devices;
    或者,获取所述多个设备在进程异常时发送的进程相关信息。Or, acquire process-related information sent by the multiple devices when the process is abnormal.
  21. 一种插件管理装置,其特征在于,包括:处理器和通信接口;A plug-in management device, comprising: a processor and a communication interface;
    所述通信接口用于执行如权利要求1-14中任一项所述的插件管理方法中进行收发的操作,或执行如权利要求15-20中任一项所述的插件管理方法中进行收发的操作;所述处理器运行指令以执行如权利要求1-14中任一项所述的插件管理方法中进行处理或控制的操作,或执行如权利要求15-20中任一项所述的插件管理方法中进行处理或控制的操作。The communication interface is used to perform the operation of sending and receiving in the plug-in management method according to any one of claims 1-14, or performing the sending and receiving operation in the plug-in management method according to any one of claims 15-20. operation; the processor executes the instruction to perform the processing or control operation in the plug-in management method according to any one of claims 1-14, or executes the operation according to any one of claims 15-20. The operation that is processed or controlled in the plugin management method.
  22. 一种芯片,其特征在于,所述芯片包括至少一个处理器和通信接口,所述通信接口和所述至少一个处理器耦合,所述至少一个处理器用于运行计算机程序或指令,以实现如权利要求1-14中任一项所述的插件管理方法,或以实现如权利要求15-20中任一项所述的插件管理方法;所述通信接口用于与所述芯片之外的其它模块进行通信。A chip, characterized in that the chip includes at least one processor and a communication interface, the communication interface is coupled to the at least one processor, and the at least one processor is used to run a computer program or instructions to implement the claim The plug-in management method according to any one of claims 1-14, or to implement the plug-in management method according to any one of claims 15-20; the communication interface is used to communicate with other modules other than the chip to communicate.
  23. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令被一个或多个处理器运行时,实现如权利要求1-14中任一项所述的插件管理方法,或实现如权利要求15-20中任一项所述的插件管理方法。A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the instructions are executed by one or more processors, the implementation of any one of claims 1-14 is implemented. The plug-in management method described above, or implement the plug-in management method according to any one of claims 15-20.
  24. 一种计算机程序产品,其特征在于,所述计算机程序产品中存储有指令,当所述指令被一个或多个处理器运行时,实现如权利要求1-14中任一项所述的插件管理方法,或实现如权利要求15-20中任一项所述的插件管理方法。A computer program product, wherein instructions are stored in the computer program product, and when the instructions are executed by one or more processors, the plug-in management according to any one of claims 1-14 is implemented method, or implement the plug-in management method according to any one of claims 15-20.
PCT/CN2021/107524 2020-11-11 2021-07-21 Plug-in management method, system and apparatus WO2022100141A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011255737.XA CN114546511A (en) 2020-11-11 2020-11-11 Plug-in management method, system and device
CN202011255737.X 2020-11-11

Publications (1)

Publication Number Publication Date
WO2022100141A1 true WO2022100141A1 (en) 2022-05-19

Family

ID=81602096

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/107524 WO2022100141A1 (en) 2020-11-11 2021-07-21 Plug-in management method, system and apparatus

Country Status (2)

Country Link
CN (1) CN114546511A (en)
WO (1) WO2022100141A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991505A (en) * 2023-09-26 2023-11-03 统信软件技术有限公司 Plug-in loading method, device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7254814B1 (en) * 2001-09-28 2007-08-07 Emc Corporation Methods and apparatus for managing plug-in services
CN103034495A (en) * 2012-12-12 2013-04-10 北京奇虎科技有限公司 Browser capable of isolating plug-in in webpage and webpage plug-in isolating method
CN103544058A (en) * 2012-07-16 2014-01-29 天津书生投资有限公司 Method and device for achieving plug-in
CN104091132A (en) * 2014-06-17 2014-10-08 小米科技有限责任公司 Method and device for running plug-in on routing equipment and routing equipment
US20150150128A1 (en) * 2012-07-27 2015-05-28 Tencent Technology (Shenzhen) Company Limited Method and apparatus for intercepting or cleaning-up plugins
US9436762B1 (en) * 2012-01-03 2016-09-06 Google Inc. Sharing a plug-in instance in a web client
CN108958833A (en) * 2018-06-14 2018-12-07 北京奇虎科技有限公司 A kind of method and terminal device loading plug-in unit
CN111352710A (en) * 2018-12-24 2020-06-30 北京奇虎科技有限公司 Process management method and device, computing equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2530472A (en) * 2014-05-21 2016-03-30 Euronet Usa Llc Financial switching engine
CN103970573A (en) * 2014-05-21 2014-08-06 百度在线网络技术(北京)有限公司 Light application program system for mobile device and program loading system and method thereof
CN107704277A (en) * 2016-08-03 2018-02-16 常州中兴华达科技有限公司 Plug-in loading method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7254814B1 (en) * 2001-09-28 2007-08-07 Emc Corporation Methods and apparatus for managing plug-in services
US9436762B1 (en) * 2012-01-03 2016-09-06 Google Inc. Sharing a plug-in instance in a web client
CN103544058A (en) * 2012-07-16 2014-01-29 天津书生投资有限公司 Method and device for achieving plug-in
US20150150128A1 (en) * 2012-07-27 2015-05-28 Tencent Technology (Shenzhen) Company Limited Method and apparatus for intercepting or cleaning-up plugins
CN103034495A (en) * 2012-12-12 2013-04-10 北京奇虎科技有限公司 Browser capable of isolating plug-in in webpage and webpage plug-in isolating method
CN104091132A (en) * 2014-06-17 2014-10-08 小米科技有限责任公司 Method and device for running plug-in on routing equipment and routing equipment
CN108958833A (en) * 2018-06-14 2018-12-07 北京奇虎科技有限公司 A kind of method and terminal device loading plug-in unit
CN111352710A (en) * 2018-12-24 2020-06-30 北京奇虎科技有限公司 Process management method and device, computing equipment and storage medium

Also Published As

Publication number Publication date
CN114546511A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
CN111316199B (en) Information processing method and electronic equipment
WO2020150917A1 (en) Application permission management method and electronic device
WO2021052415A1 (en) Resource scheduling method and electronic device
WO2022127787A1 (en) Image display method and electronic device
WO2021115112A1 (en) Installation package downloading method, installation package distribution method, terminal device, server, and system
WO2021052070A1 (en) Frame rate identification method and electronic device
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
WO2021093626A1 (en) Memory management method and electronic device
CN113553130A (en) Method for executing drawing operation by application and electronic equipment
WO2022078105A1 (en) Memory management method, electronic device, and computer-readable storage medium
WO2022160991A1 (en) Permission control method and electronic device
WO2021104122A1 (en) Method and apparatus for responding to call request, and electronic device
CN113747527A (en) Network link switching method based on electronic equipment state and electronic equipment
US20230418630A1 (en) Operation sequence adding method, electronic device, and system
CN114466449A (en) Position feature acquisition method and electronic equipment
WO2022022674A1 (en) Application icon layout method and related apparatus
CN115333941A (en) Method for acquiring application running condition and related equipment
CN113688019B (en) Response time duration detection method and device
WO2022100141A1 (en) Plug-in management method, system and apparatus
CN112437341B (en) Video stream processing method and electronic equipment
CN111104209A (en) Method for processing task and related equipment
WO2021238376A1 (en) Function pack loading method and apparatus, and server and electronic device
WO2022170856A1 (en) Method for establishing connection, and electronic device
WO2022166435A1 (en) Picture sharing method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21890672

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21890672

Country of ref document: EP

Kind code of ref document: A1