CN109828858A - A kind of method and system for preventing system boot stuck - Google Patents

A kind of method and system for preventing system boot stuck Download PDF

Info

Publication number
CN109828858A
CN109828858A CN201910045262.2A CN201910045262A CN109828858A CN 109828858 A CN109828858 A CN 109828858A CN 201910045262 A CN201910045262 A CN 201910045262A CN 109828858 A CN109828858 A CN 109828858A
Authority
CN
China
Prior art keywords
time
success
preset
preset time
software watchdog
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
CN201910045262.2A
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.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology 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 Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN201910045262.2A priority Critical patent/CN109828858A/en
Publication of CN109828858A publication Critical patent/CN109828858A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention belongs to fields of communication technology, disclose a kind of method and system for preventing system boot stuck, and method includes: detection starting-up signal, and according to starting-up signal activation system;Configuration software house dog, and the time-out time of software watchdog is set;Judge whether system is switched on success within a preset time, preset time is less than or equal to the time-out time of software watchdog;The success if system is switched within a preset time, removes software watchdog;If system is not keyed up success within a preset time, enter preset mode when the time-out time of software watchdog reaches.Present invention active arrangement software watchdog in booting, and judge whether system is switched on success within a preset time, when system is not keyed up successfully within a preset time, it then forces that system is allowed to enter preset mode when time-out time reaches, it is stuck always in starting-up interface when to prevent locking system booting, improve the usage experience of user.

Description

A kind of method and system for preventing system boot stuck
Technical field
The invention belongs to field of communication technology, in particular to a kind of method and system for preventing system boot stuck.
Background technique
With the rapid development of science and technology and network technology, the portable intelligents such as mobile phone, smartwatch, intelligent glasses are set It is standby more more and more universal.The arriving in smart machine epoch means that the intelligent of people extends, and by these equipment, people be can be convenient Quickly know itself and external various information, offers convenience to various aspects such as the work, life, amusement of people.
Currently, only needing tens in the case where without exception when the smart machines booting such as smartwatch, mobile phone in the market Second can enter system desktop;But when an exception occurs, system can be blocked, and not enter system slowly.In the prior art, it encounters The solution of the situation be setting hardware watchdog mechanism, if system block and kernel can not normally feed dog when, hardware is guarded the gate Dog can trigger system and actively restart, still, under certain abnormal conditions, it is understood that there may be when system is blocked, kernel side is still normal Activity works normally hardware watchdog mechanism, can not trigger system reboot, so that system is constantly in the state of blocking, need User's active long-pressing power button is restarted, so that the usage experience of user is poor, is unfavorable for the popularization and use of product.
Summary of the invention
The object of the present invention is to provide a kind of method and system for preventing system boot stuck, system is actively restarted in realization, It prevents equipment from blocking always, improves the usage experience of user.
Technical solution provided by the invention is as follows:
On the one hand, a kind of method for preventing system boot stuck is provided, comprising:
Starting-up signal is detected, and according to the starting-up signal activation system;
Configuration software house dog, and the time-out time of the software watchdog is set;
Judge whether system is switched on success within a preset time, the preset time is less than or equal to the software watchdog Time-out time;
If system is switched on successfully in the preset time, the software watchdog is removed;
If system is not keyed up success in the preset time, the software watchdog time-out time reach when into Enter preset mode.
It is further preferred that if the system is not keyed up success in the preset time, in the software watchdog Time-out time enter preset mode and specifically include when reaching:
If system is not keyed up success in the preset time, the weight when the time-out time of the software watchdog reaches Starting system.
It is further preferred that if system is not keyed up success in the preset time, in the software watchdog time-out Time is restarted when reaching after system further include:
As the system reboots, software watchdog is reconfigured, and the time-out time of the software watchdog reconfigured is set;
Judge the success that whether is switched on after system reboot within a preset time;
If system is not keyed up successfully and is not keyed up successful number greater than preset threshold, it is described reconfigure it is soft The time-out time of part house dog enters abnormal patterns, and print log when reaching.
It is further preferred that if the system is not keyed up success in the preset time, in the software watchdog Time-out time enter preset mode and specifically include when reaching:
If system is not keyed up success in the preset time, the software watchdog time-out time reach when into Enter abnormal patterns, and print log.
Judge whether system is switched within a preset time it is further preferred that described and successfully specifically include:
When booting Success Flag is not detected within a preset time, then judge that system is not keyed up in the preset time Success;
When detect within a preset time booting Success Flag when, then judge system be switched in the preset time at Function.
On the other hand, a kind of system for preventing system boot stuck is also provided, comprising:
System starting module, for detecting starting-up signal, and according to the starting-up signal activation system;
House dog configuration module is used for configuration software house dog, and the time-out time of the software watchdog is arranged;
Be switched on judgment module, for judging whether system is switched on success within a preset time, the preset time is less than etc. In the time-out time of the software watchdog;
House dog removes module, if being switched in the preset time successfully for system, removes the software and guards the gate Dog;
Preset mode module, if success is not keyed up in the preset time for system, in the software watchdog Time-out time reach when enter preset mode.
It is further preferred that the preset mode module includes:
System reboot unit, if success is not keyed up in the preset time for system, in the software watchdog Time-out time reach when restart system.
It is further preferred that the house dog configuration module, is also used to as the system reboots, reconfigure software and guard the gate Dog, and the time-out time of the software watchdog reconfigured is set;
Whether the booting judgment module is also used to when the system restarts, open within a preset time after judging system reboot Machine success;
The preset mode module further include:
Abnormal patterns unit, if be not keyed up successfully for system and be not keyed up successful number greater than preset threshold, Enter abnormal patterns, and print log when the time-out time of the software watchdog reconfigured reaches.
It is further preferred that the preset mode module includes:
Abnormal patterns unit, if success is not keyed up in the preset time for system, in the software watchdog Time-out time reach when enter abnormal patterns, and print log.
It is further preferred that the booting judgment module includes:
Be switched on judging unit, for when booting Success Flag is not detected within a preset time, then judging system in institute It states and is not keyed up success in preset time;
The booting judging unit is also used to then judge system when detecting booting Success Flag within a preset time It is switched on successfully in the preset time.
Compared with prior art, a kind of method and system for preventing system boot stuck provided by the invention have with following Beneficial effect:
1, present invention active arrangement software watchdog in booting, and judge whether system is switched within a preset time Function then forces that system is allowed to enter preset mode when time-out time reaches, in advance when system is not keyed up successfully within a preset time If mode can be configured as carried out system reboot or entering other modes, when being switched on to prevent locking system always according to the actual situation It is stuck to be operated manually in starting-up interface, and without user, the usage experience of user is improved, whole process is in start process It is detected, will not influence the subsequent normal use of user, reduced and complain, finally improve the competitiveness of product in market.
2, in a preferred embodiment, when system is not keyed up success within a preset time, lay equal stress on starting system when, weight New configuration software house dog, and the time-out time of the software watchdog reconfigured is set, it is guarded the gate by the software reconfigured Whether dog continues to test system and is switched on success, when the system of detecting is not keyed up successful number greater than preset threshold, illustrate firmly Part equipment or storage exist abnormal, and system is allowed to enter specified abnormal patterns, and print log at this time, can retain last time and be not keyed up Successfully scene, it is convenient after sale or developer analyzes and searches reason.
3, in a preferred embodiment, when equipment is in the development phase, if system is not opened within a preset time Machine success, then be directly entered specified abnormal patterns when the time-out time of software watchdog reaches, and is not keyed up success to retain Scene, facilitate developer search analysis reason.
Detailed description of the invention
Below by clearly understandable mode, preferred embodiment is described with reference to the drawings, system boot card is prevented to one kind Above-mentioned characteristic, technical characteristic, advantage and its implementation of dead method and system are further described.
Fig. 1 is a kind of flow diagram of the first embodiment for the method for preventing system boot stuck of the present invention;
Fig. 2 is a kind of flow diagram of the second embodiment for the method for preventing system boot stuck of the present invention;
Fig. 3 is a kind of flow diagram of the 3rd embodiment for the method for preventing system boot stuck of the present invention;
Fig. 4 is a kind of flow diagram of the fourth embodiment for the method for preventing system boot stuck of the present invention;
Fig. 5 is a kind of flow diagram of 5th embodiment of the method for preventing system boot stuck of the present invention;
Fig. 6 is a kind of flow diagram of the sixth embodiment for the method for preventing system boot stuck of the present invention;
Fig. 7 is a kind of flow diagram of 7th embodiment of the method for preventing system boot stuck of the present invention;
Fig. 8 is a kind of flow diagram of 8th embodiment of the method for preventing system boot stuck of the present invention;
Fig. 9 is a kind of structural schematic block diagram of the one embodiment for the system for preventing system boot stuck of the present invention.
Drawing reference numeral explanation
100, system starting module;200, house dog configuration module;
300, be switched on judgment module;310, be switched on judging unit;
400, house dog removes module;500, preset mode module;
510, system reboot unit;520, abnormal patterns unit.
Specific embodiment
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, Detailed description of the invention will be compareed below A specific embodiment of the invention.It should be evident that drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically shown in each figure, they are not represented Its practical structures as product.In addition, there is identical structure or function in some figures so that simplified form is easy to understand Component only symbolically depicts one of those, or has only marked one of those.Herein, "one" is not only indicated " only this ", can also indicate the situation of " more than one ".
The first embodiment provided according to the present invention, as shown in Figure 1, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S300 judges whether system is switched on success within a preset time, and the preset time is less than or equal to the software and guards the gate The time-out time of dog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S500 system is not keyed up success in the preset time, default mould is entered when the time-out time reaches Formula.
Specifically, it when the power button of the mobile terminals such as user or exploitation tester's long-pressing mobile phone, wrist-watch, can be detected To starting-up signal, at this time according to starting-up signal activation system kernel, active arrangement software is guarded the gate during starting kernel (booting) Dog, and the time-out time of software watchdog is set, the time-out time of software watchdog should be greater than required when system normal boot-strap Time, avoid the time-out time due to software watchdog from reaching and influence the normal boot-strap of system.
Judge whether system is switched on success within a preset time, preset time can be configured according to the actual situation, be arranged Preset time should be less than or equal to software watchdog time-out time.
The success if system is switched within a preset time, removes software watchdog, avoids the normal use for influencing user, if System is not keyed up success within a preset time, then so that system is entered preset mode when the time-out time of software watchdog reaches, Preset mode can attach most importance to starting system or other mode, stuck in starting-up interface to prevent locking system, reduce the usage experience of user.
Present invention active arrangement software watchdog in booting, and judge whether system is switched on success within a preset time, When system is not keyed up successfully within a preset time, then forces that system is allowed to enter preset mode when time-out time reaches, preset Mode can be configured according to the actual situation as carried out system reboot or entering other modes, to prevent blocking always when locking system booting Extremely in starting-up interface, the usage experience of user is improved, whole process is detected in start process, after will not influence user Continuous normal use, reduces and complains, finally improve the competitiveness of product in market.
The second embodiment provided according to the present invention, as shown in Fig. 2, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S300 judges whether system is switched on success within a preset time, and the preset time is less than or equal to the software and guards the gate The time-out time of dog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S510 system is not keyed up success in the preset time, reached in the time-out time of the software watchdog Shi Chongqi system.
Specifically, user is during using equipment, when equipment is according to the starting-up signal activation system kernel detected Afterwards, software watchdog is automatically configured, and the time-out time of software watchdog is set, when judgement system is switched within a preset time When function, the software watchdog for actively removing configuration is then guarded the gate by software when judgement system is not keyed up successfully within a preset time Dog restarts system, and anti-locking system is stuck always in starting-up interface, and system reboot carries out on backstage, entire to be switched on restarting process not It can have any impact to user, can be complained with reducing to user with good usage experience, improve the market competition of product Power.
The 3rd embodiment provided according to the present invention, as shown in figure 3, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S300 judges whether system is switched on success within a preset time, and the preset time is less than or equal to the software and guards the gate The time-out time of dog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S510 system is not keyed up success in the preset time, reached in the time-out time of the software watchdog Shi Chongqi system;
S600 as the system reboots, reconfigures software watchdog, and the time-out of the software watchdog reconfigured is arranged Time;
S700 judges the success that whether is switched on after system reboot within a preset time;
If S800 system is not keyed up successfully and is not keyed up successful number greater than preset threshold, reconfigured described Software watchdog time-out time reach when enter abnormal patterns, and print log.
Specifically, during user uses equipment, after equipment is according to the starting-up signal activation system kernel detected, Software watchdog is automatically configured, and the time-out time of software watchdog is set, when judgement system is switched on success within a preset time When, the software watchdog of configuration is actively removed, when judgement system is not keyed up successfully within a preset time, then by software watchdog Restart system.
System reconfigures software watchdog when restarting, and the time-out time of the software watchdog reconfigured is arranged, And whether the software watchdog by reconfiguring continues to test system and is switched within a preset time success, if system is also not keyed up into Whether function then restarts system again, and configuration software house dog again, be switched within a preset time after judging system reboot again Success.When system continuous several times are not keyed up successfully and continuous several times are not keyed up successful number greater than preset threshold, then illustrate There is apparent exception in the hardware of equipment or storage etc., reconfiguring the super of the software watchdog of (or configuring again) at this time When the time force the system into specified abnormal patterns, and print log when reaching, abnormal patterns, which can be used to analyze last time, not to be opened Machine is successfully live, and convenience is after sale or developer was not keyed up successful reason analytical equipment last time.Preset threshold can be according to reality The setting of border situation, be such as set as 2 times, it is 3 inferior.
In the present embodiment, when system is not keyed up success within a preset time, lay equal stress on starting system when, reconfigure software and see Door dog, and the time-out time of software watchdog reconfigured is arranged, is continued to test by the software watchdog reconfigured and is The success that whether is switched on of uniting illustrates hardware device or storage when the system of detecting is not keyed up successful number greater than preset threshold There are exceptions, and system is allowed to enter specified abnormal patterns, and print log at this time, can retain last time and be not keyed up successful scene, Convenience is after sale or developer analyzes and searches reason.
The fourth embodiment provided according to the present invention, as shown in fig. 7, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S300 judges whether system is switched on success within a preset time, and the preset time is less than or equal to the software and guards the gate The time-out time of dog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S520 system is not keyed up success in the preset time, reached in the time-out time of the software watchdog When enter abnormal patterns, and print log.
Specifically, when equipment is when developing test phase, when equipment is according in the starting-up signal activation system detected After core, software watchdog is automatically configured, and the time-out time of software watchdog is set, when judgement system is switched within a preset time When success, the software watchdog for actively removing configuration is guarded the gate when judgement system is not keyed up successfully within a preset time in software The time-out time of dog forces the system into abnormal patterns, and print log when reaching, abnormal patterns can be used to analyze last time not at The scene of function booting facilitates and develops the reason of tester was switched on analysis last time not successfully, and repairs existing defect, to improve The market competitiveness of equipment.
In the present embodiment, when equipment is in the development phase, if system is not keyed up success within a preset time, soft The time-out time of part house dog is directly entered specified abnormal patterns when reaching, and is not keyed up successful scene to retain, conveniently opens It sends out people finder and analyzes reason.
The 5th embodiment provided according to the present invention, as shown in figure 5, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S310 then judges system in the preset time not when booting Success Flag is not detected within a preset time It is switched on successfully;
S320 then judges that system is switched in the preset time when detecting booting Success Flag within a preset time Success, the preset time are less than or equal to the time-out time of the software watchdog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S500 system is not keyed up success in the preset time, reached in the time-out time of the software watchdog When enter preset mode.
Specifically, after system starts according to starting-up signal, active arrangement software watchdog, and the super of software watchdog is set When the time, software watchdog has detected whether that booting complement mark (booting Success Flag) generates, when software watchdog is default When booting Success Flag generation being not detected in the time, then illustrate that system is not keyed up success within a preset time, when software is seen When door dog has detected that booting Success Flag generates within a preset time, then illustrate that system is switched on success within a preset time.It opens Machine Success Flag refers to the mark generated after the completion of system boot.The present embodiment directly passes through the mark generated after detection booting Will judges whether system is switched on success, and not only accuracy rate is high, but also can simplify judgment step.
The sixth embodiment provided according to the present invention, as shown in fig. 6, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S310 then judges system in the preset time not when booting Success Flag is not detected within a preset time It is switched on successfully;
S320 then judges that system is switched in the preset time when detecting booting Success Flag within a preset time Success, the preset time are less than or equal to the time-out time of the software watchdog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S510 system is not keyed up success in the preset time, reached in the time-out time of the software watchdog Shi Chongqi system.
Specifically, user is during using equipment, when equipment is according to the starting-up signal activation system kernel detected Afterwards, software watchdog is automatically configured, and the time-out time of software watchdog is set, is switched on successfully when detecting within a preset time When mark, then judges that system is switched on success within a preset time, actively remove the software watchdog of configuration at this time.
When booting Success Flag is not detected within a preset time, then judge that system is not keyed up within a preset time Function restarts system by software watchdog at this time, and anti-locking system is stuck always in starting-up interface, and system reboot carries out on backstage, Entire booting restarting process will not have any impact to user, can be complained to user with good usage experience with reducing, Improve the competitiveness of product in market.
The 7th embodiment provided according to the present invention, as shown in fig. 7, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S310 then judges system in the preset time not when booting Success Flag is not detected within a preset time It is switched on successfully;
S320 then judges that system is switched in the preset time when detecting booting Success Flag within a preset time Success, the preset time are less than or equal to the time-out time of the software watchdog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S510 system is not keyed up success in the preset time, reached in the time-out time of the software watchdog Shi Chongqi system;
S600 as the system reboots, reconfigures software watchdog, and the time-out of the software watchdog reconfigured is arranged Time;
S700 judges the success that whether is switched on after system reboot within a preset time;
If S800 system is not keyed up successfully and is not keyed up successful number greater than preset threshold, reconfigured described Software watchdog time-out time reach when enter abnormal patterns, and print log.
Specifically, during user uses equipment, after equipment is according to the starting-up signal activation system kernel detected, Software watchdog is automatically configured, and the time-out time of software watchdog is set, is successfully marked when detecting to be switched within a preset time When will, then judges that system is switched on success within a preset time, actively remove the software watchdog of configuration at this time.When in preset time When booting Success Flag is inside not detected, then judge that system is not keyed up success within a preset time, at this time by software watchdog weight Starting system.
System reconfigures software watchdog when restarting, and the time-out time of the software watchdog reconfigured is arranged, And whether the software watchdog by reconfiguring continues to test system and is switched within a preset time success, if system is also not keyed up into Whether function then restarts system again, and configuration software house dog again, be switched within a preset time after judging system reboot again Success.When system continuous several times are not keyed up successfully and continuous several times are not keyed up successful number greater than preset threshold, then illustrate There is apparent exception in the hardware of equipment or storage etc., reconfiguring the super of the software watchdog of (or configuring again) at this time When the time force the system into specified abnormal patterns, and print log when reaching, abnormal patterns, which can be used to analyze last time, not to be opened Machine is successfully live, and convenience is after sale or developer was not keyed up successful reason analytical equipment last time.Preset threshold can be according to reality The setting of border situation, be such as set as 2 times, it is 3 inferior.
In the present embodiment, when system is not keyed up success within a preset time, lay equal stress on starting system when, reconfigure software and see Door dog, and the time-out time of software watchdog reconfigured is arranged, is continued to test by the software watchdog reconfigured and is The success that whether is switched on of uniting illustrates hardware device or storage when the system of detecting is not keyed up successful number greater than preset threshold There are exceptions, and system is allowed to enter specified abnormal patterns, and print log at this time, can retain last time and be not keyed up successful scene, Convenience is after sale or developer analyzes and searches reason.
The 8th embodiment provided according to the present invention, as shown in figure 8, a kind of method for preventing system boot stuck, comprising:
S100 detects starting-up signal, and according to the starting-up signal activation system;
S200 configuration software house dog, and the time-out time of the software watchdog is set;
S310 then judges system in the preset time not when booting Success Flag is not detected within a preset time It is switched on successfully;
S320 then judges that system is switched in the preset time when detecting booting Success Flag within a preset time Success, the preset time are less than or equal to the time-out time of the software watchdog;
If S400 system is switched on successfully in the preset time, the software watchdog is removed;
If S520 system is not keyed up success in the preset time, reached in the time-out time of the software watchdog When enter abnormal patterns, and print log.
Specifically, when equipment is when developing test phase, when equipment is according in the starting-up signal activation system detected After core, automatically configure software watchdog, and the time-out time of software watchdog be set, when detect within a preset time booting at When function mark, then judges that system is switched on success within a preset time, actively remove the software watchdog of configuration at this time.
When booting Success Flag is not detected within a preset time, then judge that system is not keyed up within a preset time Function forces the system into abnormal patterns, and print log when the time-out time of software watchdog reaches, and abnormal patterns can be used to The scene that analysis last time is switched on not successfully facilitates and develops the reason of tester was switched on analysis last time not successfully, and repairs presence Defect, to improve the market competitiveness of equipment.
In the present embodiment, when equipment is in the development phase, if system is not keyed up success within a preset time, soft The time-out time of part house dog is directly entered specified abnormal patterns when reaching, and is not keyed up successful scene to retain, conveniently opens It sends out people finder and analyzes reason.
The 9th embodiment provided according to the present invention, as shown in figure 9, a kind of system for preventing system boot stuck, comprising:
System starting module 100, for detecting starting-up signal, and according to the starting-up signal activation system;
House dog configuration module 200 is used for configuration software house dog, and the time-out time of the software watchdog is arranged;
Be switched on judgment module 300, and for judging whether system is switched on success within a preset time, the preset time is less than Equal to the time-out time of the software watchdog;
House dog removes module 400, if being switched in the preset time successfully for system, removes the software and sees Door dog;
Preset mode module 500 is guarded the gate if being not keyed up success in the preset time for system in the software The time-out time of dog enters preset mode when reaching.
Specifically, it when the power button of the mobile terminals such as user or exploitation tester's long-pressing mobile phone, wrist-watch, can be detected To starting-up signal, at this time according to starting-up signal activation system kernel, active arrangement software is guarded the gate during starting kernel (booting) Dog, and the time-out time of software watchdog is set, the time-out time of software watchdog should be greater than required when system normal boot-strap Time, avoid the time-out time due to software watchdog from reaching and influence the normal boot-strap of system.
Judge whether system is switched on success within a preset time, preset time can be configured according to the actual situation, be arranged Preset time should be less than or equal to software watchdog time-out time.
The success if system is switched within a preset time, removes software watchdog, avoids the normal use for influencing user, if System is not keyed up success within a preset time, then so that system is entered preset mode when the time-out time of software watchdog reaches, Preset mode can attach most importance to starting system or other mode, stuck in starting-up interface to prevent locking system, reduce the usage experience of user.
Present invention active arrangement software watchdog in booting, and judge whether system is switched on success within a preset time, When system is not keyed up successfully within a preset time, then forces that system is allowed to enter preset mode when time-out time reaches, preset Mode can be configured according to the actual situation as carried out system reboot or entering other modes, to prevent blocking always when locking system booting Extremely in starting-up interface, the usage experience of user is improved, whole process is detected in start process, after will not influence user Continuous normal use, reduces and complains, finally improve the competitiveness of product in market.
Preferably, the preset mode module 500 includes:
System reboot unit 510 is guarded the gate if being not keyed up success in the preset time for system in the software The time-out time of dog restarts system when reaching.
Specifically, user is during using equipment, when equipment is according to the starting-up signal activation system kernel detected Afterwards, software watchdog is automatically configured, and the time-out time of software watchdog is set, when judgement system is switched within a preset time When function, the software watchdog for actively removing configuration is then guarded the gate by software when judgement system is not keyed up successfully within a preset time Dog restarts system, and anti-locking system is stuck always in starting-up interface, and system reboot carries out on backstage, entire to be switched on restarting process not It can have any impact to user, can be complained with reducing to user with good usage experience, improve the market competition of product Power.
Preferably, the house dog configuration module 200 is also used to as the system reboots, reconfigure software watchdog, and The time-out time of the software watchdog reconfigured is set;
The booting judgment module 300, is also used to when the system restarts, judge whether system is switched within a preset time Function;
The preset mode module 500 further include:
Abnormal patterns unit 520, if be not keyed up successfully for system and be not keyed up successful number greater than preset threshold, Then enter abnormal patterns, and print log when the time-out time of the software watchdog reconfigured reaches.
Specifically, during user uses equipment, after equipment is according to the starting-up signal activation system kernel detected, Software watchdog is automatically configured, and the time-out time of software watchdog is set, when judgement system is switched on success within a preset time When, the software watchdog of configuration is actively removed, when judgement system is not keyed up successfully within a preset time, then by software watchdog Restart system.
System reconfigures software watchdog when restarting, and the time-out time of the software watchdog reconfigured is arranged, And whether the software watchdog by reconfiguring continues to test system and is switched within a preset time success, if system is also not keyed up into Function then restarts system again, and configuration software house dog again, judges whether system is switched on success within a preset time again.When When system continuous several times are not keyed up successfully and continuous several times are not keyed up successful number greater than preset threshold, then illustrate the hard of equipment There is apparent exception in part or storage etc., arrive at this time in the time-out time for the software watchdog for reconfiguring (or configuring again) Up to when force the system into specified abnormal patterns, and print log, abnormal patterns can be used to analyze last time and be not keyed up successfully Scene, convenience is after sale or developer was not keyed up successful reason analytical equipment last time.Preset threshold can be set according to the actual situation Set, be such as set as 2 times, it is 3 inferior.
In the present embodiment, when system is not keyed up success within a preset time, lay equal stress on starting system when, reconfigure software and see Door dog, and the time-out time of software watchdog reconfigured is arranged, is continued to test by the software watchdog reconfigured and is The success that whether is switched on of uniting illustrates hardware device or storage when the system of detecting is not keyed up successful number greater than preset threshold There are exceptions, and system is allowed to enter specified abnormal patterns, and print log at this time, can retain last time and be not keyed up successful scene, Convenience is after sale or developer analyzes and searches reason.
Preferably, abnormal patterns unit 520, if being also used to system is not keyed up success in the preset time, in institute Enter abnormal patterns, and print log when stating the time-out time arrival of software watchdog.
Specifically, when equipment is when developing test phase, when equipment is according in the starting-up signal activation system detected After core, software watchdog is automatically configured, and the time-out time of software watchdog is set, when judgement system is switched within a preset time When success, the software watchdog for actively removing configuration is guarded the gate when judgement system is not keyed up successfully within a preset time in software The time-out time of dog forces the system into abnormal patterns, and print log when reaching, abnormal patterns can be used to analyze last time not at The scene of function booting facilitates and develops the reason of tester was switched on analysis last time not successfully, and repairs existing defect, to improve The market competitiveness of equipment.
In the present embodiment, when equipment is in the development phase, if system is not keyed up success within a preset time, soft The time-out time of part house dog is directly entered specified abnormal patterns when reaching, and is not keyed up successful scene to retain, conveniently opens It sends out people finder and analyzes reason.
Preferably, the booting judgment module 300 includes:
Be switched on judging unit 310, for when booting Success Flag is not detected within a preset time, then judging that system exists Success is not keyed up in the preset time;
The booting judging unit 310, be also used to when detect within a preset time booting Success Flag when, then judge be System is switched on successfully in the preset time.
Specifically, after system starts according to starting-up signal, active arrangement software watchdog, and the super of software watchdog is set When the time, software watchdog has detected whether that booting complement mark (booting Success Flag) generates, when software watchdog is default When booting Success Flag generation being not detected in the time, then illustrate that system is not keyed up success within a preset time, when software is seen When door dog has detected that booting Success Flag generates within a preset time, then illustrate that system is switched on success within a preset time.It opens Machine Success Flag refers to the mark generated after the completion of system boot.The present embodiment directly passes through the mark generated after detection booting Will judges whether system is switched on success, and not only accuracy rate is high, but also can simplify judgment step.
It should be noted that above-described embodiment can be freely combined as needed.The above is only of the invention preferred Embodiment, it is noted that for those skilled in the art, in the premise for not departing from the principle of the invention Under, several improvements and modifications can also be made, these modifications and embellishments should also be considered as the scope of protection of the present invention.

Claims (10)

1. a kind of method for preventing system boot stuck characterized by comprising
Starting-up signal is detected, and according to the starting-up signal activation system;
Configuration software house dog, and the time-out time of the software watchdog is set;
Judge whether system is switched on success within a preset time, the preset time is less than or equal to the time-out of the software watchdog Time;
If system is switched on successfully in the preset time, the software watchdog is removed;
If system is not keyed up success in the preset time, enter when the time-out time of the software watchdog reaches pre- If mode.
2. a kind of method for preventing system boot stuck according to claim 1, which is characterized in that if the system is in institute It states and is not keyed up success in preset time, then enter preset mode when the time-out time of the software watchdog reaches and specifically wrap It includes:
If system is not keyed up success in the preset time, restarts when the time-out time of the software watchdog reaches and be System.
3. a kind of method for preventing system boot stuck according to claim 2, which is characterized in that if system is described pre- If being not keyed up success in the time, then after restarting system when the software watchdog time-out time reaches further include:
As the system reboots, software watchdog is reconfigured, and the time-out time of the software watchdog reconfigured is set;
Judge the success that whether is switched on after system reboot within a preset time;
If system is not keyed up successfully and is not keyed up successful number greater than preset threshold, seen in the software reconfigured The time-out time of door dog enters abnormal patterns, and print log when reaching.
4. a kind of method for preventing system boot stuck according to claim 1, which is characterized in that if the system is in institute It states and is not keyed up success in preset time, then enter preset mode when the time-out time of the software watchdog reaches and specifically wrap It includes:
If system is not keyed up success in the preset time, enter when the time-out time of the software watchdog reaches different Norm formula, and print log.
5. a kind of method for preventing system boot stuck according to claim 1-4, which is characterized in that described to sentence Whether disconnected system is switched within a preset time successfully specifically includes:
When booting Success Flag is not detected within a preset time, then judge that system is not keyed up into the preset time Function;
When detecting booting Success Flag within a preset time, then judge that system is switched on successfully in the preset time.
6. a kind of system for preventing system boot stuck characterized by comprising
System starting module, for detecting starting-up signal, and according to the starting-up signal activation system;
House dog configuration module is used for configuration software house dog, and the time-out time of the software watchdog is arranged;
Be switched on judgment module, and for judging whether system is switched on success within a preset time, the preset time is less than or equal to institute State the time-out time of software watchdog;
House dog removes module, if being switched in the preset time successfully for system, removes the software watchdog;
Preset mode module, if being not keyed up success in the preset time for system, in the super of the software watchdog When the time reach when enter preset mode.
7. a kind of system for preventing system boot stuck according to claim 6, which is characterized in that the preset mode mould Block includes:
System reboot unit, if being not keyed up success in the preset time for system, in the super of the software watchdog When the time reach when restart system.
8. a kind of system for preventing system boot stuck according to claim 7, which is characterized in that
The house dog configuration module is also used to as the system reboots, reconfigure software watchdog, and is arranged and reconfigures The time-out time of software watchdog;
Whether the booting judgment module is also used to when the system restarts, be switched within a preset time after judging system reboot Function;
The preset mode module further include:
Abnormal patterns unit, if be not keyed up successfully for system and be not keyed up successful number greater than preset threshold, in institute Enter abnormal patterns, and print log when stating the time-out time arrival of the software watchdog reconfigured.
9. a kind of system for preventing system boot stuck according to claim 6, which is characterized in that the preset mode mould Block includes:
Abnormal patterns unit, if being not keyed up success in the preset time for system, in the super of the software watchdog When the time reach when enter abnormal patterns, and print log.
10. according to a kind of described in any item systems for preventing system boot stuck of claim 6-9, which is characterized in that described Booting judgment module include:
Be switched on judging unit, for when booting Success Flag is not detected within a preset time, then judging system described pre- If being not keyed up success in the time;
The booting judging unit is also used to then judge system in institute when detecting booting Success Flag within a preset time It states and is switched on successfully in preset time.
CN201910045262.2A 2019-01-17 2019-01-17 A kind of method and system for preventing system boot stuck Pending CN109828858A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910045262.2A CN109828858A (en) 2019-01-17 2019-01-17 A kind of method and system for preventing system boot stuck

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910045262.2A CN109828858A (en) 2019-01-17 2019-01-17 A kind of method and system for preventing system boot stuck

Publications (1)

Publication Number Publication Date
CN109828858A true CN109828858A (en) 2019-05-31

Family

ID=66861810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910045262.2A Pending CN109828858A (en) 2019-01-17 2019-01-17 A kind of method and system for preventing system boot stuck

Country Status (1)

Country Link
CN (1) CN109828858A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966407A (en) * 2020-07-16 2020-11-20 芯发威达电子(上海)有限公司 Startup management method, system and storage medium thereof

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188828A (en) * 2006-11-16 2008-05-28 中兴通讯股份有限公司 Method for dual-processor mobile terminal to work status of process slave processor
CN101359304A (en) * 2007-08-01 2009-02-04 华硕电脑股份有限公司 Starting up method and system
CN101860624A (en) * 2010-06-21 2010-10-13 中兴通讯股份有限公司 Crash auto-restart method and mobile phone
CN101931696A (en) * 2010-08-11 2010-12-29 无锡中星微电子有限公司 Rapid mobile phone starting method and system thereof
CN103645972A (en) * 2013-12-17 2014-03-19 广州商科信息科技有限公司 Method and device for automatic recovery of system
CN106550096A (en) * 2015-09-18 2017-03-29 中兴通讯股份有限公司 The method and device of control terminal start
CN108304275A (en) * 2018-01-09 2018-07-20 福州瑞芯微电子股份有限公司 A kind of method and apparatus of detection Android system application layer exception
CN108347521A (en) * 2017-01-24 2018-07-31 中兴通讯股份有限公司 A kind of data back up method and device
CN109032822A (en) * 2017-06-09 2018-12-18 中兴通讯股份有限公司 A kind of store method and device of computer crash information

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188828A (en) * 2006-11-16 2008-05-28 中兴通讯股份有限公司 Method for dual-processor mobile terminal to work status of process slave processor
CN101359304A (en) * 2007-08-01 2009-02-04 华硕电脑股份有限公司 Starting up method and system
CN101860624A (en) * 2010-06-21 2010-10-13 中兴通讯股份有限公司 Crash auto-restart method and mobile phone
CN101931696A (en) * 2010-08-11 2010-12-29 无锡中星微电子有限公司 Rapid mobile phone starting method and system thereof
CN103645972A (en) * 2013-12-17 2014-03-19 广州商科信息科技有限公司 Method and device for automatic recovery of system
CN106550096A (en) * 2015-09-18 2017-03-29 中兴通讯股份有限公司 The method and device of control terminal start
CN108347521A (en) * 2017-01-24 2018-07-31 中兴通讯股份有限公司 A kind of data back up method and device
CN109032822A (en) * 2017-06-09 2018-12-18 中兴通讯股份有限公司 A kind of store method and device of computer crash information
CN108304275A (en) * 2018-01-09 2018-07-20 福州瑞芯微电子股份有限公司 A kind of method and apparatus of detection Android system application layer exception

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
于玉珠等: "ARM Cortex-M0的油田采输物联网监控系统设计", 《 单片机与嵌入式系统应用》 *
周强等: "单片机软件喂狗方式和硬件喂狗方式的比较", 《陕西科技大学学报》 *
朱鹏: "垂直向力位耦合电液系统控制策略研究", 《万方中国学位论文全文数据库》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966407A (en) * 2020-07-16 2020-11-20 芯发威达电子(上海)有限公司 Startup management method, system and storage medium thereof

Similar Documents

Publication Publication Date Title
CN105809003B (en) The terminal screen unlocking method and terminal of a kind of fingerprint recognition
CN112199223B (en) Recovery method for boot failure of terminal equipment and terminal equipment
CN109522147A (en) A kind of method, apparatus, storage medium and the terminal of record booting exception information
US20120265974A1 (en) Method and Device for Resetting Intelligent Terminal
US20070234123A1 (en) Method for detecting switching failure
CN105024879A (en) Virtual machine fault detection and recovery system and virtual machine detection, recovery and starting method
CN107885635B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN108762886B (en) Fault detection recovery method and system for virtual machine
CN109471670A (en) Equipment starting method and electronic equipment
CN107623899A (en) Information processing method, device, storage medium and electronic equipment
CN105975304A (en) Restarting method and apparatus for mobile device
CN103870319B (en) Information processing method, device and electronic equipment
CN109828858A (en) A kind of method and system for preventing system boot stuck
CN109023835A (en) A kind of control method for washing machine, device, storage medium and washing machine
CN101923480A (en) Method and device for starting terminal equipment
CN109783267A (en) A kind of method and system solving downloading mode exception
US20240152439A1 (en) Detection Method and Electronic Device
CN108984265A (en) Detect the method and device of virtual machine environment
US20140115378A1 (en) System and method for restoring network configuration parameters
CN102023887B (en) Power supply management method of computer system and computer system
CN105224426A (en) Physical host fault detection method, device and empty machine management method, system
CN106489153A (en) A kind of face register method and face registering apparatus
CN114090270B (en) Thread management method and device, electronic equipment and computer readable storage medium
CN110109529A (en) SD card method for controlling power supply, device, storage medium and electronic equipment
CN106843022A (en) A kind of method for improving embedded control system output reliability

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190531

RJ01 Rejection of invention patent application after publication