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

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

Info

Publication number
CN110489313A
CN110489313A CN201910598600.5A CN201910598600A CN110489313A CN 110489313 A CN110489313 A CN 110489313A CN 201910598600 A CN201910598600 A CN 201910598600A CN 110489313 A CN110489313 A CN 110489313A
Authority
CN
China
Prior art keywords
operation log
block chain
block
data
stored
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.)
Granted
Application number
CN201910598600.5A
Other languages
Chinese (zh)
Other versions
CN110489313B (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to block chain technical fields, disclose a kind of operation log recording method based on block chain, comprising the following steps: are requested to generate operation log according to business processing;System, which is recorded, by business diary records the operation log;It will be in the operation log write-in block chain account book of business diary record system record.The invention also discloses a kind of electronic device and storage mediums.The present invention passes through the operation log that will generate and is written in block chain, using block chain can not tamper, trackability, solve the problems, such as that operation log is easy to be tampered, and raising is found the problem by operation log, recalls a possibility that problem.

Description

Operation log recording method, device and storage medium based on block chain
Technical field
The present invention relates to block chain technical field more particularly to a kind of operation log recording methods based on block chain, dress It sets and storage medium.
Background technique
System log is the information of hardware, software and system problem in record traffic system, while can be with monitoring system The event of middle generation.The reason of mistake occurs or the trace that inquiry operation person leaves can be checked by the system log of record Mark.The commercial operations activities such as promoting service, movable expansion, the Discount Promotion of front-end A PP or webpage are controlled by rear guard system, Each single item operation all can record log, whom be and done certain operations why in order to trace.Current operation note day Will is stored in traditional database, there are problems that Yi Beiren is distorted.
Summary of the invention
The present invention provides a kind of operation log recording method based on block chain, device and storage medium, existing to solve The problem of operation note log is easily distorted by people in technology.
To achieve the goals above, it is an aspect of the invention to provide a kind of operation log recording sides based on block chain Method, comprising: requested to generate operation log according to business processing;System, which is recorded, by business diary records the operation log;It will In the operation log write-in block chain account book of the business diary record system record.
Preferably, by the step packet in the operation log write-in block chain account book of business diary record system record It includes: receiving storage request, the storage request includes operation log to be stored and corresponding type of service;According to described wait store Operation log generates one or more data blocks;One or more of data blocks are stored in block chain account book.
Preferably, generating one or more data blocks according to the operation log to be stored includes: according to type of service Classify to the operation log to be stored;Different data fields is generated according to the operation log to be stored of different service types Block, wherein generating data block includes: the operation log recording to be stored by storage into block main body, in block main body Generate all data informations in data block;Data information is stored in block head, and generates the cryptographic Hash of data block; Holding time stamp, completes the generation of data block.
Preferably, after the step of generating one or more data blocks, further includes: pass through the data field in Except block chain Node request for data except the corresponding node of block is synchronous;All nodes data block being synchronized in block chain.
Preferably, one or more of data blocks are stored in front of the step in block chain account book, the method Further include: historical operation log whether is stored in inquiry business diary record system;If inquiring business diary record system In be stored with historical operation log, then pass through the business diary record system send addition request;Receive the business diary The addition request that record system is sent, is added to data block for the operation log stored in the business diary record system In.
Preferably, by the business diary record system record operation log write-in block chain account book in step it Before, further includes: processing is formatted to the operation log of generation, converts preset format text for the operation log of generation.
Preferably, by the business diary record system record operation log write-in block chain account book in step it Before, further includes: processing is filtered to the operation log of record, filters out invalid log, the operation log through being obtained by filtration is used In write-in block chain account book;Wherein, the step of operation log of described pair of record is filtered processing includes: to obtain invalid day The keyword of will filters out the operation log with the keyword.
Preferably, by the business diary record system record operation log write-in block chain account book in step it Afterwards, further includes: receive inquiry request, the inquiry request includes the type of service and Data Identification of operation log to be checked;Root The operation log in the block chain account book is inquired according to the Data Identification.
To achieve the goals above, another aspect of the present invention is to provide a kind of electronic device, which includes: Processor;Memory includes the operation log recording program based on block chain, the behaviour based on block chain in the memory Make to realize the operation log recording method as described above based on block chain when log recording program is executed by the processor Step.
To achieve the goals above, another aspect of the invention is to provide a kind of computer readable storage medium, described It include the operation log recording program based on block chain, the operation log based on block chain in computer readable storage medium When logging program is executed by processor, the step of realizing operation log recording method as described above based on block chain.
Compared with the existing technology, the present invention has the following advantages and beneficial effects:
The present invention passes through the operation log that will generate and is written in block chain, using block chain can not tamper, can be traced Property, solve the problems, such as that operation log is easy to be tampered, and improve the possibility for problem of finding the problem, recall by operation log Property, convenient for understanding which operation who has done.
Detailed description of the invention
Fig. 1 is the flow diagram of the operation log recording method of the present invention based on block chain;
Fig. 2 is the module diagram of the operation log recording program based on block chain in the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
Embodiment of the present invention described below with reference to the accompanying drawings.Those skilled in the art may recognize that It arrives, it without departing from the spirit and scope of the present invention, can be with a variety of different modes or combinations thereof to described Embodiment is modified.Therefore, attached drawing and description are regarded as illustrative in nature, and are only used to explain the present invention, rather than are used In limitation scope of protection of the claims.In addition, in the present specification, attached drawing is drawn not in scale, and identical attached drawing mark Note indicates identical part.
Fig. 1 is the flow diagram of the operation log recording method of the present invention based on block chain, as shown in Figure 1, this Invent the operation log recording method based on block chain, comprising the following steps:
Step S1, it is requested to generate operation log according to business processing, wherein business processing request refers to transports in request operation lines Row configuration, operation log for record who done which operation, run which configuration etc. information, business processing request with Operation system is corresponding, for example, if operation system is financial system, the request of corresponding business processing can be financing, fund, The request such as loan, if operation system is vehicle insurance system, corresponding business processing request can be the request such as accept insurance, settle a claim;
Step S2, system is recorded by business diary and records the operation log;
It step S3, will be in the operation log write-in block chain account book of business diary record system record.
By the present invention in that recording operation log with the mode of block chain distribution account book, can not distorting for block chain is utilized Property, trackability, can be very good to solve the problems, such as that operation log is easily distorted by people, so improve by operation log find ask The ability of topic, backtracking problem.
The business diary record system is used for the operation log of record traffic system, and the operation system includes being used for industry Front-end A PP and various Web page systems that business is promoted etc., for example, financial system, Hospitalization insurance system etc., the operation log packet of generation Include date of operation, operating time, operator's account, operation description etc., wherein operation is described as to operation operation briefly It is bright, for example, in financial system, the operation description that the operations such as transfer accounts or withhold generate include serial number, action type (transfer accounts or Withhold), operate before account balance etc. after account balance and operation.
Block chain account book is a kind of shared between network members, duplication and synchronous database, records assets or data Exchange, have be not easy to distort the characteristic with decentralization.In the present invention, block chain account book is written into the operation log of record In, so that the operation log of storage is not easy to be tampered, also, operation log can be made in multiple networks by block chain account book It is shared between member, convenient for the storage and the operation such as inquiry to operation log.
Preferably, by the step packet in the operation log write-in block chain account book of business diary record system record It includes:
Storage request is received, the storage request includes operation log to be stored and corresponding type of service, wherein operation The operation log that different operation systems generates is different, for the ease of being convenient for according to type of service to operation log classification storage Inquiry, type of service is carried when storing operation log, and type of service can be financial business, insurance business, automobile business, doctor Treatment business etc.;One or more data blocks are generated according to the operation log to be stored;By one or more of data fields Block is stored in block chain account book.When generating a data block, refer to all behaviour for being recorded business diary record system It is stored in a data block as log, which is stored in block chain account book;Generate multiple data blocks When, refer to that all operation logs for being recorded business diary record system are respectively stored in multiple data blocks, then will be more A data block is stored in block chain account book, can be inquired respectively the record log in each data block.
Preferably, generating one or more data blocks according to the operation log to be stored includes: according to type of service Classify to the operation log to be stored, different data blocks generated according to different classes of operation log to be stored, So that the operation log for the different data block characterization different business systems being stored in block chain account book, convenient for behaviour Make the inquiry of log.Wherein, the generation of each data block is accomplished in the following manner, comprising: by storage wait store behaviour Make log recording into block main body, all data informations in data block are generated in block main body (wait store operation day The data of will);Data information is stored in block head, and generates the cryptographic Hash of data block;Holding time stamp, completes data The generation of block.Wherein, the cryptographic Hash in data block is generated according to the data of the block head in a upper data block, on One data block refers to the data block generated in block chain, associated with data block to be generated.
After data block is stored in block chain account book, the behaviour of storage can be directly got in block chain account book Make log.In one embodiment of the present of invention, Data Identification is generated according to operation log to be stored and corresponding type of service, The Data Identification is stored in the data block, wherein Data Identification can be the data ID of characterization operation log, or behaviour Make the data name of log or the combination of data ID and data name, the present invention only needs institute to this and without specifically limiting It states Data Identification and the operation log to be stored corresponds, can be marked by the Data Identification and be stored in block Operation log in chain account book, convenient for being asked to pass through the operation log discovery inquired according to Data Identification inquiry operation log It inscribes and search efficiency can be improved.Further, the Data Identification of different service types is different, for the ease of being subsequently generated behaviour When making log, Data Identification can be generated simultaneously, and after data block is stored in block chain, Data Identification is back to Business diary records system.
In one embodiment of the present of invention, after the step of generating one or more data blocks, further includes: by removing area Node request for data except the corresponding node of data block in block chain is synchronous;The data block is synchronized in block chain All nodes, to guarantee the consistency of the daily record data stored in block chain, so that the data in each node are phases With, operation log data can be got by any one node, without carrying out the transmission of operation log data.
In one embodiment of the present of invention, one or more of data blocks are stored in the step in block chain account book Before, further includes: historical operation log whether is stored in inquiry business diary record system;If inquiring business diary record It is stored with historical operation log in system, then system is recorded by the business diary and sends addition request;Receive the business The addition request that diary record system is sent, and the historical operation log stored in the business diary record system is added to In data block, then data block stored into block chain account book.It is stored in business diary record system if not inquiring Historical operation log then records system by business diary and sends feedback signal, receives feedback signal, will be one or more A data block is stored in block chain account book.Wherein, the historical operation log stored in business diary record system refers to Some operation logs of stored physical presence in business diary record system can add this partial history operation log It adds in block chain account book and carries out unified storage.Preferably, Data Identification is carried in the addition request received, in order to pass through The historical operation log that Data Identification marks in block chain account book, convenient for the inquiry and management to operation log.
In one embodiment of the present of invention, by business diary record system record the operation log the step of it Afterwards, the operation log is cached, it is at interval of setting time, the operation log cached in the business diary record system is unified It is written in block chain account book, to reduce the frequency that data are written in block chain.
In one embodiment of the present of invention, block chain account is written into the operation log of business diary record system record Before step in this, further includes: system is recorded by the business diary, the operation log of generation is pre-processed, it will be through It crosses in pretreated operation log write-in block chain account book.Further, pretreatment includes: and records to be by the business diary System is formatted processing to operation log, converts preset format text for the operation log of generation, will be default after conversion Format text is written in block chain account book, convenient for unified storage.In one embodiment of the present of invention, pretreatment includes: to generation Operation log be filtered processing, filter invalid log, the operation log through being obtained by filtration be used to be written block chain account book In.Wherein, filtration treatment, which refers to, selects the operation log of generation, picks out and meets the operation log of setting demand and be stored in In block chain account book, to facilitate inquiry to use, to filter out invalid log, wherein be filtered to the operation log of record Processing, comprising: the keyword for obtaining invalid log filters out the operation log with the keyword.Wherein, invalid log Refer to the log operation for not generating on the running configuration etc. in operation lines and influencing at all caused by, is unfavorable for the discovery of problem and chases after It traces back.Setting demand can be the operation log generated to the operation of certain specific transactions systems, or to certain operation systems The operation log that certain specific operations generate.For example, business diary record system only will can operate generation to financial system It stores, can also only financial system transfer accounts the operation that the operation of remittance generates in operation log write-in block chain account book It is stored in log write-in block chain account book, thus more targeted when inquiring block chain account book.
In one embodiment of the present of invention, block chain account is written into the operation log of business diary record system record After step in this, further includes: receive inquiry request, the inquiry request include operation log to be checked type of service and Data Identification;The operation log in the block chain account book is inquired according to the Data Identification.Wherein, include in inquiry request to The type of service and Data Identification of inquiry operation log can directly position the operation in block chain account book according only to Data Identification Log first can also be positioned probably according to type of service, is accurately positioned further according to Data Identification, when reducing inquiry Workload.Data Identification may include the type of service for generating operation log in Data Identification for characterizing operation log.It is excellent Selection of land judges whether operation log meets setting demand by Data Identification.
In one embodiment of the present of invention, block chain account is written into the operation log of business diary record system record Before step in this, further includes: construct Log Directory in block chain account book, operation log is respectively written into each catalogue Under, operation log is inquired according to catalogue convenient for subsequent.Wherein the building of Log Directory can be characterized according to log Type of service carries out.Further, can also be block-identified according to Log Directory generation, in order to according to block-identified interrogation zone Some specific data block or some data block details in block chain, wherein data block details include block height, block Log list in mark and the data block.
Operation log recording method of the present invention based on block chain is applied to electronic device, and the electronic device can be with It is the terminal devices such as television set, smart phone, tablet computer, computer.
The electronic device includes: processor;Memory, for storing the operation log recording program based on block chain, Processor executes the operation log recording program based on block chain, realizes the operation log recording below based on block chain The step of method: it is requested to generate operation log according to business processing;System, which is recorded, by business diary records the operation log; It will be in the operation log write-in block chain account book of business diary record system record.By the way that block chain is written in operation log In account book, using block chain can not tamper, trackability, solve the problems, such as that log is easily tampered, convenient for according to operation Log searches problem, or the root that retrospect problem generates.
The electronic device further includes network interface and communication bus etc..Wherein, network interface may include having for standard Line interface, wireless interface, communication bus is for realizing the connection communication between various components.
Memory includes the readable storage medium storing program for executing of at least one type, can be that flash memory, hard disk, CD etc. are non-volatile to be deposited Storage media is also possible to plug-in type hard disk etc., and is not limited to this, can be in a manner of non-transitory store instruction or software with And any associated data file and to processor provide instruction or software program so that the processor be able to carry out instruction or Any device of software program.In the present invention, the software program of memory storage includes the operation log recording based on block chain Program, and the operation log recording program based on block chain can be provided to processor, so that processor can execute this Operation log recording program based on block chain, the step of realizing operation log recording method based on block chain.
Processor can be central processing unit, microprocessor or other data processing chips etc., can be in run memory Storage program, for example, based on the operation log recording program of block chain in the present invention.
The electronic device can also include display, and display is referred to as display screen or display unit.Some Display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and Organic Light Emitting Diode in embodiment (Organic Light-Emitting Diode, OLED) touches device etc..Display is used to show and handle in an electronic Information and for showing visual working interface.
The electronic device can also include user interface, and user interface may include input unit (such as keyboard), language Sound output device (such as sound equipment, earphone) etc..
In other embodiments, the operation log recording program based on block chain can also be divided into one or more Module, one or more module is stored in memory, and is executed by processor, to complete the present invention.Alleged by the present invention Module be refer to complete specific function series of computation machine program instruction section.Fig. 2 is in the present invention based on block chain The module diagram of operation log recording program, as shown in Fig. 2, the operation log recording program based on block chain can be by Segmentation are as follows: log generation module 1, logger module 2 and log memory module 3.Wherein:
Log generation module 1 requests to generate operation log according to business processing;
Logger module 2 records system by business diary and records the operation log;
Log memory module 3, will be in the operation log write-in block chain account book of business diary record system record.
Business diary records the operation log that system is used for record traffic system, and operation system includes for promoting service Front-end A PP and various Web page systems etc., for example, financial system, Hospitalization insurance system etc., the operation log of generation includes operation day Phase, operating time, operator's account, operation description etc., wherein operation is described as the brief description to operation operation, for example, In financial system, the operation description that the operations such as transfer accounts or withhold generate includes serial number, action type (transfer accounts or withhold), behaviour Account balance and account balance after operation etc. before making.
Block chain account book is a kind of shared between network members, duplication and synchronous database, records assets or data Exchange, have be not easy to distort the characteristic with decentralization.In the present invention, block chain account book is written into the operation log of record In, so that the operation log of storage is not easy to be tampered, also, operation log can be made in multiple networks by block chain account book It is shared between member, convenient for the storage and the operation such as inquiry to operation log.
Preferably, log memory module 3 includes: request reception unit, receives storage request, the storage request include to Store operation log and corresponding type of service, wherein the operation log difference that different operation systems generates is operated, in order to just In being convenient for inquiry to operation log classification storage according to type of service, type of service is carried when storing operation log, business Type can be financial business, insurance business, automobile business, medical profession etc.;Block generation unit, according to described wait store behaviour Make log and generates one or more data blocks;One or more of data blocks are stored in block by block storage unit In chain account book.When generating a data block, refer to that all operation logs for being recorded business diary record system store In a data block, which is stored in block chain account book;When generating multiple data blocks, refer to business day All operation logs that will record system is recorded are respectively stored in multiple data blocks, then multiple data blocks are stored In block chain account book, the record log in each data block can be inquired respectively.
Preferably, block generation unit is when generating multiple data blocks wait store operation log according to, according to industry Service type classifies to the operation log to be stored, and generates different data according to different classes of operation log to be stored Block.So that the operation log for the different data block characterization different business systems being stored in block chain account book, just In the inquiry to operation log.Wherein, the generation of each data block is accomplished in the following manner, comprising: by storage to Operation log recording is stored into block main body, all data informations in data block are generated in block main body (wait store The data of operation log);Data information is stored in block head, and generates the cryptographic Hash of data block;Holding time stamp, it is complete At the generation of data block.Wherein, the cryptographic Hash in data block is raw according to the data of the block head in a upper data block At, a upper data block refers to the data block generated in block chain, related to data block to be generated Connection.
After data block is stored in block chain account book, the behaviour of storage can be directly got in block chain account book Make log.In one embodiment of the present of invention, the electronic device further includes identifier generation module, according to operation day to be stored Will and corresponding type of service generate Data Identification, the Data Identification are stored in the data block, wherein Data Identification It can be the combination of the data ID of characterization operation log or the data name of operation log or data ID and data name, this Invention only needs the Data Identification and the operation log to be stored to correspond, leads to this and without specifically limiting The operation log being stored in block chain account book can be marked by crossing the Data Identification, convenient for according to Data Identification inquiry operation day Will, to be found the problem by the operation log inquired and search efficiency can be improved.Further, the number of different service types It is different according to mark, for the ease of that can generate Data Identification simultaneously, be stored by data block when being subsequently generated operation log After in block chain, Data Identification is back to business diary record system.
In one embodiment of the present of invention, the electronic device further includes data simultaneous module, one or more generating After the step of data block, the data block is synchronized to all nodes in block chain, to guarantee to store in block chain Daily record data consistency so that the data in each node be it is identical, can be obtained by any one node To operation log data, without carrying out the transmission of operation log data.
In one embodiment of the present of invention, the electronic device further includes adding module, by one or more of numbers It is stored according to block before the step in block chain account book, historical operation day whether is stored in inquiry business diary record system Will;If inquiring in business diary record system and being stored with historical operation log, addition request is sent;Addition request is received, And the historical operation log stored in the business diary record system is added in data block, then data block is stored Into block chain account book.Wherein, the historical operation log stored in business diary record system refers to record in business diary This partial history operation log can be added to block chain account book by some operation logs of stored physical presence in system In carry out unified storage.Preferably, Data Identification is carried in the addition request received, in order to pass through Data Identification in block Operation log is marked in chain account book, convenient for the inquiry and management to operation log.
In one embodiment of the present of invention, the electronic device further includes cache module, is being recorded by business diary After the step of system records the operation log, the operation log is cached, at interval of setting time, the business diary is remembered The operation log cached in recording system is uniformly written in block chain account book, to reduce the frequency that data are written in block chain.
In one embodiment of the present of invention, the electronic device further includes preprocessing module, and block is written in operation log Before step in chain account book, system is recorded by the business diary, the operation log of generation is pre-processed, will passed through In pretreated operation log write-in block chain account book.Further, preprocessing module is pre-processed by following manner, packet It includes: system being recorded by the business diary, processing is formatted to operation log, converted the operation log of generation to pre- If format text, by the preset format text write-in block chain account book after conversion, stored convenient for unified.A reality of the invention It applies in example, preprocessing module is pre-processed by following manner, comprising: processing is filtered to the operation log of generation, it will Operation log through being obtained by filtration is for being written in block chain account book.Wherein, filtration treatment refers to the operation log progress to generation Selection is picked out and meets the operation log of setting demand and be stored in block chain account book, to facilitate inquiry to use, to filter out Invalid log, wherein processing is filtered to the operation log of record, comprising: obtain the keyword of invalid log, will have institute The operation log for stating keyword filters out.Wherein, invalid log, which refers to, does not generate basic influence to the running configuration etc. in operation lines Operation caused by log, be unfavorable for the discovery and retrospect of problem.Setting demand can refer to certain specific transactions systems The operation log generated is operated, or to the operation log that certain specific operations of certain operation systems generate.For example, business day Will record system can only by financial system operation generate operation log write-in block chain account book in store, can also only by Financial system transfer accounts remittance the operation log write-in block chain account book that generates of operation in store, thus in inquiry block It is more targeted when chain account book.
In one embodiment of the present of invention, the electronic device further includes enquiry module, and block is being written in operation log After step in chain account book, inquiry request is received, the inquiry request includes the type of service sum number of operation log to be checked According to mark;The operation log in the block chain account book is inquired according to the Data Identification.It wherein, include to be checked in inquiry request The type of service and Data Identification for asking operation log, can directly position the operation day in block chain account book according only to Data Identification Will first can also be positioned probably according to type of service, is accurately positioned further according to Data Identification, when being inquired with reducing Workload.Data Identification may include the type of service for generating operation log in Data Identification for characterizing operation log.It is preferred that Ground judges whether operation log meets setting demand by Data Identification.
In one embodiment of the present of invention, the electronic device further includes catalogue building module, is written by operation log Before step in block chain account book, Log Directory is constructed in block chain account book, operation log is respectively written into each catalogue Under, operation log is inquired according to catalogue convenient for subsequent.Wherein the building of Log Directory can be characterized according to log Type of service carries out.Further, can also be block-identified according to Log Directory generation, in order to according to block-identified interrogation zone Some specific data block or some data block details in block chain, wherein data block details include block height, block Log list in mark and the data block.
In one embodiment of the present of invention, computer readable storage medium, which can be, any includes or storage program or instruction Tangible medium, program therein can be performed, and pass through the corresponding function of the relevant hardware realization of the program instruction of storage.Example Such as, computer readable storage medium can be computer disk, hard disk, random access memory, read-only memory etc..The present invention It is not limited to this, can be in a manner of non-transitory store instruction or software and any associated data files or data structure simultaneously And processor is provided to so that processor executes any device of program therein or instruction.The computer-readable storage medium Include the operation log recording program based on block chain in matter, it is described based on the operation log recording program of block chain by processor When execution, the following operation log recording method based on block chain is realized:
It is requested to generate operation log according to business processing;
System, which is recorded, by business diary records the operation log;
It will be in the operation log write-in block chain account book of business diary record system record.
The specific embodiment of the computer readable storage medium of the present invention and the above-mentioned operation log based on block chain are remembered Recording method, the specific embodiment of electronic device are roughly the same, and details are not described herein.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, device of element, article or method.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.Pass through above embodiment party The description of formula, it is required general that those skilled in the art can be understood that above-described embodiment method can add by software The mode of hardware platform is realized, naturally it is also possible to which by hardware, but in many cases, the former is more preferably embodiment.It is based on Such understanding, substantially the part that contributes to existing technology can be with software product in other words for technical solution of the present invention Form embody, which is stored in a storage medium (such as ROM/RAM, magnetic disk, light as described above Disk) in, including some instructions use is so that a terminal device (can be mobile phone, computer, server or the network equipment Deng) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of operation log recording method based on block chain is applied to electronic device characterized by comprising
It is requested to generate operation log according to business processing;
System, which is recorded, by business diary records the operation log;
It will be in the operation log write-in block chain account book of business diary record system record.
2. the operation log recording method according to claim 1 based on block chain, which is characterized in that by the business day Will records the step that the operation log that system records is written in block chain account book
Storage request is received, the storage request includes operation log to be stored and corresponding type of service;
One or more data blocks are generated according to the operation log to be stored;
One or more of data blocks are stored in block chain account book.
3. the operation log recording method according to claim 2 based on block chain, which is characterized in that according to described wait deposit Storage operation log generates one or more data blocks
Classified according to type of service to the operation log to be stored;
Different data blocks is generated according to different classes of operation log to be stored,
Wherein, generating data block includes: the operation log recording to be stored by storage into block main body, in block main body Generate all data informations in data block;
Data information is stored in block head, and generates the cryptographic Hash of data block;
Holding time stamp, completes the generation of data block.
4. the operation log recording method according to claim 2 based on block chain, which is characterized in that generate one or more After the step of a data block, further includes:
It is synchronous by the node request for data except the corresponding node of data block in Except block chain;
All nodes data block being synchronized in block chain.
5. the operation log recording method according to claim 2 based on block chain, which is characterized in that by one or Multiple data blocks are stored in front of the step in block chain account book, the method also includes:
Whether historical operation log is stored in inquiry business diary record system;
If inquiring in business diary record system and being stored with historical operation log, system hair is recorded by the business diary Addition is sent to request;
The addition request that the business diary record system is sent is received, and the historical operation log is added to data block In.
6. the operation log recording method according to claim 1 based on block chain, which is characterized in that by the business day Will records before the step in the operation log write-in block chain account book of system record, further includes: to the operation log of generation into Formatting lines processing, converts preset format text for the operation log of generation.
7. the operation log recording method according to claim 1 based on block chain, which is characterized in that by the business day Will records before the step in the operation log write-in block chain account book of system record, further includes: to the operation log of record into Row filtration treatment filters out invalid log, and the operation log through being obtained by filtration is used to be written in block chain account book;
Wherein, the step of operation log of described pair of record is filtered processing includes: the keyword for obtaining invalid log, will be had There is the operation log of the keyword to filter out.
8. the operation log recording method according to claim 1 based on block chain, which is characterized in that by the business day Will records after the step in the operation log write-in block chain account book of system record, further includes:
Inquiry request is received, the inquiry request includes the type of service and Data Identification of operation log to be checked;
The operation log in the block chain account book is inquired according to the Data Identification.
9. a kind of electronic device, which is characterized in that the electronic device includes: processor;Memory includes base in the memory In the operation log recording program of block chain, when the operation log recording program based on block chain is executed by the processor It realizes such as the step of the operation log recording method described in any item of the claim 1 to 8 based on block chain.
10. a kind of computer readable storage medium, which is characterized in that include being based on block in the computer readable storage medium The operation log recording program of chain when the operation log recording program based on block chain is executed by processor, is realized as weighed Benefit require any one of 1 to 8 described in operation log recording method based on block chain the step of.
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 true CN110489313A (en) 2019-11-22
CN110489313B 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)

Cited By (5)

* 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
CN111241157A (en) * 2020-01-07 2020-06-05 支付宝(杭州)信息技术有限公司 Operation behavior backtracking method and device and electronic equipment
CN111767168A (en) * 2020-06-23 2020-10-13 江苏荣泽信息科技股份有限公司 Block chain-based storage system convenient for 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

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170364700A1 (en) * 2015-06-02 2017-12-21 ALTR Solutions, Inc. Immutable logging of access requests to distributed file systems
CN108596588A (en) * 2018-04-28 2018-09-28 百度在线网络技术(北京)有限公司 A kind of processing method of block data, device, computing device and storage medium
US20180287797A1 (en) * 2017-04-04 2018-10-04 International Business Machines Corporation Distributed logging of application events in a blockchain
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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170364700A1 (en) * 2015-06-02 2017-12-21 ALTR Solutions, Inc. Immutable logging of access requests to distributed file systems
US20180287797A1 (en) * 2017-04-04 2018-10-04 International Business Machines Corporation Distributed logging of application events in a blockchain
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

Cited By (7)

* 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
CN111241157A (en) * 2020-01-07 2020-06-05 支付宝(杭州)信息技术有限公司 Operation behavior backtracking method and device and electronic equipment
CN111241157B (en) * 2020-01-07 2023-10-24 蚂蚁胜信(上海)信息技术有限公司 Operation behavior backtracking method and device and electronic equipment
CN111767168A (en) * 2020-06-23 2020-10-13 江苏荣泽信息科技股份有限公司 Block chain-based storage system convenient for data backtracking
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

Also Published As

Publication number Publication date
WO2021000494A1 (en) 2021-01-07
CN110489313B (en) 2022-07-19

Similar Documents

Publication Publication Date Title
CN110489313A (en) Operation log recording method, device and storage medium based on block chain
CN105446991B (en) Date storage method, querying method and equipment
CN109189782A (en) A kind of indexing means in block chain commodity transaction inquiry
US9348879B2 (en) Data lineage transformation analysis
CN108280365A (en) Data access authority management method, device, terminal device and storage medium
CN104182506A (en) Log management method
CN112287015B (en) Image generation system, image generation method, electronic device, and storage medium
WO2019056789A1 (en) Method, device, computer device, storage medium for identifying related party transaction
CN109472568A (en) A kind of block chain method of commerce, device, management system, equipment and storage medium
CN102164186A (en) Method and system for realizing cloud search service
CN111552704A (en) Data report generation method and device, computer equipment and storage medium
CN106339408A (en) Data synchronization method, data synchronization device and server
CN104657808A (en) System and method capable of realizing real-time inquiry and management of fund data of enterprise
CN108563730A (en) A kind of cold and hot data automatic switching method, device, electronic equipment and storage medium
CN104391899B (en) A kind of data managing method and system for concentrating system for settling account
CN108304591A (en) A kind of method for customizing of label, system and terminal device
CN107729330B (en) Method and apparatus for acquiring data set
US20240161198A1 (en) Custom data
CN105446981B (en) Map of website generation method, access method and device
WO2021189766A1 (en) Data visualization method and related device
CN110275798A (en) Block chain data processing method, device, server and storage medium
CN116797345A (en) Task processing method, device, computer equipment and storage medium
CN112417018B (en) Data sharing method and device
JP5560297B2 (en) Customer information name identification method and customer information name identification system
CN106951452A (en) The data query method and device reviewed for account

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