CN111090562A - Business process monitoring method, equipment and storage medium of edge intelligent gateway - Google Patents

Business process monitoring method, equipment and storage medium of edge intelligent gateway Download PDF

Info

Publication number
CN111090562A
CN111090562A CN201911166072.2A CN201911166072A CN111090562A CN 111090562 A CN111090562 A CN 111090562A CN 201911166072 A CN201911166072 A CN 201911166072A CN 111090562 A CN111090562 A CN 111090562A
Authority
CN
China
Prior art keywords
monitoring
intelligent gateway
service
business process
service process
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
CN201911166072.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 Ketyoo Intelligent Technology Co Ltd
Original Assignee
Guangdong Ketyoo Intelligent 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 Ketyoo Intelligent Technology Co Ltd filed Critical Guangdong Ketyoo Intelligent Technology Co Ltd
Priority to CN201911166072.2A priority Critical patent/CN111090562A/en
Publication of CN111090562A publication Critical patent/CN111090562A/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/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a business process monitoring method, equipment and a storage medium of an edge intelligent gateway, wherein the business process monitoring method comprises the following steps: s1: starting a monitoring program and establishing a monitoring process; s2: starting a business process, and calling a fork method to create a sub-process associated with the business process; s3: creating a socket pair to enable the monitoring process to establish communication with the sub-process, and transmitting a file descriptor of the socket as a parameter to the business process to enable the business process to establish communication with the monitoring process; s4: starting a timer in the monitoring process, judging whether the service process sends monitoring information to the monitoring process within the set time of the timer, and if so, executing S5; if not, go to S6; s5: receiving and analyzing the monitoring information sent by the business process to realize the monitoring and management of the business process; s6: the business process is restarted and returns to step S3 again. The invention restarts the service process of the intelligent gateway and increases the working stability of the intelligent gateway.

Description

Business process monitoring method, equipment and storage medium of edge intelligent gateway
Technical Field
The invention relates to the field of intelligent gateway monitoring, in particular to a service process monitoring method, equipment and a storage medium of an edge intelligent gateway.
Background
At present, in the product of intelligence house, there can be different product forms according to the scene of difference, some products have external power source to last the power supply, and some products use battery system power supply, and the agreement of equipment networking is also diversified, has Zigbee, BLE, WIFI etc. wherein Zigbee and BLE agreement have that the communication overhead is little, advantage that the consumption is low. The intelligent product uses equipment of protocols such as Zigbee, BLE can't direct access to ethernet, needs to 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 stable operation of the intelligent gateway directly relates to the user experience of the intelligent device, the long-time operation of the intelligent gateway may cause memory fragments of the system, the other unknown software defects may cause program crash or deadlock, the program crash or deadlock may cause the intelligent gateway to fail to work normally, and at this time, the intelligent gateway needs to be restarted. However, the overhead of restarting the whole intelligent gateway system is large, and the normal use of the user is greatly influenced in the process of restarting the whole intelligent gateway, so that the operation of restarting the intelligent gateway can not be executed frequently.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the objectives of the present invention is to provide a method for monitoring a service process of an edge intelligent gateway, which restarts the service process of the intelligent gateway and increases the working 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:
a service process monitoring method of an edge intelligent gateway comprises the following steps:
step S1: starting a monitoring program and establishing a monitoring process;
step S2: starting a business process, and calling a fork method to create a sub-process associated with the business process;
step S3: creating a socket pair to enable the monitoring process to establish communication with the sub-process, and transmitting a file descriptor of the socket as a parameter to the business process to enable the business process to establish communication with the monitoring process;
step S4: starting a timer in the monitoring process, judging whether the service process sends monitoring information to the monitoring process within the set time of the timer, and if so, executing the step S5; if not, go to step S6;
step S5: receiving and analyzing the monitoring information sent by the business process to realize the monitoring and management of the business process;
step S6: the business process is restarted and returns to step S3 again.
Further, the monitoring process waits for the service process through waitpid and obtains the exit state of the service process.
Further, the exit state of the business process is automatically written into a storage file, the restart reason of the business process is obtained by analyzing the content in the storage file after the next business process is started, and the restart reason is uploaded to the cloud.
Further, after the monitor process is created in step S1, a thread for receiving socket data is created in the monitor process.
Further, in step S4, the timer automatically triggers generating a feedback instruction after the set time is consumed, and transmits the feedback instruction to the monitoring process.
Further, the step S5 includes resetting the timer.
Further, in the step S6, the service process is restarted by calling a kill command to terminate the process.
Further, after the service process is restarted in step S6, the method further includes destroying the current socket pair, and after the destruction is completed, the method returns to step S3 to create a new socket pair.
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 service process monitoring 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 for business process monitoring of an edge intelligent gateway.
Compared with the prior art, the invention has the beneficial effects that:
in the monitoring process, a communication channel is established between the monitoring process and the service process by a socket method for creating Linux, the service process needs to report the state to the monitoring process through the socket channel within a certain time, if the preset time is exceeded, the monitoring process can consider that the service process has a fault, and the monitoring process can restart the service process so as to improve the working stability of the intelligent gateway.
Drawings
Fig. 1 is a schematic flow chart of a service process monitoring 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.
A business process monitoring method of an edge intelligent gateway establishes a subprocess through monitoring software, and monitors the running state of the subprocess and reports a failure mechanism so as to improve the stability of the intelligent gateway.
As shown in fig. 1, the business process monitoring method includes:
step S1: starting a monitoring program and establishing a monitoring process;
the monitoring program is mainly used for dynamically monitoring the operation of the target host through a program implanted into the target host, and in the implementation, the monitoring program is implanted into the service process of the intelligent gateway, a monitoring process is created in the monitoring program, and the operation condition of the service process is monitored and managed through the monitoring process. In addition, a thread for receiving socket data is created in the monitoring process after the monitoring process is created, so that the monitoring process is in communication connection with the business process.
Step S2: starting a business process, and calling a fork method to create a sub-process associated with the business process;
the fork method is to create a process almost completely identical to the original process through system call, namely, to create a new sub-process through the fork method and execute the same content as the business process; the method has the advantages that a new sub-process which executes the same business process in the same way is established, so that the normal operation of the business process is not influenced, the stability of the business process is ensured, an intervention position is provided for a monitoring process, and the effect of monitoring the business process is realized.
Step S3: creating a socket pair to enable the monitoring process to establish communication with the sub-process, and transmitting a file descriptor of the socket as a parameter to the business process to enable the business process to establish communication with the monitoring process;
wherein the socket pair is used for process communication in the local machine; in the monitoring process, a socket pair is created, a file descriptor of the socket pair is transmitted to a subprocess, the subprocess transmits the file descriptor of the socket as a parameter to a service process, and the service process can communicate with the monitoring process after obtaining the file descriptor of the socket, so that information transmission between the two processes is realized.
The monitoring process can wait for the business process through waitpid, wherein waitpid can temporarily stop the execution of the current process until a signal comes or the process is finished; namely, the monitoring process suspends the execution of the process, waits for the monitoring information sent by the service process, and starts to execute the process content of the monitoring process after receiving the monitoring information sent by the service process. In addition, waitpid can also obtain the exit state of the program, that is, after the business process is restarted or crashed, waitpid can automatically write the exit state of the business process into a storage file, and can obtain the restart reason of the business process by analyzing the content in the storage file after the next business process is started, and can upload the restart reason to the cloud for further analysis, so as to classify and investigate problems.
Step S4: starting a timer in the monitoring process, judging whether the service process sends monitoring information to the monitoring process within the set time of the timer, and if so, executing the step S5; if not, go to step S6;
the monitoring process starts a timer, automatically triggers and generates a feedback instruction after the time is consumed, and transmits the feedback instruction to the monitoring process, so that the monitoring process can conveniently restart and control the service process in time. After the service process is started, if a message is sent to the monitoring process within the specified set time, which indicates that the service process still operates normally, step S5 is executed; if the monitoring information of the business process is not received within the set time, the abnormal business process is shown, and at the moment, the business process needs to be restarted, so that the effect of stabilizing the intelligent gateway is achieved.
Step S5: after receiving the message of the service process, the monitoring process analyzes the content of the message to realize the management and monitoring of the service process;
step S6: if the monitoring information of the business process is not received within the set time, the timer sends a feedback instruction to the monitoring process, and after the monitoring process receives the feedback instruction, the monitoring process terminates the process by calling a kill command so as to achieve the effect of restarting the business process.
And then, destroying the current socket pair after restarting the business process, returning to the step S3 again after destroying, and monitoring the business process again.
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 monitoring business process of edge intelligent gateway according to the first embodiment 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 service process monitoring method for the 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 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 (10)

1. A service process monitoring method of an edge intelligent gateway is characterized by comprising the following steps:
step S1: starting a monitoring program and establishing a monitoring process;
step S2: starting a business process, and calling a fork method to create a sub-process associated with the business process;
step S3: creating a socket pair to enable the monitoring process to establish communication with the sub-process, and transmitting a file descriptor of the socket as a parameter to the business process to enable the business process to establish communication with the monitoring process;
step S4: starting a timer in the monitoring process, judging whether the service process sends monitoring information to the monitoring process within the set time of the timer, and if so, executing the step S5; if not, go to step S6;
step S5: receiving and analyzing the monitoring information sent by the business process to realize the monitoring and management of the business process;
step S6: the business process is restarted and returns to step S3 again.
2. The method for monitoring the service process of the edge intelligent gateway according to claim 1, wherein the monitoring process waits for the service process through waitpid and obtains the exit state of the service process.
3. The method for monitoring the service process of the edge intelligent gateway according to claim 2, wherein the exit state of the service process is automatically written into a storage file, and after the next service process is started, the restart reason of the service process is obtained by analyzing the content in the storage file and is uploaded to a cloud.
4. The method for monitoring the service process of the edge intelligent gateway according to claim 1, wherein a thread for receiving socket data is created in the monitoring process after the monitoring process is created in step S1.
5. The method for monitoring the service process of the edge intelligent gateway according to claim 1, wherein the timer in step S4 automatically triggers generation of a feedback command after the set time is consumed, and transmits the feedback command to the monitoring process.
6. The method for monitoring service progress of an edge intelligent gateway according to claim 1, wherein the step S5 further comprises resetting a timer.
7. The method for monitoring the service process of the edge intelligent gateway as claimed in claim 1, wherein the step S6 is implemented by calling a kill command to terminate the process, so as to restart the service process.
8. The method for monitoring the service process of the edge intelligent gateway according to claim 7, wherein the step S6 further includes destroying the current socket pair after restarting the service process, and returning to the step S3 to create a new socket pair after destroying.
9. A terminal device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the method for monitoring the service process of the edge intelligent gateway according to any one of claims 1 to 8 when executing the computer program.
10. A storage medium having a computer program stored thereon, wherein the computer program is executed to implement the method for monitoring service progress of an edge intelligent gateway according to any one of claims 1 to 8.
CN201911166072.2A 2019-11-25 2019-11-25 Business process monitoring method, equipment and storage medium of edge intelligent gateway Pending CN111090562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911166072.2A CN111090562A (en) 2019-11-25 2019-11-25 Business process monitoring method, equipment and storage medium of edge intelligent gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911166072.2A CN111090562A (en) 2019-11-25 2019-11-25 Business process monitoring method, equipment and storage medium of edge intelligent gateway

Publications (1)

Publication Number Publication Date
CN111090562A true CN111090562A (en) 2020-05-01

Family

ID=70393846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911166072.2A Pending CN111090562A (en) 2019-11-25 2019-11-25 Business process monitoring method, equipment and storage medium of edge intelligent gateway

Country Status (1)

Country Link
CN (1) CN111090562A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241338A (en) * 2020-10-21 2021-01-19 展讯半导体(成都)有限公司 Restarting method and device
CN112860408A (en) * 2021-03-03 2021-05-28 苏州沁游网络科技有限公司 Process keep-alive method, device and system in cloud reality machine and storage medium
CN113032183A (en) * 2021-03-24 2021-06-25 西安闻泰信息技术有限公司 System management method, device, computer equipment and storage medium
CN113391909A (en) * 2021-06-28 2021-09-14 上海商汤科技开发有限公司 Process creation method and device, electronic equipment and storage medium
CN114815641A (en) * 2022-03-29 2022-07-29 青岛海尔科技有限公司 Monitoring method and device for intelligent equipment, storage medium and electronic equipment
CN115580552A (en) * 2022-10-19 2023-01-06 施耐德智能技术有限公司 Gateway supervision and gateway state diagnosis method and related devices

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040268317A1 (en) * 2003-06-27 2004-12-30 Eric Gouriou Method and apparatus for controlling execution of a child process generated by a modified parent process
US20050268197A1 (en) * 2002-06-28 2005-12-01 Svante Wold Method and device for monitoring and fault detection in industrial processes
CN1904852A (en) * 2006-08-01 2007-01-31 西安西电捷通无线网络通信有限公司 Method for monitoring and abnormal processing of computer application program
CN104156298A (en) * 2014-08-19 2014-11-19 腾讯科技(深圳)有限公司 Application monitoring method and device
CN105204936A (en) * 2015-09-30 2015-12-30 山东乾云启创信息科技有限公司 Universal resident process management platform and method
CN105589757A (en) * 2014-10-23 2016-05-18 上海天脉聚源文化传媒有限公司 Method for protecting working process in server framework and server
CN107943622A (en) * 2016-10-13 2018-04-20 腾讯科技(深圳)有限公司 Spare O&M methods, devices and systems
CN108694093A (en) * 2017-04-06 2018-10-23 迈普通信技术股份有限公司 Process exception monitoring method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050268197A1 (en) * 2002-06-28 2005-12-01 Svante Wold Method and device for monitoring and fault detection in industrial processes
US20040268317A1 (en) * 2003-06-27 2004-12-30 Eric Gouriou Method and apparatus for controlling execution of a child process generated by a modified parent process
CN1904852A (en) * 2006-08-01 2007-01-31 西安西电捷通无线网络通信有限公司 Method for monitoring and abnormal processing of computer application program
CN104156298A (en) * 2014-08-19 2014-11-19 腾讯科技(深圳)有限公司 Application monitoring method and device
CN105589757A (en) * 2014-10-23 2016-05-18 上海天脉聚源文化传媒有限公司 Method for protecting working process in server framework and server
CN105204936A (en) * 2015-09-30 2015-12-30 山东乾云启创信息科技有限公司 Universal resident process management platform and method
CN107943622A (en) * 2016-10-13 2018-04-20 腾讯科技(深圳)有限公司 Spare O&M methods, devices and systems
CN108694093A (en) * 2017-04-06 2018-10-23 迈普通信技术股份有限公司 Process exception monitoring method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241338A (en) * 2020-10-21 2021-01-19 展讯半导体(成都)有限公司 Restarting method and device
CN112860408A (en) * 2021-03-03 2021-05-28 苏州沁游网络科技有限公司 Process keep-alive method, device and system in cloud reality machine and storage medium
CN113032183A (en) * 2021-03-24 2021-06-25 西安闻泰信息技术有限公司 System management method, device, computer equipment and storage medium
CN113391909A (en) * 2021-06-28 2021-09-14 上海商汤科技开发有限公司 Process creation method and device, electronic equipment and storage medium
CN114815641A (en) * 2022-03-29 2022-07-29 青岛海尔科技有限公司 Monitoring method and device for intelligent equipment, storage medium and electronic equipment
CN115580552A (en) * 2022-10-19 2023-01-06 施耐德智能技术有限公司 Gateway supervision and gateway state diagnosis method and related devices

Similar Documents

Publication Publication Date Title
CN111090562A (en) Business process monitoring method, equipment and storage medium of edge intelligent gateway
US10802906B2 (en) Monitoring method and apparatus of server, and storage medium
TW201944236A (en) Task processing method, apparatus, and system
CN110262822B (en) Multi-split system and upgrading method and device thereof
CN112306567B (en) Cluster management system and container management and control method
CN110062054B (en) Remote control method and system for Internet of things equipment
CN110691398B (en) Network interaction method, system, equipment and storage medium of intelligent equipment
CN106550438B (en) Method and system for limiting regular awakening and mobile device
EP3489777B1 (en) Control device, control method, and program
CN110933170A (en) Multi-device linkage control method and device of ZigBee gateway and storage medium
CN110809262B (en) COAP protocol-based operation and maintenance management method for Internet of things equipment
CN113360344B (en) Server monitoring method, device, equipment and computer readable storage medium
WO2020043006A1 (en) Terminal connection restoration method and apparatus
CN108075947B (en) Storage device, PC (personal computer) end and maintenance method and system of communication connection connectivity
CN113010379A (en) Electronic equipment monitoring system
CN111371668A (en) Periodic transmission method, device, equipment and storage medium based on gratuitous ARP
CN106169982B (en) Method, device and system for processing expansion port
CN111427704A (en) Remote monitoring method, device and equipment for configuration instruction and storage medium
CN113079152B (en) Data transmission method, device and medium
CN110673710B (en) Server case resetting method, device, equipment and medium
CN113765736A (en) android device network stabilizing method, system, terminal and storage medium
US10091068B1 (en) System for modeling distributed systems
CN109981635B (en) Data processing method and system
CN112532493A (en) Household appliance fault reporting method, system, electronic equipment and medium
US20210157384A1 (en) Assigning power sources

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: 20200501

RJ01 Rejection of invention patent application after publication