CN110489313B - Operation log recording method and device based on block chain and storage medium - Google Patents

Operation log recording method and device based on block chain and storage medium Download PDF

Info

Publication number
CN110489313B
CN110489313B CN201910598600.5A CN201910598600A CN110489313B CN 110489313 B CN110489313 B CN 110489313B CN 201910598600 A CN201910598600 A CN 201910598600A CN 110489313 B CN110489313 B CN 110489313B
Authority
CN
China
Prior art keywords
operation log
log
service
block chain
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910598600.5A
Other languages
Chinese (zh)
Other versions
CN110489313A (en
Inventor
朱坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910598600.5A priority Critical patent/CN110489313B/en
Priority to PCT/CN2019/117899 priority patent/WO2021000494A1/en
Publication of CN110489313A publication Critical patent/CN110489313A/en
Application granted granted Critical
Publication of CN110489313B publication Critical patent/CN110489313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6272Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database by registering files or documents with a third party

Abstract

The invention belongs to the technical field of block chains, and discloses an operation log recording method based on a block chain, which comprises the following steps: generating an operation log according to the service processing request; recording the operation log through a service log recording system; and writing the operation log recorded by the service log recording system into a block chain account book. The invention also discloses an electronic device and a storage medium. The invention writes the generated operation log into the block chain, solves the problem that the operation log is easy to be falsified by using the non-tampering property and the traceability of the block chain, and improves the possibility of finding the problem and the traceability through the operation log.

Description

Operation log recording method and device based on block chain and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method and an apparatus for recording an operation log based on a block chain, and a storage medium.
Background
The system log is information for recording hardware, software and system problems in the service system, and can also monitor events occurring in the system. The recorded system log can be used for checking the reason of error occurrence or inquiring traces left by an operator. Business operation activities such as business promotion, activity expansion, discount promotion and the like of the front-end APP or the webpage are controlled through the back-end management system, and each operation records a log so as to trace back who and why some operations are performed. The current operation record logs are all stored in a traditional database, and the problem that the operation record logs are easy to be tampered by people exists.
Disclosure of Invention
The invention provides an operation log recording method, device and storage medium based on a block chain, and aims to solve the problem that an operation log is easily tampered by people in the prior art.
In order to achieve the above object, an aspect of the present invention is to provide an operation logging method based on a block chain, including: generating an operation log according to the service processing request; recording the operation log through a service log recording system; and writing the operation log recorded by the service log recording system into a block chain account book.
Preferably, the step of writing the operation log recorded by the service logging system into a block chain ledger includes: receiving a storage request, wherein the storage request comprises an operation log to be stored and a corresponding service type; generating one or more data blocks according to the operation log to be stored; storing the one or more data blocks in a block chain ledger.
Preferably, the generating one or more data blocks according to the operation log to be stored includes: classifying the operation logs to be stored according to the service types; generating different data blocks according to the operation logs to be stored of different service types, wherein the generating of the data blocks comprises the following steps: recording the stored operation log to be stored into a block main body, and generating all data information in the data block in the block main body; storing the data information in a block header and generating a hash value of the data block; and saving the time stamp to finish the generation of the data block.
Preferably, after the step of generating one or more data chunks, the method further includes: applying for data synchronization by nodes other than the node corresponding to the data block in the block chain; the data block is synchronized to all nodes in a block chain.
Preferably, before the step of storing the one or more data blocks in a blockchain ledger, the method further comprises: inquiring whether a historical operation log is stored in a service log recording system; if the historical operation logs are inquired to be stored in the service log recording system, sending an adding request through the service log recording system; and receiving an adding request sent by the service log recording system, and adding the operation log stored in the service log recording system into a data block.
Preferably, before the step of writing the operation log recorded by the service logging system into a block chain ledger, the method further includes: and formatting the generated operation log, and converting the generated operation log into a preset format text.
Preferably, before the step of writing the operation log recorded by the service logging system into a block chain ledger, the method further includes: filtering the recorded operation logs, filtering invalid logs, and writing the operation logs obtained through filtering into a block chain account book; wherein, the step of filtering the recorded operation log comprises: and acquiring the keywords of the invalid logs, and filtering the operation logs with the keywords.
Preferably, after the step of writing the operation log recorded by the service log recording system into the block chain ledger, the method further includes: receiving a query request, wherein the query request comprises the service type and the data identification of an operation log to be queried; and inquiring the operation log in the block chain account book according to the data identification.
In order to achieve the above object, another aspect of the present invention provides an electronic device, including: a processor; a memory, in which a block chain based oplogging program is included, which when executed by the processor implements the steps of the block chain based oplogging method as described above.
In order to achieve the above object, a further aspect of the present invention is to provide a computer-readable storage medium, which includes a blockchain-based oplogging program, and when the blockchain-based oplogging program is executed by a processor, the method implements the steps of the blockchain-based oplogging method as described above.
Compared with the prior art, the invention has the following advantages and beneficial effects:
according to the method and the device, the generated operation log is written into the block chain, and the problem that the operation log is easily tampered is solved by using the non-tampering property and the traceability of the block chain, the possibility that the problem and the traceability are found through the operation log is improved, and people who perform operations can be conveniently known.
Drawings
FIG. 1 is a schematic flow chart of a block chain-based operation log recording method according to the present invention;
FIG. 2 is a block diagram of an operation logging program based on a block chain according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The embodiments of the present invention will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will recognize that the described embodiments can be modified in various different ways, or combinations thereof, without departing from the spirit and scope of the present invention. Accordingly, the drawings and description are illustrative in nature and are only intended to illustrate the invention and not to limit the scope of the claims. Furthermore, in the present description, the drawings are not drawn to scale and like reference numerals designate like parts.
Fig. 1 is a schematic flow diagram of an operation log recording method based on a block chain according to the present invention, and as shown in fig. 1, the operation log recording method based on a block chain according to the present invention includes the following steps:
step S1, generating an operation log according to the service processing request, where the service processing request refers to a request for configuration running on an operation line, the operation log is used to record which people have performed which operations and which configurations have been run, and the service processing request corresponds to the service system, for example, if the service system is a financial system, the corresponding service processing request may be a request for financing, fund, loan, or the like, and if the service system is a car insurance system, the corresponding service processing request may be a request for underwriting, claim settlement, or the like;
step S2, recording the operation log through a service log recording system;
and step S3, writing the operation log recorded by the service log recording system into a block chain account book.
According to the invention, the operation log is recorded by using a block chain distributed account book mode, and the problem that the operation log is easily tampered by people can be well solved by using the non-tampering property and traceability of the block chain, so that the capability of finding the problem and the traceability problem through the operation log is improved.
The business log recording system is used for recording operation logs of a business system, the business system comprises a front-end APP for business promotion, various webpage systems and the like, such as a financial system, a medical insurance system and the like, and the generated operation logs comprise operation dates, operation times, operator accounts, operation descriptions and the like, wherein the operation descriptions are brief descriptions of operation operations, for example, in the financial system, the operation descriptions generated by operations such as transfer or deduction and the like comprise serial numbers, operation types (transfer or deduction), account balances before operation, account balances after operation and the like.
The block chain account book is a database shared, copied and synchronized among network members, records the exchange of assets or data, and has the characteristics of difficult tampering and decentralization. In the invention, the recorded operation log is written into the block chain account book, so that the stored operation log is not easy to be falsified, and the operation log can be shared among a plurality of network members through the block chain account book, thereby facilitating the operations such as storage, query and the like of the operation log.
Preferably, the step of writing the operation log recorded by the service log recording system into a block chain ledger includes:
receiving a storage request, wherein the storage request comprises an operation log to be stored and a corresponding service type, the operation logs generated by operating different service systems are different, the operation logs are convenient to store in a classified manner according to the service types and query, the operation logs are carried with the service types when being stored, and the service types can be financial services, insurance services, automobile services, medical services and the like; generating one or more data blocks according to the operation log to be stored; storing the one or more data blocks in a block chain ledger. When a data block is generated, storing all operation logs recorded by a service log recording system in the data block, and storing the data block in a block chain account book; when a plurality of data blocks are generated, all operation logs recorded by the business log recording system are respectively stored in the plurality of data blocks, and then the plurality of data blocks are stored in the block chain account book, so that the recorded logs in each data block can be respectively inquired.
Preferably, the generating one or more data blocks according to the operation log to be stored includes: and classifying the operation logs to be stored according to the service types, and generating different data blocks according to the operation logs to be stored of different types, so that the different data blocks stored in the block chain account book represent the operation logs of different service systems, and the operation logs can be conveniently inquired. Wherein, the generation of each data block is realized by the following modes: recording the stored operation log to be stored into a block main body, and generating all data information (data of the operation log to be stored) in the data block in the block main body; storing the data information in a block header and generating a hash value of the data block; and saving the time stamp to finish the generation of the data block. The hash value in the data block is generated according to the data of the block header in the last data block, and the last data block refers to the data block which is generated in the block chain and is associated with the data block to be generated.
After the data block is stored in the block chain ledger, the stored operation log can be directly acquired in the block chain ledger. In an embodiment of the present invention, a data identifier is generated according to an operation log to be stored and a corresponding service type, and the data identifier is stored in the data block, where the data identifier may be a data ID representing the operation log, or a data name of the operation log, or a combination of the data ID and the data name. Further, the data identifications of different service types are different, so that in order to facilitate the generation of the operation log subsequently, the data identifications can be generated at the same time, and after the data blocks are stored in the block chain, the data identifications are returned to the service log recording system.
In an embodiment of the present invention, after the step of generating one or more data chunks, the method further includes: applying for data synchronization through nodes except nodes corresponding to data blocks in a block chain; and synchronizing the data block to all nodes in the block chain so as to ensure the consistency of the log data stored in the block chain, so that the data in each node are the same, and the operation log data can be acquired through any one node without transmitting the operation log data.
In an embodiment of the present invention, before the step of storing the one or more data blocks in the blockchain ledger, the method further includes: inquiring whether a historical operation log is stored in a service log recording system; if the historical operation log is stored in the service log recording system, sending an adding request through the service log recording system; and receiving an adding request sent by the business log recording system, adding the historical operation log stored in the business log recording system into a data block, and storing the data block into a block chain account book. And if the historical operation log is not inquired to be stored in the service log recording system, sending a feedback signal through the service log recording system, receiving the feedback signal, and storing the one or more data blocks in a block chain account book. The historical operation logs stored in the service log recording system refer to some operation logs which are actually stored in the service log recording system, and the historical operation logs can be added to the block chain account book for unified storage. Preferably, the received addition request carries a data identifier, so that the historical operation logs marked in the block chain ledger through the data identifier are convenient to query and manage the operation logs.
In an embodiment of the present invention, after the step of recording the operation log by using a service log recording system, the operation log is cached, and the operation log cached in the service log recording system is uniformly written into a block chain ledger at a set time interval, so as to reduce the frequency of data writing in a block chain.
In an embodiment of the present invention, before the step of writing the operation log recorded by the service log recording system into a block chain ledger, the method further includes: and preprocessing the generated operation log through the service log recording system, and writing the preprocessed operation log into a block chain account book. Further, the pre-processing comprises: and formatting the operation log through the service log recording system, converting the generated operation log into a preset format text, and writing the converted preset format text into a block chain account book, so that unified storage is facilitated. In one embodiment of the invention, the pre-processing comprises: and filtering the generated operation log, filtering invalid logs, and writing the operation log obtained by filtering into a block chain account book. Wherein, filtering process means to select the operation log that produces, picks out the operation log that accords with the settlement demand and stores in the block chain account book to convenient inquiry is used, thereby filters out invalid log, wherein, carries out filtering process to the operation log of record, includes: and acquiring the keywords of the invalid logs, and filtering the operation logs with the keywords. The invalid log refers to a log generated by an operation which does not have a fundamental influence on the operation configuration and the like on the operation line, and is not beneficial to the discovery and tracing of problems. The set requirement may be an operation log generated for the operation of some specific business system or an operation log generated for some specific operation of some business system. For example, the business log recording system may only write the operation log generated by the operation on the financial system into the blockchain account book for storage, or may only write the operation log generated by the operation on the transfer remittance on the financial system into the blockchain account book for storage, so that the business log recording system is more targeted when inquiring the blockchain account book.
In an embodiment of the present invention, after the step of writing the operation log recorded by the service log recording system into a block chain ledger, the method further includes: receiving a query request, wherein the query request comprises the service type and the data identification of an operation log to be queried; and inquiring the operation log in the block chain account book according to the data identification. The query request comprises the service type and the data identification of the operation log to be queried, the operation log in the block chain account book can be directly positioned only according to the data identification, or approximate positioning can be performed according to the service type first, and then accurate positioning is performed according to the data identification, so that the workload during query is reduced. The data identification is used for characterizing the operation log, and the service type for generating the operation log can be included in the data identification. Preferably, whether the operation log meets the set requirement is judged through the data identification.
In an embodiment of the present invention, before the step of writing the operation log recorded by the service log recording system into a block chain ledger, the method further includes: and log directories are constructed in the block chain account book, and the operation logs are respectively written into the directories, so that the operation logs can be conveniently inquired in the follow-up process according to the directories. The construction of the log catalog can be carried out according to the service type represented by the log. Further, a block identifier may be generated according to the log directory, so as to query a specific certain data block or a certain data block detail in the block chain according to the block identifier, where the data block detail includes a block height, a block identifier, and a log list in the data block.
The operation log recording method based on the block chain is applied to an electronic device, and the electronic device can be a television, a smart phone, a tablet computer, a computer and other terminal equipment.
The electronic device includes: a processor; a memory, configured to store a block chain based operation logging program, and a processor executes the block chain based operation logging program to implement the following steps of the block chain based operation logging method: generating an operation log according to the service processing request; recording the operation log through a service log recording system; and writing the operation log recorded by the service log recording system into a block chain account book. By writing the operation log into the block chain account book, the problem that the log is easily tampered is solved by using the non-tampering property and the traceability of the block chain, and the problem can be conveniently searched according to the operation log or the root cause of the problem can be traced.
The electronic device further comprises a network interface, a communication bus and the like. The network interface may include a standard wired interface and a standard wireless interface, and the communication bus is used for realizing connection and communication among the components.
The memory includes at least one type of readable storage medium, which may be a non-volatile storage medium such as a flash memory, a hard disk, an optical disk, etc., or a plug-in hard disk, etc., and is not limited thereto, and may be any device that stores instructions or software and any associated data files in a non-transitory manner and provides instructions or software programs to the processor to enable the processor to execute the instructions or software programs. In the invention, the software program stored in the memory comprises an operation log recording program based on the block chain, and the operation log recording program based on the block chain can be provided for the processor, so that the processor can execute the operation log recording program based on the block chain, and the steps of the operation log recording method based on the block chain are realized.
The processor may be a central processing unit, a microprocessor or other data processing chip, etc., and may run a stored program in the memory, for example, an oplogging program based on a block chain in the present invention.
The electronic device may further comprise a display, which may also be referred to as a display screen or display unit. In some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch panel, or the like. The display is used for displaying information processed in the electronic device and for displaying a visual work interface.
The electronic device may further comprise a user interface which may comprise an input unit, such as a keyboard, a speech output device, such as a sound, a headset, etc.
In other embodiments, the blockchain-based oplogging program may also be partitioned into one or more modules that are stored in memory and executed by a processor to implement the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions. Fig. 2 is a schematic block diagram of an oplogging program based on a block chain in the present invention, and as shown in fig. 2, the oplogging program based on a block chain may be divided into: the device comprises a log generating module 1, a log recording module 2 and a log storing module 3. Wherein:
the log generation module 1 is used for generating an operation log according to the service processing request;
the log recording module 2 is used for recording the operation log through a service log recording system;
and the log storage module 3 is used for writing the operation log recorded by the service log recording system into a block chain account book.
The business log recording system is used for recording operation logs of a business system, the business system comprises a front-end APP used for business promotion, various webpage systems and the like, such as a financial system, a medical insurance system and the like, and the generated operation logs comprise operation dates, operation times, operator account numbers, operation descriptions and the like, wherein the operation descriptions are brief descriptions of operation operations, for example, in the financial system, the operation descriptions generated by operations such as transfer or deduction comprise serial numbers, operation types (transfer or deduction), account balances before operation, account balances after operation and the like.
The block chain ledger is a database shared, copied and synchronized among network members, records the exchange of assets or data, and has the characteristics of being not easy to be tampered and decentralized. In the invention, the recorded operation log is written into the block chain account book, so that the stored operation log is not easy to be falsified, and the operation log can be shared among a plurality of network members through the block chain account book, thereby facilitating the operations such as storage, query and the like of the operation log.
Preferably, the log storage module 3 comprises: the request receiving unit is used for receiving a storage request, wherein the storage request comprises an operation log to be stored and a corresponding service type, the operation logs generated by different service systems are different, the operation logs are convenient to classify and store according to the service types and query, the service types are carried when the operation logs are stored, and the service types can be financial services, insurance services, automobile services, medical services and the like; the block generating unit is used for generating one or more data blocks according to the operation log to be stored; and the block storage unit stores the one or more data blocks in a block chain account book. When a data block is generated, storing all operation logs recorded by a service log recording system in the data block, and storing the data block in a block chain account book; when a plurality of data blocks are generated, all operation logs recorded by the business log recording system are respectively stored in the plurality of data blocks, and then the plurality of data blocks are stored in the block chain account book, so that the recorded logs in each data block can be respectively inquired.
Preferably, when the block generating unit generates a plurality of data blocks according to the operation log to be stored, the operation log to be stored is classified according to the service type, and different data blocks are generated according to different types of operation logs to be stored. Therefore, different data blocks stored in the block chain account book represent operation logs of different service systems, and the operation logs can be conveniently inquired. Wherein, the generation of each data block is realized by the following modes: recording the stored operation logs to be stored into a block main body, and generating all data information (data of the operation logs to be stored) in the data block in the block main body; storing the data information in a block header and generating a hash value of the data block; and saving the time stamp to finish the generation of the data block. The hash value in the data block is generated according to the data of the block header in the last data block, and the last data block refers to the data block which is generated in the block chain and is associated with the data block to be generated.
After the data block is stored in the block chain ledger, the stored operation log can be directly acquired in the block chain ledger. In an embodiment of the present invention, the electronic apparatus further includes an identifier generating module, which generates a data identifier according to the operation log to be stored and the corresponding service type, and stores the data identifier in the data block, where the data identifier may be a data ID representing the operation log, or a data name of the operation log, or a combination of the data ID and the data name. Further, the data identifications of different service types are different, so that in order to facilitate the generation of the data identifications at the same time when the operation log is subsequently generated, the data identifications are returned to the service log recording system after the data blocks are stored in the block chain.
In an embodiment of the present invention, the electronic device further includes a data synchronization module, after the step of generating one or more data blocks, synchronizing the data blocks to all nodes in the block chain to ensure consistency of log data stored in the block chain, so that data in each node is the same, and the operation log data can be acquired through any one node without transmission of the operation log data.
In an embodiment of the present invention, the electronic apparatus further includes an adding module, configured to query whether a historical operation log is stored in a service log recording system before the step of storing the one or more data blocks in a block chain ledger; if the historical operation log is stored in the service log recording system, sending an adding request; and receiving an adding request, adding the historical operation log stored in the service log recording system into a data block, and storing the data block into a block chain account book. The historical operation logs stored in the service log recording system refer to some operation logs which are actually stored in the service log recording system, and the historical operation logs can be added to the block chain account book for unified storage. Preferably, the received addition request carries a data identifier, so that the operation log is marked in the blockchain account book through the data identifier, and query and management of the operation log are facilitated.
In an embodiment of the present invention, the electronic apparatus further includes a cache module, after the step of recording the operation log by the service log recording system, the operation log is cached, and the operation log cached in the service log recording system is uniformly written into the block chain ledger at every set time interval, so as to reduce the frequency of data writing in the block chain.
In an embodiment of the present invention, the electronic apparatus further includes a preprocessing module, before the step of writing the operation log into the block chain ledger, the service log recording system preprocesses the generated operation log, and writes the preprocessed operation log into the block chain ledger. Further, the preprocessing module performs preprocessing in the following manner, including: the operation log is formatted through the service log recording system, the generated operation log is converted into a preset format text, and the converted preset format text is written into a block chain account book, so that unified storage is facilitated. In one embodiment of the present invention, the preprocessing module performs preprocessing by: and filtering the generated operation log, and writing the operation log obtained by filtering into a block chain account book. Wherein, filtering process means to select the operation log that produces, picks out the operation log that accords with the settlement demand and stores in the block chain account book to convenient inquiry is used, thereby filters out invalid log, wherein, carries out filtering process to the operation log of record, includes: and acquiring the keywords of the invalid logs, and filtering the operation logs with the keywords. The invalid log refers to a log generated by an operation that does not fundamentally affect the operation configuration and the like on the operation line, and is not beneficial to problem discovery and tracing. The set requirement may refer to an operation log generated for an operation of some specific service system or an operation log generated for a specific operation of some service system. For example, the service log recording system may only write an operation log generated by operating a financial system into a block chain account book for storage, or may only write an operation log generated by performing transfer remittance operation on the financial system into the block chain account book for storage, so that the service log recording system is more targeted when querying the block chain account book.
In an embodiment of the present invention, the electronic apparatus further includes a query module, configured to receive a query request after the step of writing the operation log into the blockchain ledger, where the query request includes a service type and a data identifier of the operation log to be queried; and inquiring the operation log in the block chain account book according to the data identification. The query request comprises the service type and the data identification of the operation log to be queried, the operation log in the block chain account book can be directly positioned only according to the data identification, or approximate positioning can be performed according to the service type first, and then accurate positioning is performed according to the data identification, so that the workload during query is reduced. The data identification is used for characterizing the operation log, and the service type for generating the operation log can be included in the data identification. Preferably, whether the operation log meets the set requirement is judged through the data identification.
In an embodiment of the present invention, the electronic apparatus further includes a directory constructing module, before the step of writing the operation log into the block chain directory, a log directory is constructed in the block chain directory, and the operation log is written into each directory respectively, so that the operation log is conveniently queried according to the directory subsequently. The construction of the log catalog can be carried out according to the service type represented by the log. Further, a block identifier may be generated according to the log directory, so as to query a specific certain data block or a certain data block detail in the block chain according to the block identifier, where the data block detail includes a block height, a block identifier, and a log list in the data block.
In one embodiment of the invention, a computer readable storage medium may be any tangible medium that can contain, or store a program or instructions, where the program can be executed to implement corresponding functions via hardware associated with stored program instructions. For example, the computer readable storage medium may be a computer diskette, hard disk, random access memory, read only memory, or the like. The invention is not so limited and can be any means that stores the instructions or software and any associated data files or data structures in a non-transitory manner and that can be provided to a processor to cause the processor to execute the programs or instructions therein. The computer readable storage medium includes a block chain based operation logging program, and when the block chain based operation logging program is executed by a processor, the block chain based operation logging method is implemented as follows:
generating an operation log according to the service processing request;
recording the operation log through a service log recording system;
and writing the operation log recorded by the service log recording system into a block chain account book.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the above-mentioned operation log recording method based on the block chain and the specific implementation of the electronic device, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An operation log recording method based on a block chain is applied to an electronic device and is characterized by comprising the following steps:
generating an operation log according to the service processing request;
recording the operation log through a service log recording system;
inquiring whether a historical operation log is stored in a service log recording system; if the historical operation log is stored in the service log recording system, sending an adding request through the service log recording system; receiving an adding request sent by the service log recording system, and adding the historical operation log to a data block; writing the operation log recorded by the service log recording system into a block chain account book; the step of writing the operation log recorded by the service log recording system into a block chain account book includes:
receiving a storage request, wherein the storage request comprises an operation log to be stored and a corresponding service type;
generating one or more data blocks according to the operation log to be stored;
storing the one or more data blocks in a blockchain ledger; storing the data blocks into a block chain account book; if the historical operation logs are not inquired to be stored in the service log recording system, sending a feedback signal through the service log recording system, receiving the feedback signal, and storing the one or more data blocks in a block chain account book; the historical operation logs stored in the service logging system refer to some operation logs which actually exist and are already stored in the service logging system.
2. The method according to claim 1, wherein generating one or more data blocks according to the operation log to be stored comprises:
classifying the operation logs to be stored according to the service types;
different data blocks are generated according to different types of operation logs to be stored,
wherein generating the data chunk comprises: recording the stored operation log to be stored into a block main body, and generating all data information in the data block in the block main body;
storing the data information in a block header and generating a hash value of the data block;
and saving the time stamp to finish the generation of the data block.
3. The method of claim 1, wherein the step of generating one or more data blocks is followed by the step of:
applying for data synchronization through nodes except nodes corresponding to data blocks in a block chain;
the data block is synchronized to all nodes in a block chain.
4. The method according to claim 1, wherein before the step of writing the operation log recorded by the service logging system into a block chain ledger, the method further comprises: and formatting the generated operation log, and converting the generated operation log into a preset format text.
5. The method according to claim 1, wherein before the step of writing the operation log recorded by the service logging system into a blockchain ledger, the method further comprises: filtering the recorded operation logs, filtering invalid logs, and writing the operation logs obtained through filtering into a block chain account book;
wherein, the step of filtering the recorded operation log comprises: and acquiring the keywords of the invalid logs, and filtering the operation logs with the keywords.
6. The method according to claim 1, wherein after the step of writing the operation log recorded by the service logging system into a blockchain ledger, the method further comprises:
receiving a query request, wherein the query request comprises the service type and the data identification of an operation log to be queried;
and inquiring the operation log in the block chain account book according to the data identification.
7. An electronic device, comprising: a processor; a memory including a blockchain-based oplogging program therein, the blockchain-based oplogging program when executed by the processor implementing the steps of the blockchain-based oplogging method of any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium includes therein a blockchain-based oplogging program, which when executed by a processor implements the steps of the blockchain-based oplogging method according to any one of claims 1 to 6.
CN201910598600.5A 2019-07-04 2019-07-04 Operation log recording method and device based on block chain and storage medium Active CN110489313B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910598600.5A CN110489313B (en) 2019-07-04 2019-07-04 Operation log recording method and device based on block chain and storage medium
PCT/CN2019/117899 WO2021000494A1 (en) 2019-07-04 2019-11-13 Blockchain-based operation logging method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910598600.5A CN110489313B (en) 2019-07-04 2019-07-04 Operation log recording method and device based on block chain and storage medium

Publications (2)

Publication Number Publication Date
CN110489313A CN110489313A (en) 2019-11-22
CN110489313B true CN110489313B (en) 2022-07-19

Family

ID=68546529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910598600.5A Active CN110489313B (en) 2019-07-04 2019-07-04 Operation log recording method and device based on block chain and storage medium

Country Status (2)

Country Link
CN (1) CN110489313B (en)
WO (1) WO2021000494A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143164A (en) * 2019-12-18 2020-05-12 银清科技有限公司 Operation data processing method and device based on block chain
CN111241157B (en) * 2020-01-07 2023-10-24 蚂蚁胜信(上海)信息技术有限公司 Operation behavior backtracking method and device and electronic equipment
CN111767168B (en) * 2020-06-23 2022-07-22 江苏荣泽信息科技股份有限公司 Block chain-based storage system facilitating data backtracking
CN111885088A (en) * 2020-08-06 2020-11-03 中国银行股份有限公司 Log monitoring method and device based on block chain
CN112347195A (en) * 2021-01-08 2021-02-09 南京慧畅数码技术有限公司 Gas cylinder data recording method and device based on block chain
CN114971649B (en) * 2021-05-26 2023-10-24 中移互联网有限公司 Information processing method, device, equipment and storage medium based on block chain
CN113553347B (en) * 2021-08-09 2024-03-22 恒安嘉新(北京)科技股份公司 Block chain-based data processing method, device, equipment and storage medium
CN113766025B (en) * 2021-09-09 2023-06-06 中国联合网络通信集团有限公司 Vehicle investigation damage assessment method, device and system based on block chain
CN115460214B (en) * 2022-11-10 2023-02-07 北京天元特通科技有限公司 Distributed network communication log storage and retrieval method and device
CN115629950B (en) * 2022-12-19 2023-04-28 深圳联友科技有限公司 Extraction method of performance test asynchronous request processing time point
CN115858466B (en) * 2023-02-07 2023-06-09 广州市千钧网络科技有限公司 Operation log generation method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596588A (en) * 2018-04-28 2018-09-28 百度在线网络技术(北京)有限公司 A kind of processing method of block data, device, computing device and storage medium
CN108833514A (en) * 2018-06-01 2018-11-16 众安信息技术服务有限公司 Audit log processing method, device and Log Audit System based on block chain
CN109522747A (en) * 2018-11-12 2019-03-26 杭州趣链科技有限公司 A kind of anti-tamper diary record system and method based on block chain
CN109753439A (en) * 2019-01-28 2019-05-14 平安科技(深圳)有限公司 Task test method and system based on block chain technology
WO2019113016A1 (en) * 2017-12-04 2019-06-13 Dan Kikinis System and method for performance testing of scalable distributed network transactional databases
CN109902074A (en) * 2019-04-17 2019-06-18 江苏全链通信息科技有限公司 Log storing method and system based on data center

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10114970B2 (en) * 2015-06-02 2018-10-30 ALTR Solutions, Inc. Immutable logging of access requests to distributed file systems
US10320566B2 (en) * 2017-04-04 2019-06-11 International Business Machines Corporation Distributed logging of application events in a blockchain
CN107766453A (en) * 2017-09-26 2018-03-06 上海策赢网络科技有限公司 Data base management method, device and storage medium based on block chain
CN108932189B (en) * 2018-06-30 2021-09-07 平安科技(深圳)有限公司 Method and device for saving server log

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019113016A1 (en) * 2017-12-04 2019-06-13 Dan Kikinis System and method for performance testing of scalable distributed network transactional databases
CN108596588A (en) * 2018-04-28 2018-09-28 百度在线网络技术(北京)有限公司 A kind of processing method of block data, device, computing device and storage medium
CN108833514A (en) * 2018-06-01 2018-11-16 众安信息技术服务有限公司 Audit log processing method, device and Log Audit System based on block chain
CN109522747A (en) * 2018-11-12 2019-03-26 杭州趣链科技有限公司 A kind of anti-tamper diary record system and method based on block chain
CN109753439A (en) * 2019-01-28 2019-05-14 平安科技(深圳)有限公司 Task test method and system based on block chain technology
CN109902074A (en) * 2019-04-17 2019-06-18 江苏全链通信息科技有限公司 Log storing method and system based on data center

Also Published As

Publication number Publication date
WO2021000494A1 (en) 2021-01-07
CN110489313A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN110489313B (en) Operation log recording method and device based on block chain and storage medium
JP6940662B2 (en) Methods and systems for the protection and verification of identities and certificates via the blockchain
CN101996067B (en) Data export method and device
CN105446991A (en) Data storage method, query method and device
US20180157851A1 (en) Systems and methods for authentication of access based on multi-data source information
CN105164674A (en) Queries involving multiple databases and execution engines
WO2019056789A1 (en) Method, device, computer device, storage medium for identifying related party transaction
US11636084B2 (en) Processing system for automated electronic record creation and transmission
CN104657387A (en) Data query method and device
WO2019056770A1 (en) Method and apparatus for data processing on basis of related transactions, and computer device
CN110765750B (en) Report data input method and terminal equipment
CN111090803A (en) Data processing method and device, electronic equipment and storage medium
CN112364021B (en) Service data processing method, device and storage medium
US20150169515A1 (en) Data driven synthesizer
CN111753141A (en) Data management method and related equipment
CN110275798A (en) Block chain data processing method, device, server and storage medium
CN115629940A (en) Micro-service full-link tracking method, device, system and medium
CN111367500A (en) Data processing method and device
WO2019056769A1 (en) Related party based transaction data processing optimization method, device, and computer device
CN114255123A (en) Risk checking method, risk checking device, computer equipment, storage medium and product
CN114153860A (en) Business data management method and device, electronic equipment and storage medium
CN110674224B (en) Entity data processing method, device and equipment and computer readable storage medium
CN110363515B (en) Rights and interests card account information inquiry method, system, server and readable storage medium
CN113806373A (en) Data processing method and device, electronic equipment and storage medium
CN111695077A (en) Asset information pushing method, terminal equipment and readable storage medium

Legal Events

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