CN114047963A - Online monitoring device configuration method, device, equipment and storage medium - Google Patents

Online monitoring device configuration method, device, equipment and storage medium Download PDF

Info

Publication number
CN114047963A
CN114047963A CN202111435972.XA CN202111435972A CN114047963A CN 114047963 A CN114047963 A CN 114047963A CN 202111435972 A CN202111435972 A CN 202111435972A CN 114047963 A CN114047963 A CN 114047963A
Authority
CN
China
Prior art keywords
configuration
configuration information
monitoring device
online monitoring
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111435972.XA
Other languages
Chinese (zh)
Inventor
黄增浩
李�昊
何锦强
赵林杰
龚博
朱登杰
廖永力
张志强
毛先胤
黄欢
牛唯
杨旗
杨柳青
张露松
文屹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CSG Electric Power Research Institute
Guizhou Power Grid Co Ltd
Original Assignee
CSG Electric Power Research Institute
Guizhou Power Grid 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 CSG Electric Power Research Institute, Guizhou Power Grid Co Ltd filed Critical CSG Electric Power Research Institute
Priority to CN202111435972.XA priority Critical patent/CN114047963A/en
Publication of CN114047963A publication Critical patent/CN114047963A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Abstract

The invention discloses a configuration method, a device, equipment and a storage medium of an online monitoring device, wherein the method comprises the following steps: analyzing the configuration file template, recording the positions of placeholders in the configuration file template according to the sequence, and recording the number of the placeholders; reading a configuration information batch entry file, and recording the value of each field in each piece of configuration information in the file according to the sequence, wherein the field comprises a device identification number; based on the position and the number of the placeholders, filling the value of each field in each piece of configuration information into a configuration file template in sequence to obtain at least one configuration file containing any piece of configuration information; and sending any one configuration file to the ith online monitoring device to be configured, wherein i is more than 0 and less than or equal to N, and N is the total number of the online monitoring devices to be configured. The configuration method of the on-line monitoring device provided by the invention can greatly improve the configuration efficiency of the on-line monitoring device.

Description

Online monitoring device configuration method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for configuring an online monitoring apparatus.
Background
As wireless sensors are widely applied to on-line monitoring devices of power transmission lines, the configuration content of the on-line monitoring devices of power transmission lines is more and more complex, and how to simply and quickly configure the information of the wireless sensors into a host of the on-line monitoring devices becomes a difficult problem for device manufacturers. The existing low-power wireless sensor generally adopts a miniature integrated design, does not have any wired configuration port, only supports a data one-way transmission mode, and cannot modify the identification number of the sensor through a command, so that the configuration content of the on-line monitoring device of the power transmission line cannot be unified through fixing the identification number of the sensor.
In the prior art, when configuring an on-line monitoring device of a power transmission line, a configuration page of the monitoring device is usually accessed through a web mode for configuration, or an identification number of a wireless sensor is written into a storage component of the monitoring device through a specific configuration program. This mode operation is more loaded down with trivial details, all need pass through the process of connecting monitoring devices, artifical input sensor identification number and saving configuration information to each monitoring devices, and when monitoring devices need the wireless sensor quantity of configuration more, the configuration efficiency of this mode is not high.
Disclosure of Invention
The invention provides a configuration method, a configuration device, equipment and a storage medium of an online monitoring device, and aims to solve the problems of complex operation and low configuration efficiency of the conventional configuration method of the online monitoring device.
In order to solve the foregoing technical problem, a first aspect of an embodiment of the present invention provides an online monitoring device configuration method, including:
analyzing a preset configuration file template, recording the positions of placeholders in the configuration file template according to the sequence, and recording the number of the placeholders;
reading a preset configuration information batch entry file, and recording the value of each field in each piece of configuration information according to a sequence, wherein the configuration information batch entry file comprises at least one piece of configuration information, each piece of configuration information comprises at least one field, and each field comprises a device identification number;
based on the position and the number of the placeholders, sequentially filling the value of each field in each piece of configuration information into the configuration file template to obtain at least one configuration file containing any piece of configuration information;
and sending any one configuration file to the ith online monitoring device to be configured, wherein i is more than 0 and less than or equal to N, and N is the total number of the online monitoring devices to be configured.
Preferably, the sending any one of the configuration files to the ith online monitoring device to be configured specifically includes:
respectively connecting N online monitoring devices to be configured with N configuration ports;
allocating IP addresses to the N online monitoring devices to be configured through the N configuration ports respectively, and generating a port number address comparison table according to port numbers corresponding to the N configuration ports and the IP addresses corresponding to the N configuration ports;
and sending any one configuration file to the online monitoring device to be configured corresponding to the current IP address according to the sequence of the IP addresses recorded in the port number address comparison table.
Preferably, after sending any one of the configuration files to the to-be-configured online monitoring device corresponding to the current IP address according to the sequence of the IP addresses recorded in the port number address comparison table, the method further includes:
extracting a current device identification number in a configuration file corresponding to the current IP address;
generating a device tag according to the current device identification number and the port number corresponding to the current IP address;
and sticking the device label to the online monitoring device to be configured corresponding to the current IP address.
Preferably, the placeholder is comprised of a prefix symbol, a suffix symbol and a sequence number.
Preferably, the filling the value of each field in each piece of configuration information to the configuration file template in sequence based on the position and the number of the placeholders specifically includes:
based on the position and the number of the placeholders, sequentially replacing the placeholders with the value of each field in each piece of configuration information according to the sequence of the sequence numbers of the placeholders;
when the number of the placeholders is larger than the number of the fields in the current configuration information, replacing the placeholders which are not replaced by the fields by adopting the empty character strings;
when the number of the placeholders is smaller than the number of the fields in the current configuration information, not filling the unfilled fields in the current configuration information into the configuration file template.
Preferably, the format of the configuration information batch entry file is a CSV format.
Preferably, the format of the configuration file template is a yaml format or an ini format.
A second aspect of the embodiments of the present invention provides an online monitoring device configuration apparatus, including:
the configuration file template analysis module is used for analyzing a preset configuration file template, recording the positions of placeholders in the configuration file template according to the sequence and recording the number of the placeholders;
the device comprises a configuration information batch entry file reading module, a configuration information batch entry file reading module and a configuration information batch entry file processing module, wherein the configuration information batch entry file reading module is used for reading a preset configuration information batch entry file and recording the value of each field in each piece of configuration information according to a sequence, the configuration information batch entry file comprises at least one piece of configuration information, each piece of configuration information comprises at least one field, and the fields comprise device identification numbers;
the configuration information filling module is used for filling the value of each field in each piece of configuration information to the configuration file template in sequence based on the position and the number of the placeholders to obtain at least one configuration file containing any piece of configuration information;
and the configuration file sending module is used for sending any configuration file to the ith online monitoring device to be configured, wherein i is more than 0 and less than or equal to N, and N is the total number of the online monitoring devices to be configured.
A third aspect of an embodiment of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the online monitoring apparatus configuration method according to any one of the first aspects.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the online monitoring apparatus configuration method according to any one of the first aspects.
Compared with the prior art, the method and the device for online monitoring have the advantages that the configuration file of the online monitoring device can be automatically generated according to the preset configuration file template file and the configuration information batch input file, the generated configuration file is sent to the online monitoring device to be configured, batch automatic configuration of the online monitoring device is achieved, and configuration efficiency of the online monitoring device is improved.
Drawings
Fig. 1 is a schematic flow chart of a configuration method of an online monitoring device according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an on-line monitoring device configuration device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a first aspect of the embodiments of the present invention provides a method for configuring an online monitoring device, including steps S1 to S4, which are specifically as follows:
step S1, analyzing a preset configuration file template, recording the positions of placeholders in the configuration file template according to the sequence, and recording the number of the placeholders.
Preferably, the placeholder is comprised of a prefix symbol, a suffix symbol and a sequence number.
Specifically, the embodiment of the present invention parses a preset configuration file template, records the positions of placeholders according to the sequence of placeholder sequence numbers in the configuration file template, and records the number of placeholders. For example, 3 placeholders are obtained by parsing according to a preset configuration file template, the first placeholder is located in the 7 th column of the 3 rd row, the second placeholder is located in the 15 th column of the 14 th row, and the third placeholder is located in the 15 th column of the 19 th row.
Preferably, the format of the configuration file template is a yaml format or an ini format.
It should be noted that the profile template is composed of two parts, namely, a fixed part and a variable part, wherein the fixed part is the same part in each online monitoring device, and the variable part is a different part in the profile of each day online monitoring device, typically, for example, the device ID of each monitoring device, the configured sensor identification number, and the like. The embodiment of the invention provides that the variable part in the configuration file template is identified by adopting a placeholder, the placeholder is represented by "$ { sequence number }", wherein "$ {" is a prefix of the placeholder, and "}" is a suffix of the placeholder, and the sequence number indicates that the placeholder is the second placeholder in the file template, and the sequence number is numbered from 1. The following is an example of a profile template provided by embodiments of the present invention:
monitor:
ID number of # on-line monitoring device
id:${1}
# Server information of data uploaded by an Online monitoring device
server:
ip:10.3.1.1
port:1234
# define sensor configuration information
sensor:
# sensor type
-type:wxcw
# sensor Serial number
serial:${2}
Identification code used in uploading data of # sensor
code:15
-type:wxcw
serial:${3}
code:25
Step S2, reading a preset configuration information batch entry file, and recording the value of each field in each piece of configuration information in sequence, where the configuration information batch entry file includes at least one piece of configuration information, each piece of configuration information includes at least one field, and the field includes a device identification number.
Preferably, the format of the configuration information batch entry file is a CSV format.
It should be noted that the configuration information batch entry file format adopts a CSV format, which facilitates the use of Excel's dragging mode for inputting sequence numbers. Before the online monitoring devices are configured, a configuration information batch entry file is compiled according to the numbers of the produced online monitoring devices and the configured sensor numbers, and a row of fields are used for representing each online monitoring device in the configuration information batch entry file. And a first field of the configuration information batch entry file is specified as the number of the online monitoring device, and the subsequent fields correspond to the placeholder serial numbers of the configuration files from 1. The character strings in the specified configuration information batch entry file adopt original values during entry, and no escape is performed.
Illustratively, the configuration information of 10 online monitoring devices is edited by a PC (personal computer) to form a batch entry file, the batch entry file comprises online monitoring device codes and serial numbers of wireless sensors, and the file name is saved as parameters. The examples of the configuration information batch entry file are as follows:
CSG001,CSG001,WXCW0001,WXCW0011
CSG002,CSG002,WXCW0002,WXCW0012
CSG003,CSG003,WXCW0003,WXCW0013
CSG004,CSG004,WXCW0004,WXCW0014
CSG005,CSG005,WXCW0005,WXCW0015
CSG006,CSG006,WXCW0006,WXCW0016
CSG007,CSG007,WXCW0007,WXCW0017
CSG008,CSG008,WXCW0008,WXCW0018
CSG009,CSG009,WXCW0009,WXCW0019
CSG010,CSG010,WXCW0010,WXCW0020
taking the first row of data as an example, the first field represents that the on-line monitoring device ID corresponding to the configuration information is CSG001, the second field represents that the placeholder "$ {1 }" should be replaced with CSG001, the third field represents that the placeholder "$ {2 }" is replaced with WXCW0001, and the fourth field represents that the placeholder "$3 }" is replaced with WXCW 0011.
Specifically, in the embodiment of the present invention, a preset configuration information batch entry file is read, each line corresponds to configuration information of one online monitoring device, and a value of each field in each piece of configuration information is recorded in sequence, where the configuration information batch entry file includes at least one piece of configuration information, each piece of configuration information includes at least one field, and the field includes a device identification number.
It should be noted that after the configuration file template and the configuration information batch entry file are set, the configuration file template and the configuration information batch entry file are stored, and a configuration file name of the online monitoring device and an online monitoring device configuration file storage directory are set, for example, the configuration file name of the online monitoring device is set to monitor.
Step S3, based on the position and number of the placeholder, sequentially filling the value of each field in each piece of configuration information into the configuration file template, and obtaining at least one configuration file containing any piece of configuration information.
Preferably, the filling the value of each field in each piece of configuration information to the configuration file template in sequence based on the position and the number of the placeholders specifically includes:
based on the position and the number of the placeholders, sequentially replacing the placeholders with the value of each field in each piece of configuration information according to the sequence of the sequence numbers of the placeholders;
when the number of the placeholders is larger than the number of the fields in the current configuration information, replacing the placeholders which are not replaced by the fields by adopting the empty character strings;
when the number of the placeholders is smaller than the number of the fields in the current configuration information, not filling the unfilled fields in the current configuration information into the configuration file template.
Specifically, the serial number, the position and the number of the placeholder are obtained by analyzing the configuration file template, and then the configuration information batch entry file is analyzed to obtain the number of the online monitoring device and the field in the configuration information. And finally, based on the position and the number of the placeholders, sequentially filling the value of each field in each piece of configuration information into the configuration file template, and generating and storing a configuration file after each line of configuration information is processed. The file name is named in such a way that a template file suffix is kept unchanged, and the file name is modified to be the device ID (i.e., the first field in the configuration information).
Illustratively, 3 placeholders are resolved according to the example profile template, wherein the first placeholder is at row 3, column 7, the second placeholder is at row 14, column 15, and the third placeholder is at row 19, column 15. Analyzing the configuration information batch input file to obtain 10 sets of online monitoring devices needing batch configuration, and storing each configuration field corresponding to each set of online monitoring devices. And finally, replacing the placeholders in the configuration files according to the configuration fields of each set of online monitoring devices to obtain 10 online monitoring device configuration files, and storing the 10 online monitoring device configuration files. The file names of the 10 online monitoring devices are respectively CSG001.yml … … CSG010. yml. The contents of the configuration file configured by taking CSG001.yml as an example are as follows:
monitor:
ID number of # on-line monitoring device
id:CSG001
# Server information of data uploaded by an Online monitoring device
server:
ip:10.3.1.1
port:1234
# define sensor configuration information
sensor:
# sensor type
-type:wxcw
# sensor Serial number
serial:WXCW0001
Identification code used in uploading data of # sensor
code:15
-type:wxcw
serial:WXCW0011
code:25
And step S4, sending any one configuration file to the ith online monitoring device to be configured, wherein i is more than 0 and less than or equal to N, and N is the total number of the online monitoring devices to be configured.
Preferably, the N online monitoring devices to be configured are respectively connected with the N configuration ports;
allocating IP addresses to the N online monitoring devices to be configured through the N configuration ports respectively, and generating a port number address comparison table according to port numbers corresponding to the N configuration ports and the IP addresses corresponding to the N configuration ports;
and sending any one configuration file to the online monitoring device to be configured corresponding to the current IP address according to the sequence of the IP addresses recorded in the port number address comparison table.
Specifically, firstly, setting a network port of an online monitoring device to be an automatically acquired IP address, then accessing the online monitoring device to a network port of an online monitoring device configuration device through a network cable, scanning each network cable port by the online monitoring device configuration device, if the online monitoring device is accessed, allocating an IP address and recording a port number for the monitoring device, and generating a port number address comparison table according to the allocated IP address and the port number corresponding to each IP address. For example, 10 on-line monitoring devices are sequentially connected to ports No. 2 to No. 11 of an on-line monitoring device configuration device, and the on-line monitoring device configuration device assigns IP addresses 192.168.2.11 to 192.168.2.20 to the 10 on-line monitoring devices. The on-line monitoring device configuration device generates and stores a comparison table of the 10 port numbers and the corresponding IP addresses.
And the online monitoring device configuration device selects any one configuration file according to the sequence of the IP addresses recorded in the port number address comparison table, copies the configuration file to the specified storage position of the online monitoring device to be configured corresponding to the current IP address through ssh, and changes the name of the configuration file into the name of the configuration file of the online monitoring device. For example, the on-line monitoring device configuration device selects entries from the port number address lookup table in the IP order, the first entry is "port 2 corresponds to 192.168.2.11", and the configuration file is selected from the generated configuration files in the file name order, which is csg001.yml. The on-line monitoring device configuration device copies CSG001.yml to the input on-line monitoring device configuration file directory/opt/monitor through ssh, and then renames CSG001.yml on the on-line monitoring device side to the input on-line monitoring device configuration file name monitor.
Preferably, after sending any one of the configuration files to the to-be-configured online monitoring device corresponding to the current IP address according to the sequence of the IP addresses recorded in the port number address comparison table, the method further includes:
extracting a current device identification number in a configuration file corresponding to the current IP address;
generating a device tag according to the current device identification number and the port number corresponding to the current IP address;
and sticking the device label to the online monitoring device to be configured corresponding to the current IP address.
Specifically, the ID of the current online monitoring device is extracted and recorded according to the selected configuration file, and a port ID comparison table is generated according to the ID of the current online monitoring device and the corresponding port number and stored. For example, the online monitoring device ID is extracted as CSG001 according to the profile name csg001.yml, and then the port-terminal ID comparison relationship "CSG 001 corresponding to port 2" is added to the port ID comparison table and stored. And then reading a port ID comparison table, generating a device label according to the read current device identification number and the port number corresponding to the current IP address, and then pasting the device label on the online monitoring device to be configured corresponding to the current IP address. For example, the port ID lookup table has 10 entries, and 10 device tags are printed. The content of the first comparison item is "port 2 corresponds to online monitoring device number CSG 001", and the content of the first printed device tag is "port: 2 device number: CSG001 ". After the device tag is attached to the on-line monitoring device connected to port No. 2, the configuration of the on-line monitoring device is completed. This is repeated until all of the collation entries in the port ID collation table are printed as device labels and affixed to the on-line monitoring device, and the batch configuration job is complete.
By adopting the configuration method of the online monitoring device provided by the embodiment of the invention, the configuration file of the online monitoring device can be automatically generated according to the preset configuration file template file and the configuration information batch input file, the IP address is dynamically allocated for the online monitoring device and is associated with the network port, the configuration file is automatically sent to the online monitoring device with the appointed IP address, the ID of the online monitoring device is associated with the network port, and the label containing the information corresponding to the network port and the ID of the online monitoring device is printed to be pasted to the online monitoring device, so that the batch automatic configuration of the online monitoring device is realized, and the configuration efficiency of the online monitoring device is improved.
Referring to fig. 2, a second aspect of the embodiment of the present invention provides an online monitoring device configuration apparatus, including:
the configuration file template analysis module 201 is configured to analyze a preset configuration file template, record positions of placeholders in the configuration file template in sequence, and record the number of the placeholders;
the device comprises a configuration information batch entry file reading module 202, a configuration information batch entry file processing module and a configuration information batch entry file processing module, wherein the configuration information batch entry file reading module is used for reading a preset configuration information batch entry file and recording the value of each field in each piece of configuration information according to a sequence, the configuration information batch entry file comprises at least one piece of configuration information, each piece of configuration information comprises at least one field, and the fields comprise device identification numbers;
a configuration information filling module 203, configured to fill, based on the position and number of the placeholder, the value of each field in each piece of configuration information to the configuration file template in sequence, so as to obtain at least one configuration file including any piece of configuration information;
the configuration file sending module 204 is configured to send any one configuration file to the ith online monitoring device to be configured, where i is greater than 0 and less than or equal to N, and N is the total number of the online monitoring devices to be configured.
Preferably, the configuration file sending module 204 is configured to send any one configuration file to the ith online monitoring device to be configured, and specifically includes:
respectively connecting N online monitoring devices to be configured with N configuration ports;
allocating IP addresses to the N online monitoring devices to be configured through the N configuration ports respectively, and generating a port number address comparison table according to port numbers corresponding to the N configuration ports and the IP addresses corresponding to the N configuration ports;
and sending any one configuration file to the online monitoring device to be configured corresponding to the current IP address according to the sequence of the IP addresses recorded in the port number address comparison table.
Preferably, the on-line monitoring device configuring device further comprises a device label pasting module for:
extracting a current device identification number in a configuration file corresponding to the current IP address;
generating a device tag according to the current device identification number and the port number corresponding to the current IP address;
and sticking the device label to the online monitoring device to be configured corresponding to the current IP address.
Preferably, the placeholder is comprised of a prefix symbol, a suffix symbol and a sequence number.
Preferably, the configuration information filling module 203 is configured to fill the value of each field in each piece of configuration information to the configuration file template in sequence based on the position and the number of the placeholders, and specifically includes:
based on the position and the number of the placeholders, sequentially replacing the placeholders with the value of each field in each piece of configuration information according to the sequence of the sequence numbers of the placeholders;
when the number of the placeholders is larger than the number of the fields in the current configuration information, replacing the placeholders which are not replaced by the fields by adopting the empty character strings;
when the number of the placeholders is smaller than the number of the fields in the current configuration information, not filling the unfilled fields in the current configuration information into the configuration file template.
Preferably, the format of the configuration information batch entry file is a CSV format.
Preferably, the format of the configuration file template is a yaml format or an ini format.
It should be noted that, the configuration device for an online monitoring device provided in the embodiment of the present invention can implement all the processes of the configuration method for an online monitoring device described in any embodiment, and the functions and technical effects of each module in the device are respectively the same as those of the configuration method for an online monitoring device described in the embodiment, and are not described herein again.
A third aspect of an embodiment of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the method for configuring an online monitoring apparatus according to any one of the embodiments of the first aspect.
The terminal device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The terminal device may include, but is not limited to, a processor, a memory. The terminal device may also include input and output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the terminal device and connects the various parts of the whole terminal device using various interfaces and lines.
The memory may be used for storing the computer programs and/or modules, and the processor may implement various functions of the terminal device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, the computer-readable storage medium is controlled to implement, by a device, the method for configuring an online monitoring apparatus according to any of the embodiments of the first aspect.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus a necessary hardware platform, and may also be implemented by hardware entirely. With this understanding in mind, all or part of the technical solutions of the present invention that contribute to the background can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments or some parts of the embodiments of the present invention.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. An online monitoring device configuration method is characterized by comprising the following steps:
analyzing a preset configuration file template, recording the positions of placeholders in the configuration file template according to the sequence, and recording the number of the placeholders;
reading a preset configuration information batch entry file, and recording the value of each field in each piece of configuration information according to a sequence, wherein the configuration information batch entry file comprises at least one piece of configuration information, each piece of configuration information comprises at least one field, and each field comprises a device identification number;
based on the position and the number of the placeholders, sequentially filling the value of each field in each piece of configuration information into the configuration file template to obtain at least one configuration file containing any piece of configuration information;
and sending any one configuration file to the ith online monitoring device to be configured, wherein i is more than 0 and less than or equal to N, and N is the total number of the online monitoring devices to be configured.
2. The method according to claim 1, wherein the sending any one of the configuration files to the ith online monitoring device to be configured specifically comprises:
respectively connecting N online monitoring devices to be configured with N configuration ports;
allocating IP addresses to the N online monitoring devices to be configured through the N configuration ports respectively, and generating a port number address comparison table according to port numbers corresponding to the N configuration ports and the IP addresses corresponding to the N configuration ports;
and sending any one configuration file to the online monitoring device to be configured corresponding to the current IP address according to the sequence of the IP addresses recorded in the port number address comparison table.
3. The method according to claim 2, wherein after sending any one of the configuration files to the to-be-configured on-line monitoring device corresponding to the current IP address according to the sequence of the IP addresses recorded in the port number address mapping table, the method further comprises:
extracting a current device identification number in a configuration file corresponding to the current IP address;
generating a device tag according to the current device identification number and the port number corresponding to the current IP address;
and sticking the device label to the online monitoring device to be configured corresponding to the current IP address.
4. The method of claim 3, wherein the placeholder is comprised of a prefix symbol, a suffix symbol, and a sequence number.
5. The configuration method of the on-line monitoring device according to claim 4, wherein the filling the value of each field in each piece of configuration information to the configuration file template in sequence based on the position and the number of the placeholders specifically comprises:
based on the position and the number of the placeholders, sequentially replacing the placeholders with the value of each field in each piece of configuration information according to the sequence of the sequence numbers of the placeholders;
when the number of the placeholders is larger than the number of the fields in the current configuration information, replacing the placeholders which are not replaced by the fields by adopting the empty character strings;
when the number of the placeholders is smaller than the number of the fields in the current configuration information, not filling the unfilled fields in the current configuration information into the configuration file template.
6. The configuration method for the on-line monitoring device according to claim 5, wherein the configuration information batch entry file is in CSV format.
7. The method of claim 6, wherein the configuration file template is in a format of yaml format or ini format.
8. An on-line monitoring device configuration device, comprising:
the configuration file template analysis module is used for analyzing a preset configuration file template, recording the positions of placeholders in the configuration file template according to the sequence and recording the number of the placeholders;
the device comprises a configuration information batch entry file reading module, a configuration information batch entry file reading module and a configuration information batch entry file processing module, wherein the configuration information batch entry file reading module is used for reading a preset configuration information batch entry file and recording the value of each field in each piece of configuration information according to a sequence, the configuration information batch entry file comprises at least one piece of configuration information, each piece of configuration information comprises at least one field, and the fields comprise device identification numbers;
the configuration information filling module is used for filling the value of each field in each piece of configuration information to the configuration file template in sequence based on the position and the number of the placeholders to obtain at least one configuration file containing any piece of configuration information;
and the configuration file sending module is used for sending any configuration file to the ith online monitoring device to be configured, wherein i is more than 0 and less than or equal to N, and N is the total number of the online monitoring devices to be configured.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the on-line monitoring device configuration method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the method of configuring an online monitoring device according to any one of claims 1 to 7.
CN202111435972.XA 2021-11-26 2021-11-26 Online monitoring device configuration method, device, equipment and storage medium Pending CN114047963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111435972.XA CN114047963A (en) 2021-11-26 2021-11-26 Online monitoring device configuration method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111435972.XA CN114047963A (en) 2021-11-26 2021-11-26 Online monitoring device configuration method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114047963A true CN114047963A (en) 2022-02-15

Family

ID=80211662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111435972.XA Pending CN114047963A (en) 2021-11-26 2021-11-26 Online monitoring device configuration method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114047963A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726234A (en) * 2018-09-14 2019-05-07 上海华岭集成电路技术股份有限公司 Integrated circuit testing Information Management System based on industry internet
CN110460512A (en) * 2019-08-01 2019-11-15 北京达佳互联信息技术有限公司 System message generation method, device, server and storage medium
CN110601931A (en) * 2019-09-10 2019-12-20 杭州行至云起科技有限公司 Batch configuration method and system of intelligent home system
CN111130962A (en) * 2019-12-30 2020-05-08 联想(北京)有限公司 Automatic configuration method, equipment, system and storage medium for switch
CN111740851A (en) * 2019-03-25 2020-10-02 华为技术有限公司 Configuration message generation method, equipment and system
CN112114893A (en) * 2020-08-14 2020-12-22 中国科学院电子学研究所苏州研究院 Process-oriented service configuration management and integration tool and method
CN112527404A (en) * 2020-11-11 2021-03-19 贵州电网有限责任公司 Configuration method, device, equipment and medium for chip relay protection general system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726234A (en) * 2018-09-14 2019-05-07 上海华岭集成电路技术股份有限公司 Integrated circuit testing Information Management System based on industry internet
CN111740851A (en) * 2019-03-25 2020-10-02 华为技术有限公司 Configuration message generation method, equipment and system
CN110460512A (en) * 2019-08-01 2019-11-15 北京达佳互联信息技术有限公司 System message generation method, device, server and storage medium
CN110601931A (en) * 2019-09-10 2019-12-20 杭州行至云起科技有限公司 Batch configuration method and system of intelligent home system
CN111130962A (en) * 2019-12-30 2020-05-08 联想(北京)有限公司 Automatic configuration method, equipment, system and storage medium for switch
CN112114893A (en) * 2020-08-14 2020-12-22 中国科学院电子学研究所苏州研究院 Process-oriented service configuration management and integration tool and method
CN112527404A (en) * 2020-11-11 2021-03-19 贵州电网有限责任公司 Configuration method, device, equipment and medium for chip relay protection general system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马国政主编: "《营销业务应用系统(抄核收)实用手册》", vol. 1, 合肥工业大学出版社, pages: 301 *

Similar Documents

Publication Publication Date Title
CN107958028A (en) Method, apparatus, storage medium and the terminal of data acquisition
CN104135520B (en) A kind of method and device for identifying android terminal
US20200204688A1 (en) Picture book sharing method and apparatus and system using the same
CN108804400A (en) A kind of electronic document processing method, device and relevant device
CN111651140B (en) Service method and device based on workflow
CN107688456B (en) File generation method, device and computer readable storage medium
CN111104178A (en) Dynamic library loading method, terminal device and storage medium
CN112769802A (en) Access verification method and device based on server, electronic equipment and storage medium
WO2019071406A1 (en) Front-end page internationalization processing method, application server and computer readable storage medium
CN109284453B (en) Data downloading method and device based on PDF document, storage medium and terminal
CN113407254B (en) Form generation method and device, electronic equipment and storage medium
CN110851136A (en) Data acquisition method and device, electronic equipment and storage medium
CN108509396A (en) Pdf document turns method, electronic device and the computer readable storage medium of picture
CN114047963A (en) Online monitoring device configuration method, device, equipment and storage medium
CN111325012A (en) word report generation method and system
CN113590564B (en) Data storage method, device, electronic equipment and storage medium
CN114090083B (en) Visual component configuration method, device, equipment and storage medium
CN108604226A (en) For the cross-platform system and method for keeping the comment to electronic document synchronous
CN113436699A (en) Method, system, electronic device and storage medium for generating new corona nucleic acid detection report
CN107506299B (en) Code analysis method and terminal equipment
CN113468460B (en) Method, device and equipment for rendering Web page based on YAML (Yaml language)
CN111144086B (en) Log formatting method and device, electronic equipment and storage medium
CN111159994B (en) Automatic filling method and device for web form, storage medium and electronic equipment
CN112402955B (en) Game log recording method and system
CN112861048A (en) Page loading method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination