CN114449018B - Automatic log file uploading method and system for power acquisition terminal - Google Patents

Automatic log file uploading method and system for power acquisition terminal Download PDF

Info

Publication number
CN114449018B
CN114449018B CN202210365462.8A CN202210365462A CN114449018B CN 114449018 B CN114449018 B CN 114449018B CN 202210365462 A CN202210365462 A CN 202210365462A CN 114449018 B CN114449018 B CN 114449018B
Authority
CN
China
Prior art keywords
log
instruction
file
log file
acquisition terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210365462.8A
Other languages
Chinese (zh)
Other versions
CN114449018A (en
Inventor
王勇
左勇
张赢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Nanrui Zhongtian Electric Power Electronics Co ltd
Original Assignee
Anhui Nanrui Zhongtian Electric Power Electronics 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 Anhui Nanrui Zhongtian Electric Power Electronics Co ltd filed Critical Anhui Nanrui Zhongtian Electric Power Electronics Co ltd
Priority to CN202210365462.8A priority Critical patent/CN114449018B/en
Publication of CN114449018A publication Critical patent/CN114449018A/en
Application granted granted Critical
Publication of CN114449018B publication Critical patent/CN114449018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J13/00Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network
    • H02J13/00006Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Power Engineering (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to the field of power management equipment, and particularly relates to an automatic log file uploading method for a power acquisition terminal, and a related system and device. According to the method and the system, when the power acquisition terminal fails, the fault state of the power acquisition terminal can be automatically reported to the master station server, and the corresponding log file can be uploaded according to the request of the master station server. The automatic log file uploading system is a distributed system and comprises a terminal subsystem operating in an electric power acquisition terminal and a master station subsystem operating in a master station server. Wherein, the terminal subsystem includes: the system comprises a local log library, a fault state mark sending module and a log request response module. The master station subsystem comprises: the device comprises a fault state mark receiving module, a log request module and a log file receiving module. The invention solves the problems that the collection of the log files needs to depend on manpower, the collection efficiency is low and the collection is dangerous when the existing power collection terminal breaks down.

Description

Automatic log file uploading method and system for power acquisition terminal
Technical Field
The invention belongs to the field of power management equipment, and particularly relates to an automatic log file uploading method for a power acquisition terminal, and a related system and device.
Background
With the continuous development and improvement of smart power grids, the work center of gravity of the power grids gradually changes from being mainly built to being mainly operated and maintained and applied. The operation and maintenance is the basis of application, and the application is the real value embodiment of the acquisition system. At present, the construction of the smart power grid is still in the initial stage of the construction of the power utilization information acquisition system, the operation and maintenance and deepening application experience of the system are shallow, how to effectively improve the operation and maintenance efficiency and furthest promote the data and functional application of the power utilization information acquisition system becomes an important subject faced by the power utilization information acquisition system.
The existing smart grid has already preliminarily finished the automation of electric power information acquisition, and a metering system can utilize a concentrator to realize remote meter reading. However, when a fault occurs in the on-site power information acquisition terminal, operation and maintenance personnel still need to go to the terminal to copy the relevant equipment log on site, and the log file recorded on the equipment is a data base for performing fault analysis and fault handling in the later period. The collection mode of the log files needs to consume a large amount of manpower and material resources, and the risk of manual operation errors exists.
Disclosure of Invention
The invention provides an automatic log file uploading method of an electric power acquisition terminal, and a related system and device, aiming at solving the problems that the acquisition of log files needs to depend on manpower, the acquisition efficiency is low and the log files are dangerous when the existing electric power acquisition terminal breaks down.
The invention is realized by adopting the following technical scheme:
an automatic log file uploading method for a power acquisition terminal; the method is used for remotely acquiring the log file of the power acquisition terminal, and the automatic log file uploading method comprises the following processes:
and after the power acquisition terminal detects that the running state is abnormal by the self-checking program, a fault state mark is sent to the master station server. The fault state mark comprises a fault type and an equipment identification number of the power acquisition terminal.
After receiving the fault state flag sent by any one power acquisition terminal, the master station server sends a self-defined request terminal configuration and information instruction to the corresponding power acquisition terminal, wherein the self-defined request terminal configuration and information instruction comprises reported log information, a server IP and port information.
And the power acquisition terminal analyzes the message sent by the master station server and verifies the legality of the received user-defined instruction. And after the verification is passed, responding to the instruction and starting a compression task, compressing the specified log file, and then subpackaging and transmitting the compressed file to the specified server and port in the format of the customized file transmission instruction.
After receiving a file transmission instruction reported by the power acquisition terminal, the master station server firstly verifies the validity of the instruction; and returning a corresponding confirmation instruction or a non-confirmation instruction to the power acquisition terminal according to the verification result.
The power acquisition terminal receives the return instruction and makes the following decisions according to the type of the instruction: (1) and when the confirmation instruction is received, continuing to report the next frame data. (2) And when the negative command is received or the return command is received overtime, the current frame data is reported again.
And the master station server judges whether the receiving of all the data is finished, if so, the received data is combined into a complete file and decompressed to obtain a log file to be transmitted.
As a further improvement of the invention, the power acquisition terminal adopts an asynchronous transmission mode when reporting the compressed file of the log file to the master station server, and the frame format of the transmission data sequentially comprises the following steps: start character, identification length L1, data length L2, start character, control field C, address field A, link user data, check code, end character.
Wherein, the identifier length L1 represents the length of the protocol identifier; the data length L2 indicates the length of user data, and both consist of 2 bytes. The control field C indicates information of a message transmission direction and a type of transmission service provided. The address domain A consists of administrative division codes, terminal addresses, master station addresses and group address marks. The check code CS is the arithmetic sum of octets of all bytes of the user data area, regardless of the overflow bit. The user data area comprises three parts of a control field C, an address field A and link user data.
As a further improvement of the invention, the link user data is an application layer, the log file transmission process is realized by the link user data of the application layer, and the format of the link user data sequentially comprises: an application layer function code AFN, a frame sequence field SEQ, a plurality of sets of data unit identifications and data units, and an additional information field AUX.
The application layer function code AFN is composed of 1 byte and is represented by binary coding. The frame sequence field SEQ is 1 byte and is used to describe the variation rule of the transmission sequence between frames. The data unit mark is composed of information point mark and information type mark, which represents information point and information type. The additional information field consists of a message authentication code field, an event counter and a time tag. The data unit is data organized by data unit identification, including parameters and commands.
As a further improvement of the present invention, the format of the customized request terminal configuration and information instruction sequentially includes: log information, a server IP address 1 section, a server IP address 2 section, a server IP address 3 section, a server IP address 4 section and a server port.
The byte number of the log information is 1, and the log information is used for recording the date of the log file requested to be transmitted. The server IP address comprises four sections, the number of bytes of each section is 1, the number of bytes of the server port is 2, and the server IP address and the server port are used for indicating the information of the server receiving the log file.
As a further improvement of the invention, the format of the customized file transmission instruction sequentially comprises: the total number of messages, the sequence number of the messages, the length of the log and the content of the log.
The number of bytes of the total number of the messages is 2, and the total number of the messages of the framed log file is represented. The byte number of the message serial number is 2, which is used for representing the serial number of the currently sent framing message. The number of bytes of the log length is 2, which is used for indicating the length of the log file contained in the current instruction. The log content includes the framing message of the currently sent log file.
The invention also discloses an automatic log file uploading system of the power acquisition terminal, which adopts the automatic log file uploading method of the power acquisition terminal, automatically reports the fault state of the power acquisition terminal to the master station server when the power acquisition terminal has a fault, and uploads the corresponding log file according to the request of the master station server. The automatic log file uploading system is a distributed system and comprises a terminal subsystem operating in the power acquisition terminal and a master station subsystem operating in the master station server.
Wherein, the terminal subsystem includes: the system comprises a local log library, a fault state mark sending module and a log request response module. The local log library is used for caching all log files recorded in the power acquisition terminal. The fault state mark sending module is used for acquiring a detection result of a self-checking program in the power acquisition terminal and generating a fault state mark containing a fault type and a self equipment identification number when the power acquisition terminal is detected to be abnormal in operation state; the fault status flag is sent to the master server. The log request response module is used for receiving and analyzing a self-defined request terminal configuration and information instruction sent by the master station server, wherein the self-defined request terminal configuration and information instruction comprises log information, a server IP address and port information. And after verifying that the instruction is legal, the log request response module searches a local log library according to the log information and sends a corresponding log file to a specified server IP address and port in a self-defined file transmission instruction format.
The master station subsystem comprises: the device comprises a fault state mark receiving module, a log request module and a log file receiving module. The fault state mark receiving module is used for receiving the fault state mark sent by the power acquisition terminal and then analyzing the fault type and the equipment identification number in the fault state mark. And the log request module is used for issuing a self-defined request terminal configuration and information instruction to the corresponding power acquisition terminal according to the fault state. The log file receiving module is used for receiving the self-defined file transmission instruction returned by the power acquisition terminal and analyzing the self-defined file transmission instruction to obtain a required log file of the power acquisition terminal for analysis by operation and maintenance personnel.
As a further improvement of the invention, the log request response module comprises a request instruction verification unit, a log retrieval unit, a log compression unit and a log sending unit. The request instruction verification unit is used for analyzing the self-defined request terminal configuration and information instruction sent by the main station server and verifying the validity of the instruction. And the log retrieval unit is used for retrieving the local log library according to the instruction analysis content after the instruction verification unit passes the verification, and screening out log files meeting the requirements. The log compression unit is used for compressing the screened log files. And the log sending unit is used for performing sub-packet processing on the compressed log file and then sending the sub-packet data to a specified server IP address and port according to a self-defined file transmission instruction format.
As a further improvement of the invention, the log file receiving module comprises a transmission instruction verification unit, a message judgment unit, a file merging unit and a file decompression unit. The transmission instruction verification unit is used for analyzing the self-defined file transmission instruction sent by the power acquisition terminal and verifying the validity of the instruction. The self-defined file transmission instruction comprises the following steps: the total number of messages, the sequence number of the messages, the length of the log and the content of the log. And the message judging unit is used for judging whether the log file content is completely received according to the message sequence number in the analyzed file transmission instruction. The file merging unit is used for merging the received sub-packet data of the log file so as to obtain a compressed file of the log file. And the file decompression unit is used for decompressing the combined compressed file to obtain a required complete log file.
As a further improvement of the invention, the log file receiving module returns a confirmation instruction or a denial instruction after receiving a file transmission instruction generated by the power acquisition terminal. After receiving the confirmation instruction, the log request response module sends next frame data to the master station server; and after receiving the denial command or the return command is overtime, the log request response module retransmits the data of the current frame.
The invention also comprises an automatic log file uploading device of the power acquisition terminal, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor. The log file automatic uploading device of the power acquisition terminal completes deployment in the mode of the log file automatic uploading system of the power acquisition terminal. And when the processor executes the program, the method for automatically uploading the log file of the power acquisition terminal is realized.
The technical scheme provided by the invention has the following beneficial effects:
the invention provides an automatic log file uploading method of an electric power acquisition terminal, a related system and a related terminal. After the method and the system are applied, when the power utilization acquisition terminal breaks down, the terminal reports the fault information to the master station at the first time, and then uploads the corresponding log file in the terminal to the master station server according to the request of the master station server. After the system is adopted, operation and maintenance personnel can know relevant data of the field terminal at the first time at the remote master station without reaching the terminal field, and timely analyze and dispose, so that stable operation of a power grid is guaranteed.
The method and the system provided by the invention can greatly improve the collection efficiency of the log files in the power collection terminal and the safety of task processing. The deployment cost of the system is low, the system can be almost only applied to the existing hardware equipment, and convenience can be provided for operation and maintenance personnel after the system is adopted; therefore, the method has great economic value and popularization and application prospect.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart illustrating steps of a method for automatically uploading log files of an electric power collection terminal according to embodiment 1 of the present invention.
Fig. 2 is a program flow diagram of an execution process of the log file automatic uploading method for the power acquisition terminal according to embodiment 1 of the present invention.
Fig. 3 is a structural topological diagram of an automatic log file uploading system of an electric power collection terminal according to embodiment 2 of the present invention.
Fig. 4 is a schematic module diagram of a log request response module in an automatic log file uploading system of an electric power collection terminal according to embodiment 2 of the present invention.
Fig. 5 is a schematic module diagram of a log file receiving module in an automatic log file uploading system of an electric power collection terminal according to embodiment 2 of the present invention.
Labeled as:
11. a local log repository; 12. a fault status flag sending module; 13. a log request response module; 21. a fault status flag receiving module; 22. a log request module; 23. a log file receiving module; 131. a request instruction verification unit; 132. a log retrieval unit; 133. a log compression unit; 134. a log sending unit; 231. a transmission instruction verification unit; 232. a message determination unit; 233. a file merging unit; 234. and a file decompression unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1
The embodiment provides an automatic log file uploading method for a power acquisition terminal; the method is used for remotely acquiring the log file of the power acquisition terminal, and as shown in fig. 1 and fig. 2, the automatic log file uploading method comprises the following processes:
1. and after the power acquisition terminal detects that the running state is abnormal, the power acquisition terminal sends a fault state mark to the master station server. The fault state mark comprises a fault type and an equipment identification number of the power acquisition terminal.
2. And after receiving the fault state mark sent by any one power acquisition terminal, the master station server sends a self-defined request terminal configuration and information instruction to the corresponding power acquisition terminal, wherein the self-defined request terminal configuration and information instruction comprises reported log information, a server IP (Internet protocol) and port information.
3. And the power acquisition terminal analyzes the message sent by the master station server and verifies the legality of the received user-defined instruction. And after the verification is passed, responding to the instruction and starting a compression task, compressing the specified log file, and then subpackaging and transmitting the compressed file to the specified server and port in the format of the customized file transmission instruction.
4. After receiving a file transmission instruction reported by the power acquisition terminal, the master station server firstly verifies the validity of the instruction; and returning a corresponding confirmation instruction or a non-confirmation instruction to the power acquisition terminal according to the verification result.
5. The power acquisition terminal receives the return instruction and makes the following decisions according to the type of the instruction:
(1) and when the confirmation instruction is received, continuing to report the next frame data.
(2) And when the negative command is received or the return command is received overtime, the current frame data is reported again.
6. And the master station server judges whether all the data are received or not, if so, the received data are combined into a complete file and decompressed to obtain a log file to be transmitted.
In this embodiment, considering that the file capacity of the log file is relatively small and the requirement on the transmission efficiency is not high, it is only necessary to ensure that a complete log file is obtained. Therefore, the power acquisition terminal adopts an asynchronous transmission mode when reporting the compressed file of the log file to the master station server. As shown in table 1 below, the frame format of the transmission data in this embodiment sequentially includes: a start character, an identification length L1, a data length L2, a start character, a control field C, an address field A, link user data, a check code, and an end character.
Table 1: frame format for data transmission between power acquisition terminal and master station server
Initial character (68H)
Mark length L1
Data length L2
Initial character (68H)
Control Domain C
Address domain A
Link user data
Check code CS
Ending character (16H)
Wherein, the identifier length L1 represents the length of the protocol identifier; the data length L2 indicates the length of user data, and both consist of 2 bytes. The control field C indicates information of a message transmission direction and a type of transmission service provided. The address domain A consists of administrative division codes, terminal addresses, master station addresses and group address marks. The check code CS is the arithmetic sum of octets of all bytes of the user data area, regardless of the overflow bit. The user data area comprises three parts of a control field C, an address field A and link user data.
In the log file transmission process of the embodiment, the national grid company enterprise standard of Q/GDW 10376-2019 communication protocol of electricity consumption information acquisition system is adopted. The link user data is the application layer, and the log file transmission process is realized through the link user data of the application layer. As shown in table 2, the format of the link user data sequentially includes: an application layer function code AFN, a frame sequence field SEQ, a plurality of sets of data unit identifications and data units, and an additional information field AUX.
Table 2: format of link user data transmitted between power acquisition terminal and master station server
Application layer function code AFN
Frame sequence domain SEQ
Data unit identification 1
Data unit 1
……
Data unit identification n
Data ofUnit n
Additional information field AUX
The application layer function code AFN is composed of 1 byte and is represented by binary coding. The frame sequence field SEQ is 1 byte and is used to describe the variation rule of the transmission sequence between frames. The data unit mark is composed of information point mark and information type mark, which represents information point and information type. The additional information field consists of a message authentication code field, an event counter and a time tag. The data unit is data organized by data unit identification, including parameters and commands.
In order to realize accurate communication between the server and the power acquisition terminal, the file request and the related instruction of file transmission are customized in the embodiment. The method comprises the following steps: "request terminal configuration and information instruction (AFN ═ 09H)" and "file transfer instruction (AFN ═ 0 FN)". The 'request terminal configuration and information instruction' is sent to the power acquisition terminal by the master station server, and the date and the type of the requested log file, and the IP address and the port of the server to which the log file is required to be sent are specified in the instruction. The file transmission instruction is generated by the power acquisition terminal after responding to the request terminal configuration and information instruction and is sent to the master station server. The "file transmission instruction" includes the packetized data of the complete log file required by the master server.
In this embodiment, as shown in table 3, the format of the customized request terminal configuration and information instruction sequentially includes: log information, a server IP address 1 section, a server IP address 2 section, a server IP address 3 section, a server IP address 4 section and a server port.
Table 3: request terminal configuration and information instruction format and description
Figure GDA0003645350310000071
The byte number of the log information is 1, and the log information is used for recording the date of the log file requested to be transmitted. The server IP address comprises four sections, the number of bytes of each section is 1, the number of bytes of the server port is 2, and the server IP address and the server port are used for indicating the information of the server receiving the log file.
As shown in table 4, the format of the customized file transmission instruction sequentially includes: the total number of messages, the sequence number of the messages, the length of the log and the content of the log.
Table 4: format and description of file transfer instructions
Data content Data format Number of bytes Description of the invention
Total number of messages BIN 2 Total number of framed messages
Message sequence number BIN 2 The log serial number sent this time
Log length BIN 2 Log length contained in current instruction
Log content BIN - Data of log file
The number of bytes of the total number of the messages is 2, and the total number of the messages of the framed log file is represented. The byte number of the message serial number is 2, which is used for representing the serial number of the currently sent framing message. The number of bytes of the log length is 2, which is used for indicating the length of the log file contained in the current instruction. The log content includes the framing message of the currently sent log file.
In the method of this embodiment, the transmission of the log files of the master station server and the power acquisition terminal may be implemented based on conventional ethernet communication or based on a power carrier communication manner. The transmission of the log file can adopt the same channel with other data transmission, and an independent channel can be configured for the transmission of the log file. Particularly, in the transmission process of the log file, the two communication parties should adopt a semi-interlocking or full-interlocking communication mode, so that the reliability of file transmission is improved.
In the method provided by the embodiment, the screening and transmission processes of the log files are completely and automatically completed by the power acquisition terminal according to the request of the master station server, and the log files do not need to be downloaded by an operator in real time. And the power acquisition terminal can contact the master station server at the first time after a fault occurs, and upload related log files. Therefore, the collection efficiency of the log files can be greatly improved, maintenance personnel can obtain fault related data in the first time, and a data base is laid for rapidly recovering normal work of the system.
Example 2
The embodiment provides an automatic log file uploading system of an electric power acquisition terminal, which adopts the automatic log file uploading method of the electric power acquisition terminal in embodiment 1, and when the electric power acquisition terminal fails, automatically reports the failure state of the electric power acquisition terminal to a master station server, and uploads a corresponding log file according to a request of the master station server. As shown in fig. 3, the log file automatic uploading system is a distributed system, and includes a terminal subsystem operating in the power acquisition terminal and a master station subsystem operating in the master station server.
Wherein, the terminal subsystem includes: a local log library 11, a fault status flag sending module 12 and a log request response module 13. The local log library 11 is used for caching all log files recorded in the power acquisition terminal. The fault state flag sending module 12 is configured to obtain a detection result of a self-checking program in the power acquisition terminal, and generate a fault state flag including a fault type and a device identification number of the fault state flag when detecting that an operation state of the power acquisition terminal is abnormal; the fault status flag is sent to the master server. The log request response module 13 is configured to receive and analyze a user-defined request terminal configuration and information instruction sent by the master station server, where the user-defined request terminal configuration and information instruction includes log information, a server IP address, and port information. The log request response module 13 retrieves the local log library 11 according to the log information after the validation instruction is validated, and sends the corresponding log file to the designated server IP address and port in a self-defined file transmission instruction format.
The master station subsystem comprises: a fault status flag receiving module 21, a log requesting module 22 and a log file receiving module 23. The fault state mark receiving module 21 is configured to receive a fault state mark sent by the power acquisition terminal, and then analyze a fault type and an equipment identification number in the fault state mark. The log request module 22 is configured to issue a self-defined request terminal configuration and information instruction to the corresponding power acquisition terminal according to the fault state. The log file receiving module 23 is configured to receive a customized file transmission instruction returned by the power acquisition terminal, and analyze the customized file transmission instruction to obtain a required log file of the power acquisition terminal, which is used for analysis by operation and maintenance staff.
In the present embodiment, as shown in fig. 4, the log request response module 13 includes a request instruction verification unit 131, a log retrieval unit 132, a log compression unit 133, and a log transmission unit 134. The request instruction verifying unit 131 is configured to analyze the self-defined request terminal configuration and information instruction sent by the master station server, and verify the validity of the instruction. The log retrieving unit 132 is configured to retrieve the local log library 11 according to the instruction parsing content after the instruction verifying unit verifies that the log file passes the instruction verifying unit, and screen out a log file meeting the requirement. The log compression unit 133 is configured to compress the filtered log file. The log sending unit 134 is configured to perform packetization on the compressed log file, and then send the packetized data to a designated server IP address and port according to a format of a customized file transmission instruction.
In the present embodiment, as shown in fig. 5, the log file receiving module 23 includes a transmission instruction verifying unit 231, a message determining unit 232, a file merging unit 233, and a file decompressing unit 234. The transmission instruction verification unit 231 is configured to analyze a customized file transmission instruction sent by the power acquisition terminal, and verify the validity of the instruction. The self-defined file transmission instruction comprises the following steps: the total number of messages, the sequence number of the messages, the length of the log and the content of the log. The message determining unit 232 is configured to determine whether all log file contents are received according to the message sequence number in the parsed file transmission instruction. The file merging unit 233 is configured to merge the received packetized data of the log file, so as to obtain a compressed file of the log file. The file decompressing unit 234 is configured to decompress the merged compressed file to obtain a required complete log file.
Specifically, the log file receiving module 23 returns a confirmation command or a denial command after receiving a file transmission command generated by the power collecting terminal. After receiving the confirmation instruction, the log request response module 13 sends next frame data to the master station server; the log request response module 13 resends the data of the current frame after receiving the denial instruction or the return instruction is overtime.
Example 3
The embodiment provides an automatic log file uploading device of a power acquisition terminal, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor. The automatic log file uploading device of the power acquisition terminal completes deployment in a manner of the automatic log file uploading system of the power acquisition terminal in embodiment 2. And implementing the steps of the automatic log file uploading method of the power collection terminal according to embodiment 1 when the processor executes the program.
The computer device may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. The computer device of the embodiment at least includes but is not limited to: a memory, a processor communicatively coupled to each other via a system bus.
In this embodiment, the memory (i.e., the readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device. Of course, the memory may also include both internal and external storage devices for the computer device. In this embodiment, the memory is generally used for storing an operating system, various types of application software, and the like installed in the computer device. In addition, the memory may also be used to temporarily store various types of data that have been output or are to be output.
The processor may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor is typically used to control the overall operation of the computer device. In this embodiment, the processor is configured to run a program code stored in the memory or process data, so as to implement the processing procedure of the method for automatically uploading the log file of the power acquisition terminal in embodiment 1, and further send the log file of the power acquisition terminal to the remote master station server for analysis by an operation and maintenance worker in the first time when the power acquisition terminal fails, so as to complete maintenance of the device in time.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. An automatic log file uploading method for a power acquisition terminal; the method is characterized by being used for remotely acquiring the log file of the power acquisition terminal, and the automatic log file uploading method comprises the following processes:
the power acquisition terminal sends a fault state mark to the master station server after the self-checking program detects that the running state is abnormal; the fault state mark comprises a fault type and an equipment identification number of the power acquisition terminal;
after receiving a fault state mark sent by any one power acquisition terminal, the master station server sends a self-defined request terminal configuration and information instruction to the corresponding power acquisition terminal, wherein the self-defined request terminal configuration and information instruction comprises reported log information, a server IP and port information;
the power acquisition terminal analyzes the message sent by the master station server and verifies the legality of the received user-defined instruction; after the verification is passed, responding to the instruction and starting a compression task, compressing the specified log file, and then subpackaging and transmitting the compressed file to the specified server and port in the format of the customized file transmission instruction;
after receiving a file transmission instruction reported by the power acquisition terminal, the master station server firstly verifies the validity of the instruction; and returning a corresponding confirmation instruction or a non-confirmation instruction to the power acquisition terminal according to the verification result;
the power acquisition terminal receives the return instruction and makes the following decision according to the type of the instruction: (1) when receiving the confirmation instruction, continuing to report the next frame data; (2) when receiving a negative command or receiving a return command overtime, reporting the current frame data again;
and the master station server judges whether the receiving of all the data is finished, if so, the received data is combined into a complete file and decompressed to obtain a log file to be transmitted.
2. The automatic log file uploading method for the power collection terminal according to claim 1, characterized in that: the power acquisition terminal adopts an asynchronous transmission mode when reporting the compressed file of the log file to the master station server, and the frame format of the transmission data sequentially comprises the following steps: the system comprises a start character, an identification length L1, a data length L2, the start character, a control field C, an address field A, link user data, a check code and an end character;
wherein, the identifier length L1 represents the length of the protocol identifier; the data length L2 represents the length of user data, both of which are composed of 2 bytes; the control domain C represents the message transmission direction and the information of the provided transmission service type; the address domain A consists of administrative division codes, terminal addresses, master station addresses and group address marks; the check code CS is the arithmetic sum of octets of all bytes in the user data area, and overflow bits are not considered; the user data area comprises three parts of a control field C, an address field A and link user data.
3. The automatic log file uploading method for the power collection terminal according to claim 2, wherein: the link user data is an application layer, the transmission process of the log file is realized through the link user data of the application layer, and the format of the link user data sequentially comprises the following steps: the system comprises an application layer function code AFN, a frame sequence domain SEQ, a plurality of groups of data unit identifications and data units and an additional information domain AUX;
the application layer function code AFN consists of 1 byte and is represented by binary coding; the frame sequence domain SEQ is 1 byte and is used for describing the change rule of a transmission sequence between frames; the data unit mark is composed of an information point mark and an information type mark and represents an information point and an information type; the additional information field consists of a message authentication code field, an event counter and a time tag; the data unit is data organized by data unit identification, including parameters and commands.
4. The automatic log file uploading method for the power collection terminal according to claim 3, wherein: the self-defined request terminal configuration and information instruction format sequentially comprises: log information, a server IP address 1 section, a server IP address 2 section, a server IP address 3 section, a server IP address 4 section and a server port;
the number of bytes of the log information is 1, and the log information is used for recording the date of the log file requested to be transmitted; the server IP address comprises four sections, the number of bytes of each section is 1, the number of bytes of the server port is 2, and the server IP address and the server port are used for indicating the information of the server receiving the log file.
5. The automatic log file uploading method for the power collection terminal according to claim 4, wherein: the format of the self-defined file transmission instruction sequentially comprises the following steps: the total number of messages, the serial number of the messages, the length of the log and the content of the log;
the byte number of the total number of the messages is 2, and the total number of the messages of the framed log file is used for representing the total number of the messages; the byte number of the message serial number is 2, and the message serial number is used for representing the serial number of the currently sent framing message; the byte number of the log length is 2, and the log length is used for indicating the length of a log file contained in the current instruction; the log content includes the framing message of the currently sent log file.
6. An automatic log file uploading system of an electric power acquisition terminal is characterized in that the automatic log file uploading method of the electric power acquisition terminal is adopted, when the electric power acquisition terminal breaks down, the fault state of the electric power acquisition terminal is automatically reported to a master station server, and a corresponding log file is uploaded according to the request of the master station server; the automatic log file uploading system is a distributed system and comprises a terminal subsystem operating in the power acquisition terminal and a master station subsystem operating in the master station server;
wherein, the terminal subsystem includes: the system comprises a local log library, a fault state mark sending module and a log request response module; the local log library is used for caching all log files recorded in the power acquisition terminal; the fault state mark sending module is used for acquiring a detection result of a self-checking program in the power acquisition terminal, generating a fault state mark containing a fault type and a self equipment identification number when the power acquisition terminal is detected to be abnormal in operation state, and sending the fault state mark to the master station server; the log request response module is used for receiving and analyzing a self-defined request terminal configuration and information instruction sent by the master station server, wherein the self-defined request terminal configuration and information instruction comprises log information, a server IP address and port information, and the log request response module retrieves a local log library according to the log information after verifying that the instruction is legal and sends a corresponding log file to a specified server IP address and port in a self-defined file transmission instruction format;
the master station subsystem comprises: the system comprises a fault state mark receiving module, a log request module and a log file receiving module; the fault state mark receiving module is used for receiving a fault state mark sent by the power acquisition terminal and then analyzing a fault type and an equipment identification number in the fault state mark; the log request module is used for issuing a self-defined request terminal configuration and information instruction to the corresponding power acquisition terminal according to the fault state; the log file receiving module is used for receiving the self-defined file transmission instruction returned by the power acquisition terminal and analyzing the self-defined file transmission instruction to obtain a required log file of the power acquisition terminal for analysis by operation and maintenance personnel.
7. The automatic log file uploading system of the power collection terminal according to claim 6, wherein: the log request response module comprises a request instruction verification unit, a log retrieval unit, a log compression unit and a log sending unit; the request instruction verification unit is used for analyzing the self-defined request terminal configuration and information instruction sent by the master station server and verifying the validity of the instruction; the log retrieval unit is used for retrieving a local log library according to the instruction analysis content after the instruction verification unit passes the verification, and screening out log files meeting the requirements; the log compression unit is used for compressing the screened log files; the log sending unit is used for performing sub-packet processing on the compressed log file and then sending the sub-packet data to a specified server IP address and port according to a self-defined file transmission instruction format.
8. The automatic log file uploading system of the power collection terminal according to claim 7, wherein: the log file receiving module comprises a transmission instruction verification unit, a message judgment unit, a file merging unit and a file decompression unit; the transmission instruction verification unit is used for analyzing a self-defined file transmission instruction sent by the power acquisition terminal and verifying the validity of the instruction; the self-defined file transmission instruction comprises the following steps: the total number of messages, the sequence number of the messages, the length of the log and the content of the log; the message judging unit is used for judging whether the log file contents are completely received according to the message serial number in the analyzed file transmission instruction; the file merging unit is used for merging the received sub-packet data of the log file so as to obtain a compressed file of the log file; and the file decompression unit is used for decompressing the combined compressed file to obtain the required complete log file.
9. The automatic log file uploading system of the power collection terminal according to claim 7, wherein: the log file receiving module returns a confirmation instruction or a denial instruction after receiving a file transmission instruction generated by the power acquisition terminal; and the log request response module sends the next frame of data to the master station server after receiving the confirmation instruction, and resends the data of the current frame after receiving the denial instruction or the return instruction is overtime.
10. The utility model provides a log file automatic uploading device at electric power acquisition terminal which characterized in that: comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that: the automatic log file uploading device of the power acquisition terminal is deployed in a mode of the automatic log file uploading system of the power acquisition terminal as claimed in any one of claims 6 to 9; and implementing the steps of the log file automatic uploading method of the power collecting terminal according to any one of claims 1 to 5 when the processor executes the program.
CN202210365462.8A 2022-04-08 2022-04-08 Automatic log file uploading method and system for power acquisition terminal Active CN114449018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210365462.8A CN114449018B (en) 2022-04-08 2022-04-08 Automatic log file uploading method and system for power acquisition terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210365462.8A CN114449018B (en) 2022-04-08 2022-04-08 Automatic log file uploading method and system for power acquisition terminal

Publications (2)

Publication Number Publication Date
CN114449018A CN114449018A (en) 2022-05-06
CN114449018B true CN114449018B (en) 2022-06-24

Family

ID=81358475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210365462.8A Active CN114449018B (en) 2022-04-08 2022-04-08 Automatic log file uploading method and system for power acquisition terminal

Country Status (1)

Country Link
CN (1) CN114449018B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114996225B (en) * 2022-07-18 2022-11-01 成都中科合迅科技有限公司 Development method for custom visual instrument control of combined instrument
CN115225472A (en) * 2022-07-29 2022-10-21 深圳市星卡软件技术开发有限公司 Log collection method and device and computer equipment
CN115175023B (en) * 2022-09-07 2022-11-08 安徽南瑞中天电力电子有限公司 Photovoltaic inverter-based method, system and device for reading meter of internet of things

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001306427A (en) * 2000-04-21 2001-11-02 Ricoh Co Ltd Remote management system
CN103700235B (en) * 2013-11-20 2016-09-07 国家电网公司 A kind of power information gathers fault detection system and remote channel detection method thereof
CN104065521B (en) * 2014-07-18 2017-09-29 国家电网公司 A kind of collection, analysis and the delivery system and its method of electric power networks device log and configuration file
CN104394020A (en) * 2014-12-04 2015-03-04 国家电网公司 Automatic fault processing and safety control system and method for power information collection device
CN205486746U (en) * 2016-03-16 2016-08-17 国网山东省电力公司莱州市供电公司 Remote measuring and controlling terminal control system's trouble alarm device
CN207301719U (en) * 2017-09-18 2018-05-01 内蒙古自治区大气探测技术保障中心 Remote controllers and automatic weather station
CN109446042B (en) * 2018-10-12 2021-12-14 安徽南瑞中天电力电子有限公司 Log management method and system for intelligent electric equipment
CN109558261B (en) * 2018-11-20 2022-05-03 广东小天才科技有限公司 Method and system for acquiring abnormal log of wearable device
CN109614260B (en) * 2018-11-28 2022-06-03 北京小米移动软件有限公司 Communication failure judgment method and device, electronic equipment and storage medium
CN110324323B (en) * 2019-06-19 2024-01-19 全球能源互联网研究院有限公司 New energy plant station network-related end real-time interaction process anomaly detection method and system
US11157373B2 (en) * 2019-11-04 2021-10-26 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Prioritized transfer of failure event log data
CN114077525A (en) * 2020-08-17 2022-02-22 鸿富锦精密电子(天津)有限公司 Abnormal log processing method and device, terminal equipment, cloud server and system
CN112529223A (en) * 2020-12-24 2021-03-19 同盾控股有限公司 Equipment fault repair method and device, server and storage medium
CN113066276B (en) * 2021-03-18 2022-10-21 国网陕西省电力公司电力科学研究院 Communication fault monitoring method and device for electricity consumption information acquisition system and storage medium

Also Published As

Publication number Publication date
CN114449018A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN114449018B (en) Automatic log file uploading method and system for power acquisition terminal
CN106709069B (en) The big data log collection and transmission method of high reliability
CN102437938B (en) Large-scale network monitoring oriented virtual deployment system and method
CN111475370A (en) Operation and maintenance monitoring method, device and equipment based on data center and storage medium
CN101388903B (en) Mobile enterprise IT standardization management platform
CN104899325A (en) APP (application) acquired data collection method, terminal, server and system
CN109460343A (en) System exception monitoring method, device, equipment and storage medium based on log
CN112822276B (en) Substation control layer communication method and system, electronic equipment and storage medium
CN104468938A (en) Information acquisition and processing methods and related devices as well as mobile terminal and server
CN104394020A (en) Automatic fault processing and safety control system and method for power information collection device
CN107704904B (en) Gas equipment management system and method and mobile terminal
CN112132538A (en) Photovoltaic power generation management system based on NB-IoT
CN110929896A (en) Security analysis method and device for system equipment
CN115277409A (en) Method and device for collecting and reporting buried point data in real time, acquisition system and terminal
CN114143171B (en) Alarm root cause positioning method and system based on TR069 protocol
CN111586022A (en) Firewall opening verification method, electronic device, computer equipment and storage medium
CN111625517B (en) New energy real-time data processing method and device based on change storage
KR102417801B1 (en) Remote meter reading system and its firmware upgrade method
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
CN114387123A (en) Data acquisition management method
CN114143308A (en) File uploading information processing method and device, computer equipment and storage medium
CN112541011A (en) Power grid terminal fault processing method and device based on RPA and AI
CN112448980A (en) Rail transit fault processing system and method
CN111131378A (en) Method and system for supplementing and acquiring real-time data after communication recovery
TWI748672B (en) Automatic meter reading abnormality analysis system and method thereof

Legal Events

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