CN109902119A - Block chain and database hybrid system Data Identification method and its methods of exhibiting - Google Patents

Block chain and database hybrid system Data Identification method and its methods of exhibiting Download PDF

Info

Publication number
CN109902119A
CN109902119A CN201910182642.0A CN201910182642A CN109902119A CN 109902119 A CN109902119 A CN 109902119A CN 201910182642 A CN201910182642 A CN 201910182642A CN 109902119 A CN109902119 A CN 109902119A
Authority
CN
China
Prior art keywords
data
common recognition
database
recognition data
block chain
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.)
Pending
Application number
CN201910182642.0A
Other languages
Chinese (zh)
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.)
Shenzhen Enjoy Internet Technology Co Ltd
Original Assignee
Shenzhen Enjoy Internet Technology 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 Shenzhen Enjoy Internet Technology Co Ltd filed Critical Shenzhen Enjoy Internet Technology Co Ltd
Priority to CN201910182642.0A priority Critical patent/CN109902119A/en
Publication of CN109902119A publication Critical patent/CN109902119A/en
Pending legal-status Critical Current

Links

Abstract

The present invention discloses a kind of block chain and database hybrid system Data Identification method and its methods of exhibiting, the identification method are as follows: in system newly developed, increases suffix mark to the respective field in database and block catenary system and distinguishes;Or each table in database and block catenary system is designed as 3 tables, two tables store common recognition data and non-common recognition data respectively, and a main table is associated with these two types of data.It is integrated in block chain in existing database, background system carries out data configuration, and definition identifies non-common recognition data, then provides interface for user front end and obtains non-common recognition data list.The present invention has filled up the blank that common recognition data and non-common recognition data are not differentiated between in block chain and database hybrid system;Displaying is distinguished to different data conducive to front end convenient for the operation expanding of system by mark common recognition data and non-common recognition data.

Description

Block chain and database hybrid system Data Identification method and its methods of exhibiting
Technical field
The present invention relates to the database data processing technique of fusion block chain, in particular to a kind of block chain and database are mixed Collaboration system Data Identification method and its methods of exhibiting.
Background technique
The many products or system realized currently based on block chain technology, such as the invoice system based on block chain, base In the food traceability system etc. of block chain, all inevitably need centralized system and block catenary system with database It combines, to meet product and operational needs.During actual business is carried out, in the database of centralized system The data of storage had both contained the data (common recognition data) on block catenary system, and the data for also containing centralized system are (non-total Know data).Current product or system without or relatively rough differentiation common recognition data and non-common recognition data, result in Processing is complicated to be shown to common recognition data and non-common recognition data separation in front-end interface, is easy error.In addition also resulting in cannot The different types of data of user intuitively are showed, the extension and front-end interface for being unfavorable for follow-up business, which are distinguished, shows both Data.
Summary of the invention
In view of the problems of the existing technology, the present invention provides a kind of block chain and database hybrid system Data Identification side Method and its methods of exhibiting.The identification schemes for realizing common recognition and non-common recognition data in block chain and database hybrid system, so that should Data in hybrid system can clearly be identified as two class data, can be to the attribute of the data of acquisition in Batch Processing system Displaying can easily be distinguished to the data got by doing quickly judgement and processing, front end page.
Firstly, the present invention provides the identification method of a kind of block chain and database hybrid system data, the hybrid system packet Block catenary system and centralized system newly developed are included, common recognition data are stored on block catenary system, and non-common recognition data are stored in On centralized system database, which is to carry out common recognition to field in block catenary system and database to mark with non-common recognition Know, specific as follows:
Increase suffix mark to the respective field in database and block catenary system to distinguish;Or
Each table in database and block catenary system is designed as 3 tables, two tables store common recognition data and non-total respectively Know data, a main table is associated with these two types of data.
Above-mentioned identification method is based on block catenary system newly developed and centralized system, in existing The block catenary system of the heart system integration, also provides another identification method, and specific technical solution is as follows:
A kind of identification method of block chain and database hybrid system data, the hybrid system include existing centralization system System and block catenary system integrated on it, the identification method are as follows:
Background system carries out data configuration, and definition identifies non-common recognition data, and it is non-for user front end acquisition then to provide interface Common recognition data list.
Based on the first identification method, the present invention also provides a kind of methods of exhibiting of data, specific technical solution is as follows:
A kind of methods of exhibiting of block chain and database hybrid system data, the hybrid system include block chain newly developed System and centralized system, common recognition data are stored on block catenary system, and non-common recognition data are stored in centralized system database On, the methods of exhibiting is as follows:
S11, it is identified using identification method described in claim 1;
The data of S12, user front end after obtaining mark in database, block chain;
S13, user front end carry out common recognition according to demand and non-common recognition data separation is shown.
Preferably, user front end through the interface of background service takes out corresponding data from database in step S12;Before user Block chain relevant interface is called to obtain related data in end.
Preferably, the data obtained in step 12 return to user front end with json format.
Based on second of identification method, the present invention also provides the methods of exhibiting of another data, and specific technical solution is such as Under:
A kind of methods of exhibiting of block chain and database hybrid system data, the hybrid system include existing centralization system System and block catenary system integrated on it, the methods of exhibiting include the following steps:
S21, Data Identification is carried out using identification method as claimed in claim 2;
S22, user front end call the interface of non-common recognition data list, return to the data configuration from the background, are compared accordingly It is right, it is non-common recognition data if there is corresponding data in the data configuration, otherwise it is common recognition data;
S23, front end carry out data separation displaying.
Using technical solution of the present invention, have the advantages that
(1), the blank that common recognition data and non-common recognition data are not differentiated between in block chain and database hybrid system has been filled up;
(2), by mark common recognition data and non-common recognition data, convenient for the operation expanding of system, conducive to front end to different Data distinguish displaying.
Detailed description of the invention
Fig. 1 is that common recognition and non-common recognition data are identified in new system of the embodiment of the present invention from background data base mark, block chain The overall procedure that data acquisition process is shown to front end;
Fig. 2 is to identify non-common recognition data, block chain data acquisition process to front end exhibition in existed system of the embodiment of the present invention The overall procedure shown.
Specific embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is further described.
The present invention program is directed to two class systems, and one kind is completely new system, i.e. system is newly developed, is integrated at the very start Block chain technology;Another kind of is that block chain technology is integrated in existing system.
One, mark common recognition and non-common recognition data in new system
The present invention provides the identification method of a kind of block chain and database hybrid system data, which includes newly opening The block catenary system and centralized system of hair, common recognition data are stored on block catenary system, and non-common recognition data are stored in centralization On system database, which is to carry out common recognition to field in block catenary system and database to identify with non-common recognition, specifically It is as follows:
Increase suffix mark to the respective field in database and block catenary system to distinguish;Or
Each table in database and block catenary system is designed as 3 tables, two tables store common recognition data and non-total respectively Know data, a main table is associated with these two types of data.
It is above-mentioned for block chain and database hybrid system newly developed, propose two kinds of Data Identification methods.Wherein:
The first identification method increases suffix mark to the respective field in database and block catenary system and distinguishes, for example, Then increase suffix " _ bc " if it is common recognition data, increase suffix if being non-common recognition data " _ nbc ", which can be it His mark that can determine common recognition data or non-common recognition data.For example the entitled of some common recognition data is designed in original system Data1, then the data name by this programme modification is data1_bc, the entitled data2 of some non-common recognition data, then Data name by this programme modification is data2_nbc.Such as table example1 has 2 fields data1 and data2, respectively For common recognition data and non-common recognition data, then corresponding table structure is table 1:
Table 1
Field Type Description
id int Major key increases id certainly
data1_bc TEXT Data1, data of knowing together
data2_nbc TEXT Data2, non-common recognition data
Second identification method is that table each in database is designed as to 3 tables, two tables store respectively common recognition data with Non- common recognition data, a main table are associated with these two types of data.Or illustrated with above example, the structure for table of knowing together is table 2:
Table 2
Field Type Description
id int Major key increases id certainly
data1_bc TEXT Data1, data of knowing together
The structure of non-common recognition table is table 3:
Table 3
Field Type Description
Id int Major key increases id certainly
data2_nbc TEXT Data2, non-common recognition data
The structure of main table is table 4:
Table 4
Field Type Description
Id int Major key increases id certainly
bc_data_id int External key association common recognition tables of data
nbc_data_id int External key is associated with non-common recognition tables of data
With reference to Fig. 1, the present invention is based on above two identification methods, provide a kind of methods of exhibiting of data, particular technique side Case is as follows:
A kind of methods of exhibiting of block chain and database hybrid system data, the hybrid system include block chain newly developed System and centralized system, common recognition data are stored on block catenary system, and non-common recognition data are stored in centralized system database On, the methods of exhibiting is as follows:
S11, above-mentioned identification method are identified;
I.e. are as follows:
S111: using divide table scheme judge;
S112: if using, it is divided into common recognition data, 3 non-common recognition data, main table tables;
S113: to use or it is non-use a point table scheme, for common recognition data field behind plus " _ bc ", non-common recognition data word Section adds " _ nbc " below.
The data of S12, user front end after obtaining mark in database, block chain;
S121: it is obtained from database;
S122: it is obtained from block chain;
S123: data processing, construction return to body, point common recognition and non-common recognition data, Json format;
It specifically,, can be from data after front end applications call the interface of background service after the Data Identification of database is completed Corresponding data are taken out in library, if being related to obtaining data from block chain, block chain relevant interface can also be called to obtain Related data is taken, finally integrates all data, returns to front end.The data for returning to front end are stored in the body of response In, with the return of json format, example is as follows:
S13, user front end carry out common recognition according to demand and non-common recognition data separation is shown.
Two, common recognition and non-common recognition data are identified after integrating block chain in existed system
The present invention is based on the block catenary systems that existing centralized system integrates, and also provide another identification method, have Body technique scheme is as follows:
A kind of identification method of block chain and database hybrid system data, the hybrid system include existing centralization system System and block catenary system integrated on it, the identification method are as follows:
Background system carries out data configuration, and definition identifies non-common recognition data, and it is non-for user front end acquisition then to provide interface Common recognition data list.
Above method is used when integrating block chain in the system run on warp after partial data carries out cochain To identify the data of common recognition and non-common recognition with regard to relatively difficult.Because after the Database field of existed system is it has been determined that be related to Platform operation layer and front end have all used, and the cost of modification is too high.Need to consider that lesser scheme is changed in backstage and front end.We Case considers that minimum, displaying of according to requirements of service being modified by front end is changed on backstage.
Existing database is not modified on backstage, but creates configuration, for defining the non-common recognition data of mark.Then it provides and connects Confession front end applications obtain non-common recognition data list, are shown on interface as needed.The format of data configuration are as follows:
With reference to Fig. 2, methods of exhibiting specific technical solution corresponding to above-mentioned identification method is as follows:
A kind of methods of exhibiting of block chain and database hybrid system data, the hybrid system include existing centralization system System and block catenary system integrated on it, the methods of exhibiting include the following steps:
S21, background system configure non-common recognition data;
I.e. are as follows: background system carries out data configuration, and definition identifies non-common recognition data, then provides interface and obtains for user front end Negated common recognition data list.
S22, user front end call the interface of non-common recognition data list, return to the data configuration from the background, are compared accordingly It is right, it is non-common recognition data if there is corresponding data in the data configuration, otherwise it is common recognition data.
When the interface for obtaining non-common recognition data list is called in front end, the data configuration is returned from body from the background, thus It is compared accordingly, if there is corresponding data in the configuration, which is non-common recognition data, is otherwise common recognition number According to.
Specific steps include:
S221: user front end obtains data;
S222: it is obtained from database;
S223: it is obtained from block chain;
S224: front end is returned to;
S225: front end obtains non-common recognition data configuration;
S226: carrying out comparing, and the data not in configuration are common recognition data, other are non-common recognition data.
S23, front end carry out data separation displaying.
Above scheme will not make an amendment the backstage of existed system, and the integrated of block catenary system is incremental integration, front end root Displaying is compared according to needs, it is smaller to the change of original system.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all at this Under the inventive concept of invention, converted using equivalence techniques made by description of the invention and accompanying drawing content, or directly/use indirectly It is included in other related technical areas in scope of patent protection of the invention.

Claims (6)

1. the identification method of a kind of block chain and database hybrid system data, which includes block linkwork newly developed System and centralized system, common recognition data are stored on block catenary system, and non-common recognition data are stored on centralized system database, It is characterized in that, the identification method is to carry out common recognition to field in block catenary system and database to identify with non-common recognition, specifically such as Under:
Increase suffix mark to the respective field in database and block catenary system to distinguish;Or
Each table in database and block catenary system is designed as 3 tables, two tables store common recognition data and non-common recognition number respectively According to a main table is associated with these two types of data.
2. the identification method of a kind of block chain and database hybrid system data, which includes existing centralized system And the block catenary system integrated on it, which is characterized in that the identification method are as follows:
Background system carries out data configuration, and definition identifies non-common recognition data, then provides interface for user front end and obtains non-common recognition Data list.
3. the methods of exhibiting of a kind of block chain and database hybrid system data, which includes block linkwork newly developed System and centralized system, common recognition data are stored on block catenary system, and non-common recognition data are stored on centralized system database, It is characterized in that, the methods of exhibiting is as follows:
S11, it is identified using identification method described in claim 1;
The data of S12, user front end after obtaining mark in database, block chain;
S13, user front end carry out common recognition according to demand and non-common recognition data separation is shown.
4. methods of exhibiting according to claim 3, which is characterized in that user front end connecing through background service in step S12 Mouth takes out corresponding data from database;User front end calls block chain relevant interface to obtain related data.
5. mark methods of exhibiting according to claim 1, which is characterized in that the data obtained in step 12 are with json format Return to user front end.
6. the mark methods of exhibiting of a kind of block chain and database hybrid system data, which includes existing centralization System and block catenary system integrated on it, which is characterized in that the mark methods of exhibiting includes the following steps:
S21, Data Identification is carried out using identification method as claimed in claim 2;
S22, user front end call the interface of non-common recognition data list, return to the data configuration from the background, are compared accordingly, if There are corresponding data in the data configuration, then it is non-common recognition data, and otherwise it is common recognition data;
S23, front end carry out data separation displaying.
CN201910182642.0A 2019-03-11 2019-03-11 Block chain and database hybrid system Data Identification method and its methods of exhibiting Pending CN109902119A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910182642.0A CN109902119A (en) 2019-03-11 2019-03-11 Block chain and database hybrid system Data Identification method and its methods of exhibiting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910182642.0A CN109902119A (en) 2019-03-11 2019-03-11 Block chain and database hybrid system Data Identification method and its methods of exhibiting

Publications (1)

Publication Number Publication Date
CN109902119A true CN109902119A (en) 2019-06-18

Family

ID=66947004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910182642.0A Pending CN109902119A (en) 2019-03-11 2019-03-11 Block chain and database hybrid system Data Identification method and its methods of exhibiting

Country Status (1)

Country Link
CN (1) CN109902119A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622436A (en) * 2012-02-29 2012-08-01 浙江吉利汽车研究院有限公司 Data table establishing method of human resource management system
CN104216893A (en) * 2013-05-31 2014-12-17 中国电信股份有限公司 Partitioned management method for multi-tenant shared data table, server and system
CN104408664A (en) * 2014-10-30 2015-03-11 国家电网公司 Power equipment data processing method and apparatus
CN105141672A (en) * 2015-08-03 2015-12-09 广州神马移动信息科技有限公司 Method, device and system for data storage
CN105160012A (en) * 2015-09-23 2015-12-16 烽火通信科技股份有限公司 Management system and method of heterogeneous database
CN107018125A (en) * 2017-02-17 2017-08-04 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN107402869A (en) * 2017-07-12 2017-11-28 东软集团股份有限公司 Collecting method, device and system
CN108428141A (en) * 2018-03-15 2018-08-21 华中农业大学 A kind of foodstuff traceability information management system based on ERP system Yu block chain

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622436A (en) * 2012-02-29 2012-08-01 浙江吉利汽车研究院有限公司 Data table establishing method of human resource management system
CN104216893A (en) * 2013-05-31 2014-12-17 中国电信股份有限公司 Partitioned management method for multi-tenant shared data table, server and system
CN104408664A (en) * 2014-10-30 2015-03-11 国家电网公司 Power equipment data processing method and apparatus
CN105141672A (en) * 2015-08-03 2015-12-09 广州神马移动信息科技有限公司 Method, device and system for data storage
CN105160012A (en) * 2015-09-23 2015-12-16 烽火通信科技股份有限公司 Management system and method of heterogeneous database
CN107018125A (en) * 2017-02-17 2017-08-04 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN107402869A (en) * 2017-07-12 2017-11-28 东软集团股份有限公司 Collecting method, device and system
CN108428141A (en) * 2018-03-15 2018-08-21 华中农业大学 A kind of foodstuff traceability information management system based on ERP system Yu block chain

Similar Documents

Publication Publication Date Title
CN108090073B (en) Configurable bill of material conversion method and device
US7028047B2 (en) Apparatus and methods for generating a contract
CN107402987A (en) A kind of method of full-text search and distributed NewSQL Database Systems
CN104376068A (en) Data representation system and method based on dynamic report template
WO2004114160A3 (en) Systems and processes for automated criteria and attribute generation, searching, auditing and reporting of data
CN105335400A (en) Method and apparatus for obtaining answer information for questioning intention of user
CN102332137A (en) Goods matching method and system
WO2005074590A3 (en) System and method for automatically updating business information reports
CN111192103A (en) Intelligent inquiry and quotation system and method for accessories
CN105138532B (en) The methods, devices and systems of business data processing
CN112464632B (en) Dynamic storage and conversion method for table style under excel report
CN102063572A (en) Method and device for automatically calculating numerical value
CN112463986A (en) Information storage method and device
CN111401014A (en) Multi-index multi-dimensional analysis method, system and construction method based on report
CN107341202B (en) Business datum table corrects appraisal procedure, device and the storage medium of danger level
CN105046414A (en) Business tracing method and business tracing device applied to ERP systems
CN111190965B (en) Impromptu relation analysis system and method based on text data
CN110347786A (en) A kind of tuning method and system of semantic model
EP2518668A1 (en) Apparatus and method for visualizing technology transition
CN109145092B (en) Database updating and intelligent question and answer management method, device and equipment
CN109902119A (en) Block chain and database hybrid system Data Identification method and its methods of exhibiting
CN110515929B (en) Book display method, computing device and storage medium
CN107562949A (en) The method for realizing consolidated accounts Excel template write into Databasce
CN107688892A (en) Distribution method, storage medium and the server of breakpoint list
EP2518667A1 (en) Apparatus and method for estimating developing speed of technology

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190618