A log maintenance method, device, apparatus, and storage medium

By remotely transmitting and maintaining log files on terminal devices, the delay problem caused by manual log file acquisition in existing technologies is solved, enabling flexible and efficient log maintenance.

CN115237872BActive Publication Date: 2026-02-06SHANGHAI SIEYUAN HONGRUI AUTOMATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210831807.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-14
Publication Date
2026-02-06
Estimated Expiration
2042-07-14

AI Technical Summary

Technical Problem

The current method of obtaining operation logs for distribution network terminal equipment mainly relies on manual on-site operation, which results in the inability to obtain them in a timely manner and misses the best maintenance time.

Method used

By determining the triggering method for log maintenance needs, a target log file is selected from locally stored log files and sent to the target maintenance party for remote maintenance. The remote transmission and maintenance of log files are achieved by utilizing the Communication Device Class (CDC) protocol and Secure Shell Transfer Protocol (SFTP) of the Universal Serial Bus (USB) bus.

Benefits of technology

It improves the flexibility and efficiency of log maintenance, enables remote log file management without on-site intervention, reduces manual intervention, and improves the timeliness of log acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115237872B_ABST
    Figure CN115237872B_ABST
Patent Text Reader

Abstract

The application discloses a log maintenance method, device and equipment and a storage medium. The method comprises the following steps: if there is a log maintenance requirement, determining a requirement triggering mode of the log maintenance requirement; determining a target log file from a locally stored log file according to the requirement triggering mode, and determining a target maintenance party; and sending the target log file to the target maintenance party, so that the target maintenance party remotely maintains the target log file. According to the scheme provided by the application, the target log file can be determined from the locally stored log file according to the determined requirement triggering mode and sent to the target maintenance party. In this way, the remote maintenance of the log file can be realized, and the flexibility and efficiency of log maintenance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution technology, and in particular to a log maintenance method, apparatus, device, and storage medium. Background Technology

[0002] Most terminal devices currently deployed in the field have the function of generating operation logs, such as distribution terminal devices in the distribution network field.

[0003] However, the existing methods for obtaining operation logs are generally to obtain them manually on-site using a laptop or by manually copying them to a USB drive. This is not conducive to the timely acquisition of operation logs and delays the best window of opportunity for log maintenance.

[0004] Therefore, how to maintain the runtime logs more effectively is an urgent problem to be solved. Summary of the Invention

[0005] This invention provides a log maintenance method, apparatus, device, and storage medium, which can realize remote maintenance of log files and improve the flexibility and efficiency of log maintenance.

[0006] According to one aspect of the present invention, a log maintenance method is provided, comprising:

[0007] If there is a need for log maintenance, determine the triggering method for that need.

[0008] Based on the aforementioned demand triggering method, determine the target log file from the locally stored log files, and determine the target maintenance party;

[0009] The target log file is sent to the target maintainer so that the target maintainer can perform remote maintenance on the target log file.

[0010] According to another aspect of the present invention, a log maintenance apparatus is provided, comprising:

[0011] The first determining module is used to determine the triggering method of the log maintenance requirement if there is a log maintenance requirement.

[0012] The second determination module is used to determine the target log file from the locally stored log files and the target maintenance party according to the demand triggering method.

[0013] The sending module is used to send the target log file to the target maintainer so that the target maintainer can perform remote maintenance on the target log file.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the log maintenance method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the log maintenance method according to any embodiment of the present invention.

[0019] The technical solution of this invention, if there is a log maintenance requirement, determines the triggering method for the log maintenance requirement, and based on the triggering method, determines the target log file from locally stored log files and the target maintainer, and finally sends the target log file to the target maintainer so that the target maintainer can remotely maintain the target log file. In this way, a scheme is provided for determining the target log file from locally stored log files and sending it to the target maintainer based on a determined triggering method, enabling remote log file maintenance and improving the flexibility and efficiency of log maintenance.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart of a log maintenance method provided according to Embodiment 1 of the present invention;

[0023] Figure 2 This is a flowchart of a log maintenance method provided according to Embodiment 2 of the present invention;

[0024] Figure 3 This is a flowchart of a log maintenance method provided according to Embodiment 3 of the present invention;

[0025] Figure 4A This is a flowchart of a log maintenance method provided in Embodiment 4 of the present invention;

[0026] Figure 4B This is a schematic diagram of the log maintenance process provided in Embodiment 4 of the present invention;

[0027] Figure 5 This is a schematic diagram of the structure of a log maintenance device according to Embodiment 5 of the present invention;

[0028] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the log maintenance method of this invention. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first," "objective," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] Example 1

[0032] Figure 1This is a flowchart of a log maintenance method according to Embodiment 1 of the present invention. This embodiment is applicable to the remote maintenance of the operation logs of terminal devices, especially to the remote maintenance of the operation logs of distribution terminals in transformer substations. This method can be executed by a log maintenance device, which can be implemented in software and / or hardware and integrated into an electronic device with log maintenance functionality, such as a distribution terminal in a transformer substation. Here, a transformer substation refers to a power distribution area, specifically the power supply range or region of a transformer. A distribution terminal in a transformer substation refers to terminal equipment configured at the substation site, which may include terminal hardware and field acquisition equipment. The field acquisition equipment can send the collected data to the processing unit of the distribution terminal in the transformer substation for integration via an RS223 / 485 interface. Figure 1 As shown, the method includes:

[0033] S101. If there is a log maintenance requirement, determine the triggering method for the log maintenance requirement.

[0034] Logs are records of the terminal equipment's operational status, representing its real-time operation. For example, logs can be operational logs generated by the terminal hardware during on-site operation. Logs may include timestamps, initiating processes, and record details. Log maintenance requests refer to requests for log maintenance operations, which can include acquiring, querying, reading, compressing, extracting, moving, and removing log files. Request triggering methods refer to the methods used to trigger log maintenance, including external request triggering and local detection triggering. External request triggering is triggered by a log maintenance request issued from outside the distribution terminal (e.g., outside the distribution terminal itself). Local detection triggering is triggered by local detection performed by the distribution terminal itself at the distribution site.

[0035] Optionally, when the distribution terminal detects an external request, such as a log maintenance request issued by a remote device (such as a private network client) configured externally, it can determine that there is a log maintenance requirement and determine that the log maintenance requirement is triggered by an external request.

[0036] Optionally, the distribution terminal of the transformer area can determine that there is a log maintenance requirement when it detects that the locally recorded log meets the preset conditions, such as when the data recorded in the log meets the preset detection conditions, and determine that the log maintenance requirement is triggered by local detection.

[0037] S102. Based on the demand triggering method, determine the target log file from the locally stored log files, and determine the target maintenance party.

[0038] The target log file refers to the log file maintained by the target. The target maintainer refers to the party that performs maintenance operations on the log. For example, the target maintainer can be a private network client configured on an external network for the distribution terminal of the transformer substation. This private network client does not need to be configured at the operating site of the distribution hardware equipment in the transformer substation (i.e., the transformer substation site), and can perform maintenance operations on the log through remote control.

[0039] Optionally, after determining the demand triggering method, the distribution terminal in the transformer area can filter the locally stored log files according to preset rules and use the stored log files that meet the filtering conditions as the target log files, that is, determine the target log files from the locally stored log files; or it can input the determined demand triggering method and all locally stored log files into a pre-trained model and directly output the target log files, that is, determine the target log files from the locally stored log files.

[0040] Optionally, the distribution terminal of the transformer area can directly determine the target maintenance party associated with the demand triggering method according to preset rules when the demand triggering method is external triggering, i.e., determine the target maintenance party; or, after determining the target log file, it can analyze the target log file according to preset rules to determine the target maintenance party associated with the target log file, i.e., determine the target maintenance party.

[0041] S103. Send the target log file to the target maintainer so that the target maintainer can perform remote maintenance on the target log file.

[0042] Remote maintenance refers to the maintenance performed remotely by the target maintenance party, which is not located at the terminal site, on the operation logs of the distribution terminal in the transformer substation that is located at the terminal site.

[0043] Optionally, after the distribution terminal in the transformer area determines the target log file and the target maintenance party, it can establish a communication channel with the target maintenance party according to preset rules, interact with the target maintenance party in real time, and send the determined target log file to the target maintenance party.

[0044] Optionally, the target log file can be sent to the target maintenance party in the following ways: using a communication device class CDC protocol based on the Universal Serial Bus (USB) to transfer the target log file to the local communication module via a USB interface; or using a Secure Shell Transfer Protocol (SFTP) and a Power Virtual Private Network (PVN) to send the target log file to the target maintenance party via a communication module.

[0045] USB (Universal Serial Bus) refers to the commonly used universal serial bus. CDC (Communication Device Class) protocol refers to the communication device class protocol of the USB bus. The local communication module refers to the module used for communication with the target maintenance party. The local communication module is configured at the distribution terminal site in the transformer substation, i.e., located locally within the distribution terminal. SFTP (SSH File Transfer Protocol) is a secure file transfer protocol based on SSH (Secure Shell). A power virtual private network (VPN) refers to a secure communication network established between devices located at great distances via the Internet. In this embodiment, the power VPN can be the power communication network for power distribution and consumption accessed by the distribution terminal in the transformer substation, also known as the terminal access network.

[0046] Optionally, the distribution terminal can, based on the CDC protocol of the USB bus, first transfer the target log file from the terminal hardware to the communication module at the terminal site via the USB interface, that is, transfer the target log file to the local communication module.

[0047] Furthermore, the communication module can wirelessly send the target log file to the target maintenance party based on the pre-configured power virtual private network and following the SFTP protocol for network interaction. In other words, the target log file can be sent from the communication module to the target maintenance party.

[0048] Optionally, after the distribution terminal sends the target log file to the target maintenance party, the target maintenance party can obtain the target log file, and then perform query operations on the log file, and / or read the data recorded in the log file, and / or compress the log file, and / or extract the feature information of the data in the log file, and / or send instructions to the distribution terminal to make the distribution terminal move or remove the corresponding log file, thereby realizing remote maintenance.

[0049] The technical solution of this invention, if there is a log maintenance requirement, determines the triggering method for the log maintenance requirement, and based on the triggering method, determines the target log file from locally stored log files and the target maintainer, and finally sends the target log file to the target maintainer so that the target maintainer can remotely maintain the target log file. In this way, a scheme is provided for determining the target log file from locally stored log files and sending it to the target maintainer based on a determined triggering method, enabling remote log file maintenance and improving the flexibility and efficiency of log maintenance.

[0050] Example 2

[0051] Figure 2This is a flowchart of a log maintenance method according to Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further explains in detail how to determine the target log file from locally stored log files and the process of determining the target maintenance party when the demand triggering method is external request triggering. Figure 2 As shown, the method includes:

[0052] S201. If there is a need for log maintenance, determine the triggering method for the log maintenance need.

[0053] S202. If the requirement is triggered by an external request, the external requester shall be designated as the target maintainer, and the target maintainer shall be subject to security authentication.

[0054] In this context, the external requester refers to a device located outside the distribution terminal of the transformer substation that can issue log maintenance requests, such as a private network client configured in a power virtual private network (VPN). The private network client can be a specific computer. Security authentication refers to the authentication of the target maintenance party's identity.

[0055] Optionally, each external request corresponds to an external requester, which can identify a target maintainer.

[0056] Optionally, if the demand is triggered by an external request, the external requester can be identified based on the content of the received log maintenance request, and designated as the target maintenance party. For example, at least one private network client can be configured outside the distribution terminal. If at least one private network client sends a log maintenance request to the distribution terminal, the distribution terminal can parse the request upon detecting it, determine the maintenance party identifier contained within the request, and designate the external requester corresponding to that identifier as the target maintenance party.

[0057] Optionally, the distribution terminal in the transformer area can perform security authentication on the target maintenance party based on the verification information contained in the external request, such as the username and password of the external requester. Specifically, it can first determine the username in the request, match it with the pre-stored username and password database to determine the correct password for the username, and compare the correct password with the verification password contained in the request to determine whether the two are consistent. If they are consistent, the security authentication of the target maintenance party is considered to be successful, and step S203 is executed. If not, the process ends, and no log file is sent to the target maintenance party.

[0058] S203. If authentication is successful, determine the maintenance permissions of the target maintainer.

[0059] Maintenance permissions can characterize the scope of log file maintenance that the target maintainer can perform. For example, maintenance permissions can characterize whether the target maintainer can access log files and how long ago the log files can be accessed.

[0060] Optionally, if authentication is successful, the distribution terminal in the transformer area can match the target maintenance party's username or other identification information with a pre-stored table that corresponds one-to-one between usernames or other identification information and maintenance permissions to determine the target maintenance party's maintenance permissions; or the target maintenance party's username or other identification information can be input into a pre-trained model to directly output the target maintenance party's maintenance permissions.

[0061] S204. Based on maintenance permissions, determine the target log file from the locally stored log files.

[0062] Among them, the target log file refers to the log file sent by the target distribution terminal to the target maintenance party.

[0063] Optionally, the distribution terminal can determine the log files that the target maintenance party has the authority to maintain from the stored log files based on the maintenance permissions of the target maintenance party. Based on the request information in the external request and the preset conditions, it can filter the locally stored log files and select the log files that meet the filtering conditions and that the target maintenance party has the authority to maintain as the target log files, thus determining the target log files.

[0064] For example, the time period information requested in the external request to obtain log files can be determined, such as obtaining log files generated between May 1 and May 5, 2012. Based on maintenance permissions, it can be determined whether the target maintenance party has the permission to obtain log files for the corresponding time period. If so, the stored log files are filtered according to the time period information, and the log files for the corresponding time period (i.e., May 1 to May 5, 2012) are selected as the target log files. If not, the process ends, and the target log files are not sent to the target maintenance party.

[0065] Optionally, if the maintenance permissions only allow access to a portion of the requested log files, then only the log files within the permission scope can be used as the target log files. For example, if the target maintainer requests log files generated between May 1st and May 5th, 2012, and based on the target maintainer's maintenance permissions, it is determined that it only has permission to access log files generated between May 2nd and May 5th, 2012, then based on the maintenance permissions and the time period information in the external request, the target log files can be determined to be the log files from May 2nd to May 5th, 2012.

[0066] S205. Send the target log file to the target maintainer so that the target maintainer can perform remote maintenance on the target log file.

[0067] In the technical solution of this invention embodiment, if the demand is triggered by an external request, the external requester is taken as the target maintenance party, and the target maintenance party is security authenticated. If the authentication is successful, the maintenance authority of the target maintenance party is determined. Finally, based on the maintenance authority, the target log file is determined from the locally stored log files and sent to the target maintenance party for log maintenance. In this way, a feasible implementation method is provided for a maintenance party outside the transformer area to send a log maintenance request and perform log maintenance remotely, which can improve the flexibility and efficiency of log maintenance.

[0068] Example 3

[0069] Figure 3 This is a flowchart of a log maintenance method according to Embodiment 3 of the present invention. Based on the above embodiments, this embodiment further explains in detail how, when the demand triggering method is local detection triggering, the target log file is determined from the locally stored log files, and the process of determining the target maintenance party. Figure 3 As shown, the method includes:

[0070] S301. If there is a log maintenance requirement, determine the triggering method for the log maintenance requirement.

[0071] S302. If the requirement is triggered by local detection, then determine the target detection event that triggers the log maintenance requirement.

[0072] Among them, target detection events refer to events that indicate the need for log maintenance, and can characterize the reason triggering the log maintenance requirement. Target detection events can include abnormal data detection events and data volume detection events. Specifically, abnormal data detection events refer to events that detect abnormal data contained in the log file. Data volume detection events refer to events that detect that the data contained in the log file exceeds a data volume threshold.

[0073] Optionally, the distribution terminal in the transformer area can detect the data contained in the locally stored log file in real time or at preset intervals during the log recording process. If the detected data meets the preset detection conditions, the log maintenance requirement is triggered. In this case, the requirement is triggered by local detection.

[0074] Optionally, if the requirement is triggered by local detection, the target detection event that triggers the log maintenance requirement can be determined based on the detection conditions met by the data that triggers the log maintenance requirement, according to preset rules.

[0075] Optionally, if, according to preset rules, it is determined that the data contained in the log file is different from the pre-stored expected data, then the data can be considered erroneous, and the target detection event that triggers the log maintenance requirement is determined as an abnormal data detection event.

[0076] Optionally, if the amount of data contained in the log file is determined to be greater than the preset data volume threshold according to the preset rules, it can be considered that the number of logs stored locally is too large. In this case, the target detection event that triggers the log maintenance requirement is determined to be the data volume detection event.

[0077] S303. Based on the target detection event, determine the target log file from the locally stored log files.

[0078] Optionally, the determined target detection event can be input into a pre-trained model and the target log file can be output, i.e., the target log file can be determined from the locally stored log files. Alternatively, the target log file can be determined from the locally stored log files based on the type of the target detection event according to preset rules. Specifically, determining the target log file from the locally stored log files based on the target detection event includes: if the target detection event is an abnormal data detection event, then the locally stored log files associated with the abnormal data are used as the target log files; if the target detection event is a data volume detection event, then all locally stored log files are used as the target log files.

[0079] For example, if the target detection event is an abnormal data detection event, then the log file containing the abnormal data is determined, that is, the locally stored log file associated with the abnormal data is determined, and that file is used as the target log file; if the target detection event is a data volume detection event, that is, the log file stores too much data, then all locally stored log files need to be filtered and deleted, so all locally stored log files are used as the target log files.

[0080] S304. Determine the target maintainer associated with the target log file from the optional maintainers.

[0081] In this context, "optional maintenance party" refers to all maintenance parties associated with the distribution terminal in the transformer area, such as all private network clients pre-configured in the power virtual private network. "Target maintenance party" refers to the maintenance party to which the log file is sent.

[0082] Optionally, the power distribution equipment in the distribution area performs local testing, triggering log maintenance requirements. After the target log file is determined, the target maintenance party associated with the target log file can be determined according to preset rules. For example, if the target detection event is a data volume detection event, the maintenance party with permission to store the log file can be designated as the target maintenance party, thus determining the target maintenance party associated with the target log file.

[0083] S305. Send the target log file to the target maintainer so that the target maintainer can perform remote maintenance on the target log file.

[0084] Optionally, if the target detection event is a data volume detection event, all log files stored locally will be sent as target log files to the target maintainer. The target maintainer can then remotely store the target log file and remotely control the terminal equipment in the control area to delete the target log file, thus completing the remote maintenance of the target log file by the target maintainer.

[0085] The technical solution of this invention, if the demand triggering method is local detection triggering, determines the target detection event that triggers the log maintenance demand, determines the target log file from the locally stored log files based on the target detection event, determines the target maintenance party associated with the target log file from the optional maintenance parties, and sends the target log file to the target maintenance party for log maintenance. In this way, a feasible implementation method is provided for the transformer equipment terminal located at the transformer site to actively trigger the log maintenance request and request a maintenance party not at the transformer site to remotely perform log maintenance, which can improve the flexibility and efficiency of log maintenance.

[0086] Example 4

[0087] Figure 4A This is a flowchart of a log maintenance method provided in Embodiment 4 of the present invention. Figure 4B This is a schematic diagram of the log maintenance process provided in Embodiment 4 of the present invention. Based on the above embodiments, this embodiment further explains in detail how to generate and store log files, such as... Figure 4A As shown, the method includes:

[0088] S401. Obtain the terminal hardware's operation record data and operating status.

[0089] In this context, "terminal hardware" refers to the hardware equipment within the distribution terminal located at the distribution area site. "Operational record data" refers to the data recorded by the distribution terminal during the operation of the terminal hardware. "Operational status" refers to the operational status of the terminal hardware, which can include normal and abnormal states.

[0090] Optionally, the distribution terminal in the transformer substation can be configured with a large-capacity storage module locally. During the operation of the terminal hardware, the storage module can generate and store operational log data and operational status information in real time. Correspondingly, the distribution terminal can obtain the operational log data and operational status of the terminal hardware from the storage module in real time.

[0091] S402. Generate a log file to be stored based on the running record data and running status.

[0092] The log files to be stored refer to the log files that are intended to be stored locally. These log files can include normal log files and error / exception log files.

[0093] Normal log entries mainly include power supply on / off status, terminal process startup and termination, uplink communication interaction records, downlink communication interaction records, operating status of field acquisition equipment, on / off status of terminal hardware, and online / offline records of field equipment. Uplink communication refers to communication between the distribution terminal and the master station, while downlink communication refers to communication between the distribution terminal and the field acquisition equipment. Error / abnormal log entries mainly include power supply exceeding limits, unexpected terminal process crashes, prolonged unresponsiveness of a process, terminal hardware temperature exceeding limits, communication link failures, prolonged lack of data interaction with the master station, and communication timeouts with field acquisition equipment, etc.

[0094] Optionally, the distribution area can analyze the operation record data and operation status based on preset rules, store the operation record data corresponding to the terminal hardware in normal operation status into a normal flow log file to be stored, store the operation record data corresponding to the terminal hardware in abnormal operation status into an error and exception log file to be stored, and then integrate the normal flow log file and the error and exception log file to generate a log file to be stored. That is, the log file to be stored is generated based on the operation record data and operation status.

[0095] Optionally, based on the running record data and running status, a log file to be stored is generated, including: generating an initial log file based on the running record data and running status; if it is determined that the remaining local storage space is insufficient based on the size of the log file, the initial log file is filtered and / or compressed to obtain the log file to be stored.

[0096] Optionally, the operation record data and operation status of each terminal hardware can be grouped into a set according to preset rules and stored sequentially into the initial log file, thus generating the initial log file.

[0097] Optionally, after generating the initial log file, the size relationship between the generated initial log file and the remaining local storage space can be determined. If the size of the generated initial log file is larger than the size of the remaining local storage space, i.e., the remaining local storage space is insufficient, the initial log file can be filtered and / or compressed to obtain the log file to be stored. Specifically, log files with higher importance or more recent recording dates can be selected as the log files to be stored according to preset filtering rules; alternatively, the initial log file can be compressed according to a preset high compression ratio algorithm, and the compressed log file can be used as the log file to be stored; alternatively, the initial log file can be filtered and / or compressed simultaneously according to the above filtering and compression methods to obtain the log file to be stored. This embodiment does not limit this.

[0098] It should be noted that by filtering and / or compressing the initial log files, the size of the determined log files to be stored can be greatly reduced, thereby saving bandwidth in the power virtual private network and improving the transmission efficiency of log files.

[0099] S403. Store the log file to be stored locally.

[0100] Optionally, after generating the log file to be stored based on the operation record data and operation status, the log file to be stored can be stored locally based on the file system of the distribution terminal in the transformer area. It should be noted that the file system mentioned in this embodiment refers to the system that organizes and allocates the log file storage space, is responsible for storing the log file, and protects the stored log file.

[0101] S404. If there is a log maintenance requirement, determine the triggering method for the log maintenance requirement.

[0102] S405. Based on the demand triggering method, determine the target log file from the locally stored log files, and determine the target maintenance party.

[0103] S406. Send the target log file to the target maintainer so that the target maintainer can perform remote maintenance on the target log file.

[0104] The technical solution of this invention provides that the distribution terminal in the transformer area obtains the operation record data and operation status of the terminal hardware, generates a log file to be stored based on the operation record data and operation status, and stores the log file to be stored locally. This provides an implementation method for generating and storing log files, which facilitates the identification of the target log file and its transmission to the target maintenance party when log maintenance needs are subsequently detected, thereby improving log maintenance efficiency.

[0105] Preferred, see Figure 4BThe distribution terminal configured at the transformer substation site can execute a solid-line connection, while the power virtual private network (VPN) and the private network client configured in the remote power company's computer room can execute a dashed-line connection. The distribution terminal's file system integrates the terminal hardware's operational records and status to generate log files, which are stored in a large-capacity storage module. This large-capacity storage is used to store the terminal's system, programs, data, and operational logs. The communication module (such as the State Grid communication module) provides a fixed IP address and port through a private network SIM card, enabling access to the power VPN while ensuring secure data transmission from the distribution terminal. The communication module's CDC protocol communication device class establishes a soft connection with the file system.

[0106] The distribution terminal in the transformer area can accept external requests sent by the private network client based on the SFTP protocol. After determining the target log file according to the method described in the above embodiments, the target log file is transmitted to the communication module through the CDC protocol of the USB interface. The communication module can wirelessly send the target log file to the private network client based on the power virtual private network.

[0107] Example 5

[0108] Figure 5 This is a schematic diagram of a log maintenance device according to Embodiment 5 of the present invention. The log maintenance device provided by the embodiment of the present invention can execute the log maintenance method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0109] like Figure 5 As shown, the device includes:

[0110] The first determining module 501 is used to determine the triggering method of the log maintenance requirement if there is a log maintenance requirement.

[0111] The second determining module 502 is used to determine the target log file from the locally stored log files and the target maintenance party according to the demand triggering method.

[0112] The sending module 503 is used to send the target log file to the target maintainer so that the target maintainer can perform remote maintenance on the target log file.

[0113] The technical solution of this invention, if there is a log maintenance requirement, determines the triggering method for the log maintenance requirement, and based on the triggering method, determines the target log file from locally stored log files and the target maintainer, and finally sends the target log file to the target maintainer so that the target maintainer can perform remote maintenance on the target log file. In this way, a scheme is provided to determine the target log file from locally stored log files and send it to the target maintainer based on a determined triggering method, thereby realizing remote log file maintenance and improving the flexibility and efficiency of log maintenance.

[0114] Furthermore, the second determining module 502 is specifically used for:

[0115] If the requirement is triggered by an external request, then the external requester will be designated as the target maintainer, and the target maintainer will be subject to security authentication.

[0116] If authentication is successful, the maintenance permissions of the target maintainer are determined;

[0117] Based on the maintenance permissions, determine the target log file from the locally stored log files.

[0118] Furthermore, the second determining module 502 may include:

[0119] The first determining unit is used to determine the target detection event that triggers the log maintenance requirement if the requirement triggering method is local detection triggering.

[0120] The second determining unit is used to determine the target log file from the locally stored log files based on the target detection event;

[0121] The third determining unit is used to determine the target maintainer associated with the target log file from the optional maintainers.

[0122] Furthermore, the second determining unit is specifically used for:

[0123] If the target detection event is an abnormal data detection event, then the locally stored log file associated with the abnormal data will be used as the target log file;

[0124] If the target detection event is a data volume detection event, then all locally stored log files will be used as target log files.

[0125] Furthermore, the sending module 503 is specifically used for:

[0126] The target log file is transmitted to the local communication module via the USB interface using the CDC protocol of the Universal Serial Bus (USB).

[0127] Based on the Secure Frame Transfer Protocol (SFTP) and the Power Virtual Private Network (PVN), the target log file is sent to the target maintenance party through the communication module.

[0128] Furthermore, the aforementioned device also includes:

[0129] The acquisition module is used to acquire the terminal hardware's operation record data and operating status;

[0130] The generation module is used to generate a log file to be stored based on the running record data and the running status;

[0131] A storage module is used to store the log file to be stored locally.

[0132] Furthermore, the generation module is specifically used for:

[0133] An initial log file is generated based on the operation record data and the operation status;

[0134] If, based on the size of the log file, it is determined that the remaining local storage space is insufficient, the initial log file is filtered and / or compressed to generate a log file to be stored.

[0135] Example 6

[0136] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the log maintenance method of this invention. Figure 6 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0137] like Figure 6As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0138] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0139] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as log maintenance methods.

[0140] In some embodiments, the log maintenance method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the log maintenance method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the log maintenance method by any other suitable means (e.g., by means of firmware).

[0141] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0142] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0143] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0144] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0145] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0146] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0147] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0148] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A log maintenance method characterized by, executed by a terminal distribution terminal, comprising: if there is a log maintenance requirement, determining a requirement trigger mode of the log maintenance requirement; determining a target log file from the locally stored log files and determining a target maintenance party according to the requirement trigger mode; the requirement trigger mode comprises an external request trigger and a local detection trigger mode; the external request trigger refers to a log maintenance mode triggered by a log maintenance request from outside the terminal distribution terminal; the local detection trigger mode refers to a log maintenance mode triggered by local detection of the terminal distribution terminal configured at the terminal site; sending the target log file to the target maintenance party to enable the target maintenance party to remotely maintain the target log file; the remote maintenance refers to the maintenance of the operation log of the terminal distribution terminal configured at the terminal site by the target maintenance party not set at the terminal site; wherein, determining a target log file from the locally stored log files and determining a target maintenance party according to the requirement trigger mode, comprises: if the requirement trigger mode is a local detection trigger, determining a target detection event triggering the log maintenance requirement; determining a target log file from the locally stored log files according to the target detection event; determining a target maintenance party associated with the target log file from the optional maintenance parties.

2. The method of claim 1, wherein, determining a target log file from the locally stored log files and determining a target maintenance party according to the requirement trigger mode, comprises: if the requirement trigger mode is an external request trigger, taking an external request party as a target maintenance party and performing security authentication on the target maintenance party; if the authentication is passed, determining a maintenance right of the target maintenance party; determining a target log file from the locally stored log files according to the maintenance right.

3. The method of claim 1, wherein, determining a target log file from the locally stored log files according to the target detection event, comprises: if the target detection event is an abnormal data detection event, taking a locally stored log file associated with the abnormal data as a target log file; if the target detection event is a data volume detection event, taking all the locally stored log files as target log files.

4. The method of claim 1, wherein, sending the target log file to the target maintenance party, comprises: transmitting the target log file to a local communication module through a USB interface based on a communication device class (CDC) protocol of a universal serial bus (USB) bus; sending the target log file to the target maintenance party through the communication module based on a secure shell file transfer protocol (SFTP) protocol and a power virtual private network (VPN).

5. The method of claim 1, wherein, further comprising: acquiring operation record data and an operation state of terminal hardware; generating a to-be-stored log file according to the operation record data and the operation state; locally storing the to-be-stored log file.

6. The method of claim 5, wherein, generating a to-be-stored log file according to the operation record data and the operation state, comprises: generating an initial log file according to the operation record data and the operation state; If it is determined that the local remaining storage space is insufficient according to the size of the log file, the initial log file is filtered and / or compressed to generate a log file to be stored.

7. A log maintenance apparatus characterized by comprising: The device is configured in a terminal distribution terminal, and comprises: The first determining module is configured to determine a demand triggering mode of the log maintenance demand if the log maintenance demand exists; The second determining module is configured to determine a target log file from the locally stored log files and determine a target maintenance party according to the demand triggering mode; the demand triggering mode comprises an external request triggering mode and a local detection triggering mode; the external request triggering mode refers to a mode of maintaining the log triggered by a log maintenance request from outside the terminal distribution terminal; the local detection triggering mode refers to a mode of maintaining the log triggered by the terminal distribution terminal configured in the terminal site after local detection; The sending module is configured to send the target log file to the target maintenance party, so that the target maintenance party remotely maintains the target log file; the remote maintenance refers to the maintenance of the operation log of the terminal distribution terminal configured in the terminal site by the target maintenance party not set in the terminal site; The second determining module comprises: The first determining unit is configured to determine a target detection event triggering the log maintenance demand if the demand triggering mode is the local detection triggering mode; The second determining unit is configured to determine a target log file from the locally stored log files according to the target detection event; The third determining unit is configured to determine a target maintenance party associated with the target log file from optional maintenance parties.

8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the log maintenance method in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the log maintenance method in any one of claims 1-6 when executed.

Citation Information

Patent Citations

  • Log processing method and device, computer equipment and storage medium

    CN113918526A

  • Log information processing method and device, electronic equipment and readable storage medium

    CN114722018A