Log audit method, system, device and medium based on multivariate log data analysis
By using blockchain technology in the control cloud to conduct wide-area data interaction log traceability and auditing, the reliability and authority problems of log auditing in the existing technology are solved, and data interaction records with high reliability and security are realized.
Patent Information
- Application Number
- CN202111424905.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-11-26
AI Technical Summary
The existing control cloud wide-area data interaction log auditing methods have problems of poor reliability and low authority. Especially in cross-regional and cross-department data sharing, it is difficult to meet the reliability requirements of data operation logs.
Adopt blockchain-based wide-area data interaction log traceability technology, and realize automatic on-chain recording and traceability verification of data interaction operations through alliance chains and smart contracts, avoiding manual intervention and improving the reliability and authority of logs.
It achieves highly reliable and authoritative log auditing, avoids data tampering and leakage, and improves the security and credibility of data interaction.
Smart Images

Figure CN114020726B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of log auditing, and in particular relates to a log auditing method, system, device and medium based on multivariate log data analysis. Background Art
[0002] With the development and deepening of the construction of the control cloud, the interaction between the control cloud's leading nodes, collaborative nodes, and source data terminals has become closer; in wide-area data interaction, data entity security and data operation security are the key to determining data quality. Application service access log data has the characteristics of full business scope, full time type, and full time dimension, and contains key information for the operation of the control cloud system. By recording the logs of wide-area data interaction, version backtracking and problem location can be performed to a large extent. In actual production work, it plays a vital guiding role in the activities of operation and maintenance personnel in system maintenance and equipment status monitoring; among them, data traceability technology is involved in version backtracking and problem location.
[0003] At present, research on data traceability technology at home and abroad is mainly concentrated in the academic community. With the maturity of big data technology, data sharing has become an important way to mine the value of data, and research on data traceability has also become known to the public. For example, Bower S et al. pointed out the technical problems currently faced in data security traceability, and proposed that secure and reliable traceability needs to provide integrity, confidentiality and availability guarantees for traceability records; in the study of data traceability models, Sudha et al. proposed the w7 model; then in 2006, the International Provenance and Annotation Workshop (IPAW) was established, dedicated to the research of data traceability related technologies and their standardization; in 2008, Sahoo et al. proposed the Provenir data traceability model, which is mainly aimed at database data traceability and formed a complete system covering data storage to upper-level business; in 2012, the fourth IPAW conference proposed the PROV data model (PROV-DM), which is currently a more common data traceability model; Yogesh's paper believes that data traceability is a kind of metadata used to track the data evolution process, and based on this, proposed a classification standard for data traceability, dividing data traceability into four categories, emphasizing the importance of data traceability. However, the traditional data traceability currently uses a centralized traceability system, which has the unreliability of a single-point system. In addition, there is a lack of unified standards for data traceability models, which makes it more difficult to integrate and analyze information between data platforms. Based on the above defects of existing traceability technologies, it can be seen that the current control cloud wide-area data interaction log audit method based on existing traceability technologies also has the defects of poor reliability and low authority.
[0004] In summary, the field of power dispatching automation is currently actively building an open and shared data ecosystem to further promote the implementation of big data and artificial intelligence. In the dispatching automation production system, data importance and privacy are relatively high. In cross-regional and cross-departmental data sharing services, in addition to the need for encrypted data transmission, the recording of data operation logs is also extremely necessary. The current control cloud wide-area data interaction log audit method cannot meet the reliability requirements, and a new log audit method and system based on multivariate log data analysis is urgently needed. Summary of the invention
[0005] The purpose of the present invention is to provide a log audit method, system, device and medium based on multivariate log data analysis to solve one or more of the above-mentioned technical problems. The log audit method provided by the present invention adopts blockchain-based wide-area data interactive log tracing technology, which can avoid manual intervention and has high reliability and authority.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A log audit method based on multivariate log data analysis provided by the first aspect of the present invention comprises the following steps:
[0008] Get the log data analysis target;
[0009] Based on the log data analysis goal, the blockchain-based log notarization and traceability method is used to locate the multiple log data sources of related services distributed at the national, provincial and local levels to obtain wide-area logs;
[0010] Parsing unstructured and semi-structured original log records in the wide-area log into a structured form, and combining them with structured original log records in the wide-area log to form structured data log records;
[0011] An audit is performed based on the structured data log records and an audit report is obtained, completing a log audit based on multivariate log data analysis.
[0012] A further improvement of the present invention is that the step of obtaining the log data analysis target specifically includes: obtaining the log data analysis target based on preset business requirements and regulating the cloud service type.
[0013] A further improvement of the present invention is that in the log evidence storage and traceability method based on blockchain:
[0014] The blockchain is a consortium chain;
[0015] The blockchain stores pre-built regulatory model data traceability model information applicable to the blockchain; wherein the pre-built regulatory model data traceability model applicable to the blockchain is established based on PROV, including: entities, activities and agents;
[0016] The object described by the entity is a data interaction operation, and the data interaction operation is formally described as follows: data interaction operation = (data summary, interaction ID, initiator, operation name, extended field); wherein the data summary is a data summary of the data operated by the data interaction operation, and the interaction ID is used as a unique identifier of the interaction initiator;
[0017] The activity is formally described as: activity = (activity type, activity agent, extension field); wherein the activity type is used to specify the data operation type, the activity agent field is used for the agent associated with the activity, and the extension field is used for function extension;
[0018] The agent is formally described as agent=(agent type, agent ID, extension field);
[0019] During the log storage process, the preset operation log traceability contract is used to achieve on-chain storage;
[0020] During the log tracing process, the query is implemented based on the preset operation tracing verification contract.
[0021] A further improvement of the present invention is that, in the process of log storage, the steps of implementing on-chain based on the preset operation log tracing contract specifically include:
[0022] When the client initiates wide-area data interaction, the wide-area data interaction middleware triggers the operation log traceability contract to start recording the operation log on the chain, forming an operation log traceability chain;
[0023] The operation log traceability contract encapsulates Put, Delete, Update and Query operations, which are used for calls in different situations of data addition, deletion, modification and query; Put operation indicates that the remote data interaction operation is to add new data, Delete operation indicates that the remote data interaction operation is to delete data, Update operation indicates that the remote data interaction operation is to change, and Query operation indicates that the remote data interaction operation is to query;
[0024] The chain structure of the operation log traceability chain is composed of nodes; each node includes a node head and a node body, the node head stores the Hash value of the interactive operation data content, and the node body includes the interaction ID, activity, agent, source end and forward pointer; among them, the source end field is used to store the Chinese name of the operating user, and the forward pointer is used to save the header Hash of the previous node.
[0025] A further improvement of the present invention is that, in the log tracing process, the step of implementing the query based on the preset operation tracing verification contract specifically includes:
[0026] The hash value of the specified data content is used as a parameter and input from the interface preset by the operation traceability verification contract to realize the historical version query of the operation log traceability chain.
[0027] A further improvement of the present invention is that the blockchain is implemented using the Fabric consortium chain platform under the Hyperledger project.
[0028] A further improvement of the present invention is that the steps of performing an audit based on the structured data log record and obtaining an audit report and completing a log audit based on multivariate log data analysis specifically include:
[0029] Input the structured data log record into a pre-built log sequence anomaly detection model based on a self-attention mechanism, form an audit report through the output result of the log sequence anomaly detection model, and complete the log audit based on multivariate log data analysis;
[0030] The log sequence anomaly detection model models the log template sequence as a natural language sequence and takes word embedding based on neural network training as input; the log sequence anomaly detection model is provided with a stacked LSTM layer for extracting implicit patterns of the log sequence, and the log sequence anomaly detection model is provided with a self-attention layer for representing the dependency relationship between logs in a sequence by calculating the similarity between them.
[0031] A second aspect of the present invention provides a log audit system based on multivariate log data analysis, comprising:
[0032] Analysis target acquisition module, used to obtain log data analysis targets;
[0033] A wide-area log acquisition module is used to locate multiple log data sources for related services distributed at the national, provincial and local levels based on the log data analysis target and using a blockchain-based log notarization and traceability method to obtain wide-area logs;
[0034] a structured data log record acquisition module, used for parsing unstructured and semi-structured original log records in the wide area log into a structured form, and combining them with structured original log records in the wide area log to form structured data log records;
[0035] The audit report acquisition module is used to perform an audit based on the structured data log records and obtain an audit report, thereby completing a log audit based on multivariate log data analysis.
[0036] A third aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the log audit method based on multivariate log data analysis as described above in any one of the present invention when executing the computer program.
[0037] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the log audit method based on multivariate log data analysis as described above in any one of the present invention are implemented.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The log audit method provided by the present invention adopts the wide-area data interactive log tracing technology based on blockchain, which can avoid manual intervention and has high reliability and authority.
[0040] In the present invention, firstly, a wide-area data interaction model is modeled (exemplarily, the model is built on the basis of the PROV standard model); secondly, the underlying distributed ledger of the blockchain and its programmability are used to implement the data traceability model, and the data interaction action log is recorded; finally, the blockchain smart contract technology is used to realize the automatic triggering of the log on the chain. In principle, the immutability of the blockchain can ensure the non-repudiation of the data interaction log and improve the reliability; the use of blockchain smart contract technology to realize the automatic triggering of the log on the chain can avoid manual intervention and enhance the authority of the interaction log.
[0041] In the present invention, the log sequence anomaly detection model can detect unknown execution workflow sequence anomalies by inputting normal log sequence patterns into the model for training; exemplary experimental results show that the overall accuracy of the detection model for log sequence anomaly detection is better than existing methods and has lower time overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art; obviously, the drawings described below are some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 It is a flow chart of a log audit method based on multivariate log data analysis according to an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of the overall architecture of the control cloud in an embodiment of the present invention;
[0045] Figure 3 This is a schematic diagram of the division of the control cloud data system in an embodiment of the present invention;
[0046] Figure 4 It is a flow chart of another log audit method based on multivariate log data analysis according to an embodiment of the present invention;
[0047] Figure 5 It is a schematic diagram of a data traceability model of a control model applicable to blockchain in an embodiment of the present invention;
[0048] Figure 6 This is a schematic diagram of a data traceability architecture based on blockchain in an embodiment of the present invention;
[0049] Figure 7 This is a schematic diagram of a single chain representation of data traceability in an embodiment of the present invention;
[0050] Figure 8 It is a schematic diagram of the operation log tracing contract collaboration process in an embodiment of the present invention;
[0051] Fig. 9 Schematic diagram of the basic structure of the operation log traceability chain in an embodiment of the present invention;
[0052] Fig.10 It is a schematic diagram of a log audit system based on multivariate log data analysis according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] 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.
[0054] 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.
[0055] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0056] Example 1
[0057] See also Figure 1 A log audit method based on multivariate log data analysis according to an embodiment of the present invention comprises the following steps:
[0058] Get the log data analysis target;
[0059] Based on the log data analysis goal, the blockchain-based log notarization and traceability method is used to locate the multiple log data sources of related services distributed at the national, provincial and local levels to obtain wide-area logs;
[0060] Parsing unstructured and semi-structured original log records in the wide-area log into a structured form, and combining them with structured original log records in the wide-area log to form structured data log records;
[0061] An audit is performed based on the structured data log records and an audit report is obtained, completing a log audit based on multivariate log data analysis.
[0062] The log audit method provided by the embodiment of the present invention adopts the wide-area data interactive log tracing technology based on blockchain, which can avoid manual intervention and has high reliability and authority.
[0063] Example 2
[0064] At present, with the further deepening of the construction of the control cloud, the control cloud has become the data collection center of the dispatching automation system, and the data interaction between the nodes of the cross-regional control cloud is becoming closer; the privacy and accuracy requirements of the dispatching automation system data are relatively high. The control cloud adopts a two-level deployment mode of national and provincial control, which essentially requires the data and business interaction between the two-level nodes to have a high degree of security and reliability, and it is necessary to avoid data leakage and data tampering in wide-area data interaction. The embodiment of the present invention aims to use data traceability and blockchain technology to study the data traceability technology applicable to the wide-area data interaction log of the two-level control cloud, and realize the trusted record and traceability of the wide-area data interaction log; specifically, the method of the present invention adopts the wide-area data interaction log traceability technology based on blockchain, firstly models the wide-area data interaction process based on the traceability model of the data traceability related research topic, and then realizes the data traceability model through blockchain technology to realize the recording of data interaction action logs; finally, the blockchain smart contract technology is used to realize the automatic triggering of the log on the chain, avoiding manual intervention, and further enhancing the authority of the interaction log.
[0065] See also Figure 2 , Figure 2 The overall architecture of the control cloud is shown; specifically, the control cloud is an analysis and decision-making center for power grid dispatching business, aiming to break through the data barriers between various professional fields of power grid dispatching, integrate various data such as power grid models, operations, and real-time, realize the safe sharing of power grid data, improve the power grid's cognition, analysis and decision-making capabilities, ensure the safe operation of ultra-high voltage AC / DC hybrid power grids, and support clean energy consumption and market-oriented reforms. The overall design of the control cloud is a two-level structure, divided into leading nodes and collaborative nodes, and each node builds a dual-active AB site; among them, the leading node is deployed in the national dispatching, and the collaborative node is deployed in each provincial control center.
[0066] See also Figure 3 , Figure 3 It shows the division of the control cloud data system; specifically, the control cloud is constructed with a model data platform, an operation data platform, a real-time data platform, and a big data platform to aggregate various data of the business system; at the same time, a data exchange platform is built as the hub for data exchange between the control cloud and other external systems. Inside the control cloud, the data of each data platform is not an isolated island. The data of the operation data platform is collected by the real-time data platform, and the historical data stored in the big data platform also overlaps with the data stored in the operation data platform. The data of each business system is collected into the platform according to business needs, shared externally through the data exchange platform, and data interaction between the two levels of the control cloud is carried out through the wide-area data interaction component. For various operations in the data interaction process, the present invention tracks and traces the entire process of data interaction on the premise of the "data sharing" concept of the control cloud, ensures data quality, and controls key links.
[0067] See also Figure 4 In an embodiment of the present invention, a log audit method based on multivariate log data analysis is provided. Specifically, the log audit is divided into the following key steps according to the unique structural characteristics of the wide-area logs on the cloud, including:
[0068] (1) Business analysis, including: determining the goals of log data analysis based on daily business needs and the specific service types of the cloud (for example, consistency verification, metadata, etc.).
[0069] (2) Locating the log data source, including: using blockchain-based log storage and traceability technology to locate related services distributed at the national, provincial and local levels.
[0070] Explanatory, the key to data traceability technology is to complete the formal data traceability model description around the data subject. The model specifically defines the functional boundaries of data traceability, that is, what data information to trace, what data operations to track, and in what form to store these "metadata". Different business scenarios use data in different ways, so it is necessary to model the control model data and the specific business involved to meet the actual data traceability needs. Please refer to Figure 5 The control cloud architecture proposes the demand for wide-area data interaction. In the wide-area data interaction, the security of the data entity and the security of data operation are the key to determine the data quality. By recording the logs of the wide-area data interaction, version backtracking and problem location can be performed to a large extent. The embodiment of the present invention is based on the PROV standard of data traceability, facing the two-level control cloud system, and proposes an operation log data traceability model based on blockchain (alliance chain); at the same time, the operation log traceability model is further constructed based on the blockchain smart contract, and two collaborative smart contracts are designed to complete the operation log chain recording and operation log verification. The present invention also uses the characteristics of the blockchain itself in terms of member management, distributed consensus, etc. to prevent the possibility of malicious users / malicious contracts from tampering with data, and ensure the reliability of the operation log traceability history.
[0071] The blockchain of the embodiment of the present invention stores pre-built data traceability model information of the regulatory model applicable to the blockchain; wherein, the pre-built data traceability model of the regulatory model applicable to the blockchain is established based on PROV, including: entity, activity and agent. The embodiment of the present invention is mainly for the traceability of wide-area data interaction actions, and the object described by the data entity is the "data interaction" operation itself; wherein, the "data interaction operation" is abstracted into an object as follows: data interaction operation = (data summary, interaction ID, initiator, operation name, extension field); wherein, the data summary is the data summary of the data operated by this data interaction operation, which is used to quickly locate the data when analyzing the operation log later; the interaction ID is the unique identifier of the interaction initiator, Source marks the Chinese name of the data interaction initiator, which is convenient for manual identification, and the Ext field is used for future function expansion. The activity (Activity) during wide-area data interaction can be described in the same way as the following structure: activity = (activity type, activity agent, extension field); wherein, the activity type specifies which operation this operation belongs to, including: data addition, deletion, modification, query, etc., the activity agent field is used for the agent associated with the activity, and the extension field is used for future function expansion. The modeling of agents is relatively simple. Usually, there are two main types of entities that initiate wide-area data interaction, namely, production systems and business systems. The main operations of production systems on data are "addition", while the main operations of business systems on data include "deletion, modification, and query". Business systems will also add their own business data. There may also be processes of human intervention in data, such as manual maintenance of data by operation and maintenance personnel. Therefore, the modeling of agents mainly considers agent type and agent identification, which is formally described as follows: agent = (agent type, agent ID, extended field). After the subject performs a certain activity, the state of the entity changes, and activities are continuously initiated through different agents to form a single linked list, such as Figure 5 As shown, the state of a node entity can be used to trace back the complete change process of the entity. The embodiment of the present invention is exemplary, using blockchain to store information such as entities, activities, agents, etc. in the data traceability model. The data stored in the blockchain distributed ledger is globally consistent and cannot be tampered with, ensuring the security and reliability of data traceability evidence; at the same time, the smart contract technology is used to realize the automated execution of the data traceability process.
[0072] See also Figure 6Based on the above data traceability model, two smart contracts, operation log traceability and operation traceability verification, are designed in the embodiment of the present invention to work together to complete the log traceability metadata chain and traceability process query work respectively. The operation log traceability contract interacts directly with the user program. When the client (may be manual or program) initiates wide-area data interaction, the wide-area interaction middleware will trigger the operation log traceability contract to carry out operation log chain recording. The alliance chain smart contract only provides basic Put and Get operations. In order to further provide a friendly data read and write interface, according to the common mode of business data, the operation log traceability contract encapsulates Put, Delete, Update, and Query operations for data addition, deletion, modification, and query calls in different situations. The wide-area data interaction middleware passes the data summary, application ID, operation name, etc. of the operation data to the smart contract in the form of JSON. After the smart contract is triggered and starts to execute, the identity verification is first performed. After the verification, the interface function of the same name inside the smart contract is called to complete the operation and return it to the initiator of the operation. Among them, the operation log traceability contract has designed four interfaces: Put, Delete, Update, and Query. Through these operations, the construction of the operation log traceability chain is completed. The structure of the traceability chain is as follows: Figure 7 shown.
[0073] The functions of the four operations of the operation log traceability chain are described as follows: ① The Put operation indicates that the remote data interaction operation is to add new data, and a new operation log traceability chain, that is, an initialization head node, will be initialized synchronously; ② The Delete operation indicates that the remote data interaction operation is to delete data. For the operation log traceability chain, the traceability chain will no longer grow after the data is deleted; ③ The Update operation indicates that the remote data interaction operation is a change. For the operation log traceability chain, the Update operation will extend the traceability chain; ④ The Query operation indicates that the remote data interaction operation is a query. For the operation log traceability chain, the Query operation will extend the traceability chain.
[0074] See also Figure 7 The chain structure of operation log tracing is composed of nodes, each of which includes a node header and a node body. The node header stores the hash value of the interactive operation data content, which can quickly index the actual data; the node body contains five items: application ID, action, agent, source, and forward pointer. Among them, the application ID is the unique identifier of the application or person who initiated the operation; the action represents the operation performed on the data this time; the agent represents the user name who initiated the action, and the source field stores the Chinese name of the user who performed this operation; the forward pointer saves the header hash of the previous node, which is used for historical tracing during data tracing.
[0075] Exemplarily, according to the open form of blockchain network, blockchain can be divided into three categories: public chain, alliance chain and private chain; among them, public chain first appeared and continued to develop as the basic technology of digital currency Bitcoin. The network of public chain is open to all users and is "completely decentralized". Clients that comply with the established network protocol can join or exit the network at will; the operation and management authority of private chain is completely subordinate to the owner, and it is "completely centralized" in business model. The difference between private chain and public chain can be compared to the difference between Internet and Intranet; the openness of alliance chain is between public chain and private chain, and it is "multi-centralized". The operation and management authority of alliance chain belongs to multiple institutions within the alliance. The structure distinguishes between management users and ordinary users, and can control the access of nodes joining the network. Alliance chain has the consensus mechanism and trust model of blockchain, and also has the characteristics of controllable authority and excellent performance. It is suitable for use across departments or across enterprises within the enterprise. This is an important reason why the present invention uses alliance chain as a prototype. Explanatory note: Grid regulation is a business that requires overall coordination. The sources of regulation data are diverse and scattered across dispatching agencies and departments at all levels. This also puts forward requirements for data sharing and authority control. The accuracy and reliability of data are guaranteed by the trust model of blockchain. Alliance chain technology has been developed to meet the above needs.
[0076] The term "smart contract" was proposed by Nick Szabo, a cross-disciplinary legal scholar, in 1995. He defined smart contracts as "a set of promises defined in digital form, including protocols on which the parties to the contract can execute these promises". Since 2009, the concept of smart contracts has gradually been put into practice on technical frameworks representing blockchain 2.0, such as Ethereum and Hyperledger. A smart contract is a program running on a blockchain system, and the blockchain guarantees that the content of the smart contract cannot be tampered with and the results of the smart contract execution cannot be tampered with. The emergence of smart contracts gives blockchains programmable characteristics, making the trust model provided by blockchains more universal and not limited to digital currencies. In the embodiment of the present invention, a wide-area data interaction log traceability model based on blockchain is designed, and a set of automatically triggered smart contract programs are designed and implemented using blockchain smart contracts to reduce manual intervention in the interactive log recording process. The blockchain-based data interaction log tracing technology first completes the design of the data tracing model, and then designs the smart contract group according to the data tracing model and deploys it to the blockchain for execution. The wide-area interactive application needs to call the smart contract interface to log the operation when performing data interaction. The alliance chain smart contract technology ensures that every step of the data operation is authorized; it ensures that once any interactive operation is completed, the log recording contract execution is triggered and written into the blockchain account book.
[0077] See also Figure 8 and Fig. 9 In the embodiment of the present invention, the Fabric alliance chain platform under the Hyperledger project is used to implement it. When the user interacts with the wide area data, the operation log initialization program will be triggered, and the operation log record will be started on the blockchain. In the embodiment of the present invention, the steps of writing the operation log record into the blockchain include: first, completing the access control based on the identity authentication and permission control mechanism unique to the alliance chain, Fabric uses the public key infrastructure (PKI) system to generate digital certificates for members to identify the user identity, and uses the modular membership service provider (MSP) component for identity authentication and permission control; secondly, after verifying the user identity, the data interaction is completed at the smart contract layer. The smart contract layer designs two contracts for operation log tracing and operation tracing verification to complete the work together, wherein the operation log tracing contract is called when the wide area interaction program sends data, and completes the operation log writing, and the operation tracing verification contract is used to trace back and verify the data operation records of the specified ID user with the ID as the index; the writing process of the distributed ledger and multi-point storage ensure that these operation records are reliable.
[0078] The operation traceability verification contract is connected to the application layer visualization tool or other related applications. The contract provides an interface for querying the operation log traceability chain. The functions mainly include current version query and historical backtracking. The Hash value of the data content can be specified as a parameter. The current version query function returns the most recent operation information of the data, and the historical backtracking function returns the Nth version of the data and returns the data change history. N is passed as a parameter to the calling interface. Using the permission control mechanism of the alliance chain, the operation traceability verification contract can be opened to users as needed. Identity authentication must be performed before the execution of the smart contract. Only after the authentication is passed can the actual interface call be made to obtain the required data.
[0079] (3) Log parsing, including: parsing each unstructured and semi-structured raw log record into a structured form through a log template extraction method.
[0080] (4) Log anomaly detection and diagnosis mainly involves establishing anomaly detection models and analyzing the causes of anomalies, providing important references for R&D personnel to manage systems and application services. Based on the system's historical anomaly data, artificial intelligence algorithms such as data classification, data analysis, and data mining are used to establish the relationship between the system's historical anomalies, current operating status, and future potential anomalies, so as to predict the anomalies of the control cloud system; based on the access log records of each application service in the system, the local and overall operating status of the system is judged to monitor the current system anomalies and predict the occurrence of future system failures or application service failures. Finally, the relevant audit conclusions formed can, on the one hand, provide auxiliary strategies for the control cloud R&D personnel to carry out engineering troubleshooting and routine operation and maintenance, and ensure the safe and stable operation of application service access; on the other hand, they can provide a basis for formulating scientific and reasonable maintenance plans and emergency response measures, so as to reduce the probability of abnormal events in application service access, shorten the time for handling abnormal events, and achieve the effect of predicting data, service or system anomalies in advance.
[0081] Exemplarily, the present invention proposes a log sequence anomaly detection model based on a self-attention mechanism, which can effectively detect anomalies in shorter log sequences. The model models the log template sequence as a natural language sequence, and uses word embedding based on neural network training as the input of the anomaly detection model, so that the semantic rules of the log template in the current log sequence can be expressed, and the purpose of dimensionality reduction can be achieved, thereby accelerating the computational efficiency of the entire model. The stacked LSTM layer in the model effectively extracts the implicit pattern of the log sequence, and the self-attention layer represents the dependency relationship by calculating the similarity between logs in a sequence, which can better learn the internal structure of a sequence. The anomaly detection model can detect unknown execution workflow sequence anomalies by inputting the normal log sequence pattern into the model for training. Experimental results show that the overall accuracy of the detection model for log sequence anomaly detection is better than existing methods, and has a lower time overhead.
[0082] In summary, log auditing refers to the centralized collection of various types of information such as system security events, user access records, system operation logs, and system operation status in the information system, and after normalization, filtering, merging, and alarm analysis, centralized storage and management in the form of logs in a unified format, combined with rich log statistics and correlation analysis functions, to achieve a comprehensive audit of information system logs. In the present invention, multivariate log data is collected from multiple dimensions such as business scope, time dimension, network security, and operation and maintenance requirements, and data-driven correlation modeling is performed using the collected service access logs. A log anomaly detection model based on an intelligent algorithm is established to perform multidimensional data analysis and mining, track the impact of the internal connections of multiple parallel application services, and achieve unified management of defects and faults, hidden danger analysis, fault location, safety warning, and other analysis, as well as pre-prevention and post-fault analysis of faults. The core invention points of the technical solution of the present invention include: (1) First, a wide-area data interaction model is modeled, and the data traceability model is realized by using the underlying distributed ledger of the blockchain and its programmability. The immutability of the blockchain ensures the non-repudiation of the data interaction log, prevents the possibility of malicious users / malicious contracts tampering with the data, and ensures the reliability of the operation log traceability history. (2) The blockchain smart contract technology is used to realize the automatic triggering of the log on the chain, avoiding manual intervention and further improving the authority of the interaction log. (3) Based on the historical abnormal data of the system, artificial intelligence algorithms such as data classification, data analysis and data mining are used to establish the relationship between the historical abnormalities of the system, the current operating status and the potential abnormalities in the future through log storage and log traceability, so as to realize the prediction of abnormalities of the control cloud system. (4) Based on the wide-area data interaction log storage and auditing technology of the blockchain, the present invention proposes an application service log data traceability model based on the blockchain (alliance chain) based on the PROV standard of data traceability, and further constructs the application service log traceability model based on the blockchain smart contract, and designs two collaborative smart contracts to complete the application service log on-chain storage and application service log traceability.
[0083] Example 3
[0084] The following is an apparatus embodiment of the present invention, which can be used to execute the method embodiment of the present invention; for details not disclosed in the apparatus embodiment, please refer to the method embodiment of the present invention.
[0085] See also Fig.10 , a log audit system based on multivariate log data analysis according to an embodiment of the present invention includes:
[0086] Analysis target acquisition module, used to obtain log data analysis targets;
[0087] A wide-area log acquisition module is used to locate multiple log data sources for related services distributed at the national, provincial and local levels based on the log data analysis target and using a blockchain-based log notarization and traceability method to obtain wide-area logs;
[0088] a structured data log record acquisition module, used for parsing unstructured and semi-structured original log records in the wide area log into a structured form, and combining them with structured original log records in the wide area log to form structured data log records;
[0089] The audit report acquisition module is used to perform an audit based on the structured data log records and obtain an audit report, thereby completing a log audit based on multivariate log data analysis.
[0090] Example 4
[0091] In another embodiment of the present invention, a computer device is provided, the computer device including a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the log audit method based on multivariate log data analysis.
[0092] Example 5
[0093] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the log audit method based on multivariate log data analysis in the above embodiment.
[0094] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0095] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A log audit method based on multivariate log data analysis, characterized in that: The following steps are involved: Get the log data analysis target; Based on the log data analysis goal, the blockchain-based log notarization and traceability method is used to locate the multiple log data sources of related services distributed at the national, provincial and local levels to obtain wide-area logs; Parsing unstructured and semi-structured original log records in the wide-area log into a structured form, and combining them with structured original log records in the wide-area log to form structured data log records; Performing an audit based on the structured data log records and obtaining an audit report, completing a log audit based on multivariate log data analysis; in, In the log evidence storage and traceability method based on blockchain: The blockchain is a consortium chain; The blockchain stores pre-built regulatory model data traceability model information applicable to the blockchain; wherein the pre-built regulatory model data traceability model applicable to the blockchain is established based on PROV, including: entities, activities and agents; The object described by the entity is a data interaction operation, which is formally described as: data interaction operation = (data summary, interaction ID, initiator, operation name, extended field); wherein the data summary is a data summary of the data operated by the data interaction operation, and the interaction ID is used as a unique identifier of the interaction initiator; The activity is formally described as follows: activity = (activity type, activity agent, extension field); wherein the activity type is used to specify the data operation type, the activity agent field is used for the agent associated with the activity, and the extension field is used for function extension; The agent is formally described as agent = (agent type, agent ID, extension field); During the log storage process, the preset operation log traceability contract is used to achieve on-chain storage; During the log tracing process, the query is realized based on the preset operation tracing verification contract; The steps of performing an audit based on the structured data log record and obtaining an audit report and completing a log audit based on multivariate log data analysis specifically include: Input the structured data log record into a pre-built log sequence anomaly detection model based on a self-attention mechanism, form an audit report through the output result of the log sequence anomaly detection model, and complete the log audit based on multivariate log data analysis; The log sequence anomaly detection model models the log template sequence as a natural language sequence and takes word embedding based on neural network training as input; the log sequence anomaly detection model is provided with a stacked LSTM layer for extracting implicit patterns of the log sequence, and the log sequence anomaly detection model is provided with a self-attention layer for representing the dependency relationship between logs in a sequence by calculating the similarity between them.
2. According to claim 1, a log audit method based on multivariate log data analysis is characterized in that: The steps of obtaining the log data analysis target specifically include: Based on the preset business requirements and the type of cloud service being regulated, log data analysis objectives are obtained.
3. According to claim 1, a log audit method based on multivariate log data analysis is characterized in that: In the process of log storage, the steps of implementing the chain based on the preset operation log tracing contract specifically include: When the client initiates wide-area data interaction, the wide-area data interaction middleware triggers the operation log traceability contract to start recording the operation log on the chain, forming an operation log traceability chain; The operation log traceability contract encapsulates Put, Delete, Update and Query operations, which are used for calls in different situations of data addition, deletion, modification and query; Put operation indicates that the remote data interaction operation is to add new data, Delete operation indicates that the remote data interaction operation is to delete data, Update operation indicates that the remote data interaction operation is to change, and Query operation indicates that the remote data interaction operation is to query; The chain structure of the operation log traceability chain is composed of nodes; each node includes a node head and a node body, the node head stores the Hash value of the interactive operation data content, and the node body includes the interaction ID, activity, agent, source end and forward pointer; among them, the source end field is used to store the Chinese name of the operating user, and the forward pointer is used to save the header Hash of the previous node.
4. According to claim 1, a log audit method based on multivariate log data analysis is characterized in that: In the log tracing process, the steps of implementing the query based on the preset operation tracing verification contract specifically include: The hash value of the specified data content is used as a parameter and input from the interface preset by the operation traceability verification contract to realize the historical version query of the operation log traceability chain.
5. According to claim 1, a log audit method based on multivariate log data analysis is characterized in that: The blockchain is implemented using the Fabric consortium chain platform under the Hyperledger project.
6. A log audit system based on multivariate log data analysis, characterized in that: include: Analysis target acquisition module, used to obtain log data analysis targets; A wide-area log acquisition module is used to locate multiple log data sources for related services distributed at the national, provincial and local levels based on the log data analysis target and using a blockchain-based log notarization and traceability method to obtain wide-area logs; a structured data log record acquisition module, used for parsing unstructured and semi-structured original log records in the wide area log into a structured form, and combining them with structured original log records in the wide area log to form structured data log records; An audit report acquisition module, used to perform an audit based on the structured data log records and obtain an audit report, completing a log audit based on multivariate log data analysis; in, In the log evidence storage and traceability method based on blockchain: The blockchain is a consortium chain; The blockchain stores pre-built regulatory model data traceability model information applicable to the blockchain; wherein the pre-built regulatory model data traceability model applicable to the blockchain is established based on PROV, including: entities, activities and agents; The object described by the entity is a data interaction operation, which is formally described as: data interaction operation = (data summary, interaction ID, initiator, operation name, extended field); wherein the data summary is a data summary of the data operated by the data interaction operation, and the interaction ID is used as a unique identifier of the interaction initiator; The activity is formally described as follows: activity = (activity type, activity agent, extension field); wherein the activity type is used to specify the data operation type, the activity agent field is used for the agent associated with the activity, and the extension field is used for function extension; The agent is formally described as agent = (agent type, agent ID, extension field); During the log storage process, the preset operation log traceability contract is used to achieve on-chain storage; During the log tracing process, the query is realized based on the preset operation tracing verification contract; The steps of performing an audit based on the structured data log record and obtaining an audit report and completing a log audit based on multivariate log data analysis specifically include: Input the structured data log record into a pre-built log sequence anomaly detection model based on a self-attention mechanism, form an audit report through the output result of the log sequence anomaly detection model, and complete the log audit based on multivariate log data analysis; The log sequence anomaly detection model models the log template sequence as a natural language sequence and takes word embedding based on neural network training as input; the log sequence anomaly detection model is provided with a stacked LSTM layer for extracting implicit patterns of the log sequence, and the log sequence anomaly detection model is provided with a self-attention layer for representing the dependency relationship between logs in a sequence by calculating the similarity between them.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the log audit method based on multivariate log data analysis as described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the log audit method based on multivariate log data analysis as described in any one of claims 1 to 5 are implemented.
