CN111092738B - Automatic restarting method, equipment and storage medium for edge intelligent gateway - Google Patents
Automatic restarting method, equipment and storage medium for edge intelligent gateway Download PDFInfo
- Publication number
- CN111092738B CN111092738B CN201911141739.3A CN201911141739A CN111092738B CN 111092738 B CN111092738 B CN 111092738B CN 201911141739 A CN201911141739 A CN 201911141739A CN 111092738 B CN111092738 B CN 111092738B
- Authority
- CN
- China
- Prior art keywords
- configuration
- intelligent gateway
- restart
- configuration parameters
- restarting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/12—Arrangements for remote connection or disconnection of substations or of equipment thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an automatic restarting method, equipment and a storage medium of an edge intelligent gateway, wherein the automatic restarting method comprises the following steps: step S1: calling a configuration file of a timed task cron; step S2: judging whether the timed task cron is configured by user definition according to the configuration file, if so, executing the step S3; if not, executing the step S4; and step S3: starting a timed task cron service, and controlling the edge intelligent gateway to restart according to configuration parameters configured by a user; and step S4: and automatically configuring the timing task cron, starting a timing task cron service after the automatic configuration is finished, and controlling the edge intelligent gateway to automatically restart within a set time period. The invention can automatically configure the restart under the condition of not manually configuring the restart time of the gateway through manual configuration, so that the intelligent gateway can be restarted in a reasonable time period, and the running stability of the intelligent gateway is improved.
Description
Technical Field
The present invention relates to the field of gateway technologies, and in particular, to an automatic restart method and apparatus for an edge intelligent gateway, and a storage medium.
Background
In recent years, with the development of artificial intelligence and internet of things, more and more intelligent household products appear on the market. Because the equipment that intelligent product used protocols such as Zigbee, BLE can't direct access to ethernet, consequently need have a gateway equipment to do the conversion of protocol, so in the overall arrangement of intelligent house, intelligent gateway is an indispensable product.
The main task of the edge intelligent gateway is to provide the capability of networking the intelligent equipment, so that the cloud can control or monitor the intelligent equipment, the intelligent gateway needs to stably operate for a long time, and the requirement on the design of software and hardware of the product of the intelligent gateway is higher. The stable operation of the intelligent gateway directly relates to the user experience of the intelligent equipment, the long-time operation of the intelligent gateway may cause memory fragments of the system, or other unpredictable interferences cause incorrect gateway service logic, and at the moment, the intelligent gateway needs to be restarted.
However, the existing intelligent gateway does not have the automatic restarting function, and only can be controlled by an operator to restart on site, but the working time of the operator is limited, and if the intelligent gateway is restarted in daily working time, a large operation pressure can be caused to a server, so that the operation stability of the system is influenced.
Disclosure of Invention
In order to overcome the defects of the prior art, an object of the present invention is to provide an automatic restart method for an edge intelligent gateway, which can automatically configure the restart time of the gateway by human, and also can automatically configure the restart without human configuration, so that the intelligent gateway can be restarted in a reasonable time period, thereby improving the operation stability of the intelligent gateway.
The second purpose of the invention is to provide a terminal device.
It is a further object of the present invention to provide a storage medium.
One of the purposes of the invention is realized by adopting the following technical scheme:
an automatic restarting method of an edge intelligent gateway comprises the following steps:
step S1: calling a configuration file of the timing task cron;
step S2: judging whether the timed task cron is configured by user definition according to the configuration file, if so, executing the step S3; if not, executing the step S4;
and step S3: starting a timed task cron service, and controlling the edge intelligent gateway to restart according to configuration parameters configured by a user;
and step S4: and automatically configuring the timed task cron, starting the timed task cron service after the automatic configuration is finished, and controlling the edge intelligent gateway to automatically restart within a set time period.
Further, the configuration parameters include at least a restart time.
Further, the method for self-defining configuration comprises the following steps:
receiving configuration parameters input by a user and writing the configuration parameters into the configuration file; wherein the restart time in the configuration parameters input by the user is any period set by the user.
Further, the automatic configuration method comprises the following steps:
and calling default configuration parameters, wherein the restart time in the default configuration parameters is a preset time period.
Further, the default configuration parameters and the configuration parameters input by the user are both transmitted to the edge intelligent gateway by the cloud.
Further, the configuration parameters automatically upload the configuration result to the cloud for storage after the configuration is completed.
Furthermore, the edge intelligent gateway automatically generates an actual restarting parameter after each restarting is completed, the actual restarting parameter is uploaded to the cloud, and the cloud compares the actual restarting parameter with the configuration parameter to generate a corresponding gateway control report.
Further, the actual restart parameters include an actual restart time and an actual restart number.
The second purpose of the invention is realized by adopting the following technical scheme:
the terminal equipment comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the automatic restarting method of the edge intelligent gateway.
The third purpose of the invention is realized by adopting the following technical scheme:
a storage medium having stored thereon a computer program which, when executed, implements the above-described method of automatic restart of an edge intelligent gateway.
Compared with the prior art, the invention has the beneficial effects that:
the intelligent gateway can be automatically restarted within a set time period by artificially configuring the restarting time of the gateway, so that the working stability of the intelligent gateway is improved; meanwhile, automatic configuration can be carried out on the restart under the condition that manual configuration is not carried out, so that the intelligent gateway can be automatically restarted in a reasonable time period with less use of the intelligent gateway, the operating pressure on the server caused by the restart of the intelligent gateway is reduced, and the operating stability of the server is improved.
Drawings
Fig. 1 is a schematic flow chart of an automatic restart method of an edge intelligent gateway according to the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
An automatic restarting method for an edge intelligent gateway controls the edge intelligent gateway to automatically restart at set time in a user-defined or automatic setting mode so that the intelligent gateway can stably operate.
As shown in fig. 1, the automatic restart method includes:
step S1: and calling a configuration file of the timing task cron.
After the gateway program is started, the configuration file of the timed task cron is loaded into the gateway program and analyzed. The configuration file has configuration parameters, and the timing task cron performs corresponding operations at regular time according to the configuration parameters in the configuration file.
In this embodiment, the configuration parameters at least include restart time, and may also include restart times, and the like, and after the configuration parameters are loaded into the configuration file, automatic restart control may be performed on the edge intelligent gateway according to the restart time of the configuration parameters, so as to achieve an effect of automatically restarting the edge intelligent gateway.
Step S2: judging whether the timed task cron is configured by user definition according to the configuration file, if so, executing the step S3; if not, executing the step S4;
the configuration parameters can be configured in a user-defined mode, and can also be automatically generated into intelligent gateway configuration, if the timing task cron is configured by the user, the timing task cron is restarted at the time of the user-defined configuration, and if the timing task cron is not configured by the user, the automatic configuration function is started. The restarting time of the intelligent gateway can be carried out in a time period set by a user, or the intelligent gateway is automatically restarted in a time period with less time frequency by default, so that the influence of the restarting of the intelligent gateway on the user is reduced.
In addition, when a plurality of intelligent gateways are connected with the server, the user can define the restarting time of different intelligent gateways in different time periods respectively, or the intelligent gateways can be randomly configured according to the default restarting time, so that the operating pressure of the server caused by the simultaneous restarting of the plurality of intelligent gateways is reduced, and the stability of the whole operating system is improved.
And step S3: and starting a timed task cron service, and controlling the edge intelligent gateway to restart according to the configuration parameters configured by the user.
The user can customize the restart time of the intelligent gateway according to the use habit of the user, and the restart time can be any time period set by the user; the user inputs the self-defined configuration parameters through a cloud end connected with the intelligent gateway, and the cloud end can transmit the user-defined configuration parameters to the intelligent gateway; after receiving the configuration parameters transmitted by the cloud, the intelligent gateway can write the configuration parameters into the configuration file of the timed task cron, so that the intelligent gateway can be restarted in a time period set by a user.
And step S4: and automatically configuring the timing task cron, starting a timing task cron service after the automatic configuration is finished, and controlling the edge intelligent gateway to automatically restart within a set time period.
And when the user does not perform the user-defined configuration, automatically starting an automatic configuration function, calling default configuration parameters, writing the default configuration parameters into a configuration file, and controlling the edge intelligent gateway to automatically restart within a set time period. The default configuration parameters can be pre-recorded in the cloud by a user, and when automatic configuration is required, the default configuration parameters stored in the cloud are automatically called to be executed, so that the intelligent gateway can automatically restart within a preset time period.
In this embodiment, in order to avoid the influence of the restart of the intelligent gateway on the user as much as possible, the automatic restart time is set to be within a time period from two to three points in the morning, and the implementation method is to obtain a 32-bit random number R and perform a modulo operation on the length value D of the restart time to obtain an Offset = R Mod D based on the start time of the time period, where: d =3600, so that the specific restart time is determined according to the offset.
After the configuration parameters are configured, automatically uploading configuration results to a cloud end for storage; in addition, the edge intelligent gateway automatically generates an actual restarting parameter after restarting is completed each time, the actual restarting parameter comprises actual restarting time and actual restarting times and is uploaded to the cloud, the cloud compares the actual restarting parameter with the configuration parameter stored in the cloud, whether the actual restarting parameter is consistent with the configuration parameter is judged, if so, the intelligent gateway performs restarting operation according to the configuration parameter, and configuration is successful; if the configuration parameters are inconsistent with the configuration parameters, the intelligent gateway does not operate according to the configuration parameters, and the configuration is not successful. Meanwhile, the gateway program can record the reasons of program crash, or acquire abnormal conditions in the program running process through the watchdog program, and then generate a corresponding gateway control report by combining the actual restart parameters and the configuration parameters for analysis, so that an operator can find problems in the gateway control report in time.
Example two
A terminal device comprising a memory, a processor, and a program stored in the memory, the program configured to be executed by the processor, the processor implementing the steps of the method for automatically restarting an edge intelligent gateway of embodiment one when executing the program.
In addition, the present invention further provides a storage medium, where the storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the automatic restart method for an edge intelligent gateway.
The invention is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The device and the storage medium in this embodiment and the method in the foregoing embodiment are based on two aspects of the same inventive concept, and the method implementation process has been described in detail in the foregoing, so that those skilled in the art can clearly understand the structure and implementation process of the system in this embodiment according to the foregoing description, and for the sake of brevity of the description, details are not repeated here.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.
Claims (5)
1. An automatic restart method for an edge intelligent gateway is characterized by comprising the following steps:
step S1: calling a configuration file of a timed task cron;
step S2: judging whether the timing task cron is configured by user definition according to the configuration file, and if so, executing a step S3; if not, executing the step S4;
and step S3: starting a timed task cron service, and controlling the edge intelligent gateway to restart according to configuration parameters configured by a user;
and step S4: the method comprises the steps that automatic configuration is conducted on a timed task cron, the timed task cron service is started after the automatic configuration is completed, and an intelligent gateway at the edge is controlled to be automatically restarted within a set time period; the automatic configuration method comprises the following steps: calling default configuration parameters, wherein the restart time in the default configuration parameters is a preset time period; then obtaining a random number R and carrying out modular operation on the length value D of the total restart time to obtain an Offset = R Mod D based on the time period starting time so as to determine the specific restart time;
the edge intelligent gateway automatically generates an actual restarting parameter after restarting is completed each time, the actual restarting parameter comprises actual restarting time and actual restarting times and is uploaded to a cloud end, and the cloud end compares the actual restarting parameter with configuration parameters stored in the cloud end, wherein the configuration parameters comprise the restarting time and the restarting times; judging whether the actual restarting parameter is consistent with the configuration parameter, if so, representing that the intelligent gateway has restarted according to the configuration parameter, and indicating that the configuration is successful; if the configuration parameters are inconsistent with the configuration parameters, the intelligent gateway does not operate according to the configuration parameters, and the configuration is not successful; and simultaneously, the gateway program records the reasons of program crash, or acquires abnormal conditions in the program running process through a watchdog program, and then analyzes the abnormal conditions by combining actual restart parameters and configuration parameters to generate a corresponding gateway control report.
2. The automatic restarting method of edge intelligent gateway according to claim 1, wherein the method of custom configuration is:
receiving configuration parameters input by a user and writing the configuration parameters into the configuration file; wherein the restart time in the configuration parameters input by the user is any period set by the user.
3. The method of claim 1, wherein the default configuration parameters and the configuration parameters inputted by the user are both transmitted to the edge intelligent gateway through a cloud.
4. A terminal device, comprising a processor, a memory, and a computer program stored in the memory and operable on the processor, wherein the processor executes the computer program to implement the method for automatically restarting the edge intelligent gateway according to any one of claims 1 to 3.
5. A storage medium having stored thereon a computer program which, when executed, implements the method for automatic restart of an edge intelligent gateway according to any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911141739.3A CN111092738B (en) | 2019-11-20 | 2019-11-20 | Automatic restarting method, equipment and storage medium for edge intelligent gateway |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911141739.3A CN111092738B (en) | 2019-11-20 | 2019-11-20 | Automatic restarting method, equipment and storage medium for edge intelligent gateway |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111092738A CN111092738A (en) | 2020-05-01 |
CN111092738B true CN111092738B (en) | 2022-10-18 |
Family
ID=70393512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911141739.3A Active CN111092738B (en) | 2019-11-20 | 2019-11-20 | Automatic restarting method, equipment and storage medium for edge intelligent gateway |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111092738B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671594A (en) * | 2021-02-21 | 2021-04-16 | 新疆医科大学第一附属医院 | Medical image data cloud storage filing monitoring system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104158710A (en) * | 2014-08-15 | 2014-11-19 | 深圳市蜂联科技有限公司 | Automatic switchover method of service application channel based on open intelligent gateway platform |
CN106781239A (en) * | 2015-11-20 | 2017-05-31 | 上海点艺信息技术有限公司 | A kind of monitoring method and system of intelligence nurse |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102006047979B4 (en) * | 2006-10-10 | 2009-07-16 | OCé PRINTING SYSTEMS GMBH | A data processing system, method and computer program product for executing a test routine in conjunction with an operating system |
CN108062245A (en) * | 2017-12-14 | 2018-05-22 | 上海钢联电子商务股份有限公司 | A kind of application timed task system for unified management and method |
CN108255582B (en) * | 2018-01-16 | 2021-02-02 | 携程旅游信息技术(上海)有限公司 | Method, system, equipment and storage medium for garbage recovery of java virtual machine |
-
2019
- 2019-11-20 CN CN201911141739.3A patent/CN111092738B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104158710A (en) * | 2014-08-15 | 2014-11-19 | 深圳市蜂联科技有限公司 | Automatic switchover method of service application channel based on open intelligent gateway platform |
CN106781239A (en) * | 2015-11-20 | 2017-05-31 | 上海点艺信息技术有限公司 | A kind of monitoring method and system of intelligence nurse |
Also Published As
Publication number | Publication date |
---|---|
CN111092738A (en) | 2020-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107517136A (en) | The implementation method of heartbeat keep-alive, apparatus and system | |
CN111092738B (en) | Automatic restarting method, equipment and storage medium for edge intelligent gateway | |
CN112306567B (en) | Cluster management system and container management and control method | |
CN110399150B (en) | Bios upgrading method, system, device and computer storage medium | |
CN107984471B (en) | Method and device for determining working state of robot and robot | |
JP7240491B2 (en) | Cleaning control method and system for cleaning equipment | |
CN105096105A (en) | Reminding method and device for project progress monitoring | |
CN108415306B (en) | Control method and device of cooking equipment | |
CN111090562A (en) | Business process monitoring method, equipment and storage medium of edge intelligent gateway | |
CN107241385B (en) | Internet of things data acquisition system and method | |
CN107577798B (en) | Snapshot creating method and device and computer readable storage medium | |
CN107888426B (en) | Configuration method and device of network terminal equipment, batch processing equipment and storage medium | |
CN106325233A (en) | Visual programming logic distribution control system and implementation method | |
CN114328003A (en) | Method for realizing data reverse order processing through CRC hardware module | |
CN113407469A (en) | Parameter configuration method and device, storage medium and electronic device | |
WO2014180396A1 (en) | Code coverage rate processing method and device | |
WO2022012127A1 (en) | Task execution method and device, storage medium and electronic device | |
US11640152B2 (en) | Method and device for providing service for a programmable logic controller | |
CN113434421B (en) | Virtual equipment testing method and device | |
CN113467814B (en) | Batch upgrading method, system and device of RBD virtual machines and readable storage medium | |
JP2005293312A (en) | Controller and tool | |
CN103365237A (en) | Method and device for monitoring and recording component and variable in PLC (Programmable Logic Controller) system | |
CN114064485A (en) | Software testing method, system, computer equipment and readable storage medium | |
CN111211952B (en) | Method and device for interaction of cigarette making machine, storage medium and processor | |
CN114328002B (en) | Data sampling method in encoder, single chip microcomputer and storage medium |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 511434 No.1 and No.2, Shihua Road, Hualong Town, Panyu District, Guangzhou City, Guangdong Province Applicant after: Guangdong haomadame smart home Co.,Ltd. Address before: No.1, No.2 highway, No.2, Panyu, Guangzhou Applicant before: GUANGDONG KELAINI INTELLIGENT TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |