Operation and maintenance operation data processing method and system and electronic equipment
By hashing operations and blockchain comparison of operation data in the civil aviation business operation environment, we verify whether the data has been tampered with during off-chain storage, solving the problem of data being tampered with between operation and maintenance links, and realizing the immutability and transparency of the data.
Patent Information
- Application Number
- CN202411894628.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-18
AI Technical Summary
In the civil aviation business operation environment, data may be tampered with when safety production incidents occur between various operation and maintenance links, resulting in increased transparency and difficulty in accountability.
By responding to the data audit request, the target operation data is determined and hashed it to obtain the target hash value. Comparing the target hash value with the preset hash value stored on the blockchain to obtain the data audit results, thereby verifying whether the data has been tampered with during off-chain storage.
It realizes the immutability of data between various operation and maintenance links in the civil aviation business operation environment, ensures data transparency and accountability, and thus solves the problem of data tampering.
Smart Images

Figure CN119848922A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method, system and electronic device for processing operation and maintenance data. Background Art
[0002] The civil aviation business operation environment is an operation and maintenance chain with multiple users responsible for different links. The operation and maintenance operations in each link may affect the safe production of civil aviation business. Taking departure as an example, the entire operation and maintenance chain includes: airports, network operators, air traffic information, GDS or foreign airlines. When the operation and maintenance operations cause a safety production incident, due to business or other reasons for accountability, concealment and buck-passing may occur between the various operation and maintenance links.
[0003] Therefore, civil aviation customers have a demand for transparency in operations at all links in the operation and maintenance chain. However, in the current civil aviation business operation environment, when operation and maintenance operations cause production safety incidents, data may be tampered with between operation and maintenance links due to business or other accountability reasons.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method, system and electronic device for processing operation and maintenance data, so as to at least solve the technical problem of data tampering between operation and maintenance links in the related art.
[0006] According to one aspect of an embodiment of the present invention, a method for processing operation and maintenance data is provided, including: in response to receiving a data audit request, determining target operation and maintenance operation data corresponding to the data audit request; when the target operation and maintenance operation data is operation data corresponding to a write operation, performing a hash operation on the target operation and maintenance operation data to obtain a target hash value; comparing the target hash value with a preset hash value to obtain an audit result corresponding to the data audit request, wherein the preset hash value is used to represent the hash value corresponding to the target operation and maintenance operation data stored on the blockchain, and the audit result is used to represent whether the audit of the target operation and maintenance operation data is successful.
[0007] Furthermore, the target hash value is compared with a preset hash value corresponding to the target operation and maintenance data on the blockchain to obtain an audit result corresponding to the data audit request, including: when the target hash value is the same as the preset hash value, the audit result is determined to be a successful audit of the target operation and maintenance data; when the target hash value is different from the preset hash value, the audit result is determined to be a failed audit of the target operation and maintenance data.
[0008] Furthermore, the method also includes: collecting multiple operation and maintenance operation data from the operation log file according to a preset data collection method; extracting key information from the multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, wherein the key operation and maintenance operation information includes: operation subject, operation time, operation object, operation action and preset hash value; and storing the key operation and maintenance operation information in the blockchain.
[0009] Furthermore, the preset data collection method is constructed based on the information items included in the key operation and maintenance operation information.
[0010] Furthermore, key information is extracted from multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, including: preprocessing the operation and maintenance operation data to obtain the operation subject and operation time in the operation and maintenance operation data; extracting information from the operation and maintenance operation data based on the target language corresponding to the operation and maintenance operation data to obtain the operation object and operation action in the operation and maintenance operation data; performing hash operation on the operation and maintenance operation data to obtain a preset hash value corresponding to the operation and maintenance operation data; assembling the operation subject, operation time, operation object, operation action and preset hash value to obtain key operation and maintenance operation information.
[0011] Furthermore, based on the target language corresponding to the operation and maintenance operation data, information is extracted from the operation and maintenance operation data to obtain operation objects and operation actions in the operation and maintenance operation data, including: when the target language is not a natural language, based on the information extraction rules corresponding to the operation and maintenance operation data, determining whether the operation and maintenance operation data is operation data corresponding to a write operation, and when the operation and maintenance operation data is operation data corresponding to a write operation, extracting key information from the operation and maintenance operation data to obtain operation objects and operation actions; when the target language is a natural language, classifying the operation and maintenance operation data using an operation classification model to determine whether the operation and maintenance operation data is operation data corresponding to a write operation, and when the operation and maintenance operation data is operation data corresponding to a write operation, processing the operation and maintenance operation data using a natural language library to obtain operation objects and operation actions.
[0012] Furthermore, the key operation and maintenance information and the preset hash value are stored in the blockchain, including: based on a preset data model, the key operation and maintenance information and the preset hash value are assembled to generate a target string; and the target string is stored in the blockchain.
[0013] According to another aspect of an embodiment of the present invention, a system for processing operation and maintenance data is also provided, including: a data collection module, used to collect multiple operation and maintenance operation data from an operation log file according to a preset data collection method; a data processing module, used to extract key information from multiple operation and maintenance operation data, and obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, wherein the key operation and maintenance operation information includes: operation subject, operation time, operation object, operation action and preset hash value; an information chain module, used to store the key operation and maintenance operation information in a blockchain.
[0014] Furthermore, the data processing module includes: a preprocessing component, which is used to preprocess the operation and maintenance operation data to obtain the operation subject and operation time in the operation and maintenance operation data; an analysis component, which is used to extract information from the operation and maintenance operation data based on the target language corresponding to the operation and maintenance operation data to obtain the operation object and operation action in the operation and maintenance operation data, and perform hash operation on the operation and maintenance operation data to obtain a preset hash value corresponding to the operation and maintenance operation data; an assembly component, which is used to assemble the operation subject, operation time, operation object, operation action and preset hash value to obtain key operation and maintenance operation information.
[0015] Furthermore, the analysis component includes: a rule analysis component for determining, when the target language is not a natural language, whether the operation and maintenance operation data is operation data corresponding to a write operation based on information extraction rules corresponding to the operation and maintenance operation data, and when the operation and maintenance operation data is operation data corresponding to a write operation, extracting key information from the operation and maintenance operation data to obtain an operation object and an operation action; an intelligent analysis component for classifying the operation and maintenance operation data using an operation classification model when the target language is a natural language, determining whether the operation and maintenance operation data is operation data corresponding to a write operation, and when the operation and maintenance operation data is operation data corresponding to a write operation, processing the operation and maintenance operation data using a natural language library to obtain an operation object and an operation action.
[0016] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0017] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0018] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0019] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0020] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0021] In an embodiment of the present invention, in response to receiving a data audit request, the target operation and maintenance operation data corresponding to the data audit request is determined; when the target operation and maintenance operation data is the operation data corresponding to the write operation, the target operation and maintenance operation data is hashed to obtain the target hash value; the target hash value is compared with the preset hash value to obtain the audit result corresponding to the data audit request, wherein the preset hash value is used to characterize the hash value corresponding to the target operation and maintenance operation data stored on the blockchain, and the audit result is used to characterize whether the target operation and maintenance operation data is successfully audited. It is easy to notice that by comparing the target hash value obtained by performing a hash operation on the target operation and maintenance operation data with the preset hash value, it is possible to verify whether the target operation and maintenance operation data has been tampered with during the off-chain storage period. Further, due to the tamper-proof characteristics of the blockchain, once the preset hash value is stored on the chain, it cannot be modified, achieving the purpose of preventing the data between the operation and maintenance links from being tampered with, thereby achieving the technical effect of ensuring that the data between the operation and maintenance links cannot be tampered with, thereby solving the technical problem of data tampering between the operation and maintenance links in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0023] Figure 1 is a flow chart of a method for processing operation and maintenance data according to an embodiment of the present invention;
[0024] Figure 2 is a flowchart of an optional method for processing operation and maintenance data according to an embodiment of the present invention;
[0025] Figure 3 is a schematic diagram of an optional system for processing operation and maintenance data according to an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of an optional system for processing operation and maintenance data taking public domain operation and maintenance data as an example according to an embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of a system for processing operation and maintenance data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] According to an embodiment of the present invention, an embodiment of a method for processing operation and maintenance data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] Figure 1 is a flow chart of a method for processing operation and maintenance data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0032] Step S102: in response to receiving the data audit request, determining target operation and maintenance data corresponding to the data audit request.
[0033] The above data audit request may be a request entered by a user in the interactive interface of the client for auditing the operation and maintenance data. The above target operation and maintenance data may be the operation and maintenance data that needs to be audited corresponding to the data audit request. The operation and maintenance data is the operation data that records the safety operation conditions in the production process, which is convenient for verification and tracing.
[0034] In an optional embodiment, in order to solve the technical problem of data tampering between various operation and maintenance links in the related technology, an embodiment of the present invention discloses a method for processing operation and maintenance operation data. First, when a data audit request input by a user in the interactive interface of a client is received, the target operation and maintenance operation data corresponding to the data audit request can be determined. For example, after receiving the data audit request, the internal production system can first parse the data audit request and understand the key elements in the data audit request, such as the audit time range, operator, operation object or operation type. This information will be used as the basis for screening the target operation and maintenance operation data. Secondly, the production system can query the relevant operation and maintenance operation records in the off-chain database according to the time range, operator and other information specified in the audit request. Since the off-chain stores complete operation and maintenance operation data, including but not limited to write operation data, the off-chain data can provide more detailed audit information. For the write operation data queried off-chain, its integrity needs to be further verified. When it is judged that the off-chain data is complete, the target operation and maintenance operation information, such as operation time, operator, operation type, operation object, etc., can be extracted from the data. This information will be used for further audit analysis, such as judging the compliance of the operation, the correlation between the operation and the fault, etc.
[0035] It should be noted that the integrity of off-chain data can be determined by calculating the hash value of the off-chain data and comparing it with the hash value stored on the chain. If the hash values match, it means that the data has not been tampered with and can be used as an audit basis; if they do not match, it means that the data may have been tampered with, and the key operation and maintenance information on the chain should be used as the basis.
[0036] Step S104: When the target operation data is operation data corresponding to a write operation, a hash operation is performed on the target operation data to obtain a target hash value.
[0037] The above-mentioned write operation may be an operation capable of modifying data in a system or database, for example, may be creating, deleting, updating a file or recording data.
[0038] In an optional embodiment, when the target operation and maintenance data is obtained, it can be first determined whether the target operation and maintenance data is operation data corresponding to a write operation. For example, when it is determined that the target operation and maintenance data is structured or semi-structured data, it can be determined whether the target operation and maintenance data is operation data corresponding to a write operation by using keywords in the target operation and maintenance data. For another example, when the target operation and maintenance data is operation and maintenance data recorded in natural language, such as a switch operation log, the text can be classified by a pre-trained model to determine whether the target operation and maintenance data is operation data corresponding to a write operation. For another example, a keyword list can be established in advance, wherein the keywords in the keyword list are related to the write operation. By searching for the keywords in the keyword list in the target operation and maintenance data, it can be determined whether the target operation and maintenance data is operation data corresponding to a write operation. For another example, it can also be determined whether the target operation and maintenance data is operation data corresponding to a write operation by context understanding.
[0039] Further, when it is determined that the target operation data is operation data corresponding to a write operation, a hash operation can be performed on the target operation data to obtain a target hash value. For example, different hash algorithms can be used to perform a hash operation on the target operation data, and the specific hash algorithm is not limited in this embodiment.
[0040] Step S106, compare the target hash value with the preset hash value to obtain the audit result corresponding to the data audit request, wherein the preset hash value is used to represent the hash value corresponding to the target operation and maintenance data stored on the blockchain, and the audit result is used to represent whether the audit of the target operation and maintenance data is successful.
[0041] The above-mentioned blockchain is a distributed database technology, which is usually used to record transaction records and asset tracking processes. It consists of a series of data blocks connected in chronological order, which are used to record and store transaction data or any digital information that needs to be verified and recorded. Each data block contains multiple transaction records within a certain period of time, as well as the hash value of the previous data block, which ensures the decentralization, immutability, transparency and data continuity of the blockchain. In this embodiment, the blockchain is used to store key operation and maintenance information and provide an audit basis for non-repudiation.
[0042] The above preset hash value is used to determine whether the target operation and maintenance data has been tampered with. When the target hash value is the same as the preset hash value, it can be determined that the target operation and maintenance data has not been tampered with, and the audit result at this time is that the audit of the target operation and maintenance data is successful. When the target hash value is different from the preset hash value, it can be determined that the target operation and maintenance data has been tampered with, and the audit result at this time is that the audit of the target operation and maintenance data has failed.
[0043] In an optional embodiment, when the target hash value corresponding to the target operation and maintenance data is obtained, the target hash value can be compared with the preset hash value to obtain the audit result corresponding to the data audit request. For example, when the target hash value is the same as the preset hash value, it can be determined that the target operation and maintenance data has not been tampered with, and the audit result at this time is that the audit of the target operation and maintenance data is successful. When the target hash value is different from the preset hash value, it can be determined that the target operation and maintenance data has been tampered with, and the audit result at this time is that the audit of the target operation and maintenance data has failed.
[0044] In an embodiment of the present invention, in response to receiving a data audit request, the target operation and maintenance operation data corresponding to the data audit request is determined; when the target operation and maintenance operation data is the operation data corresponding to the write operation, the target operation and maintenance operation data is hashed to obtain the target hash value; the target hash value is compared with the preset hash value to obtain the audit result corresponding to the data audit request, wherein the preset hash value is used to characterize the hash value corresponding to the target operation and maintenance operation data stored on the blockchain, and the audit result is used to characterize whether the target operation and maintenance operation data is successfully audited. It is easy to notice that by comparing the target hash value obtained by performing a hash operation on the target operation and maintenance operation data with the preset hash value, it is possible to verify whether the target operation and maintenance operation data has been tampered with during the off-chain storage period. Further, due to the tamper-proof characteristics of the blockchain, once the preset hash value is stored on the chain, it cannot be modified, achieving the purpose of preventing the data between the operation and maintenance links from being tampered with, thereby achieving the technical effect of ensuring that the data between the operation and maintenance links cannot be tampered with, thereby solving the technical problem of data tampering between the operation and maintenance links in the related technology.
[0045] Optionally, the target hash value is compared with a preset hash value corresponding to the target operation and maintenance data on the blockchain to obtain an audit result corresponding to the data audit request, including: when the target hash value is the same as the preset hash value, determining the audit result is that the audit of the target operation and maintenance data is successful; when the target hash value is different from the preset hash value, determining the audit result is that the audit of the target operation and maintenance data has failed.
[0046] In an optional embodiment, when the target hash value is the same as the preset hash value, the audit result can be determined as a successful audit of the target operation and maintenance data; when the target hash value is different from the preset hash value, the audit result can be determined as a failed audit of the target operation and maintenance data.
[0047] Optionally, the method also includes: collecting multiple operation and maintenance operation data from the operation log file according to a preset data collection method; extracting key information from the multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, wherein the key operation and maintenance operation information includes: operation subject, operation time, operation object, operation action and preset hash value; and storing the key operation and maintenance operation information in the blockchain.
[0048] Optionally, the preset data collection method is constructed based on the information items contained in the key operation and maintenance operation information. The above-mentioned key operation and maintenance operation information can be defined in advance by the user and is used to prevent the information of the denial of audit. Among them, the definition of key operation and maintenance operation information is based on two principles: First, the key operation means that the operation will change the state of the production system. Second, the content in the key operation and maintenance operation information should be as concise as possible. According to principle one, the key operation and maintenance operation information should only contain the operation and maintenance data of the write operation on the production system, because only the write operation may introduce a fault in the production system. And because the amount of data generated by the write operation accounts for a very small proportion of the total amount of data, the key operation and maintenance operation information containing only the write operation can greatly simplify the data. According to the data of the embodiment of the present invention, the proportion of data containing only the write operation is less than 5% of the total operation and maintenance data. In addition, even the operation and maintenance data of the write operation still contains some information that is not very important or not the most critical for anti-denial. According to principle two, the operation and maintenance data of the write operation can be further simplified, and the key operation and maintenance operation information can be extracted from each operation and maintenance data. Among them, the key operation and maintenance operation information includes at least five information items: time, operator, basic operation, operation object, and hash value.
[0049] In an optional embodiment, the internal production system can also collect multiple operation and maintenance operation data from the operation log file according to a preset data collection method. Secondly, the production system can extract key information from the multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, wherein the key operation and maintenance operation information includes: operation subject, operation time, operation object, operation action and preset hash value. Finally, the key operation and maintenance operation information can be stored in the blockchain.
[0050] It should be noted that after defining the key operation and maintenance information, the next step is to adjust the data extraction method to ensure that all information items contained in the key operation and maintenance information can be extracted. Traditional data extraction mainly extracts and stores the content in the operation log file, but for the operation logs generated in some environments, the log content does not contain all the information items of the key operation and maintenance information. For example, the operator information does not appear in the log file content of the operating system, but appears in the log file name. Therefore, in such cases, the extraction method needs to be adjusted to obtain complete information items.
[0051] Optionally, key information is extracted from multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, including: preprocessing the operation and maintenance operation data to obtain the operation subject and operation time in the operation and maintenance operation data; extracting information from the operation and maintenance operation data based on the target language corresponding to the operation and maintenance operation data to obtain the operation object and operation action in the operation and maintenance operation data; performing hash operation on the operation and maintenance operation data to obtain a preset hash value corresponding to the operation and maintenance operation data; and assembling the operation subject, operation time, operation object, operation action and preset hash value to obtain key operation and maintenance operation information.
[0052] In an optional embodiment, after obtaining the key operation and maintenance data, it is necessary to perform intelligent analysis on these data to filter out the key operation and maintenance information. The first stage is preprocessing, the purpose of which is to extract the main body of the data to prepare for subsequent analysis. Some information items in the key operation and maintenance information can sometimes be obtained at this stage, such as time. The second stage is data analysis, the purpose of which is to extract other information items of the key operation and maintenance information from the main body of the data, such as basic operations, operation objects, etc. At this stage, different analysis methods are used for data with different characteristics. Then, a hash operation can be performed on the entire record of the operation and maintenance operation to obtain a preset hash value to form complete key operation and maintenance information. Finally, the operation subject, operation time, operation object, operation action and preset hash value can be assembled to obtain key operation and maintenance information.
[0053] Optionally, based on a target language corresponding to the operation and maintenance operation data, information extraction is performed on the operation and maintenance operation data to obtain operation objects and operation actions in the operation and maintenance operation data, including: when the target language is not a natural language, based on the information extraction rules corresponding to the operation and maintenance operation data, determining whether the operation and maintenance operation data is operation data corresponding to a write operation, and when the operation and maintenance operation data is operation data corresponding to a write operation, extracting key information from the operation and maintenance operation data to obtain operation objects and operation actions; when the target language is a natural language, classifying the operation and maintenance operation data using an operation classification model to determine whether the operation and maintenance operation data is operation data corresponding to a write operation, and when the operation and maintenance operation data is operation data corresponding to a write operation, processing the operation and maintenance operation data using a natural language library to obtain operation objects and operation actions.
[0054] In an optional embodiment, the operation and maintenance data comes from multiple operation and maintenance environments, so the data formats are also different. But generally speaking, it can be divided into two categories. The first type of operation and maintenance data is recorded in a language with clear commands or operation target words and syntax. For example, the database is structured query language (SQL) and the operating system is a command interpreter (shell). This type of data only needs to be analyzed according to the rules of the language (i.e. the above-mentioned information extraction rules) to accurately extract information such as basic operations and operation objects. The second type of operation and maintenance data is recorded in natural language, and uses simple sentences, such as the operation log of a switch. For natural language, the overall idea is to use a combination of multiple natural language processing models for processing. First, we use the Bidirectional Encoder Representation from Transformers (BERT) model (i.e. the operation classification model mentioned above) to classify and filter out data containing only write operations, and then use the open source Natural Language Processing (NLP) library (spaCy) to perform word segmentation and dependency syntax analysis on these data. Because operation and maintenance operation data are generally simple sentences, the extraction of basic operations and operation objects has been completed at this time.
[0055] Optionally, storing the key operation and maintenance information and the preset hash value in the blockchain includes: assembling the key operation and maintenance information and the preset hash value based on a preset data model to generate a target string; and storing the target string in the blockchain.
[0056] In an optional embodiment, after obtaining the key operation and maintenance information and the preset hash value, the key operation and maintenance information can be stored in the blockchain. This process includes selecting a suitable blockchain platform, designing a data structure, writing a smart contract, deploying a smart contract, and finally storing data on the blockchain. Among them, the key operation and maintenance information and the preset hash value can be assembled based on the preset data model to generate a target string; the target string is stored in the blockchain.
[0057] The embodiment of the present invention proposes a method for auditing operation record data based on blockchain technology. The principle of the method is to use blockchain technology to store key operation operation information to achieve the goal of non-repudiation. In order to avoid the performance and cost problems caused by a large amount of data on the chain, multiple natural language processing models are used to perform intelligent analysis on the data to filter out key operation operation information from a large amount of native operation operation data. Only the key operation operation information is stored in the blockchain, which greatly alleviates the cost and performance pressure of the blockchain. The embodiment of the present invention also divides the content of the operation data into two parts. The first part only includes the most critical information: time, operator, basic operation, and operation object; the second part contains the complete details of the operation. The first part of the information is stored in the key operation operation information, and the entire record of the operation operation is hashed, and the output hash value is also stored in the key operation operation information. The key operation operation information contains at least five information items: time, operator, basic operation, operation object, and hash value. The key operation operation information is stored in the blockchain, and the entire record of the operation operation is stored off the chain. When it is necessary to audit the operation and maintenance record data, first check the operation and maintenance data stored off-chain. When encountering a write operation, perform a hash operation on the operation and maintenance record, and compare the obtained hash value with the corresponding hash value on the chain. If they are the same, it means that the operation and maintenance record off-chain has not been tampered with and is credible. If the hash values are different, it means that the record off-chain has been tampered with. At this time, the key operation and maintenance information on the chain should be used as the basis for the audit.
[0058] The implementation process of the present invention mainly includes the following four processes: defining key operation and maintenance information, that is, first determining what kind of information needs to be stored on the blockchain; data collection, that is, adjusting the data collection method according to the key operation and maintenance information to ensure that the collected data does not miss the necessary part of the key operation and maintenance information; data processing, that is, then performing intelligent analysis on the collected data to screen out the key operation and maintenance information, so that the amount of data stored on the chain is greatly reduced; information on the chain, that is, storing the key operation and maintenance information on the chain.
[0059] Figure 2 is a flowchart of an optional method for processing operation and maintenance data according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0060] Step S21, defining key operation and maintenance information;
[0061] Step S22, ensuring that each information item in the key operation and maintenance information is collected (if necessary, the collection method needs to be adjusted);
[0062] Step S23, preprocessing data;
[0063] Step S24, determine whether the data content has clear rules, if yes, proceed to step S25, if no, proceed to step S26;
[0064] Step S25, extract information items (such as SQL language, shell, etc.) according to clear rules, and proceed to step S27;
[0065] Step S26, extracting information items using a natural language processing model;
[0066] Step S27, performing hash operation to form complete key operation and maintenance information;
[0067] Step S28, storing key operation and maintenance information on the chain;
[0068] Step S29, end.
[0069] It should be noted that steps S23 to S27 are for processing data and obtaining the content of key operation and maintenance information.
[0070] Figure 3 is a schematic diagram of an optional system for processing operation and maintenance data according to an embodiment of the present invention, such as Figure 3 As shown, the operation and maintenance data processing system 30 includes: a data acquisition module 32, a data processing module 34 and an information uplink module 36. Figure 3 As shown, the data acquisition module 32 is connected to the data processing module 34 in communication, and the data processing module 34 is connected to the information uplink module 36 in communication. Figure 3 As shown, the data collection module 32 includes a log collection unit 32-1. The data processing module 34 includes: a pre-processing unit 34-1, a rule analysis unit 34-2, an intelligent analysis unit 34-3 and a data assembly unit 34-4. The information uplink module 36 includes: an uplink processing unit 36-1.
[0071] The data collection module collects data from various data sources. This data must include four key operation and maintenance information items: time, operator, basic operation, and operation object. In this module, the operator information item can sometimes be directly obtained.
[0072] The data processing module is used to perform intelligent analysis on data and extract various information items of key operation and maintenance information. It includes four components: preprocessing, rule analysis, intelligent analysis, and data assembly. Preprocessing is to separate other fields from the log one by one and extract the main body of the data. Generally speaking, the information item of time will be obtained in this component. Rule analysis is to use corresponding rules to analyze data for those operation data with clear grammatical rules. It can not only accurately filter out write operation data, but also obtain two information items, basic operations and operation objects, such as database and operating system operation data. Intelligent analysis is to use multiple natural language processing models to process those operation data recorded in natural language, first filter out write operation data, and then obtain two information items, basic operations and operation objects. Data assembly will calculate the hash value for the filtered write operation, and assemble the complete key operation and maintenance operation information together with the four information items obtained previously.
[0073] The information on-chain module is used to store key operation and maintenance information into the blockchain. This module can be implemented according to the help documentation provided by the blockchain platform.
[0074] The method and device of this embodiment are applicable to each link of the operation and maintenance chain, because the operation and maintenance operation data generated by each link can be basically divided into two categories according to data characteristics: rule-based and natural language-based. The embodiment of the present invention includes these two types of processing methods and modules. The following will take public domain operation and maintenance data as an example to illustrate the specific implementation method. Figure 4 This is a schematic diagram of an optional processing system for operation and maintenance data, taking public domain operation and maintenance data as an example, according to an embodiment of the present invention. The public domain operation and maintenance data refers to the operation and maintenance data generated by the manufacturer's equipment, such as switches, operating systems, and databases. Because the operation data generated by the manufacturer's equipment is relatively standardized in format and content, and the audience of the manufacturer's equipment is wider, this also makes the application of the present invention more universal.
[0075] like Figure 4 As shown, the operation and maintenance data processing system 30 includes: a data acquisition module 32, a data processing module 34 and an information uplink module 36. Figure 4 As shown, the data acquisition module 32 is communicatively connected to the data processing module 34 , and the data processing module 34 is communicatively connected to the information uplink module 36 .
[0076] First, a data model needs to be defined to store key operation and maintenance information. This data model is the carrier of key operation and maintenance information and runs through the entire processing process. The values of each field are obtained in the data collection and data processing modules, and finally the information chain module is used to store this data in the blockchain.
[0077] like Figure 4As shown, the data collection module 32 uses the ELK (open source log collector (filebeat) + data processing pipeline (logstash) + open source search engine and analysis engine (El ast icsearch, ES)) solution, see Figure 4 The data collection part in . Because the operation and maintenance data is time series data, the industry's mature data collection solution - ELK solution is adopted. In order to provide higher processing capabilities, a key-value storage database (Redis) or a distributed stream processing platform (Kafka) can be added between filebeat and logstash. In order to ensure that key operation and maintenance operation information can be obtained during data collection, filebeat needs to be adjusted according to actual conditions. For example, the operator information does not appear in the log file content of the operating system, but in the file name. In this case, the operator information can be added by adding a custom (fields) field in the filebeat configuration file to increase the collection of operator information, so that each operation data collected in ES will contain the operator information.
[0078] The data processing module is divided into three components: data preprocessing, data analysis and data assembly, see Figure 3 data processing part.
[0079] 1. Data preprocessing is to analyze the native data stored in ES, parse the string according to the delimiter, separate the data body, and obtain the operation time information item.
[0080] 2. The data analysis component is also divided into two parts according to the different types of input data: rule analysis and intelligent analysis. Rule analysis is used to process data that is a language or command rule, such as SQL statements in databases and Shell commands in operating systems. Rule analysis first classifies data according to limited keywords in the language or command, and divides it into write operations and non-write operations. Then, according to the rules of SQL statements or Shell commands, the operation object can be parsed from the data of write operations. Intelligent analysis is used to process data recorded in natural language. First, the BERT model is trained, that is, part of the data is marked for read and write operations in advance, and the marked data is used as a training set, and the BERT model is used for classification training of read and write operations. Then, the trained BERT model is used to predict the data and divide the data into two categories: write operations and non-write operations. Finally, the content identified as write operations is further processed through the spaCy library. Because the switch log conforms to the writing specifications of natural language and the sentence structure is complete, the spaCy library can be used to load the English corpus model to directly perform part-of-speech recognition and dependency analysis on the text, and extract the desired operation actions and operation objects from it.
[0081] 3. The data assembly module first calculates the hash value. For example, the Secure Hash Algor ithm 256 (SHA-256) algorithm can be used to take the entire record of the filtered write operation data as input to calculate a hash value with a fixed length of 64 characters. In a high-level programming language (Java), the MessageDigest class can be used to implement the SHA-256 algorithm. After obtaining the hash value, the data assembly begins to assemble the key operation and maintenance information of this write operation. Among them, MessageDigest is a class in Java that is used to implement the message digest algorithm. The MessageDigest class provides a method to convert data of any length into a fixed-length digest.
[0082] 4. The information on-chain module stores key operation and maintenance information on the chain. The usual steps for on-chain storage are as follows: select a suitable blockchain platform; design data structure; write smart contracts; deploy smart contracts; store information on the blockchain. This patent uses the Air Travel Chain platform of China Aviation Information Network to briefly illustrate this process. The data structure of the on-chain data is to use the data model of key operation and maintenance information to form a string in XML format. Because there is already a smart contract written into the evidence on the Air Travel Chain, there is no need to rewrite it. Then install the smart contract on the Air Travel Chain as a tenant.
[0083] According to an embodiment of the present invention, an embodiment of a system for processing operation and maintenance data is provided. Figure 5 is a schematic diagram of a system for processing operation and maintenance data according to an embodiment of the present invention. As shown in the figure, the system 50 includes: a data acquisition module 52, a data processing module 54 and an information uplink module 56.
[0084] Among them, the data collection module is used to collect multiple operation and maintenance operation data from the operation log file according to the preset data collection method; the data processing module is used to extract key information from multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to multiple operation and maintenance operation data, wherein the key operation and maintenance operation information includes: operation subject, operation time, operation object, operation action and preset hash value; the information chain module is used to store the key operation and maintenance operation information to the blockchain.
[0085] Furthermore, the data processing module includes: a preprocessing component, which is used to preprocess the operation and maintenance operation data to obtain the operation subject and operation time in the operation and maintenance operation data; an analysis component, which is used to extract information from the operation and maintenance operation data based on the target language corresponding to the operation and maintenance operation data to obtain the operation object and operation action in the operation and maintenance operation data, and perform hash operation on the operation and maintenance operation data to obtain a preset hash value corresponding to the operation and maintenance operation data; an assembly component, which is used to assemble the operation subject, operation time, operation object, operation action and preset hash value to obtain key operation and maintenance operation information.
[0086] Furthermore, the analysis component includes: a rule analysis component for determining, when the target language is not a natural language, whether the operation and maintenance operation data is operation data corresponding to a write operation based on information extraction rules corresponding to the operation and maintenance operation data, and when the operation and maintenance operation data is operation data corresponding to a write operation, extracting key information from the operation and maintenance operation data to obtain an operation object and an operation action; an intelligent analysis component for classifying the operation and maintenance operation data using an operation classification model when the target language is a natural language, determining whether the operation and maintenance operation data is operation data corresponding to a write operation, and when the operation and maintenance operation data is operation data corresponding to a write operation, processing the operation and maintenance operation data using a natural language library to obtain an operation object and an operation action.
[0087] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.
[0088] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0089] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0090] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0091] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0092] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0094] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0095] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0096] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0097] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing operation and maintenance data, characterized in that: include: In response to receiving the data audit request, determining target operation and maintenance data corresponding to the data audit request; In a case where the target operation and maintenance operation data is operation data corresponding to a write operation, performing a hash operation on the target operation and maintenance operation data to obtain a target hash value; The target hash value is compared with a preset hash value to obtain an audit result corresponding to the data audit request, wherein the preset hash value is used to represent the hash value corresponding to the target operation and maintenance data stored on the blockchain, and the audit result is used to represent whether the audit of the target operation and maintenance data is successful.
2. The method according to claim 1, characterized in that: Compare the target hash value with the preset hash value corresponding to the target operation and maintenance data on the blockchain to obtain the audit result corresponding to the data audit request, including: When the target hash value is the same as the preset hash value, determining that the audit result is that the audit of the target operation and maintenance data is successful; When the target hash value is different from the preset hash value, the audit result is determined to be the failure of the audit of the target operation and maintenance data.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: Collect multiple operation and maintenance operation data from the operation log file according to the preset data collection method; Extract key information from the multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, wherein the key operation and maintenance operation information includes: operation subject, operation time, operation object, operation action and preset hash value; The key operation and maintenance information is stored in the blockchain.
4. The method according to claim 3, characterized in that The preset data collection method is constructed based on the information items included in the key operation and maintenance information.
5. The method according to claim 3, characterized in that: Extracting key information from the multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data includes: Preprocessing the operation and maintenance data to obtain the operation subject and operation time in the operation and maintenance data; Based on the target language corresponding to the operation and maintenance operation data, information is extracted from the operation and maintenance operation data to obtain operation objects and operation actions in the operation and maintenance operation data; Performing a hash operation on the operation and maintenance data to obtain a preset hash value corresponding to the operation and maintenance data; The operation subject, the operation time, the operation object, the operation action and the preset hash value are assembled to obtain the key operation and maintenance operation information.
6. The method according to claim 5, characterized in that Based on the target language corresponding to the operation and maintenance data, information is extracted from the operation and maintenance data to obtain operation objects and operation actions in the operation and maintenance data, including: In the case where the target language is not a natural language, determining whether the operation and maintenance operation data is operation data corresponding to a write operation based on an information extraction rule corresponding to the operation and maintenance operation data, and in the case where the operation and maintenance operation data is operation data corresponding to a write operation, extracting key information from the operation and maintenance operation data to obtain the operation object and the operation action; When the target language is a natural language, the operation classification model is used to classify the operation and maintenance operation data to determine whether the operation and maintenance operation data is operation data corresponding to a write operation. When the operation and maintenance operation data is operation data corresponding to a write operation, the natural language library is used to process the operation and maintenance operation data to obtain the operation object and the operation action.
7. The method according to claim 3, characterized in that Storing the key operation and maintenance information and the preset hash value in the blockchain includes: Based on a preset data model, assembling the key operation and maintenance information and the preset hash value to generate a target string; The target string is stored in the blockchain.
8. A system for processing operation and maintenance data, characterized in that: include: A data collection module is used to collect multiple operation and maintenance operation data from the operation log file according to a preset data collection method; A data processing module is used to extract key information from the multiple operation and maintenance operation data to obtain key operation and maintenance operation information corresponding to the multiple operation and maintenance operation data, wherein the key operation and maintenance operation information includes: operation subject, operation time, operation object, operation action and preset hash value; The information uploading module is used to store the key operation and maintenance information on the blockchain.
9. The system according to claim 8, characterized in that The data processing module comprises: A preprocessing component, used to preprocess the operation and maintenance data to obtain the operation subject and operation time in the operation and maintenance data; An analysis component is used to extract information from the operation and maintenance operation data based on the target language corresponding to the operation and maintenance operation data, obtain the operation object and operation action in the operation and maintenance operation data, and perform a hash operation on the operation and maintenance operation data to obtain a preset hash value corresponding to the operation and maintenance operation data; An assembly component is used to assemble the operation subject, the operation time, the operation object, the operation action and the preset hash value to obtain the key operation and maintenance operation information.
10. The system according to claim 9, characterized in that The analysis components include: A rule analysis component is used to determine whether the operation and maintenance operation data is operation data corresponding to a write operation based on an information extraction rule corresponding to the operation and maintenance operation data when the target language is not a natural language, and to extract key information from the operation and maintenance operation data to obtain the operation object and the operation action when the operation and maintenance operation data is operation data corresponding to a write operation; An intelligent analysis component is used to classify the operation and maintenance operation data using an operation classification model when the target language is a natural language, determine whether the operation and maintenance operation data is operation data corresponding to a write operation, and when the operation and maintenance operation data is operation data corresponding to a write operation, process the operation and maintenance operation data using a natural language library to obtain the operation object and the operation action.
11. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
Optical transmission system management platform based on distributed storage and multi-protocol adaptation
CN120264177A