CN113381876A - Bus log collection method based on intelligent gateway and intelligent gateway - Google Patents

Bus log collection method based on intelligent gateway and intelligent gateway Download PDF

Info

Publication number
CN113381876A
CN113381876A CN202011430327.4A CN202011430327A CN113381876A CN 113381876 A CN113381876 A CN 113381876A CN 202011430327 A CN202011430327 A CN 202011430327A CN 113381876 A CN113381876 A CN 113381876A
Authority
CN
China
Prior art keywords
message
log
bus
intelligent gateway
control module
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.)
Granted
Application number
CN202011430327.4A
Other languages
Chinese (zh)
Other versions
CN113381876B (en
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.)
Guangzhou Haoxiang Information Technology Co ltd
Original Assignee
Guangzhou Haoxiang Information 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 Guangzhou Haoxiang Information Technology Co ltd filed Critical Guangzhou Haoxiang Information Technology Co ltd
Priority to CN202011430327.4A priority Critical patent/CN113381876B/en
Publication of CN113381876A publication Critical patent/CN113381876A/en
Application granted granted Critical
Publication of CN113381876B publication Critical patent/CN113381876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • 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/3027Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a bus log acquisition method based on an intelligent gateway and the intelligent gateway, wherein the method comprises the following steps: when monitoring that the intelligent gateway receives the feedback message through the interface circuit, the control module generates a message sending log according to the bus message and a preset log generating strategy; when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message receiving log according to the feedback message and a preset log generating strategy; when the network connection of the intelligent gateway is monitored, the control module controls the intelligent gateway to upload a message sending log and a message receiving log to the cloud background. Compared with the prior art, the method and the system have the advantages that the real-time capture of the gateway receiving and sending data is realized through the control module in the intelligent gateway, the message sending log and the message receiving log can be generated and used for analyzing and positioning the bus equipment problems, the bus equipment deployment cost and the operation and maintenance cost can be reduced, and the condition of the bus equipment can be analyzed in time.

Description

Bus log collection method based on intelligent gateway and intelligent gateway
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a bus log acquisition method based on an intelligent gateway and the intelligent gateway.
Background
At present, the technology of the internet of things is widely used in various industries, and after networking is performed on internet of things equipment in a wireless communication or wired communication mode, the whole networking is realized through gateway equipment. Because networking equipment of the internet of things is more, when the equipment is deployed in the engineering implementation stage, data on each communication bus is required to be monitored, and problems encountered in the positioning and deployment process are convenient to analyze. In addition, after networking of the internet of things equipment is completed, data during operation of the equipment often needs to be acquired in the equipment operation stage, and daily operation and maintenance of the system are facilitated.
However, if the deployed internet of things system includes a bus device or a terminal, data can be collected on site only through a device with a bus interface carried by a worker, which is not only inefficient and costly, but also cannot realize real-time recording of operating data.
Disclosure of Invention
The embodiment of the application provides a bus log acquisition method based on an intelligent gateway and the intelligent gateway, which can effectively improve acquisition efficiency and facilitate the monitoring of bus equipment, and the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for collecting bus logs based on an intelligent gateway, where the intelligent gateway includes a control module and a plurality of interface circuits, the control module is connected to the interface circuits, each interface circuit is connected to a bus, and the bus is connected to a plurality of devices, where the method includes:
when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message sending log according to the bus message and a preset log generating strategy;
when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message receiving log according to the feedback message and a preset log generating strategy;
when the network connection of the intelligent gateway is monitored, the control module controls the intelligent gateway to upload the message sending log and the message receiving log to a cloud background.
Optionally, the generating a message sending log according to the bus message and a preset log generating policy includes:
acquiring first time for issuing the bus message, an identifier of a first interface circuit for issuing the bus message, an identifier of a first target device for receiving the bus message and content of the bus message;
and generating a message sending log according to the first time, the identifier of the first target bus, the identifier of the first target device and the content of the bus message.
Optionally, the generating a message sending log according to the bus message and a preset log generating policy includes:
acquiring a second time for receiving the feedback message, an identifier of a second interface circuit for receiving the feedback message, an identifier of a second target device for sending the feedback message, and the content of the feedback message;
and generating a message receiving log according to the second time, the identifier of the first target bus, the identifier of the second target device and the content of the feedback message.
Optionally, the intelligent gateway includes a storage module, the storage module is connected to the control module, and the bus log collecting method based on the intelligent gateway further includes the steps of:
and the control module stores the message sending log and the message receiving log in the storage module.
Optionally, the bus log collecting method based on the intelligent gateway further includes the steps of:
when the control module receives a log obtaining instruction, searching a target log corresponding to the log identifier from the storage module according to the log identifier in the log obtaining instruction;
and sending the target log to a sending end of the log obtaining instruction.
Optionally, the bus log collecting method based on the intelligent gateway further includes the steps of:
acquiring first time for issuing the bus message and second time for receiving the feedback message;
and when the difference between the second time for receiving any feedback message and the first time for issuing the bus message exceeds a preset time threshold, the control module sends a delayed receiving reminding message to the cloud background.
Optionally, before sending the delayed reception reminding message to the cloud background, the method further includes:
acquiring the identifier of the intelligent gateway, the current time, the identifier of a target interface circuit for delaying to receive the feedback message, the identifier of target equipment for delaying to send the feedback message and the timeout duration;
and generating the delayed receiving reminding message according to the identification of the intelligent gateway, the current time, the identification of the target interface circuit for delaying to receive the feedback message, the identification of the target equipment for delaying to send the feedback message and the timeout duration.
Optionally, before generating a message receiving log according to the feedback message and a preset log generation policy, the method includes:
the control module carries out integrity check on the feedback information based on a preset data integrity check strategy;
when the feedback information is abnormal in verification, the control module sends verification abnormity prompting information to the cloud background.
Optionally, before the control module sends the verification failure reminding message to the cloud background, the method further includes the steps of:
acquiring an identifier of the intelligent gateway, the current time, an identifier of a target interface circuit for receiving the feedback message with abnormal verification, an identifier of target equipment for sending the feedback message with abnormal verification and abnormal content;
and generating the verification abnormity prompting information according to the identification of the intelligent gateway, the current time, the identification of the target interface circuit for delaying to receive the feedback message, the identification of the target equipment for delaying to send the feedback message and the abnormal content.
In a second aspect, an embodiment of the present application provides an intelligent gateway, including: the device comprises a control module and a plurality of interface circuits; the control module is connected with the interface circuits, each interface circuit is respectively connected with a bus, and a plurality of devices are connected to the buses; the control module comprises a processor, a memory and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the intelligent gateway-based bus log collection method according to the first aspect when executing the computer program.
Compared with the prior art, the intelligent gateway in the embodiment of the application comprises a control module and a plurality of interface circuits, the control module is connected with the interface circuits, each interface circuit is connected with a bus, the buses are connected with a plurality of devices, and when the control module monitors that the intelligent gateway receives feedback messages through the interface circuits, a message sending log is generated according to the bus messages and a preset log generating strategy; when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message receiving log according to the feedback message and a preset log generating strategy; when the network connection of the intelligent gateway is monitored, the control module controls the intelligent gateway to upload the message sending log and the message receiving log to a cloud background. The embodiment of the application realizes real-time capture of gateway receiving and sending data through the control module in the intelligent gateway, and can generate the message sending log and the message receiving log for analyzing and positioning the bus equipment problems.
For a better understanding and implementation, the technical solutions of the present application are described in detail below with reference to the accompanying drawings.
Drawings
Fig. 1 is a schematic flowchart of a bus log collection method based on an intelligent gateway according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a system of things in accordance with an embodiment of the present application;
fig. 3 is a schematic structural diagram of an intelligent gateway according to an embodiment of the present application;
fig. 4 is a schematic flowchart of S101 in a bus log collection method based on an intelligent gateway according to an embodiment of the present application;
fig. 5 is a schematic flowchart of S102 in a bus log collection method based on an intelligent gateway according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a bus log collection method based on an intelligent gateway according to another embodiment of the present application;
fig. 7 is a schematic structural diagram of an intelligent gateway according to another embodiment of the present application;
fig. 8 is a schematic flowchart of a bus log collection method based on an intelligent gateway according to another embodiment of the present application;
fig. 9 is a schematic flowchart of a bus log collection method based on an intelligent gateway according to another embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if/if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, a schematic flow chart of a bus log collecting method based on an intelligent gateway according to an embodiment of the present application is shown, where the method includes the following steps:
s101: and when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message sending log according to the bus message and a preset log generating strategy.
In the embodiment of the present application, please refer to fig. 2 and fig. 3, fig. 2 is a schematic structural diagram of an internet of things system provided in an embodiment of the present application, and fig. 3 is a schematic structural diagram of an intelligent gateway provided in an embodiment of the present application.
The internet of things system comprises a cloud background, an intelligent gateway, a bus and equipment. And the cloud background is respectively connected with each intelligent gateway through a network to perform data transmission.
The intelligent gateway comprises a control module and a plurality of interface circuits, wherein the control module is connected with the interface circuits, each interface circuit is respectively connected with a bus, and a plurality of devices are connected to the buses.
In an optional embodiment, the intelligent gateway further includes a network module, the network module is connected with the control module, and the intelligent gateway establishes a network connection with the cloud background or the external device through the network module.
In another alternative embodiment, the network module may be integrated into the control module, and the specific location of the network module in the control module is not limited herein.
In the embodiment of the present application, the bus type is a serial bus, specifically, the bus type may be a serial bus adopting an RS-485 serial bus standard, and the control module may be a microcontroller, a microprocessor, an integrated control chip, or the like.
It should be noted that the control module provided in the embodiment of the present application is different from a common controller or processor in a gateway, and the common controller or processor in the gateway can only be used for forwarding and receiving bus device instructions, and cannot execute the bus log collection method of the intelligent gateway provided in the embodiment of the present application.
In step 101, when the control module monitors that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message sending log according to the bus message and a preset log generating strategy.
The bus message not only includes specific message content, but also includes which interface circuit issues the bus message, and which devices under the bus connected with the interface circuit need to receive and feed back the bus message.
The preset log generation strategy needs to be preset in the control module, when the control module monitors that the intelligent gateway receives the feedback message through the interface circuit, the bus message is captured in time, the bus message is analyzed, and a message sending log is generated according to the preset log generation strategy.
In an alternative embodiment, in order to better record the data transmission condition of the bus device, the message transmission log is generated as follows, referring to fig. 4, step S101 includes steps S1011 to S1012, specifically as follows:
s1011: the method comprises the steps of obtaining the first time for issuing the bus message, the identification of a first interface circuit for issuing the bus message, the identification of a first target device for receiving the bus message and the content of the bus message.
The first time for receiving the feedback message is the time when the control module monitors that the intelligent gateway receives the feedback message through the interface circuit.
In an optional embodiment, when the state of the intelligent gateway network is good, the first time is the network standard time. In another optional embodiment, a timer may be built in the intelligent gateway, the initial network standard time is obtained before the network state is unstable, and the timer is started when the network unstable state is monitored, so that the intelligent gateway receives the feedback message through the interface circuit when the situation that the first time cannot be accurately obtained is monitored, and the first time is obtained based on the initial network flag time and the timer time, thereby avoiding the occurrence of the situation that the first time cannot be accurately obtained.
In this embodiment, the identifier of the first interface circuit is a channel number of the first interface circuit, and the identifier of the first target device is a device address or a device serial number.
S1012: and generating a message sending log according to the first time, the identifier of the first target bus, the identifier of the first target device and the content of the bus message.
In an optional embodiment, the control module performs a character string connection on the first time, the identifier of the first target bus, the identifier of the first target device, and the content of the bus message, and generates a message sending log.
In another optional embodiment, after the control module performs character string connection on the first time, the identifier of the first target bus, the identifier of the first target device, and the content of the bus message, the control module compresses the character strings through a preset compression algorithm, and then generates a message sending log.
In other optional embodiments, after the control module performs string connection on the first time, the identifier of the first target bus, the identifier of the first target device, and the content of the bus message, the control module encrypts a string by a pre-stored private key to generate a message sending log.
In order to ensure the security of the message sending log, a hardware encryption module can be arranged in the intelligent gateway and connected with the control module, and the hardware encryption module can encrypt the character string, so that the situation of stealing the private key is prevented, and the security of the collected log is ensured.
S102: and when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message receiving log according to the feedback message and a preset log generating strategy.
In the embodiment of the application, when the control module monitors that the intelligent gateway receives the feedback message through the interface circuit, a message receiving log is generated according to the feedback message and a preset log generating strategy.
The feedback message includes not only the specific message content, but also the feedback message sent by which device and the feedback message received through which interface circuit.
The preset log generation strategy needs to be preset in the control module, when the control module monitors that the intelligent gateway receives the feedback message through the interface circuit, the feedback message is captured in time, the feedback message is analyzed, and a message sending log is generated according to the preset log generation strategy.
In an alternative embodiment, in order to better record the message feedback condition of the bus device, the message receiving log is generated as follows, referring to fig. 5, step S102 includes steps S1021 to S1022, which are specifically as follows:
s1021: and acquiring a second time for receiving the feedback message, an identifier of a second interface circuit for receiving the feedback message, an identifier of a second target device for sending the feedback message, and the content of the feedback message.
The second time for receiving the feedback message is the time for the control module to monitor that the intelligent gateway receives the feedback message through the interface circuit.
In an optional embodiment, when the state of the intelligent gateway network is good, the second time is the network standard time. In another optional embodiment, a timer may be built in the intelligent gateway, the initial network standard time is obtained before the network state is unstable, and the timer is started when the network unstable state is monitored, so that the intelligent gateway receives the feedback message through the interface circuit when monitoring that the network unstable state is unstable, and the second time is obtained based on the initial network flag time and the timer time, thereby avoiding the situation that the second time cannot be accurately obtained.
In this embodiment, the identifier of the second interface circuit is a channel number of the second interface circuit, and the identifier of the second target device is a device address or a device serial number.
S1022: and generating a message receiving log according to the second time, the identifier of the first target bus, the identifier of the second target device and the content of the feedback message.
In an optional embodiment, the control module performs a character string connection on the second time, the identifier of the second target bus, the identifier of the second target device, and the content of the feedback message, and generates a message receiving log.
In another optional embodiment, after the control module performs character string connection on the second time, the identifier of the second target bus, the identifier of the second target device, and the content of the feedback message, the control module compresses the character strings by a preset compression algorithm to generate a message receiving log.
In other optional embodiments, after the control module performs string connection on the second time, the identifier of the second target bus, the identifier of the second target device, and the content of the feedback message, the control module encrypts a string by using a pre-stored private key to generate a message receiving log.
In order to ensure the safety of the message receiving log, a hardware encryption module can be arranged in the intelligent gateway and connected with the control module, and the hardware encryption module can encrypt the character string, so that the condition of stealing the private key is prevented, and the safety of the collected log is ensured.
S103: when the network connection of the intelligent gateway is monitored, the control module controls the intelligent gateway to upload the message sending log and the message receiving log to a cloud background.
And when the control module monitors that the network of the intelligent gateway is connected, the intelligent gateway is controlled to upload the message sending log and the message receiving log to the cloud background.
Specifically, addresses of the cloud background are stored in the control module, and the message sending log and the message receiving log are sent to the cloud background according to the addresses.
In an optional embodiment, to ensure the security of the cloud backend, security verification needs to be performed between the smart gateway and the cloud backend, and after the security verification is passed, the smart gateway can upload the log to the cloud backend.
Compared with the prior art, the intelligent gateway in the embodiment of the application comprises a control module and a plurality of interface circuits, the control module is connected with the interface circuits, each interface circuit is connected with a bus, the buses are connected with a plurality of devices, and when the control module monitors that the intelligent gateway receives feedback messages through the interface circuits, a message sending log is generated according to the bus messages and a preset log generating strategy; when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message receiving log according to the feedback message and a preset log generating strategy; when the network connection of the intelligent gateway is monitored, the control module controls the intelligent gateway to upload the message sending log and the message receiving log to a cloud background. The embodiment of the application realizes real-time capture of gateway receiving and sending data through the control module in the intelligent gateway, and can generate the message sending log and the message receiving log for analyzing and positioning the bus equipment problems.
In an optional embodiment, there may often be a situation that the intelligent gateway cannot be networked, and in order to ensure the integrity of the log, referring to fig. 6, the log collecting method based on the intelligent gateway further includes steps S104 to S106, which are specifically as follows:
s104: and the control module stores the message sending log and the message receiving log in the storage module.
Please refer to fig. 7, which is a schematic structural diagram of an intelligent gateway according to another embodiment of the present application, and as shown in fig. 7, the intelligent gateway further includes a storage module, and the storage module is connected to the control module.
And when the network of the intelligent gateway is monitored to be disconnected, the control module stores the message sending log and the message receiving log into the storage module.
The logs have unique identifiers when being stored in a storage module or uploaded to a cloud, and the unique identifiers can be the second time for receiving the feedback message or the first time for issuing the bus message and are distinguished according to the difference of log types.
When storing the message sending log and the message receiving log, in an optional embodiment, the log may be further managed in a file for facilitating future searching.
S105: when the control module receives a log obtaining instruction, searching a target log corresponding to the log identification from the storage module according to the log identification in the log obtaining instruction.
When the network state is not good, the log of the bus cannot be checked in real time in the cloud device, so that the cloud device can be connected to a local area network where the intelligent gateway is located through the external device, and a log obtaining instruction is sent to the intelligent gateway.
When the control module receives a log obtaining instruction, searching a target log corresponding to the log identification from the storage module according to the log identification in the log obtaining instruction.
S106: and sending the target log to a sending end of the log obtaining instruction.
And the control module sends the target log to a sending end of the log obtaining instruction, namely external equipment.
In an optional embodiment, before the external device sends the log obtaining instruction, the log directory extracting instruction may be sent first, and when the target log is found by searching the directory, the target log is obtained through the manners of S105 to S106.
In other optional embodiments, in order to timely feed back the problem of the bus device, please refer to fig. 8, the log collecting method based on the intelligent gateway further includes steps S107 to S108, which are specifically as follows:
s107: and acquiring first time for issuing the bus message and second time for receiving the feedback message.
And the control equipment sends the first time of the bus message and receives the second time of the feedback message.
It should be noted that each feedback message in S107 needs to correspond to a sent bus message, that is, the feedback message is a feedback given by the bus device after receiving the bus message.
S108: and when the difference between the second time for receiving any feedback message and the first time for issuing the bus message exceeds a preset time threshold, the control module sends a delayed receiving reminding message to the cloud background.
The control device is pre-stored with a preset time threshold, and when the difference between the second time for receiving any feedback message and the first time for issuing the bus message exceeds the preset time threshold, the control module sends a delayed receiving reminding message to the cloud background.
Specifically, to obtain the delayed reception reminding message, the control module obtains the identifier of the intelligent gateway, the current time, the identifier of the target interface circuit for delaying reception of the feedback message, the identifier of the target device for delaying transmission of the feedback message, and the timeout duration, and then generates the delayed reception reminding message according to the identifier of the intelligent gateway, the current time, the identifier of the target interface circuit for delaying reception of the feedback message, the identifier of the target device for delaying transmission of the feedback message, and the timeout duration.
The current time is the time when the difference between the second time when the control module judges the feedback message and the first time when the bus message is issued exceeds a preset time threshold.
In an optional embodiment, the preset time threshold may be adjusted according to different types of the issued bus message, specifically, a table is stored in the control device in advance, a table field includes a bus message type and a corresponding preset time threshold, and the control device finds the preset time threshold corresponding to the bus message through a lookup table when determining whether to delay receiving the message. By the method, the time threshold can be flexibly adjusted, so that when the bus equipment executes complex tasks, the reference for judging whether the delay fault exists is reasonably adjusted.
In this embodiment, by comparing the difference between the second time of receiving the feedback message and the first time of issuing the bus message with the preset time threshold, the abnormality of the bus device can be monitored from the perspective of the response time of the bus device, which is beneficial to analyzing the operation condition of the bus device in time.
In other optional embodiments, in order to better monitor the bus device and discover a fault in time, referring to fig. 9, the log collecting method based on the intelligent gateway further includes steps S109 to S110, which are specifically as follows:
s109: and the control module carries out integrity verification on the feedback information based on a preset data integrity verification strategy.
A data integrity verification strategy is preset in the control module, and based on the preset data integrity verification strategy, integrity verification can be carried out on the feedback information.
In an alternative embodiment, the predetermined data integrity check policy is used to check the format of the data frame, which may be changed in case of abnormal operation of the bus device.
S110: when the feedback information is abnormal in verification, the control module sends verification abnormity prompting information to the cloud background.
Specifically, the control module obtains an identifier of the intelligent gateway, current time, an identifier of a target interface circuit that receives the feedback message with abnormal verification, an identifier of a target device that sends the feedback message with abnormal verification, and abnormal content.
Wherein, the current time refers to the time when the control module checks that the feedback information is abnormal.
And then, the control module generates the checking abnormity prompting information according to the identification of the intelligent gateway, the current time, the identification of the target interface circuit for delaying to receive the feedback message, the identification of the target equipment for delaying to send the feedback message and the abnormity content.
In this embodiment, the integrity of the feedback information is verified, so that the abnormality of the bus device can be further monitored in all aspects from the viewpoint of data integrity.
Please refer to fig. 3, which is a schematic structural diagram of an intelligent gateway according to an embodiment of the present application. As shown in fig. 3, the intelligent gateway 2 includes a control module 21 and a plurality of interface circuits 22; the control module 21 is connected to the interface circuits 22, and each of the interface circuits 22 is connected to a bus (not shown), and a plurality of devices (not shown) are connected to the bus; the control module 21 comprises a processor 210, a memory 210 and a computer program 212 stored in the memory 210 and executable on the processor 210, such as: a bus log acquisition program based on an intelligent gateway or a bus log acquisition program based on an intelligent gateway of a circuit board; the processor 210, when executing the computer program 212, implements the steps in the above-described method embodiments, such as the steps S101 to S103 shown in fig. 1.
The processor 210 may include one or more processing cores, among others. The processor 210 is connected to various parts in the intelligent gateway 2 by using various interfaces and lines, and executes various functions of the intelligent gateway 2 and processes data by operating or executing instructions, programs, code sets or instruction sets stored in the memory 211 and calling data in the memory 211, and optionally, the processor 210 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), Programmable Logic Array (PLA). The processor 210 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing contents required to be displayed by the touch display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 210, but may be implemented by a single chip.
The Memory 211 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 211 comprises a non-transitory computer-readable medium. The memory 211 may be used to store instructions, programs, code sets, or instruction sets. The memory 211 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned method embodiments, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 211 may optionally be at least one memory device located remotely from the processor 210.
In an optional embodiment, the intelligent gateway 2 includes a network module 23, the network module 23 is connected to the control module 21, and the intelligent gateway 2 establishes a network connection with a cloud backend or an external device through the network module 23.
The network module 23 may be integrated in the control module 21 to achieve the same function, and the specific location thereof is not limited.
In another alternative embodiment, referring to fig. 7, the intelligent gateway 2 further includes a storage module 24, and the storage module 24 is connected to the control module 21.
Compared with the prior art, the intelligent gateway in the embodiment of the application comprises a control module and a plurality of interface circuits, the control module is connected with the interface circuits, each interface circuit is connected with a bus, the buses are connected with a plurality of devices, and when the control module monitors that the intelligent gateway receives feedback messages through the interface circuits, a message sending log is generated according to the bus messages and a preset log generating strategy; when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message receiving log according to the feedback message and a preset log generating strategy; when the network connection of the intelligent gateway is monitored, the control module controls the intelligent gateway to upload the message sending log and the message receiving log to a cloud background. The embodiment of the application realizes real-time capture of gateway receiving and sending data through the control module in the intelligent gateway, and can generate the message sending log and the message receiving log for analyzing and positioning the bus equipment problems.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The present invention is not limited to the above-described embodiments, and various modifications and variations of the present invention are intended to be included within the scope of the claims and the equivalent technology of the present invention if they do not depart from the spirit and scope of the present invention.

Claims (10)

1. A bus log collection method based on an intelligent gateway is characterized in that the intelligent gateway comprises a control module and a plurality of interface circuits, the control module is connected with the interface circuits, each interface circuit is respectively connected with a bus, and the buses are connected with a plurality of devices, and the method comprises the following steps:
when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message sending log according to the bus message and a preset log generating strategy;
when monitoring that the intelligent gateway receives a feedback message through the interface circuit, the control module generates a message receiving log according to the feedback message and a preset log generating strategy;
when the network connection of the intelligent gateway is monitored, the control module controls the intelligent gateway to upload the message sending log and the message receiving log to a cloud background.
2. The bus log collection method based on the intelligent gateway according to claim 1, wherein the generating of the message sending log according to the bus message and a preset log generation strategy comprises the steps of:
acquiring first time for issuing the bus message, an identifier of a first interface circuit for issuing the bus message, an identifier of a first target device for receiving the bus message and content of the bus message;
and generating a message sending log according to the first time, the identifier of the first target bus, the identifier of the first target device and the content of the bus message.
3. The bus log collection method based on the intelligent gateway according to claim 1, wherein the generating of the message sending log according to the bus message and a preset log generation strategy comprises the steps of:
acquiring a second time for receiving the feedback message, an identifier of a second interface circuit for receiving the feedback message, an identifier of a second target device for sending the feedback message, and the content of the feedback message;
and generating a message receiving log according to the second time, the identifier of the first target bus, the identifier of the second target device and the content of the feedback message.
4. The intelligent gateway-based bus log collection method according to claim 1, wherein the intelligent gateway comprises a storage module, the storage module is connected with the control module, and the method further comprises the following steps:
and the control module stores the message sending log and the message receiving log in the storage module.
5. The intelligent gateway based bus log collection method according to claim 4, further comprising the steps of:
when the control module receives a log obtaining instruction, searching a target log corresponding to the log identifier from the storage module according to the log identifier in the log obtaining instruction;
and sending the target log to a sending end of the log obtaining instruction.
6. The intelligent gateway based bus log collection method according to claim 1, further comprising the steps of:
acquiring first time for issuing the bus message and second time for receiving the feedback message;
and when the difference between the second time for receiving any feedback message and the first time for issuing the bus message exceeds a preset time threshold, the control module sends a delayed receiving reminding message to the cloud background.
7. The intelligent gateway based bus log collection method of claim 6, wherein before sending the delayed reception reminding message to the cloud background, the method further comprises:
acquiring the identifier of the intelligent gateway, the current time, the identifier of a target interface circuit for delaying to receive the feedback message, the identifier of target equipment for delaying to send the feedback message and the timeout duration;
and generating the delayed receiving reminding message according to the identification of the intelligent gateway, the current time, the identification of the target interface circuit for delaying to receive the feedback message, the identification of the target equipment for delaying to send the feedback message and the timeout duration.
8. The bus log collection method based on the intelligent gateway as claimed in claim 1, wherein before generating a message receiving log according to the feedback message and a preset log generation policy, the method comprises the steps of:
the control module carries out integrity check on the feedback information based on a preset data integrity check strategy;
when the feedback information is abnormal in verification, the control module sends verification abnormity prompting information to the cloud background.
9. The intelligent gateway-based bus log collection method according to claim 8, wherein before the control module sends a verification failure reminding message to the cloud background, the method further comprises the steps of:
acquiring an identifier of the intelligent gateway, the current time, an identifier of a target interface circuit for receiving the feedback message with abnormal verification, an identifier of target equipment for sending the feedback message with abnormal verification and abnormal content;
and generating the verification abnormity prompting information according to the identification of the intelligent gateway, the current time, the identification of the target interface circuit for delaying to receive the feedback message, the identification of the target equipment for delaying to send the feedback message and the abnormal content.
10. An intelligent gateway is characterized by comprising a control module and a plurality of interface circuits; the control module is connected with the interface circuits, each interface circuit is respectively connected with a bus, and a plurality of devices are connected to the buses; the control module comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the steps of the method according to claims 1 to 9 are implemented when the processor executes the computer program.
CN202011430327.4A 2020-12-09 2020-12-09 Bus log collection method based on intelligent gateway and intelligent gateway Active CN113381876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011430327.4A CN113381876B (en) 2020-12-09 2020-12-09 Bus log collection method based on intelligent gateway and intelligent gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011430327.4A CN113381876B (en) 2020-12-09 2020-12-09 Bus log collection method based on intelligent gateway and intelligent gateway

Publications (2)

Publication Number Publication Date
CN113381876A true CN113381876A (en) 2021-09-10
CN113381876B CN113381876B (en) 2022-04-01

Family

ID=77569138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011430327.4A Active CN113381876B (en) 2020-12-09 2020-12-09 Bus log collection method based on intelligent gateway and intelligent gateway

Country Status (1)

Country Link
CN (1) CN113381876B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205259A (en) * 2021-12-07 2022-03-18 施耐德电气(中国)有限公司 Method and device for diagnosing abnormal counting of gateways
CN114397854A (en) * 2022-01-25 2022-04-26 山东捷讯通信技术有限公司 Bus type main control system suitable for underground comprehensive pipe gallery
CN114978870A (en) * 2022-07-29 2022-08-30 深圳市天翊瑞霖智能科技有限公司 Hardware equipment running state monitoring system based on intelligent gateway

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732611A (en) * 2015-01-23 2015-06-24 广州快飞计算机科技有限公司 Log recording and reading method and device based on flight controller
CN106130853A (en) * 2016-08-31 2016-11-16 深圳Tcl智能家庭科技有限公司 A kind of intarconnected cotrol method of intelligent home device and system thereof
CN106375204A (en) * 2015-07-21 2017-02-01 施耐德电器工业公司 Intelligent gateway system and operation method thereof
CN106919495A (en) * 2015-12-25 2017-07-04 比亚迪股份有限公司 CAN journal file acquisition device, system and vehicle for vehicle

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732611A (en) * 2015-01-23 2015-06-24 广州快飞计算机科技有限公司 Log recording and reading method and device based on flight controller
CN106375204A (en) * 2015-07-21 2017-02-01 施耐德电器工业公司 Intelligent gateway system and operation method thereof
CN106919495A (en) * 2015-12-25 2017-07-04 比亚迪股份有限公司 CAN journal file acquisition device, system and vehicle for vehicle
CN106130853A (en) * 2016-08-31 2016-11-16 深圳Tcl智能家庭科技有限公司 A kind of intarconnected cotrol method of intelligent home device and system thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
米永巍等: "基于物联网的医疗设备管理体系结构和关键技术研究", 《医疗卫生装备》 *
龚逸乐: "基于二总线协议的智能网关", 《电子技术与软件工程》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205259A (en) * 2021-12-07 2022-03-18 施耐德电气(中国)有限公司 Method and device for diagnosing abnormal counting of gateways
CN114205259B (en) * 2021-12-07 2024-06-07 施耐德电气(中国)有限公司 Gateway upper number abnormity diagnosis method and device
CN114397854A (en) * 2022-01-25 2022-04-26 山东捷讯通信技术有限公司 Bus type main control system suitable for underground comprehensive pipe gallery
CN114978870A (en) * 2022-07-29 2022-08-30 深圳市天翊瑞霖智能科技有限公司 Hardware equipment running state monitoring system based on intelligent gateway

Also Published As

Publication number Publication date
CN113381876B (en) 2022-04-01

Similar Documents

Publication Publication Date Title
CN113381876B (en) Bus log collection method based on intelligent gateway and intelligent gateway
CN109922160B (en) Terminal secure access method, device and system based on power Internet of things
CN110737566B (en) Host performance monitoring method and device, electronic equipment and storage medium
CN111796858A (en) Method, system and related equipment for access detection of application programs in Kubernetes cluster
CN109284140B (en) Configuration method and related equipment
CN107959715A (en) Remote terminal information recognition software system and recognition methods based on wireless telecommunications
CN103905415A (en) Method and system for preventing remote control type Trojan viruses
CN112423322B (en) Model information sending method, device, storage medium and electronic device
CN106254312B (en) method and device for achieving server attack prevention through virtual machine heterogeneous
CN112099828A (en) Method, device, storage medium, electronic equipment and system for upgrading electronic equipment
CN107395451B (en) Processing method, device and equipment for internet traffic abnormity and storage medium
CN111083176B (en) Cloud self-adaptive online method and device for monitoring camera
CN108289041B (en) Server information processing method and related device
CN112769762A (en) Distributed efficient Internet of things equipment access method
CN111737084A (en) Information monitoring method and device, intelligent equipment, computer equipment and medium
WO2023035690A1 (en) Method and apparatus for controlling air conditioner, and air conditioner
CN115484110A (en) DDOS processing method and device, electronic equipment and storage medium
CN114629917A (en) Data processing method and device for cross-system communication and electronic equipment
CN112636465A (en) Intelligent processing method, system, terminal and storage medium for transmission line fault
CN111405028B (en) Information processing method, device, server, electronic device and medium
CN111949980A (en) Target client monitoring method and device, storage medium and electronic device
CN112702705A (en) Equipment debugging method, device and system based on Zigbee technology
CN111488235A (en) Terminal fault processing method and system and cloud platform
CN111147476B (en) Data analysis method
CN107124390B (en) Security defense and implementation method, device and system of computing equipment

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
GR01 Patent grant
GR01 Patent grant