Gateway management method and device, electronic device, and storage medium
By creating target devices on the gateway in the industrial Internet and performing data detection and configuration, the problem of management of gateways and new devices is solved, efficient management and data synchronization between devices and gateways is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202410070230.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-01-18
AI Technical Summary
The existing technology is difficult to effectively manage the relationship between gateways and newly built equipment in the industrial Internet, resulting in difficulties in device configuration and data synchronization.
After the device identity information authentication is passed, the target device is created on the gateway, the communication address, packet length, storage address, maximum reply time and byte order are set, and data detection and configuration are carried out, and the file packets are generated according to the preset frequency Issued to the terminal to achieve efficient management of devices and gateways.
Improves the comprehensiveness of gateway configuration and user experience, ensures normal communication and data synchronization between devices and gateways, and simplifies management processes.
Smart Images

Figure CN117914738B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication network technology, and in particular to a gateway management method and device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of industrial technology, the application of industrial Internet technology is becoming more and more extensive. The industrial Internet architecture is usually composed of industrial equipment, gateways, edge computing devices and cloud platforms. The gateway is used to collect on-site data of industrial equipment and receive feedback information from edge computing devices. In addition, the gateway is highly distributed and the client requires zero maintenance. As long as there is a network and a browser, business processing such as query and browsing can be performed anytime and anywhere. Maintenance is simple and convenient. You only need to change the web page to achieve synchronous updates for all users. Whenever a new device is created, it is necessary to deploy a corresponding gateway for the device and a terminal to receive the corresponding file package of the device. Therefore, how to manage the gateway and the newly built device is a technical problem that needs to be solved urgently. Summary of the invention
[0003] To solve the above technical problems, embodiments of the present application provide a gateway management method and device, an electronic device, and a computer-readable storage medium.
[0004] According to one aspect of an embodiment of the present application, a gateway management method is provided, comprising: after device identity information authentication is passed, creating a target device on the gateway, the creating the target device comprising setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device; performing data detection on the target device based on the communication address and maximum reply time of the target device, the data detection comprising detecting whether the target device can communicate normally; if the target device can communicate normally, configuring a matching target database for the target device based on the storage address of the target device to store the data information of the target device in the target database; generating a file package corresponding to the target device based on the data information of the target device, and sending it to the corresponding terminal at a preset frequency.
[0005] According to one aspect of an embodiment of the present application, data detection is performed on the target device based on the communication address of the target device and the maximum response time, and the data detection includes detecting whether the target device can communicate normally, including: sending communication test information to the communication address of the target device; if it is detected that the target device receives the communication test information within the maximum response time, it indicates that the target device can communicate normally.
[0006] According to one aspect of an embodiment of the present application, configuring a matching target database for the target device based on the storage address of the target device includes: selecting a storage type of the target device and an identity of a data collection point; if the storage type of the target device includes a changing storage type, matching the target database based on the identity of the data collection point and a change range of the changing storage type.
[0007] According to one aspect of an embodiment of the present application, the method also includes: if the storage type of the target device includes a cyclic storage type, determining the storage frequency of the cyclic storage type based on the byte sequence of the target device and the maximum reply duration; and periodically storing the data generated by the target device based on the storage frequency.
[0008] According to one aspect of an embodiment of the present application, the method also includes: in the configuration mode of the gateway, monitoring the operating status of the target device; if the target device has a preset alarm operating state, generating corresponding alarm information; and prompting the alarm information based on at least one of a web page prompt, an email prompt, and a personal account push prompt.
[0009] According to one aspect of an embodiment of the present application, the method also includes: in the configuration mode of the gateway, determining the alarm node of the target device, the alarm node being the corresponding variable in the communication information of the target device; setting the alarm threshold information of the alarm node to generate alarm information corresponding to the variable based on the alarm threshold information.
[0010] According to one aspect of an embodiment of the present application, before the device identity information authentication is passed, the method further includes: if the gateway is successfully accessed based on the communication parameters, communication point table and physical link of the device, it indicates that the identity information authentication of the device has passed.
[0011] According to one aspect of an embodiment of the present application, a gateway management device is provided, comprising: a creation module, for creating a target device on the gateway after the device identity information is authenticated, the creation of the target device comprising setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device; a detection module, for performing data detection on the target device based on the communication address and maximum reply time of the target device, the data detection comprising detecting whether the target device can communicate normally; a configuration module, for configuring a matching target database for the target device based on the storage address of the target device if the target device can communicate normally, so as to store the data information of the target device in the target database; a sending module, for generating a file package corresponding to the target device based on the data information of the target device, and sending it to the corresponding terminal at a preset frequency.
[0012] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the gateway management method as described above.
[0013] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the gateway management method as described above.
[0014] In the technical solution provided in the embodiments of the present application, after the device identity authentication is passed, a target device is created in the gateway. The creation of the target device includes setting the communication address of the target device, the length of the data packet, the storage address, the maximum reply time and the byte order. After that, the target device can be monitored for data according to the communication address and the maximum reply time of the target device to detect whether the target device can communicate normally. When the target device communicates normally, a database is configured for the target device to store the data information corresponding to the target device through the database, and then a file package corresponding to the target device is generated based on the data information of the target device, and the file package is sent to the corresponding terminal at a preset frequency, thereby realizing efficient management between the device and the gateway, improving the comprehensiveness of the gateway configuration, and improving the user experience.
[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0017] Figure 1 is a schematic diagram of connection between a gateway and a device shown in an exemplary embodiment of the present application;
[0018] Figure 2 It is a schematic diagram of an implementation environment for gateway management during navigation according to an exemplary embodiment of the present application;
[0019] Figure 3 is a flow chart of a gateway management method shown in an exemplary embodiment of the present application;
[0020] Figure 4 is a flow chart of a gateway management method shown in another exemplary embodiment of the present application;
[0021] Figure 5 is a flow chart of a gateway management method shown in another exemplary embodiment of the present application;
[0022] Figure 6 is a flow chart of a gateway management method shown in another exemplary embodiment of the present application;
[0023] Figure 7 is a flow chart of a gateway management method shown in another exemplary embodiment of the present application;
[0024] Figure 8 is a flow chart of a gateway management method shown in another exemplary embodiment of the present application;
[0025] Fig. 9 is a block diagram of a gateway management device shown in an exemplary embodiment of the present application;
[0026] Fig.10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0028] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0029] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0030] The term "multiple" as used in this application refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0031] First of all, it should be explained that a gateway, also known as an internetwork connector or protocol converter, is a complex network interconnection device used to interconnect two networks with different high-level protocols. A gateway implements network interconnection above the network layer and can be used for both wide area network interconnection and local area network interconnection. It repackages the received information to meet the needs of the destination system.
[0032] With the development of industrial technology, the application of industrial Internet technology is becoming more and more extensive. The industrial Internet architecture is usually composed of industrial equipment, gateways, edge computing devices and cloud platforms. The gateway is used to collect on-site data of industrial equipment and receive feedback information from edge computing devices, so a large amount of data will be generated. Therefore, it is necessary to configure the communication address, data packet length, storage address, maximum response time and byte order corresponding to the device on the gateway to facilitate the processing of the data generated by the device.
[0033] Figure 1 It is a schematic diagram of an implementation environment of a gateway link shown in an exemplary embodiment of the present application, that is, a micro-control gateway is connected to multiple corresponding configuration terminals through a switch.
[0034] Figure 2 FIG. 1 is a schematic diagram of a real-time environment for gateway management according to an exemplary embodiment of the present application. Figure 2 As shown, during the process of establishing a connection between a device and a gateway, after the device identity information is authenticated by the terminal 210, a target device is created on the gateway through the server 220, and the creation of the target device includes setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device; thus, data detection can be performed on the target device based on the communication address and maximum reply time of the target device, and the data detection includes detecting whether the target device can communicate normally; if the target device can communicate normally, a matching target database is configured for the target device based on the storage address of the target device to store the data information of the target device in the target database; a file package corresponding to the target device is generated based on the data information of the target device, and is sent to the corresponding terminal 210 at a preset frequency. Thus, the management between the device and the gateway is realized, and the management efficiency is improved.
[0035] in, Figure 2The smart terminal 210 shown can be any terminal device that supports the installation of navigation map software, such as a smart phone, a car computer, a tablet computer, a laptop computer, or a wearable device, but is not limited thereto. Figure 2 The navigation server 220 shown is a navigation server, which can be, for example, an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, etc., and is not limited here. The smart terminal 210 can communicate with the navigation server 220 through wireless networks such as 3G (third generation mobile information technology), 4G (fourth generation mobile information technology), and 5G (fifth generation mobile information technology), and is not limited here.
[0036] With the development of industrial technology, the application of industrial Internet technology is becoming more and more extensive. The industrial Internet architecture is usually composed of industrial equipment, gateways, edge computing devices and cloud platforms. The gateway is used to collect on-site data of industrial equipment and receive feedback information from edge computing devices. In addition, the gateway is highly distributed and the client requires zero maintenance. As long as there is a network and a browser, business processing such as query and browsing can be performed anytime and anywhere. Maintenance is simple and convenient. You only need to change the web page to achieve synchronous updates for all users. Whenever a new device is created, it is necessary to deploy a corresponding gateway for the device and a terminal to receive the corresponding file package of the device. Therefore, how to manage the gateway and the newly built device is a technical problem that needs to be solved urgently.
[0037] The problems pointed out above are generally applicable to the connection between general devices and gateways. To solve these problems, the embodiments of the present application respectively propose a gateway management method, a gateway management device, an electronic device, a computer-readable storage medium and a computer program product. These embodiments will be described in detail below.
[0038] See also Figure 3 , Figure 3 is a flowchart of a gateway management method shown in an exemplary embodiment of the present application. The method can be applied to Figure 2 The implementation environment shown is specifically executed by the gateway 220 in the implementation environment. It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.
[0039] like Figure 3As shown, in an exemplary embodiment, the gateway management method includes at least steps S310 to S340, which are described in detail as follows:
[0040] Step S310, after the device identity information is authenticated, a target device is created on the gateway, wherein the creation of the target device includes setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device.
[0041] Specifically, if a device needs to establish a connection with a gateway, the identity information of the device needs to be authenticated, so that after the identity information of the device is authenticated, a target device can be created on the gateway, wherein creating a target device includes setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device.
[0042] Among them, byte order refers to the storage order of bytes when multi-byte data is stored in computer memory or transmitted over the network. In computers, bytes are used as units, each address corresponds to one byte, and one byte is 8 bits. In a computer system, when the length of a physical unit is greater than one byte, the byte order must be distinguished. There are two common byte orders: big-endian and little-endian.
[0043] Exemplarily, after the identity information of the device is authenticated, the target device information corresponding to the device can be created on the gateway to set the target device information including the communication address corresponding to the target device, data packet length, corresponding data storage address, maximum reply time and byte order, etc.
[0044] Step S320: performing data detection on the target device based on the communication address of the target device and the maximum reply time. The data detection includes detecting whether the target device can communicate normally.
[0045] Following the above-mentioned embodiment, after the target device is successfully created on the gateway, data detection can be performed on the target device according to the communication address and maximum response time set corresponding to the target device, wherein the data detection includes detecting whether the target device can communicate normally.
[0046] Exemplarily, a test heartbeat packet is sent to the device at a preset frequency, and a response message returned by the device is received. If the device returns a response message within the maximum response time, it indicates that the communication of the device is normal. If the device does not return a response message within the maximum response time, it indicates that the communication of the device is abnormal.
[0047] Furthermore, the data detection also includes detecting whether the communication address of the device is accurate. For example, if the device does not receive a response message within the maximum response time, it is determined whether the communication connection of the device is normal. If the communication connection of the device is normal, it is determined that the communication address of the device is wrong.
[0048] Step S330: If the target device can communicate normally, a matching target database is configured for the target device based on the storage address of the target device to store data information of the target device in the target database.
[0049] Continuing from the above embodiment, if the target device is tested to be able to communicate normally through the solution of the above embodiment, the target database is matched for the target device based on the storage address of the target device, wherein the data information generated by the target device is stored in the target database, wherein the data information generated by the target device includes all data information generated by the target device during the connection process with the gateway.
[0050] For example, according to the storage address set by the target device, the storage address can be matched with the corresponding target database, so that the data generated during the operation of the target device can be stored in the target device. If the target device fails, the corresponding fault information can also be stored in the target device, so that the fault information corresponding to the target device can be obtained from the target database to repair the fault as soon as possible.
[0051] Step S340: Generate a file package corresponding to the target device based on the data information of the target device, and send it to the corresponding terminal at a preset frequency.
[0052] Furthermore, data information corresponding to the target device can be obtained from the target database at a preset frequency, and a file package corresponding to the target device can be generated and sent to a corresponding terminal device, where the terminal device can be a terminal device corresponding to the target device client or the target device itself.
[0053] Exemplarily, after the identity authentication of the device to be accessed by the gateway is passed, a corresponding target device corresponding to the device can be created on the gateway, and the communication address, data packet length, storage address, maximum reply time and byte sequence corresponding to the target device can be created. Then, data detection can be performed on the target device according to the set communication address and maximum reply time to determine whether the target device can communicate normally. If the device can communicate normally, the corresponding target database can be matched according to the storage address of the target device to store the data information corresponding to the target device in the target database. The data information can be the data generated by the target device during the process of accessing the gateway, and the data in the target database can be packaged and sent to the corresponding terminal device, wherein the terminal device can be the target device itself or other terminal devices other than the target device.
[0054] In this embodiment, after the device identity authentication is passed, the target device is created in the gateway. The creation of the target device includes setting the communication address of the target device, the length of the data packet, the storage address, the maximum reply time and the byte order. After that, the target device can be monitored for data according to the communication address and the maximum reply time of the target device to detect whether the target device can communicate normally. When the target device communicates normally, a database is configured for the target device to store the data information corresponding to the target device through the database, and then a file package corresponding to the target device is generated based on the data information of the target device, and the file package is sent to the corresponding terminal at a preset frequency, thereby realizing efficient management between the device and the gateway, improving the comprehensiveness of the gateway configuration, and improving the user experience.
[0055] Further, based on the above embodiment, please refer to Figure 4 In one of the exemplary embodiments provided in the present application, the data detection of the target device based on the communication address and the maximum reply time of the target device, the data detection includes a specific implementation process of detecting whether the target device can communicate normally, and may also include steps S410 and S420, which are described in detail as follows:
[0056] Step S410, sending communication test information to the communication address of the target device;
[0057] Step S420: If it is detected that the target device receives the communication test information within the maximum response time, it indicates that the target device can communicate normally.
[0058] Specifically, in this embodiment, communication test information may be sent to the communication address corresponding to the target device, wherein the communication test information may be a detection heartbeat packet, so as to determine whether the target device can communicate normally by receiving a response message from the target device to the detection heartbeat packet. Exemplarily, if a response message to the detection heartbeat packet is received within the maximum response time of the target device, it indicates that the target device can communicate normally.
[0059] Among them, the heartbeat packet is a data packet, which is usually sent by the client to the server at regular intervals to notify the server that it is still online and transmit some possibly necessary data. The role of the heartbeat packet is to detect the health of the network connection and whether the device, process or network element is operating normally. In a TCP connection, the heartbeat packet can be implemented by either party to detect the status of the other party. If either party crashes unexpectedly, crashes, the network cable is disconnected, or the router fails, the other party cannot know that the TCP connection has failed unless it continues to send data on this connection and causes an error return. Therefore, by sending heartbeat packets regularly, the abnormal disconnection of one party can be detected in a timely and effective manner. The implementation of the heartbeat packet can be completed by the TCP protocol layer or the application layer. The heartbeat implemented by the TCP protocol layer is called Keepalive, and the heartbeat packet implemented by the application layer is called a heartbeat packet. TCP does not enable the Keepalive function by default, because enabling the Keepalive function consumes additional bandwidth and traffic, but in some cases, such as in an environment where traffic is charged, it will increase the cost. On the other hand, if the Keepalive setting is unreasonable, a healthy TCP connection may be disconnected due to short-term network fluctuations.
[0060] Typical protocols that use heartbeat packets are IM (Instant Messaging) protocols, such as QQ / MSN / Fetion. The clients of these protocols need to send heartbeat packets to the server periodically to tell the server that they are online. Although the TCP / IP underlying layer provides an optional KeepAlive mechanism, these protocols still implement higher-level heartbeat packets.
[0061] In short, the heartbeat packet is a technology used to detect the health of network connections and the running status of application processes. It can be implemented at the TCP protocol layer or the application layer. Heartbeat packets are widely used in instant messaging and other scenarios that require real-time status detection.
[0062] In this embodiment, a test message is sent to the communication address of the target device to determine whether the target device can communicate normally, thereby ensuring the effectiveness of the device accessing the gateway.
[0063] Further, based on the above embodiment, please refer to Figure 5In one of the exemplary embodiments provided in the present application, the specific implementation process of configuring a matching target database for the target device based on the storage address of the target device may also include step S510 and step S520, which are described in detail as follows:
[0064] Step S510, selecting the storage type of the target device and the identity of the data collection point;
[0065] Step S520: if the storage type of the target device includes a change storage type, matching the target database based on the identity of the data collection point and the change range of the change storage type.
[0066] Specifically, the storage type of the target device and the data collection point corresponding to the target device are determined according to the storage address corresponding to the target device, wherein the storage type includes memory storage, hard disk storage, network storage, cloud storage, online storage, near-line storage, offline storage and off-site protection. Among them, the data collection point can be a data collection point pre-set during the operation of the target device, that is, during the operation of the target device, the corresponding data on the pre-set data collection point is collected, and the collected data is stored in the target database. In some feasible embodiments, the corresponding target database can also be determined according to the identity corresponding to the data collection point. The change range corresponding to the storage type of the target device can also be matched with the target database.
[0067] It should be noted that a data point is an instance or an item in the data, which can be in the form of numbers, text, pictures, videos, etc. In data analysis, data points are often aggregated, analyzed and processed to discover patterns and trends in the data. Data points are represented in the data set as each value or item in each data record. Depending on the nature and purpose of the data, data points can have different types, such as: read-write type: read-only data points, writable data points, alarm data points, and fault data points. Data types: Boolean, enumeration, numeric, extended, etc. Data series: Data points can form a data series, each data point corresponds to a cell data in the data area, and the data series corresponds to a row or column of data, forming graphics such as points, lines, and surfaces. Relative indicators: calculated by absolute indicators, used to assist analysis, multidimensional analysis can provide in-depth insights into the inherent connections of data.
[0068] Since the data storage type can change according to different needs and scenarios, the following are some common changes: Structured data and unstructured data: Structured data refers to row data, which is stored in the database and can be logically expressed in a two-dimensional table structure. Unstructured data refers to data that cannot be represented by a unified structure, including text, images, audio, and video; Text storage and binary storage: Text storage usually stores data in text form, which is convenient for reading and editing; while binary storage stores data in binary code form, which is fast but difficult to understand; Distributed storage and centralized storage: Distributed storage is to store data on multiple servers in a dispersed manner, which can achieve load balancing and fault tolerance. Centralized storage is to store data in a centralized manner on one server, which is easy to manage but can easily become a bottleneck; Block storage, file storage, and object storage: Block storage is to store data in blocks, which is fast but difficult to expand. File storage is to store data in files, which is convenient for management and access; object storage is to store data in objects, which is highly scalable and easy to manage. Cold storage and hot storage: Cold storage is the low-frequency storage of infrequently accessed data, while hot storage is the high-frequency storage of frequently accessed data.
[0069] That is to say, the corresponding target database can be determined according to the data collection point corresponding to the target device, the change range of the change storage type, and the change strategy.
[0070] In this embodiment, the target database is matched by data collection points and storage types, thereby ensuring the effectiveness of device access to the gateway and the intelligence of data storage, thereby improving the experience of using the gateway.
[0071] Further, based on the above embodiment, please refer to Figure 6 In one of the exemplary embodiments provided in the present application, the specific implementation process of the above gateway management method may further include step S610 and step S620, which are described in detail as follows:
[0072] Step S610, if the storage type of the target device includes a cyclic storage type, determining a storage frequency of the cyclic storage type based on the byte sequence of the target device and a maximum reply duration;
[0073] Step S620: periodically store the data generated by the target device based on the storage frequency.
[0074] It should be noted that in data storage, circular storage is a common storage method, which is mainly used for data processing of circular structures. The circular storage structure usually stores data in a certain order, and reads and processes the data in sequence in a circular manner during processing. Common circular storage structures include arrays and linked lists. An array is a linear data structure with a fixed length, and the elements in the array can be accessed by index. A linked list is a dynamic data structure that can add or delete elements at any time. In circular storage, a linked list usually connects elements in a certain order to form a circular linked list. In circular storage, the storage order and processing method of data are key factors. According to different needs and scenarios, different circular storage methods can be selected, such as in time order, in space order, in order of importance, etc. At the same time, when processing circularly stored data, it is also necessary to select appropriate methods and algorithms according to specific needs and scenarios to improve data processing efficiency and accuracy. In short, circular storage is a common storage method that is suitable for processing data with a circular structure. In practical applications, it is necessary to select appropriate circular storage methods and processing methods according to specific needs and scenarios to improve data processing efficiency and accuracy.
[0075] Specifically, if the storage method of the target device includes a cyclic storage type, the storage frequency corresponding to the cyclic storage type can be determined according to the byte sequence and maximum response time corresponding to the target device, wherein the storage frequency corresponding to the target device is positively correlated with the byte sequence of the target device, and negatively correlated with the maximum response time of the target device, and then the data generated by the target device is periodically stored according to the storage frequency.
[0076] In this embodiment, the target device determines the storage frequency of the cyclic storage of the data corresponding to the target device based on the maximum reply time and byte sequence, thereby improving the intelligence of the data storage corresponding to the device on the gateway and improving the user experience.
[0077] Further, based on the above embodiment, please refer to Figure 7 In one of the exemplary embodiments provided in the present application, the specific implementation process of the above-mentioned gateway management method may also include steps S710 to S730, which are described in detail as follows:
[0078] Step S710, monitoring the operating status of the target device in the configuration mode of the gateway;
[0079] Step S720, if the target device has a preset alarm operation state, then generate corresponding alarm information;
[0080] Step S730, the alarm information is prompted based on at least one of a web page prompt, an email prompt, and a personal account push prompt.
[0081] First of all, it should be noted that the configuration mode of the gateway refers to the way to configure, manage and optimize the gateway through specific software or tools. According to different needs and scenarios, the configuration mode of the gateway can be divided into the following types: Command Line Interface (CLI): Enter commands through the command line to configure and manage the gateway. This method requires a certain technical background and experience; Graphical User Interface (GUI): Configure and manage through the graphical interface. This method is relatively easy to operate and suitable for users without technical background; Remote Management Interface (Remote Management Interface): Manage and configure the gateway remotely. This method can easily achieve remote management and monitoring; API interface: Program and configure the gateway through the API interface. This method is suitable for users with certain technical capabilities. In actual applications, it is necessary to select the appropriate configuration mode according to specific needs and scenarios to achieve efficient, stable and secure network communication and data processing. At the same time, it is also necessary to pay attention to the security and stability of the gateway to ensure that the gateway can resist network attacks and unexpected situations and ensure the security and integrity of data.
[0082] Exemplarily, in the configuration mode of the gateway, the operating status of the target device is monitored, and when the target device is monitored to have a preset alarm operating status, a corresponding alarm message is generated, and the alarm message is sent to the corresponding terminal, and a prompt is given on the terminal in the form of a web page prompt, an email prompt, and a personal account push, so that relevant personnel can deal with the faulty target device in a timely manner, improve the fault handling capability, and ensure normal use.
[0083] Further, based on the above embodiment, please refer to Figure 8 In one of the exemplary embodiments provided in the present application, the specific implementation process of the above-mentioned gateway management method may also include step S810 and step S820, which are described in detail as follows:
[0084] Step S810, in the configuration mode of the gateway, determining an alarm node of the target device, the alarm node being a corresponding variable in the communication information of the target device;
[0085] Step S820: setting the alarm threshold information of the alarm node to generate the alarm information corresponding to the variable based on the alarm threshold information.
[0086] Specifically, in the configuration mode of the gateway, the alarm node of the target device is set, wherein the alarm node is different due to the different properties, functions and operation modes of the target device. Therefore, the alarm node is the corresponding variable in the communication information of the target device, and the alarm threshold information corresponding to the alarm node is set. After monitoring that the operation information of the target device reaches above the alarm threshold information, the corresponding alarm information is generated and sent to the corresponding terminal.
[0087] Exemplarily, the alarm node of the target device is determined according to the properties of the target device, and the alarm threshold information of the variable corresponding to the alarm node is set, so that when the variable on the early warning node reaches above the corresponding alarm threshold, the corresponding alarm information is generated and sent to the corresponding terminal.
[0088] In this embodiment, by setting the alarm node and alarm threshold information, alarm information can be generated efficiently and quickly when a device fails, and by setting the alarm threshold, the flexibility and adaptability of the gateway to alarm prompts for different devices can be ensured, thereby improving the intelligence of the gateway.
[0089] Further, based on the above embodiment, in one of the exemplary embodiments provided in the present application, before the above device identity information authentication is passed, the method further includes the following steps, which are described in detail as follows:
[0090] If the device successfully accesses the gateway based on the communication parameters, communication point table and physical link of the device, it indicates that the identity information authentication of the device has passed.
[0091] If the communication parameters, communication nodes and physical links of the device can be successfully connected to the gateway, the identity information authentication of the device is passed. For example, the gateway stores a corresponding device whitelist internally, and the communication parameters, communication nodes and physical links of the device can be compared with the corresponding communication parameters, communication nodes and physical links in the device whitelist. If the comparison result indicates that the communication parameters, communication nodes and physical links of the device are the same as those in the device whitelist, the result indicating that the identity authentication of the device is passed is obtained.
[0092] In this embodiment, by comparing the communication parameters, communication nodes and physical links of the device accessing the gateway, it is ensured that the device accessing the gateway is a device that has passed identity authentication, thereby ensuring the security of the gateway.
[0093] Fig. 9 is a block diagram of a gateway management device shown in an exemplary embodiment of the present application. The device can be applied to Figure 2The implementation environment shown in the figure is specifically configured in the gateway 220. The device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applied.
[0094] like Fig. 9 As shown, the exemplary gateway management device 900 includes: a creation module 910, which is used to create a target device on the gateway after the device identity information is authenticated, and the creation of the target device includes setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device; a detection module 920, which is used to perform data detection on the target device based on the communication address and maximum reply time of the target device, and the data detection includes detecting whether the target device can communicate normally; a configuration module 930, which is used to configure a matching target database for the target device based on the storage address of the target device if the target device can communicate normally, so as to store the data information of the target device in the target database; a sending module 940, which is used to generate a file package corresponding to the target device based on the data information of the target device, and send it to the corresponding terminal at a preset frequency.
[0095] According to one aspect of an embodiment of the present application, the above-mentioned detection module 920 further specifically includes: a sending unit, used to send communication test information to the communication address of the target device; a detection unit, used to detect that the target device receives the communication test information within the maximum reply time, thereby indicating that the target device can communicate normally.
[0096] According to one aspect of an embodiment of the present application, the above-mentioned configuration module 930 further specifically includes: a selection unit, used to select the storage type of the target device and the identity of the data collection point; a matching unit, used to match the target database based on the identity of the data collection point and the change range of the change storage type if the storage type of the target device includes a change storage type.
[0097] According to one aspect of an embodiment of the present application, the above-mentioned gateway management device also includes: a determination module, which is used to determine the storage frequency of the cyclic storage type based on the byte sequence and maximum reply duration of the target device if the storage type of the target device includes a cyclic storage type; and a storage module, which is used to periodically store the data generated by the target device based on the storage frequency.
[0098] According to one aspect of an embodiment of the present application, the above-mentioned gateway management device also includes: a monitoring module, which is used to monitor the operating status of the target device in the configuration mode of the gateway; a generation module, which is used to generate corresponding alarm information if the target device has a preset alarm operating state; a prompt module, which is used to prompt the alarm information based on at least one of a web page prompt, an email prompt, and a personal account push prompt.
[0099] According to one aspect of an embodiment of the present application, the above-mentioned gateway management device also includes: an alarm node module, which is used to determine the alarm node of the target device in the configuration mode of the gateway, and the alarm node is the corresponding variable in the communication information of the target device; a setting module, which is used to set the alarm threshold information of the alarm node to generate alarm information corresponding to the variable based on the alarm threshold information.
[0100] According to one aspect of an embodiment of the present application, the above-mentioned gateway management device also includes: an authentication module, which is used to indicate that the identity information authentication of the device has been passed if the device successfully accesses the gateway based on the communication parameters, communication point table and physical link of the device.
[0101] It should be noted that the gateway management device provided in the above embodiment and the gateway management method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here. In actual applications, the gateway management device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0102] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the gateway management method provided in the above-mentioned embodiments.
[0103] Fig.10 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0104] like Fig.10As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003, such as executing the method described in the above embodiment. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002 and the RAM 1003 are connected to each other through the bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004.
[0105] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0106] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.
[0107] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0108] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0109] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0110] Another aspect of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the gateway management method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0111] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the gateway management method provided in each of the above embodiments.
[0112] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A gateway management method, characterized in that: include: After the device identity information is authenticated, a target device is created on the gateway, wherein the creation of the target device includes setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device; Performing data detection on the target device based on the communication address and the maximum response time of the target device, wherein the data detection includes detecting whether the target device can communicate normally; If the target device can communicate normally, configuring a matching target database for the target device based on the storage address of the target device to store data information of the target device in the target database; Generate a file package corresponding to the target device based on the data information of the target device, and send it to the corresponding terminal at a preset frequency; The configuring a matching target database for the target device based on the storage address of the target device includes: Select the storage type of the target device and the identity of the data collection point; If the storage type of the target device includes a variable storage type, and the variable storage type is that the data storage type of the target device is changed according to different needs and scenarios, wherein the data storage change mode includes structured data and unstructured data, then the target database is matched based on the identity of the data collection point and the change range of the variable storage type, wherein the data collection point is a data collection point pre-set during the operation of the target device, so as to collect corresponding data on the data collection point during the operation of the target device, and store the collected data in the target database.
2. The method according to claim 1, characterized in that The data detection of the target device based on the communication address and the maximum response time of the target device includes detecting whether the target device can communicate normally, including: Sending communication test information to the communication address of the target device; If it is detected that the target device receives the communication test information within the maximum response time, it indicates that the target device can communicate normally.
3. The method according to claim 1, characterized in that The method further comprises: If the storage type of the target device includes a cyclic storage type, determining a storage frequency of the cyclic storage type based on the byte order of the target device and a maximum reply duration; The data generated by the target device is periodically stored based on the storage frequency.
4. The method according to claim 1, characterized in that The method further comprises: In the configuration mode of the gateway, monitoring the operating status of the target device; If the target device enters a preset alarm operation state, a corresponding alarm message is generated; The alarm information is prompted based on at least one of a web page prompt, an email prompt, and a personal account push prompt.
5. The method according to claim 4, characterized in that: The method further comprises: In the configuration mode of the gateway, determining an alarm node of the target device, the alarm node being a corresponding variable in the communication information of the target device; The alarm threshold information of the alarm node is set to generate the alarm information corresponding to the variable based on the alarm threshold information.
6. The method according to claim 1, characterized in that Before the device identity information is authenticated, the method further includes: If the device successfully accesses the gateway based on the communication parameters, communication point table and physical link of the device, it indicates that the identity information authentication of the device has passed.
7. A gateway management device, characterized in that: The device comprises: A creation module, used to create a target device on the gateway after the device identity information is authenticated, wherein the creation of the target device includes setting the communication address, data packet length, storage address, maximum reply time and byte order of the target device; A detection module, configured to perform data detection on the target device based on the communication address and the maximum reply time of the target device, wherein the data detection includes detecting whether the target device can communicate normally; A configuration module, for configuring a matching target database for the target device based on the storage address of the target device if the target device can communicate normally, so as to store the data information of the target device in the target database; the configuration of the matching target database for the target device based on the storage address of the target device includes: selecting the storage type of the target device and the identity of the data collection point; if the storage type of the target device includes a variable storage type, the variable storage type is a data storage type of the target device that is changed according to different needs and scenarios, wherein the data storage change mode includes structured data and unstructured data, then matching the target database based on the identity of the data collection point and the change range of the variable storage type, wherein the data collection point is a data collection point pre-set during the operation of the target device, so as to collect the corresponding data on the data collection point during the operation of the target device, and store the collected data in the target database; The sending module is used to generate a file package corresponding to the target device based on the data information of the target device, and send it to the corresponding terminal at a preset frequency.
8. An electronic device, characterized in that: include: one or more processors; A storage device, used to store one or more programs, when the one or more programs are executed by the one or more processors, enables the electronic device to implement the gateway management method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the gateway management method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Link management method for storage disaster recovery, message execution node and storage control cluster
CN114090342A