CN111538608A - Method for preventing terminal equipment from being down, terminal equipment and storage medium - Google Patents

Method for preventing terminal equipment from being down, terminal equipment and storage medium Download PDF

Info

Publication number
CN111538608A
CN111538608A CN202010371099.1A CN202010371099A CN111538608A CN 111538608 A CN111538608 A CN 111538608A CN 202010371099 A CN202010371099 A CN 202010371099A CN 111538608 A CN111538608 A CN 111538608A
Authority
CN
China
Prior art keywords
downtime
terminal equipment
parameters
terminal device
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010371099.1A
Other languages
Chinese (zh)
Inventor
蔡杭
陈天健
郑楚煜
刘洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202010371099.1A priority Critical patent/CN111538608A/en
Publication of CN111538608A publication Critical patent/CN111538608A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/004Error avoidance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3447Performance evaluation by modeling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for preventing terminal equipment from being crashed, terminal equipment and a storage medium, wherein real-time state parameters of the terminal equipment are collected; inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training; and executing corresponding prevention operation according to the running state to prevent the terminal equipment from being down. The method and the device avoid the problems that the time for the user to wait for the recovery of the equipment is wasted and the working content of the user is lost due to the crash of the terminal equipment, improve the use efficiency of the terminal equipment, and ensure the privacy safety of the user because the data of the user on the terminal equipment cannot be leaked based on the horizontal federal learning.

Description

Method for preventing terminal equipment from being down, terminal equipment and storage medium
Technical Field
The invention relates to the technical field of federal learning and intelligent terminal equipment, in particular to a method for preventing terminal equipment from being crashed, the terminal equipment and a storage medium.
Background
With the development of federal learning techniques, federal learning is also being applied to more and more fields. When the federal learning is applied to the field of terminal equipment, the terminal equipment can perform machine learning modeling with other terminal equipment or servers without exposing data owned by the terminal equipment to other terminal equipment or servers, so that dispersed small data islands can be combined to be changed into big data analysis through a federal model in a mode of 'data motionless model motion' on the premise of protecting user data privacy.
In addition, the existing terminal devices themselves are also developed to be very popular, and for example, the applications of the terminal devices such as smart phones and computers in the life of people have become increasingly indispensable. However, when people actually use the terminal device, the terminal device often goes down because of problems such as excessive system operating pressure, serious memory occupation of application software programs, and/or wrong operation of users, so that not only is the time for people to wait for the terminal device to resume operation wasted, but also the time is more serious, and in some specific scenes, the terminal device goes down and the work content of people based on the terminal device is lost.
Disclosure of Invention
The invention mainly aims to provide a method, a device, terminal equipment and a storage medium for preventing terminal equipment downtime, aiming at preventing the downtime of the terminal equipment by locally training and aggregating scattered terminal equipment data on the premise of protecting data privacy based on a federal learning technology, and avoiding the problems of time waste and work content loss of users caused by the downtime of the terminal equipment.
In order to achieve the above object, the present invention provides a method for preventing downtime of a terminal device, where the method for preventing downtime of a terminal device includes:
acquiring real-time state parameters of the terminal equipment;
inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training;
and executing corresponding prevention operation according to the running state to prevent the terminal equipment from being down.
Further, the operating state includes: the normal and imminent downtime of the mobile device,
the step of inputting the state parameters into the downtime prediction model to predict the operation state of the terminal equipment comprises the following steps:
inputting the state parameters into the downtime prediction model so that the downtime prediction model feeds back a prediction result;
if the prediction result identifies that the state parameter is smaller than the corresponding downtime threshold value, the running state is predicted to be normal;
and if the prediction result identifies that the state parameter is greater than or equal to the corresponding downtime threshold value, predicting the running state to be about to be downtime.
Further, the step of executing a corresponding prevention operation according to the operating state to prevent the terminal device from going down includes:
when the running state is predicted to be about to be down, outputting preset prompt information;
and receiving an execution instruction based on the preset prompt information feedback, and executing the operation content carried by the execution instruction to prevent the terminal equipment from going down.
Further, the step of executing corresponding prevention operation according to the operating state to prevent the terminal device from going down further includes:
when the running state is predicted to be about to be down, detecting a foreground running program and a background running program of the terminal equipment;
and if the foreground running program is detected to belong to the preset working class program, terminating the background running program to prevent the terminal equipment from being down.
Further, after the step of executing the corresponding prevention operation according to the operating state to prevent the terminal device from going down, the method further includes:
training the downtime prediction model to obtain a new downtime prediction model based on the state parameters of the terminal equipment during downtime;
and predicting the running state according to the new downtime prediction model and executing corresponding prevention operation to prevent the terminal equipment from downtime.
Further, the method for preventing the terminal device from going down further includes:
obtaining the downtime prediction model based on transverse federal learning training;
the step of obtaining the downtime prediction model based on the horizontal federal learning training comprises the following steps:
acquiring a preset transverse federated learning initial model;
according to the real-time state parameters of the terminal equipment, performing local training on the preset transverse federated learning initial model to obtain a local training model;
and integrating the local training models to obtain a downtime prediction model.
Further, before the step of obtaining the preset horizontal federal learning initial model, the method further includes:
establishing the preset transverse federated learning initial model according to the state parameters of the terminal equipment, wherein the state parameters comprise: hardware parameters, system parameters, and application parameters;
the step of carrying out local training on the preset transverse federated learning initial model according to the real-time state parameters of the terminal equipment to obtain a local training model comprises the following steps:
when the terminal equipment is down, recording real-time hardware parameters, system parameters and application program parameters of the terminal equipment;
and training the preset transverse federated learning initial model locally on the terminal equipment based on the hardware parameters, the system parameters and the application program parameters to obtain the local training model.
In addition, in order to achieve the above object, the present invention further provides a device for preventing downtime of a terminal device, where the device for preventing downtime of a terminal device includes:
the acquisition module is used for acquiring real-time state parameters of the terminal equipment;
the prediction module is used for inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training;
and the prevention module is used for executing corresponding prevention operation according to the running state so as to prevent the terminal equipment from going down.
When the functional modules of the device for preventing the downtime of the terminal equipment run, the steps of the method for preventing the downtime of the terminal equipment are realized.
In addition, to achieve the above object, the present invention also provides a terminal device, including: the method comprises the following steps of storing a program for preventing the terminal equipment from being down, storing the program on the storage, and running the program on the processor, wherein the program for preventing the terminal equipment from being down is executed by the processor to realize the steps of the method for preventing the terminal equipment from being down.
In addition, in order to achieve the above object, the present invention further provides a storage medium, wherein the storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the method for preventing the terminal device from going down.
According to the method, the device, the terminal equipment and the storage medium for preventing the terminal equipment from going down, the real-time state parameters of the terminal equipment are collected; inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training; and executing corresponding prevention operation according to the running state to prevent the terminal equipment from being down.
The invention realizes that the downtime prediction model for predicting the operation state of the terminal equipment is obtained based on the horizontal federal learning integration, and then when the downtime prediction model is used for predicting that the terminal equipment is possibly crashed, the corresponding prevention operation is executed on the terminal equipment to prevent the terminal equipment from going down, thereby avoiding the problems of wasting the time of a user waiting for equipment recovery and losing the working content of the user caused by the terminal equipment going down, improving the use efficiency of the terminal equipment, and in addition, on the premise of protecting the privacy of user data based on the federal learning technology, the small data islands of the dispersed terminal equipment are connected in series in a mode of 'data motionless model movement', so that data of the user on the terminal equipment cannot be leaked, the privacy safety of the user is ensured, and the prediction efficiency and precision aiming at the downtime of the terminal equipment are optimized.
Drawings
Fig. 1 is a schematic structural diagram of the hardware operation of a terminal device according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an embodiment of a method for preventing a downtime of a terminal device according to the present invention;
fig. 3 is a schematic flowchart illustrating a detailed process of step S20 in an embodiment of the method for preventing the downtime of the terminal device according to the present invention;
fig. 4 is a schematic flowchart illustrating a detailed process of step S30 in an embodiment of the method for preventing the downtime of the terminal device according to the present invention;
fig. 5 is a schematic flowchart of another embodiment of a method for preventing a downtime of a terminal device according to the present invention;
fig. 6 is a schematic view of an application flow in an embodiment of a method for preventing a downtime of a terminal device according to the present invention;
fig. 7 is a schematic structural diagram of a module of the apparatus for preventing the downtime of the terminal device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment related to a terminal device according to an embodiment of the present invention.
It should be noted that fig. 1 is a schematic structural diagram of a hardware operating environment of the terminal device. The terminal equipment of the embodiment of the invention can be terminal equipment such as a PC, a portable computer and the like.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal device configuration shown in fig. 1 is not intended to be limiting of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a distributed task processing program. Among them, the operating system is a program that manages and controls the hardware and software resources of the sample terminal device, a handler that supports distributed tasks, and the execution of other software or programs.
In the terminal apparatus shown in fig. 1, the user interface 1003 is mainly used for data communication with each terminal; the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; and the processor 1001 may be configured to call a program stored in the memory 1005 for preventing the terminal device from going down, and perform the following operations:
acquiring real-time state parameters of the terminal equipment;
inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training;
and executing corresponding prevention operation according to the running state to prevent the terminal equipment from being down.
Further, the operating state includes: the processor 1001 may invoke the program stored in the memory 1005 to prevent the terminal device from going down, and also perform the following operations:
inputting the state parameters into the downtime prediction model so that the downtime prediction model feeds back a prediction result;
if the prediction result identifies that the state parameter is smaller than the corresponding downtime threshold value, the running state is predicted to be normal;
and if the prediction result identifies that the state parameter is greater than or equal to the corresponding downtime threshold value, predicting the running state to be about to be downtime.
Further, the processor 1001 may call a program stored in the memory 1005 for preventing the terminal device from going down, and further perform the following operations:
when the running state is predicted to be about to be down, outputting preset prompt information;
and receiving an execution instruction based on the preset prompt information feedback, and executing the operation content carried by the execution instruction to prevent the terminal equipment from going down.
Further, the processor 1001 may call a program stored in the memory 1005 for preventing the terminal device from going down, and further perform the following operations:
when the running state is predicted to be about to be down, detecting a foreground running program and a background running program of the terminal equipment;
and if the foreground running program is detected to belong to the preset working class program, terminating the background running program to prevent the terminal equipment from being down.
Further, the processor 1001 may call the program for preventing the terminal device from going down, which is stored in the memory 1005, and after executing the corresponding prevention operation according to the operating status to prevent the terminal device from going down, further execute the following operations:
training the downtime prediction model to obtain a new downtime prediction model based on the state parameters of the terminal equipment during downtime;
and predicting the running state according to the new downtime prediction model and executing corresponding prevention operation to prevent the terminal equipment from downtime.
Further, the processor 1001 may call a program stored in the memory 1005 for preventing the terminal device from going down, and further perform the following operations:
and obtaining the downtime prediction model based on transverse federal learning training.
Further, the processor 1001 may call a program stored in the memory 1005 for preventing the terminal device from going down, and further perform the following operations:
acquiring a preset transverse federated learning initial model;
according to the real-time state parameters of the terminal equipment, performing local training on the preset transverse federated learning initial model to obtain a local training model;
and integrating the local training models to obtain a downtime prediction model.
Further, the processor 1001 may call a program stored in the memory 1005 for preventing the terminal device from going down, and before executing the step of obtaining the preset horizontal federal learning initial model, further execute the following operations:
establishing the preset transverse federated learning initial model according to the state parameters of the terminal equipment, wherein the state parameters comprise: hardware parameters, system parameters, and application parameters.
Further, the processor 1001 may call a program stored in the memory 1005 for preventing the terminal device from going down, and further perform the following operations:
when the terminal equipment is down, recording real-time hardware parameters, system parameters and application program parameters of the terminal equipment;
and training the preset transverse federated learning initial model locally on the terminal equipment based on the hardware parameters, the system parameters and the application program parameters to obtain the local training model.
Further, the processor 1001 may call a program stored in the memory 1005 for preventing the terminal device from going down, and further perform the following operations:
uploading the local training model to a coordinator in the horizontal federal learning so that the coordinator can integrate the local training model and feed back the integrated training model;
and receiving the integrated training model, and taking the integrated training model as the downtime prediction model when the coordinator detects that the integrated training model is converged.
Based on the structure, the invention provides each embodiment of the method for preventing the terminal equipment from going down.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a method for preventing a downtime of a terminal device according to the present invention.
While a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different than that shown or described herein.
The method for preventing the downtime of the terminal equipment in the embodiment of the invention is applied to the terminal equipment, and the terminal equipment in the embodiment of the invention can be the terminal equipment such as a PC, a portable computer and the like, and is not particularly limited herein.
The method for preventing the terminal equipment from being down in the embodiment comprises the following steps:
s100, acquiring real-time state parameters of the terminal equipment;
after the terminal equipment receives the downtime prediction model issued by the coordinator in the accessed horizontal federal learning, the downtime prediction model is continuously operated on the current terminal equipment, and real-time hardware parameters, system parameters and application program parameters of the current terminal equipment are continuously collected.
Specifically, for example, after the current terminal device is used as a participant and receives a shutdown prediction model of gradient convergence issued by a coordinator in the accessed horizontal federal learning, the shutdown prediction model is continuously run locally on the current terminal device, and hardware parameters such as real-time battery residual capacity of the current terminal device, system parameters such as a system supportable operating memory and the like, and application program parameters such as an operating occupied memory of each application program and power consumption of each application program in operation are continuously collected.
It should be noted that, in this embodiment, the downtime prediction model for predicting the operating state of the terminal device is obtained in advance based on the horizontal federal learning training.
Further, in an embodiment, the method for preventing the terminal device from being down according to the present invention may further include:
step A, obtaining the downtime prediction model based on horizontal federal learning training;
in the horizontal federal learning accessed in advance, the current terminal equipment and a plurality of other terminal equipment are jointly trained together by utilizing real-time state parameters of the terminal under the coordination of a coordinator in the horizontal federal learning to obtain a downtime prediction model for predicting the operation state of the terminal equipment.
Further, step a may include:
step A1, acquiring a preset transverse federal learning initial model;
and A2, carrying out local training on the preset transverse federal learning initial model according to the real-time state parameters of the terminal equipment to obtain a local training model.
The method comprises the steps that terminal equipment or a specific application program installed on the terminal equipment continuously collects real-time state parameters of the terminal equipment, and training a preset transverse federal learning initial model by taking the collected real-time state parameters as input in the local of the terminal equipment, so that a local training model of the terminal equipment is obtained.
Further, before step S100, the method for preventing the terminal device from going down according to the present invention further includes:
step A3, establishing the preset horizontal federal learning initial model according to the state parameters of the terminal equipment, wherein the state parameters include: hardware parameters, system parameters, and application parameters.
It should be noted that, in this embodiment, the real-time status parameters of the terminal device include, but are not limited to: hardware parameters, system parameters and application parameters of the terminal device. The hardware parameters of the terminal device may specifically include the battery remaining capacity of the terminal device, the system parameters of the terminal device may specifically include a version of the terminal device system, a supportable operating memory, and the like, and the application program parameters of the terminal device may specifically include the number of application programs installed on the terminal device, an operating memory occupied by the operation of each application program, the operating power consumption of each application program, and the like. It should be understood that, based on different actual application scenarios and different application requirements, in other embodiments, other parameters different from the state parameters of the terminal device listed in this embodiment may also be adopted, and the method for preventing the terminal device from going down according to the present invention is not limited to specific types and numbers of the state parameters of the terminal device.
And establishing a preset transverse federal learning initial model for learning and training the running state of the terminal equipment based on the existing machine learning model and the hardware parameters, system parameters and application program parameters of the terminal equipment.
Specifically, for example, as shown in the application flow of fig. 6, the terminal device is accessed into a horizontal federal study including a plurality of other terminal devices, hardware parameters such as the hardware version model and the battery remaining amount of the terminal device are collected, and collects the version of the system installed in the terminal equipment, the system parameters such as the memory which can be supported by the system, and collecting application program parameters such as the number of the application programs installed on the terminal equipment, the memory occupied by the running of each application program, the power consumption of the running of each application program and the like, the hardware parameters, system parameters and application program parameters to be acquired are used as initial training samples, any existing machine learning model is called to input the training samples for model training, therefore, an initial horizontal federal prediction model which is combined with the hardware parameters, the system parameters and the application program parameters of the terminal equipment and used for learning the running state of the terminal equipment is created.
It should be noted that, in this embodiment, the machine learning model for creating the initial prediction model to call may be any existing type of machine learning model, for example, a binary model or a convolutional neural network model, and it should be understood that, based on practical application needs, in other embodiments, other machine learning models different from the above may also be used.
Further, in another embodiment, after the terminal device is accessed into a horizontal federal study containing a plurality of other terminal devices, a coordinator of the horizontal federal study (for example, a server or a terminal device of the same type) issues a general machine learning model frame for the terminal device (the machine learning model frame is obtained by acquiring any one or more of hardware parameters, system parameters and application parameters of the terminal device which do not contain user privacy data and performing preliminary training), the terminal device receives the general machine learning model frame, acquires its own hardware parameters, system parameters and application parameters as training samples, trains the general machine learning model frame, and thereby creates and obtains the hardware parameters, system parameters and application parameters of the terminal device, and the initial horizontal federal prediction model is used for learning the running state of the terminal equipment.
Further, in an embodiment, in the step a2, the locally training the preset horizontal federal learning initial model according to the real-time state parameters of the terminal device to obtain a locally trained model may include:
step A201, when the terminal equipment is down, recording real-time hardware parameters, system parameters and application program parameters of the terminal equipment;
the method comprises the steps that the terminal equipment or a specific application program installed on the terminal equipment continuously monitors the real-time running state of the terminal equipment, and when the terminal equipment is detected to be down, hardware parameters, system parameters and application program parameters of the terminal equipment at the current moment are collected and recorded.
Specifically, for example, the current terminal device monitors a "daemon process" (a process with a longer lifetime, which is started when the system is booted and is terminated when the system is turned off) of the terminal device, so that when the "daemon process" is terminated, it is determined that the current terminal device is down, and then hardware parameters such as the battery remaining capacity of the terminal device at the current time are correspondingly acquired, system parameters such as the version of the system installed in the terminal device and the supportable operating memory of the system are acquired, and application parameters such as the number of applications installed on the terminal device, the operating occupied memory of each application, and the operating power consumption of each application are acquired.
It should be noted that, in another embodiment, the terminal device may continuously acquire and record the hardware parameters, the system parameters, and the application parameters when the terminal device is down in the entire life cycle of the cyclic operation, and then persistently store the acquired hardware parameters, system parameters, and application parameters to form a sample database for performing learning training on the operation states of the terminal devices of the same type.
Step A202, training the preset transverse federated learning initial model locally on the terminal device based on the hardware parameters, the system parameters and the application program parameters to obtain the local training model.
And taking the collected and recorded hardware parameters, system parameters and application program parameters of the terminal equipment at the downtime moment as sample data of model training, and then inputting the sample data into the created preset horizontal federal learning initial model to perform model training on the preset horizontal federal learning initial model so as to obtain a local training model which runs locally on the terminal equipment to perform learning training on the running state of the terminal equipment.
Specifically, for example, as shown in the application flow of fig. 6, when the terminal device is down, hardware parameters such as the battery remaining capacity of the terminal device are acquired, system parameters such as the version of a system installed in the terminal device and the supportable operating memory of the system are acquired, application parameters such as the number of applications installed on the terminal device, the operating memory occupied by each application, and the operating power consumption of each application are acquired, and the acquired application parameters are used as sample data for performing model training on the created initial horizontal federal prediction model, and then the initial horizontal federal prediction model stored locally in the terminal device is trained by using the sample data to be a local training model for performing learning and training on the operating state of the terminal device.
And A3, integrating the local training models to obtain a downtime prediction model.
The method comprises the steps that a terminal device locally trains a preset transverse federal learning initial model by taking collected real-time state parameters as input, so that a local training model of the terminal device is obtained, the local training model is uploaded to a coordinator in the transverse federal learning system based on a transverse federal learning system accessed by the terminal device, the coordinator integrates a plurality of received local training models, and an integrated and gradient-converged downtime prediction model is fed back to the terminal device.
It should be noted that, in this embodiment, the downtime prediction model is specifically a federal downtime prediction model, and for convenience of description, it is only described as the downtime prediction model subsequently, in addition, the current terminal device is added as a participant in advance into a horizontal federal study, the horizontal federal study includes at least one coordinator and terminal devices with a number greater than or equal to two, each terminal device in the horizontal federal study is the same as the current terminal device, the initial prediction model is trained in respective local places and respective local training models are obtained, in addition, in the horizontal federal study, the coordinator may be a comprehensive server specifically or may also be a terminal device specifically, it should be understood that there are differences in requirements and scenes based on actual applications, in other embodiments, other devices other than the above-mentioned server and terminal device may also be used as the coordinator, the method for preventing the terminal equipment from being down does not limit the specific characteristics of the transverse federal learning system accessed by the terminal equipment.
Specifically, for example, in the application process shown in fig. 6, after a current terminal device is trained locally to obtain a local training model, the local training model is uploaded to a coordinator in the added horizontal federal learning, the coordinator combines the local training model with local training models uploaded by other terminal devices in the current horizontal federal learning to obtain a weighted average model of the local training models to integrate the local training models, and then the coordinator detects whether a model training gradient of each terminal device uploading the local training model in a current turn for integration has converged, and when convergence is detected, the obtained weighted average model is used as a downtime prediction model and fed back to all terminal devices in the current horizontal federal learning.
Step S200, inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training;
and continuously operating the downtime prediction model on the current terminal equipment, continuously acquiring the real-time hardware parameters, system parameters and application program parameters of the current terminal equipment, and inputting the acquired hardware parameters, system parameters and application program parameters into the downtime prediction model which continuously operates, so that the downtime prediction model predicts the operation state of the current terminal equipment.
And step S300, executing corresponding prevention operation according to the running state to prevent the terminal equipment from going down.
After the terminal equipment receives the downtime prediction model fed back by the coordinator in the accessed transverse federated learning system, the downtime prediction model is continuously operated locally on the terminal equipment, various state parameters of the terminal equipment are continuously acquired as input to be used by the downtime prediction model to predict the operation state of the terminal equipment, and when the operation state is predicted to be a preset state, corresponding prevention operation is executed on the terminal equipment, so that the downtime phenomenon of the terminal equipment is prevented.
It should be noted that, in this embodiment, the preset state may specifically be "about to be down" of the current terminal device, and it should be understood that, based on different requirements of practical applications, in other embodiments, the preset state may also be set to be a different state of "about to be down", specifically, the preset state may be set to be "normal operation", and then the operation that the terminal device correspondingly executes when predicting the state may also not be a prevention operation any more, for example, the operation state of the terminal device at the next time may be continuously predicted.
Specifically, for example, in the application flow shown in fig. 6, after the current terminal device is used as a participant and receives a downtime prediction model with gradient convergence issued by a coordinator in the accessed horizontal federal learning, the downtime prediction model is continuously operated locally on the current terminal device, and hardware parameters such as the real-time battery residual capacity of the current terminal device, system parameters such as the system supportable operating memory of the system and application program parameters such as the operating occupied memory of each application program and the power consumption of each application program are continuously collected, and the hardware parameters, the system parameters and the application program parameters are used as inputs, the downtime prediction model predicts the operating state of the current terminal device according to the hardware parameters, the system parameters and the application program parameters, and then when it is detected that the operating state predicted by the downtime prediction model is "about to be down", and outputting a corresponding prompt on the current terminal equipment to perform subsequent prevention operation, or automatically closing an application program running in a background on the current terminal equipment to clear the occupied memory, so as to avoid the terminal equipment from going down.
In this embodiment, a preset horizontal federal learning initial model for learning and training the running state of the terminal device is created based on the existing machine learning model and the hardware parameters, system parameters and application program parameters of the terminal device; continuously acquiring real-time state parameters of the terminal equipment by the terminal equipment or a specific application program installed on the terminal equipment, and training a preset transverse federal learning initial model by taking the acquired real-time state parameters as input in the local of the terminal equipment so as to obtain a local training model of the terminal equipment; uploading the local training model to a coordinator in the transverse federated learning system based on the transverse federated learning system accessed by the terminal equipment, integrating the received multiple local training models by the coordinator, and feeding back an integrated and gradient-converged downtime prediction model to the terminal equipment; and continuously operating the downtime prediction model locally on the terminal equipment, continuously acquiring various state parameters of the terminal equipment as input to predict the operation state of the terminal equipment by the downtime prediction model, and executing corresponding prevention operation on the terminal equipment when the operation state is predicted to be a preset state, thereby preventing the terminal equipment from being crashed.
The method realizes that the downtime prediction model for predicting the operation state of the terminal equipment is obtained based on the horizontal federal learning integration, and then when the downtime prediction model is used for predicting that the terminal equipment is possibly crashed, the corresponding prevention operation is executed on the terminal equipment to prevent the terminal equipment from going down, thereby avoiding the problems of wasting the time of the user waiting for the equipment to be recovered and losing the working content of the user caused by the terminal equipment going down, improving the use efficiency of the terminal equipment, and in addition, on the premise of protecting the privacy of the user data based on the federal learning technology, the small data islands of the dispersed terminal equipment are connected in series in a mode of 'data motionless model movement', so that data of the user on the terminal equipment cannot be leaked, the privacy safety of the user is ensured, and the prediction efficiency and precision aiming at the downtime of the terminal equipment are optimized.
Further, based on the first embodiment of the method for preventing the downtime of the terminal device, the second embodiment of the method for preventing the downtime of the terminal device is provided.
Referring to fig. 3, in the second embodiment of the method for preventing downtime of a terminal device according to the present invention, the operation state of the terminal device predicted by the downtime prediction model includes, but is not limited to: based on different actual application scenarios and requirements, in other embodiments, different operation states from the above operation states can be obtained by prediction, and the method for preventing the downtime of the terminal equipment does not specifically limit the operation states which can be obtained by the downtime prediction model.
In the step S200, the step of inputting the state parameter into the downtime prediction model to predict the operation state of the terminal device may include:
step S201, inputting the state parameters into the downtime prediction model so that the downtime prediction model feeds back a prediction result;
the terminal equipment takes the collected real-time hardware parameters, system parameters and application program parameters as input, so that the downtime prediction model carries out a new round of learning training based on the real-time hardware parameters, system parameters and application program parameters and outputs a prediction result for predicting the running state of the terminal equipment.
Specifically, for example, hardware parameters such as the real-time battery remaining capacity of the current terminal device, which are collected by the current terminal device, system parameters such as a system supportable operating memory, and application program parameters such as an operating occupied memory of each application program and power consumption of each application program, are used as input data of a downtime prediction model continuously operating on the current terminal device, and the input data are input into the downtime prediction model, so that the downtime prediction model performs a new round of machine learning training according to the input data to obtain a prediction result for predicting the operating state of the current terminal device and outputs the prediction result.
Step S202, if the prediction result identifies that the state parameter is smaller than the corresponding downtime threshold value, the running state is predicted to be normal;
it should be noted that, in this embodiment, the terminal device locally trains the preset horizontal federal learning initial model based on the hardware parameters, the system parameters and the application program parameters of the terminal device in real time when the terminal device is detected to be down in advance, so as to obtain a local training model, and in the process that the terminal device sets the hardware parameters, the system parameters and the application program parameters of the terminal device in real time as the corresponding down threshold value when the terminal device is detected to be down.
If the real-time state parameters are identified in the prediction result obtained by the downtime prediction model according to the real-time state parameters of the terminal equipment and are all smaller than the corresponding state parameters of the terminal equipment when the terminal equipment is crashed, the operation state of the terminal equipment obtained by the downtime prediction model is normal.
Specifically, for example, in the downtime prediction model continuously running on the current terminal device, the running state of the terminal device is predicted and the prediction result is output according to the hardware parameters such as the real-time battery remaining capacity of the terminal device, the system parameters such as the system supportable running memory and the like, and the application program parameters such as the running occupied memory of each application program and the power consumption of each application program, if the terminal device detects the prediction result output by the downtime prediction model, the hardware parameters such as the real-time battery remaining capacity of the terminal device are identified to be smaller than the hardware parameters such as the battery remaining capacity of the terminal device when downtime occurs, the system parameters such as the system supportable running memory and the like are also smaller than the system parameters such as the system supportable running memory when downtime occurs, and the application program parameters such as the running occupied memory of each application program and the power consumption of each application program, when the actual operation state of the terminal equipment is smaller than the actual operation state of the terminal equipment, the operation of each application program occupies the internal memory and the application program parameters such as the power consumption of the operation of each application program, and the like, and the actual operation state of the terminal equipment is predicted to be normal by the downtime prediction model according to the current real-time hardware parameters, system parameters and application program parameters of the terminal equipment.
Step S203, if the prediction result identifies that the state parameter is greater than or equal to the corresponding downtime threshold value, predicting the running state as the impending downtime;
if the real-time state parameters are identified in the prediction result obtained by the downtime prediction model according to the real-time state parameters of the terminal equipment, and any one or more state parameters which are more than or equal to the corresponding state parameters of the terminal equipment when the terminal equipment is down exist, the operation state of the terminal equipment obtained by the downtime prediction model is indicated to be about to be down.
Specifically, for example, in the downtime prediction model continuously running on the current terminal device, the running state of the terminal device is predicted and the prediction result is output according to the hardware parameters such as the real-time battery remaining capacity of the terminal device, the system parameters such as the supportable running memory of the system, and the application program parameters such as the running occupied memory of each application program and the power consumption of each application program, if the terminal device detects the prediction result output by the downtime prediction model, the hardware parameters such as the real-time battery remaining capacity of the terminal device are identified to be smaller than the hardware parameters such as the battery remaining capacity when the terminal device is down, and the application program parameters such as the running occupied memory of each application program and the power consumption of each application program are smaller than the application program parameters such as the running occupied memory of each application program and the power consumption of each application program when the terminal device is down, however, if the system parameters such as the supportable operating memory of the system are greater than the system parameters such as the supportable operating memory of the system when the terminal device is down, the system indicates that the operation state of the terminal device predicted by the down prediction model is about to be down according to the current real-time hardware parameters, system parameters and application program parameters of the terminal device.
Further, referring to fig. 4, in an embodiment, in the step S300, executing a corresponding prevention operation according to the operating state to prevent the terminal device from going down may include:
step S301, outputting preset prompt information when the running state is predicted to be about to go down;
and when the terminal equipment outputs a prediction result in the downtime prediction model and indicates that the operation state of the terminal equipment is predicted to be downtime, extracting preset prompt information immediately and outputting the preset prompt information to be displayed to a user.
It should be noted that, in this embodiment, the preset prompting information may specifically be a "respected user" generated in advance by the terminal device, and it is suggested that your device "suspend the current operation", or "close the background running program", or "clear the memory", or "backup data'" may cause a downtime based on a load occurring in the XX running content, where in fields of "suspend the current operation", "close the background running program", "clear the memory", and "backup data" of the preset prompting information, a trigger button with an instruction is preset, so that the user directly triggers a corresponding execution instruction. It should be understood that, based on different practical application scenarios and requirements, in other embodiments, it is of course also possible to set different contents in the prompt message for recommending the user to perform the operation to prevent the device from going down from the above list.
Specifically, for example, if the terminal device detects that in the prediction result output by the downtime prediction model, the system parameters such as the supportable operating memory of the real-time system of the terminal device are greater than the system parameters such as the supportable operating memory of the system when the terminal device goes down, that is, the prediction result indicates that the operating state of the terminal device predicted by the downtime prediction model is about to go down, the current terminal device immediately extracts preset prompt information "respected user" carrying a specified trigger button, and the device possibly goes down based on the current operating content suggests that you 'pause the current operation', or 'close a background operating program', or 'clear the memory', or 'backup data' ″, and outputs the preset prompt information through a display screen at the front end of the terminal device for the user to view and know.
Further, in another embodiment, the terminal device may further convert the preset prompting message into voice through a speaker at the front end, and output the voice.
Step S302, receiving an execution instruction fed back based on the preset prompting information, and executing operation content carried by the execution instruction to prevent the terminal device from going down.
After outputting and displaying the extracted preset prompting information to a user, the terminal equipment acquires an execution instruction triggered by the user based on the preset prompting information, and then reads and correspondingly executes the operation content carried in the execution instruction, so that the terminal equipment is prevented from going down.
Specifically, for example, after the terminal device detects that the operation state of the terminal device is identified as going to be down by the prediction result output by the down prediction model, so as to extract and display preset prompt information- "respected user" through a display screen at the front end, your device suggests you to 'pause current operation', or 'close background running program', or 'clear memory', or 'backup data' — output to the user, receives an instruction trigger button preset by the user through a 'close background running program' field in the preset prompt information displayed by clicking, so as to trigger an execution instruction, then reads the operation content carried by the execution instruction- "close running program", detects all application programs currently running in the background, and performs background closing processing on all the detected application programs to release the system memory, so as to avoid the current terminal equipment from being down.
Further, in an embodiment, when the terminal device converts the preset prompting information into voice through a display screen at the front end or a speaker at the front end and outputs the voice, the terminal device may further determine, based on the voice information sent by the collected user, an execution instruction triggered by the user based on the preset prompting information; or, after the preset prompt information is output and displayed for more than a certain time (for example, 1 second), the terminal device may automatically detect 'suspend current operation', 'close background running program', 'clear memory' and 'backup data' fields, so as to quickly restore the operation content of the system that can support running the memory, and automatically generate a corresponding execution instruction.
Further, in another embodiment, in the step S300, the step of executing a corresponding prevention operation according to the operating status to prevent the terminal device from going down may further include:
step S303, detecting a foreground running program and a background running program of the terminal equipment when the running state is predicted to be about to be down;
when the terminal equipment outputs a prediction result in the downtime prediction model and indicates that the operation state of the terminal equipment is predicted to be downtime, the current terminal equipment automatically detects foreground operation programs which are in foreground operation and background operation programs which are in background operation state to occupy system resources.
Specifically, for example, if the terminal device detects that in the prediction result output by the downtime prediction model, the system parameters such as the system supportable operating memory for identifying the real-time system of the terminal device is greater than the system parameters such as the system supportable operating memory for identifying the real-time system of the terminal device when the terminal device is down, that is, the prediction result indicates that the operating state of the terminal device predicted by the downtime prediction model is about to be down, the current terminal device monitors the operating system to detect a foreground operating program which is currently operating in the foreground at the current time and all background operating programs which occupy system resources in the background operating state.
And step S304, if the foreground running program is detected to belong to the preset working class program, terminating the background running program to prevent the terminal equipment from being down.
It should be noted that, in this embodiment, the preset work class program may be specifically defined according to a category to which each application program belongs in the application market, for example, the application programs such as WPS, nail, FOX mailbox, and flight meeting may be defined as the preset work class program according to a "work class" to which each application program belongs in the application market, and in addition, the user may also perform autonomous addition in the preset work class program in advance, for example, for an application that may be "social class" in the application market: WeChat is added to the preset working class program automatically.
When the terminal equipment detects that the operation state is predicted to be the time about to crash, and the foreground operation program of the terminal equipment belongs to the preset working class program, the terminal equipment automatically stops all detected background operation programs in the acquired operation state, so that occupied resources are released, and the terminal equipment is prevented from crashing.
Specifically, for example, when the terminal device detects that the prediction result output by the downtime prediction model indicates that the operation state is to be crashed, the foreground operating program of the terminal device is a "flight meeting", and further detects that the "flight meeting" belongs to one of the preset work class programs, then the terminal device automatically closes all the background operating programs of the terminal device when the prediction result output by the downtime prediction model indicates that the operation state is to be crashed, so that system memory resources occupied by all the background operating programs in the background operating state are released, and the terminal device is prevented from being crashed due to insufficient system memory resources.
In this embodiment, the state parameters are input into the downtime prediction model, so that the downtime prediction model feeds back a prediction result; if the prediction result identifies that the state parameter is smaller than the corresponding downtime threshold value, the running state is predicted to be normal; and if the prediction result identifies that the state parameter is greater than or equal to the corresponding downtime threshold value, predicting the running state to be about to be downtime. When the running state is predicted to be about to be down, outputting preset prompt information; receiving an execution instruction based on the preset prompt information feedback, and executing operation contents carried by the execution instruction to prevent the terminal equipment from going down; or detecting a foreground operating program and a background operating program of the terminal equipment when the running state is predicted to be about to be down; and if the foreground running program is detected to belong to the preset working class program, terminating the background running program to prevent the terminal equipment from being down.
The method has the advantages that the operation state of the terminal equipment is predicted based on the downtime prediction model obtained through horizontal federal learning and integration according to the real-time hardware parameters, system parameters and application program parameters of the terminal equipment, and when the downtime prediction model predicts that the terminal equipment is likely to crash, prompt information is output to a user to suggest that the user authorizes the execution of corresponding prevention operation, so that the terminal equipment is prevented from crashing, or the terminal equipment automatically closes background application programs to ensure that the working content of the user is enough to operate, namely, the equipment crash is avoided, the working data of the user are also kept, and the use efficiency of the terminal equipment is improved to a great extent.
Further, based on the first embodiment of the method for preventing the downtime of the terminal device, a third embodiment of the method for preventing the downtime of the terminal device is provided.
Referring to fig. 5, in the third embodiment of the method for preventing the downtime of the terminal device according to the present invention, in step S300, the corresponding prevention operation is executed according to the operating status to prevent the downtime of the terminal device, and the method for preventing the downtime of the terminal device according to the present invention may further include:
step S400, training the downtime prediction model to obtain a new downtime prediction model based on the state parameters of the terminal equipment during downtime;
in the process that the terminal device continuously operates the received downtime prediction model to predict the operation state, if the current terminal device is down, the terminal device continuously collects and records the hardware parameters, the system parameters and the application program parameters at the time of the downtime, the hardware parameters, the system parameters and the application program parameters are used as sample data of model training, then the sample data is input into the downtime prediction model to perform model training on the downtime prediction model, and then a new downtime prediction model for predicting the operation state of the terminal device is obtained locally at the terminal device.
It should be noted that, in this embodiment, even if the operation state of the terminal device is predicted by the operation downtime prediction model, so as to prevent the terminal device from being crashed, because the state parameters of the terminal device are numerous, sample data that is not learned and trained in advance may exist in the downtime prediction model, and thus the operation state of the terminal device may not be predicted comprehensively.
Specifically, for example, in the application process shown in fig. 6, in the process that the terminal device continuously runs the downtime prediction model to predict the running state, the current terminal device still continuously monitors a certain "daemon" of the terminal device, and when the "daemon" is terminated to determine that the current terminal device is down, correspondingly collects hardware parameters such as the battery residual capacity of the terminal device at the current moment, collects system parameters such as the version of a system installed on the terminal device and the supportable running memory of the system, and collects application program parameters such as the number of application programs installed on the terminal device, the running occupied memory of each application program, and the power consumption of each application program running, and uses the collected application program parameters as sample data for model training of the downtime prediction model, and then trains the downtime prediction model locally on the current terminal device by using the sample data, therefore, a new downtime prediction model capable of comprehensively predicting the operation state of the terminal equipment is obtained.
Further, in another embodiment, the terminal device may further record a feedback operation performed by the user for the output preset prompting information, and use the feedback operation as sample data of model training for training to obtain a new downtime prediction model.
Specifically, for example, after the terminal device displays preset prompt information- "respected user, your device may go down based on the currently running content, suggesting you 'suspend the current operation', or 'close the background running program', or 'clear the memory', or 'backup data'" output to the user, receiving an execution instruction triggered by a command trigger button preset by the field of 'closing the background running program' in the preset prompt information displayed by clicking by a user, and records parameters from the time when the prompt information is output and displayed to the time when the user clicks and triggers the execution instruction, the specific type of the execution instruction triggered by the user and the like, then using the parameters as sample data for model training of the downtime prediction model, then using the sample data to train the downtime prediction model locally on the current terminal equipment, therefore, a new downtime prediction model capable of comprehensively predicting the operation state of the terminal equipment is obtained.
And S500, predicting the running state according to the new downtime prediction model and executing corresponding prevention operation to prevent the terminal equipment from downtime.
After the terminal equipment trains and obtains a new downtime prediction model according to the collected hardware parameters, system parameters and application program parameters at the downtime moment, the new downtime prediction model is continuously operated locally on the terminal equipment, and all the hardware parameters, system parameters and application program parameters of the terminal equipment are continuously collected as input, so that the new downtime prediction model can predict the operation state of the terminal equipment, and when the operation state is predicted to be a preset state, corresponding prevention operation is executed on the terminal equipment, and the downtime phenomenon of the terminal equipment is prevented.
Specifically, for example, in the application flow shown in fig. 6, after the current terminal device trains a new downtime prediction model according to the collected hardware parameters such as the battery remaining capacity of the terminal device, the system parameters such as the system supportable operating memory, and the application parameters such as the operating memory occupied by the operation of each application and the power consumption of the operation of each application at the time of the downtime, the new downtime prediction model is continuously operated at the local location of the current terminal device, and the hardware parameters such as the real-time battery remaining capacity of the current terminal device, the system parameters such as the system supportable operating memory, and the application parameters such as the operating memory occupied by the operation of each application and the power consumption of the operation of each application are continuously collected, and the hardware parameters, the system parameters, and the application parameters are used as inputs, and the new downtime prediction model uses the hardware parameters, the system parameters, and the application parameters as inputs, And then when detecting that the operation state predicted by the downtime prediction model is 'about to crash', outputting a corresponding prompt on the current terminal equipment to perform subsequent prevention operation, or automatically closing an application program which runs in a background on the current terminal equipment to clear an occupied memory, so as to avoid the crash of the terminal equipment.
In this embodiment, in the process that the terminal device continuously operates the received downtime prediction model to predict the operation state, if the current terminal device is down, the terminal device continues to acquire and record hardware parameters, system parameters and application program parameters at the time of the downtime, and uses the hardware parameters, the system parameters and the application program parameters as sample data of model training, and then inputs the sample data into the downtime prediction model to perform model training on the downtime prediction model, so as to obtain a new downtime prediction model locally for predicting the operation state of the terminal device; and continuously operating the new downtime prediction model locally on the terminal equipment, continuously acquiring various hardware parameters, system parameters and application program parameters of the terminal equipment as input, so that the new downtime prediction model predicts the operation state of the terminal equipment, and executing corresponding prevention operation on the terminal equipment when the operation state is predicted to be a preset state, thereby preventing the downtime phenomenon of the terminal equipment.
The method realizes that the small data islands of the dispersed terminal equipment are connected in series to obtain the downtime prediction model in a mode of 'data motionless model movement' on the premise of protecting the privacy of user data based on the federal learning technology, and the downtime prediction model is used for continuously learning and training various parameters of the terminal equipment, so that the running state of the terminal equipment is predicted more comprehensively and accurately, corresponding prevention operation is executed to avoid the downtime of the terminal equipment, and the comprehensiveness and accuracy of preventing the downtime of the terminal equipment are improved.
Further, based on the first embodiment of the method for preventing the downtime of the terminal device, a fourth embodiment of the method for preventing the downtime of the terminal device is provided.
In a fourth embodiment of the method for preventing the downtime of the terminal device, in the step a3, the integrating the local training models to obtain the downtime prediction model may include:
step A301, uploading the local training model to a coordinator in the horizontal federal learning, so that the coordinator can integrate the local training model and feed back the integrated training model;
the method comprises the steps that a terminal device locally trains a preset transverse federal learning initial model by taking collected real-time state parameters as input, so that after a local training model of the terminal device is obtained, the terminal device uploads the local model to a coordinator in an accessed transverse federal learning system, the coordinator integrates a plurality of received local training models, and whether a model training gradient integrated in a current round of transverse federal learning is converged or not is detected.
Specifically, for example, after the current terminal device is trained locally to obtain a local training model, the local training model is uploaded to a coordinator in the added horizontal federal learning, the coordinator combines the local training model with local training models uploaded by other terminal devices in the current horizontal federal learning, a weighted average model of the local training models is obtained to integrate the local training models to obtain an integrated training model, and then the coordinator detects whether a loss function, a model parameter, a model training gradient, or the like of the integrated training model in the current round converges.
Step A302, receiving the integrated training model, and when the coordinator detects that the integrated training model is converged, using the integrated training model as the downtime prediction model.
It should be noted that, in this embodiment, after a coordinator in the horizontal federal learning accessed by the terminal device completes integration of each local training model in each round, so as to obtain an integrated training model, the integrated training model is fed back to the terminal device, and the above iteration is performed until the coordinator detects that the integrated training model has converged.
When the terminal equipment receives the integrated training model fed back by the coordinator in the accessed horizontal federal learning, the received training model is used as a downtime prediction model for predicting the operation state of the terminal equipment when the coordinator detects the converged training model.
Specifically, for example, a coordinator in the horizontal federal learning accessed by the terminal device obtains a weighted average model of the local training models by combining the local training models to integrate the local training models to obtain an integrated training model, and detects that a loss function, model parameters or model training gradient of the integrated training model has converged in the current turn, so that after the integrated training model is fed back to the terminal device in the last time, the terminal device receives the converged training model, and uses the training model as a downtime prediction model for performing operation state prediction according to real-time hardware parameters, system parameters and application program parameters of the terminal device.
In this embodiment, after the terminal device locally trains a preset horizontal federal learning initial model by using the collected real-time state parameters as input, so as to obtain a local training model of the terminal device, the terminal device uploads the local model to a coordinator in an accessed horizontal federal learning system, the coordinator integrates a plurality of received local training models, and detects whether a model training gradient integrated in a current turn of horizontal federal learning is converged, and the terminal device receives the integrated training model fed back by the coordinator in the accessed horizontal federal learning, and when the coordinator detects the converged training model, the received training model is used as a downtime prediction model for predicting the operation state of the terminal device.
The method and the device have the advantages that the local training model obtained by the local training of the terminal equipment is integrated based on the horizontal federal learning, so that the downtime prediction model for predicting the running state of the terminal equipment is obtained, the data of the user on the terminal equipment does not need to be integrated, the data of the user on the terminal equipment is prevented from being leaked, and the privacy safety of the user is ensured.
In addition, referring to fig. 7, an embodiment of the present invention further provides a device for preventing downtime of a terminal device, where the device for preventing downtime of a terminal device includes:
the acquisition module is used for acquiring real-time state parameters of the terminal equipment;
the prediction module is used for inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training;
and the prevention module is used for executing corresponding prevention operation according to the running state so as to prevent the terminal equipment from going down.
Preferably, the operating state includes: normal and imminent downtime, a prediction module comprising:
the input unit is used for inputting the state parameters into the downtime prediction model so that the downtime prediction model can feed back a prediction result;
the first prediction unit is used for predicting that the running state is normal if the prediction result identifies that the state parameter is smaller than a corresponding downtime threshold value;
and the second prediction unit is used for predicting the running state as about to be down if the prediction result identifies that the state parameter is greater than or equal to a corresponding down threshold value.
Preferably, the prevention module comprises:
the output unit is used for outputting preset prompt information when the running state is predicted to be about to go down;
and the first prevention unit is used for receiving an execution instruction fed back based on the preset prompt information and executing operation contents carried by the execution instruction so as to prevent the terminal equipment from going down.
Preferably, the prevention module further comprises:
the detection unit is used for detecting a foreground running program and a background running program of the terminal equipment when the running state is predicted to be about to be down;
and the second prevention unit is used for terminating the background running program if the foreground running program is detected to belong to a preset working class program so as to prevent the terminal equipment from being crashed.
Preferably, the apparatus for preventing the terminal device from going down of the present invention further includes:
the combined training module is used for training the downtime prediction model to obtain a new downtime prediction model based on the state parameters of the terminal equipment during downtime;
the prevention module of the device for preventing the terminal equipment from going down is also used for predicting the running state according to the new downtime prediction model and executing corresponding prevention operation to prevent the terminal equipment from going down
Preferably, the joint training module of the device for preventing the downtime of the terminal equipment is further used for obtaining the downtime prediction model based on transverse federal learning training;
a joint training module comprising:
the acquiring unit is used for acquiring a preset transverse federated learning initial model;
the local training unit is used for carrying out local training on the preset transverse federated learning initial model according to the real-time state parameters of the terminal equipment to obtain a local training model;
and the integration unit is used for integrating the local training model to obtain a downtime prediction model.
Preferably, the joint training module further comprises:
the establishing unit is used for establishing the preset transverse federated learning initial model according to the state parameters of the terminal equipment, wherein the state parameters comprise: hardware parameters, system parameters, and application parameters;
a local training unit comprising:
the recording subunit is used for recording real-time hardware parameters, system parameters and application program parameters of the terminal equipment when the terminal equipment is down;
and the training subunit is configured to train the preset transverse federated learning initial model locally on the terminal device based on the hardware parameters, the system parameters, and the application program parameters, so as to obtain the local training model.
Preferably, the integration unit comprises:
the transmission subunit is used for uploading the local training model to a coordinator in the horizontal federal learning so that the coordinator can integrate the local training model and feed back the integrated training model;
and the calibration subunit is used for receiving the integrated training model and taking the integrated training model as the downtime prediction model when the coordinator detects that the integrated training model is converged.
The steps implemented by the functional modules of the apparatus for preventing the downtime of the terminal device in the present invention during the operation can refer to the first embodiment and the second embodiment of the method for preventing the downtime of the terminal device of the present invention, and are not described herein again.
In addition, an embodiment of the present invention further provides a terminal device, where the terminal device includes: the method comprises the following steps of storing a program for preventing the terminal equipment from being down, storing the program on the storage, and running on the processor, wherein the program for preventing the terminal equipment from being down is executed by the processor to realize the steps of the method for preventing the terminal equipment from being down.
The steps implemented when the program for preventing the downtime of the terminal device run on the processor is executed may refer to each embodiment of the method for preventing the downtime of the terminal device of the present invention, and are not described herein again.
In addition, an embodiment of the present invention further provides a storage medium, which is applied to a computer, and the storage medium may be a non-volatile computer-readable storage medium, where a program for preventing the terminal device from going down is stored on the storage medium, and when the program for preventing the terminal device from going down is executed by a processor, the steps of the method for preventing the terminal device from going down are implemented.
The steps implemented when the program for preventing the downtime of the terminal device run on the processor is executed may refer to each embodiment of the method for preventing the downtime of the terminal device of the present invention, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for preventing terminal equipment from being down is characterized in that the method for preventing the terminal equipment from being down comprises the following steps:
acquiring real-time state parameters of the terminal equipment;
inputting the state parameters into a downtime prediction model to predict the operation state of the terminal equipment, wherein the downtime prediction model is obtained in advance based on horizontal federal learning training;
and executing corresponding prevention operation according to the running state to prevent the terminal equipment from being down.
2. The method of preventing downtime of a terminal device according to claim 1, wherein the operating state comprises: the normal and imminent downtime of the mobile device,
the step of inputting the state parameters into the downtime prediction model to predict the operation state of the terminal equipment comprises the following steps:
inputting the state parameters into the downtime prediction model so that the downtime prediction model feeds back a prediction result;
if the prediction result identifies that the state parameter is smaller than the corresponding downtime threshold value, the running state is predicted to be normal;
and if the prediction result identifies that the state parameter is greater than or equal to the corresponding downtime threshold value, predicting the running state to be about to be downtime.
3. The method for preventing the downtime of the terminal equipment according to claim 2, wherein the step of performing the corresponding prevention operation according to the operating status to prevent the downtime of the terminal equipment comprises:
when the running state is predicted to be about to be down, outputting preset prompt information;
and receiving an execution instruction based on the preset prompt information feedback, and executing the operation content carried by the execution instruction to prevent the terminal equipment from going down.
4. The method for preventing the downtime of the terminal device according to claim 2, wherein the step of performing the corresponding prevention operation according to the operating status to prevent the downtime of the terminal device further comprises:
when the running state is predicted to be about to be down, detecting a foreground running program and a background running program of the terminal equipment;
and if the foreground running program is detected to belong to the preset working class program, terminating the background running program to prevent the terminal equipment from being down.
5. The method for preventing the downtime of the terminal equipment according to claim 1, wherein after the step of performing the corresponding prevention operation according to the operating status to prevent the downtime of the terminal equipment, the method further comprises:
training the downtime prediction model to obtain a new downtime prediction model based on the state parameters of the terminal equipment during downtime;
and predicting the running state according to the new downtime prediction model and executing corresponding prevention operation to prevent the terminal equipment from downtime.
6. The method for preventing downtime of a terminal device according to claim 1, wherein the method for preventing downtime of a terminal device further comprises:
obtaining the downtime prediction model based on transverse federal learning training;
the step of obtaining the downtime prediction model based on the horizontal federal learning training comprises the following steps:
acquiring a preset transverse federated learning initial model;
according to the real-time state parameters of the terminal equipment, performing local training on the preset transverse federated learning initial model to obtain a local training model;
and integrating the local training models to obtain a downtime prediction model.
7. The method for preventing downtime of a terminal device according to claim 6, wherein before the step of obtaining the preset horizontal federal learning initial model, further comprising:
establishing the preset transverse federated learning initial model according to the state parameters of the terminal equipment, wherein the state parameters comprise: hardware parameters, system parameters, and application parameters;
the step of carrying out local training on the preset transverse federated learning initial model according to the real-time state parameters of the terminal equipment to obtain a local training model comprises the following steps:
when the terminal equipment is down, recording real-time hardware parameters, system parameters and application program parameters of the terminal equipment;
and training the preset transverse federated learning initial model locally on the terminal equipment based on the hardware parameters, the system parameters and the application program parameters to obtain the local training model.
8. The method for preventing downtime of a terminal device according to claim 6, wherein the step of integrating the local training models to obtain the downtime prediction model comprises:
uploading the local training model to a coordinator in the horizontal federal learning so that the coordinator can integrate the local training model and feed back the integrated training model;
and receiving the integrated training model, and taking the integrated training model as the downtime prediction model when the coordinator detects that the integrated training model is converged.
9. A terminal device, characterized in that the terminal device comprises: a memory, a processor and a program stored on the memory and executable on the processor for preventing a terminal device from going down, the program for preventing a terminal device from going down implementing the steps of the method for preventing a terminal device from going down according to any one of claims 1 to 8 when executed by the processor.
10. A storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of preventing a downtime of a terminal device according to any one of claims 1 to 8.
CN202010371099.1A 2020-04-30 2020-04-30 Method for preventing terminal equipment from being down, terminal equipment and storage medium Pending CN111538608A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010371099.1A CN111538608A (en) 2020-04-30 2020-04-30 Method for preventing terminal equipment from being down, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010371099.1A CN111538608A (en) 2020-04-30 2020-04-30 Method for preventing terminal equipment from being down, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111538608A true CN111538608A (en) 2020-08-14

Family

ID=71975549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010371099.1A Pending CN111538608A (en) 2020-04-30 2020-04-30 Method for preventing terminal equipment from being down, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111538608A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686369A (en) * 2020-12-10 2021-04-20 广州广电运通金融电子股份有限公司 Center party selection method, storage medium and system
CN112686368A (en) * 2020-12-10 2021-04-20 广州广电运通金融电子股份有限公司 Cooperative learning method, storage medium, terminal and system for updating center side
CN115617411A (en) * 2022-12-20 2023-01-17 苏州浪潮智能科技有限公司 Electronic equipment data processing method and device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686369A (en) * 2020-12-10 2021-04-20 广州广电运通金融电子股份有限公司 Center party selection method, storage medium and system
CN112686368A (en) * 2020-12-10 2021-04-20 广州广电运通金融电子股份有限公司 Cooperative learning method, storage medium, terminal and system for updating center side
WO2022121026A1 (en) * 2020-12-10 2022-06-16 广州广电运通金融电子股份有限公司 Collaborative learning method that updates central party, storage medium, terminal and system
CN112686369B (en) * 2020-12-10 2024-02-27 广州广电运通金融电子股份有限公司 Central side selection method, storage medium and system
CN115617411A (en) * 2022-12-20 2023-01-17 苏州浪潮智能科技有限公司 Electronic equipment data processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3502880B1 (en) Method for preloading application, storage medium, and terminal device
CN111538608A (en) Method for preventing terminal equipment from being down, terminal equipment and storage medium
JP5976221B2 (en) Information backup method and apparatus
CN111176960A (en) User operation behavior tracking method, device, equipment and storage medium
CN109901881B (en) Plug-in loading method and device of application program, computer equipment and storage medium
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
CN110457214B (en) Application testing method and device and electronic equipment
CN113593071A (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
CN112115038A (en) Application testing method and device and storage medium
CN105847446B (en) Method, device and system for acquiring network data
KR20210034558A (en) Artificial intelligence development platform managing method, device, and medium
CN109426597A (en) Application performance monitoring method, device, equipment, system and storage medium
JP2023519774A (en) Automated test method, apparatus, electronic device, storage medium, and program
CN113010825A (en) Data processing method and related device
CN108427599A (en) Method, apparatus and storage medium is uniformly processed in asynchronous task
CN111476349A (en) Model testing method and server
CN113535029A (en) Operation recording method, terminal, computer device and computer-readable storage medium
CN110262856B (en) Application program data acquisition method, device, terminal and storage medium
CN114327779A (en) Application operation environment building method and device and storage medium
CN113467879A (en) Multi-system data processing method and device based on RPA robot
CN109032907B (en) Data monitoring method and system for equipment application
CN111026657A (en) Method, computing device and medium for testing application in mobile terminal
CN111163309A (en) Testing method based on behavior simulation, television equipment and storage medium
CN110465093A (en) A kind of backpack body redundant resource analysis method and its device based on Unity
CN112215587B (en) Method, device and system for automatically executing business process interaction tasks by multiple devices

Legal Events

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