CN109800334A - A kind of key assignments generation method, database tamper resistant method equipment and storage medium - Google Patents
A kind of key assignments generation method, database tamper resistant method equipment and storage medium Download PDFInfo
- Publication number
- CN109800334A CN109800334A CN201910048437.5A CN201910048437A CN109800334A CN 109800334 A CN109800334 A CN 109800334A CN 201910048437 A CN201910048437 A CN 201910048437A CN 109800334 A CN109800334 A CN 109800334A
- Authority
- CN
- China
- Prior art keywords
- contract
- key assignments
- transaction
- title
- information
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000006854 communication Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention provides a kind of key assignments generation method, database tamper resistant method equipment and storage medium, this method comprises: generating the first key assignments according to the first transaction;First key assignments includes Contract ID information, and Contract ID information is used to identify the contract title for executing the first contract of the first transaction.The many embodiments of the present invention are identified the contract title of execution contract with this, effectively prevent the possibility across contract altered data, ensure that the safety of database by adding Contract ID information when designing key assignments.
Description
Technical field
This application involves fields of communication technology, and in particular to a kind of key assignments generation method, database tamper resistant method equipment
And storage medium.
Background technique
Currently, more contract platforms that generally existing ecosystem contract and Dynamical Deployment contract mix in block catenary system, area
Block catenary system is generally saved in database in the form of key-value after having executed a transaction, in this more contracts
In the case of, when different contracts uses same key value, block catenary system cannot be distinguished in time, will cause different contracts and execute
Data be tampered, cause database to be tampered, very big loss brought to user.
Summary of the invention
In view of drawbacks described above in the prior art or deficiency, being intended to provide a kind of prevents from being tampered when executing database
Key assignments generation method, equipment and storage medium.
In a first aspect, the present invention provides a kind of key assignments generation method, the contract for each contract disposed in block catenary system
Title is different, this method comprises:
The first key assignments is generated according to the first transaction;First key assignments includes Contract ID information, and Contract ID information is for marking
Know the contract title for executing the first contract of the first transaction.
Further, before generating the first key assignments according to the first transaction, this method further include:
Judge whether the contract title of the first contract is different from the contract title of existing contract in block catenary system: if
It is then to dispose the success of the first contract.
Further, Contract ID information includes the contract title of the first contract, generates the first key assignments packet according to the first transaction
It includes:
The second key assignments is generated according to the first transaction;
The contract title of the first contract is added before the second key assignments to generate the first key assignments.
Second aspect, the present invention provide a kind of method that database is anti-tamper, and the first transaction being performed is comprising several
First key assignments, this method comprises:
Obtain the first contract title for executing the first contract of the first transaction;
Whether the second contract title for judging that the Contract ID information of the first contract title and the first key assignments is identified is identical;
It is then to submit the implementing result for executing the first transaction;
It is no, then the implementing result of the first transaction is not submitted.
Further, Contract ID information includes the contract title of the first contract.
The third aspect, the present invention also provides a kind of equipment, including one or more processors and memory, wherein memory
Comprising can by instruction that the one or more processors execute so that the one or more processors execute it is each according to the present invention
The anti-tamper method of the key assignments generation method and database that embodiment provides.
Fourth aspect, the present invention also provides a kind of storage medium for being stored with computer program, which makes to count
The anti-tamper method of calculation machine execution each embodiment provides according to the present invention key assignments generation method and database.
Advantageous effect of the invention
The many embodiments of the present invention are by when design key assignments, addition Contract ID information, identify execution contract with this
Contract title, enable block catenary system quickly correctly distinguish transaction be by which execute contract execute, in addition, also passing through
Judge whether contract representated by the contract title for executing contract for the transaction being performed and the identification information of key assignments is consistent, thus
Across contract operation is prevented, the possibility across contract altered data is effectively prevented, ensure that the safety of database.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of schematic diagram of a scenario for key assignments generation method that one embodiment of the invention provides.
Fig. 2 is a kind of flow chart for key assignments generation method that one embodiment of the invention provides.
Fig. 3 is the flow chart of one preferred embodiment of method shown in Fig. 2
Fig. 4 is the flow chart of the step S11 of a preferred embodiment provided by the invention.
Fig. 5 is a kind of flow chart of database tamper resistant method provided by the invention.
Fig. 6 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is a kind of schematic diagram of a scenario for key assignments generation method that one embodiment of the invention provides.As shown in Figure 1, one
Trading in tx1 may include account information, amount information, contract information, several information such as address information, according to these information,
Along with the contract title for executing the contract, such as user.wasm.dice constitutes key value,
Such as: user.wasm.dice-accountA-addr, by the key assignments, block catenary system can identify tx1 be by
What about user.wasm.dice was executed.
Fig. 2 is a kind of flow chart for key assignments generation method that one embodiment of the invention provides.
As shown in Fig. 2, in the present embodiment, the present invention provides a kind of key assignments generation method, disposed in block catenary system
Each contract contract title it is different, this method comprises:
S11, the first key assignments is generated according to the first transaction;First key assignments includes Contract ID information, and Contract ID information is used
The contract title of the first contract of the first transaction is executed in mark.
Specifically, scene as shown in Figure 1 generates the first key assignments according to the first transaction described in step S11, in addition to can
Think the account information for obtaining the first transaction, address information is also possible to obtain the amount information of its first transaction, can also be
The information of first transaction such as the first currency type information symbol, contract information traded, can also be any combination of these information,
First key assignments includes Contract ID information, such as user.wasm.dice, which can be used in identifying the friendship
It is easily to be executed by this with about user.wasm.dice.
Fig. 3 is the flow chart of one preferred embodiment of method shown in Fig. 2.As shown in figure 3, in the present embodiment, in basis
Before first transaction generates the first key assignments, this method further include:
S12, judge whether the contract title of the first contract is different from the contract title of existing contract in block catenary system:
If so, deployment the first contract success.
Specifically, when block catenary system receives the request for disposing new contract, directly contract will not be deployed in system,
First to judge whether the contract repeat with the contract title of contract already existing in system, if repeated, refusal portion
The contract is affixed one's name to, if not repeating, disposes contract success.Screening judgement first is carried out to contract title before disposing contract, into
One step avoids carrying out the case where database execution can be tampered under identical contract title.
Fig. 4 is the flow chart of the step S11 of a preferred embodiment provided by the invention.Such as
Shown in Fig. 4, in the present embodiment, Contract ID information includes the contract title of the first contract, and step S11 includes:
S111, the second key assignments is generated according to the first transaction;
S112, the contract title of the first contract is added before the second key assignments to generate the first key assignments.
Specifically, scene as shown in Figure 1 can be entire contract title user.wasm.dice in step S112, more
In more preferred embodiments, the keyword for representing the contract title, such as dice can also be, can also be that block catenary system is being set
Different contracts are encoded under rule, such as 1,2,3, A, B, C etc., as long as the Contract ID information can be used in identifying the transaction
It is to be executed by the contract, it is not limited to the limitation of contract title.
In more embodiments, contract mark can also be added on the defined position of the second key assignments in block catenary system
Information is known, before may be not necessarily limited to the second key assignments.
Fig. 5 is a kind of database tamper resistant method provided by the invention.
As shown in figure 5, in the present embodiment, a kind of method that database is anti-tamper is provided, the first transaction being performed
Comprising several first key assignments, this method comprises:
S21, the first contract title for executing the first contract of the first transaction is obtained;
S22, judge whether is the second contract title that the Contract ID information of the first contract title and the first key assignments is identified
It is identical;
It is then to submit the implementing result for executing the first transaction;
It is no, then the implementing result of the first transaction is not submitted.
Specifically, after the first transaction is executed by the first contract, by the data after execution with key, the form of value is sent out
It is sent in database, at this moment, obtains in the first transaction being executed and execute contract, i.e. the contract title of the first contract;
Judging the contract title that is identified of Contract ID information of the first key assignments in the first transaction, whether the about first contract title is identical, if
Identical, then representing first contract is the execution contract for handling first transaction, implementing result is sent to database, if not phase
Together, then the implementing result of the first transaction is not submitted.Such as, the execution contract of the first transaction is user.wasm.dice, the first key assignments
The contract title of Contract ID message identification be user.wasm.trade, then illustrate to execute and about user.wasm.dice usurped
The transaction data that should be executed by user.wasm.trade contract is changed, has not then submitted and submitted by user.wasm.dice contract
Implementing result.
Likewise, Contract ID information can be entire contract title user.wasm.dice, it can also be and represent the conjunction
The about keyword of title, such as dice can also be that block catenary system encodes different contracts under setting rule, such as 1,2,
3, A, B, C etc., as long as the Contract ID information can be used in identifying that the transaction is executed by the contract, it is not limited to
The limitation of contract title.
Fig. 6 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
As shown in fig. 6, present invention also provides a kind of equipment 700, including one or more centres as on the other hand
Unit (CPU) 701 is managed, can be added according to the program being stored in read-only memory (ROM) 702 or from storage section 708
The program that is downloaded in random access storage device (RAM) 703 and execute various movements appropriate and processing.In RAM703, also deposit
It contains equipment 700 and operates required various programs and data.CPU701, ROM702 and RAM703 pass through the phase each other of bus 704
Even.Input/output (I/O) interface 705 is also connected to bus 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.;
And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because
The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon
Computer program be mounted into storage section 708 as needed.
Particularly, in accordance with an embodiment of the present disclosure, the key assignments generation method of any of the above-described embodiment description, database are prevented usurping
Changing method may be implemented as computer software programs.For example, embodiment of the disclosure includes a kind of computer program product,
Including the computer program being tangibly embodied on machine readable media, the computer program includes to generate for executing key assignments
The program code of method, database tamper resistant method.In such embodiments, which can pass through communications portion
709 are downloaded and installed from network, and/or are mounted from detachable media 711.
As another aspect, present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums
Matter can be computer readable storage medium included in the device of above-described embodiment;It is also possible to individualism, it is unassembled
Enter the computer readable storage medium in equipment.Computer-readable recording medium storage has one or more than one program, should
It is anti-tamper that program by one or more than one processor is used to execute the key assignments generation method for being described in the application, database
Method.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depending on related function.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yitong
The dedicated hardware based system of functions or operations as defined in executing is crossed to realize, or by specialized hardware and can be calculated
The combination of machine instruction is realized.
Being described in the embodiment of the present application involved unit or module can be realized by way of software, can also be with
It is realized by way of hardware.Described unit or module also can be set in the processor, for example, each unit can
To be the software program being arranged in computer or intelligent movable equipment, it is also possible to the hardware device being separately configured.Wherein, this
The title of a little units or module does not constitute the restriction to the unit or module itself under certain conditions.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the application design, appointed by above-mentioned technical characteristic or its equivalent feature
Other technical solutions of meaning combination and formation.Such as features described above and (but being not limited to) disclosed herein have similar functions
Technical characteristic replaced mutually and the technical solution that is formed.
Claims (7)
1. a kind of key assignments generation method, which is characterized in that each not phase of the contract title for each contract disposed in block catenary system
Together, which comprises
The first key assignments is generated according to first transaction;First key assignments includes Contract ID information, the Contract ID letter
Breath executes the contract title of the first contract of first transaction for identifying.
2. the method according to claim 1, wherein it is described according to it is described first transaction generate the first key assignments it
Before, the method also includes:
Judge whether the contract title of first contract is different from the contract title of existing contract in the block catenary system:
If so, deployment the first contract success.
3. method according to claim 1 or 2, which is characterized in that the Contract ID information includes first contract
Contract title, it is described according to it is described first transaction generate the first key assignments include:
The second key assignments is generated according to first transaction;
The contract title of first contract is added before second key assignments to generate first key assignments.
4. a kind of database tamper resistant method, which is characterized in that the first transaction being performed includes several first key assignments, described
Method includes:
Obtain the first contract title for executing the first contract of the first transaction;
Judge whether is the second contract title that the Contract ID information of the first contract title and first key assignments is identified
It is identical;
It is then to submit the implementing result for executing first transaction;
It is no, then the implementing result of first transaction is not submitted.
5. according to method described in claim 4, which is characterized in that the Contract ID information includes the conjunction of first contract
About title.
6. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors
Execute method according to any one of claims 1 to 5.
7. a kind of storage medium for being stored with computer program, which is characterized in that realize when the program is executed by processor as weighed
Benefit requires method described in any one of 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910048437.5A CN109800334A (en) | 2019-01-18 | 2019-01-18 | A kind of key assignments generation method, database tamper resistant method equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910048437.5A CN109800334A (en) | 2019-01-18 | 2019-01-18 | A kind of key assignments generation method, database tamper resistant method equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109800334A true CN109800334A (en) | 2019-05-24 |
Family
ID=66559642
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910048437.5A Pending CN109800334A (en) | 2019-01-18 | 2019-01-18 | A kind of key assignments generation method, database tamper resistant method equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800334A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107832275A (en) * | 2017-11-29 | 2018-03-23 | 北京欧链科技有限公司 | The generation method of intelligent Contract ID, apparatus and system in block chain |
CN108628942A (en) * | 2018-03-27 | 2018-10-09 | 深圳市网心科技有限公司 | The digital independent and wiring method of block chain node device, distributed data base |
CN108737348A (en) * | 2017-04-21 | 2018-11-02 | 中国科学院信息工程研究所 | A kind of internet of things equipment access control method of the intelligent contract based on block chain |
CN108769173A (en) * | 2018-05-21 | 2018-11-06 | 阿里体育有限公司 | The block chain implementation method and equipment of the intelligent contract of operation |
CN108985930A (en) * | 2018-06-13 | 2018-12-11 | 湖南搜云网络科技股份有限公司 | Information processing method and device, block chain node and storage medium |
US20190018947A1 (en) * | 2017-07-14 | 2019-01-17 | Alibaba Group Holding Limited | Login information data processing |
-
2019
- 2019-01-18 CN CN201910048437.5A patent/CN109800334A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108737348A (en) * | 2017-04-21 | 2018-11-02 | 中国科学院信息工程研究所 | A kind of internet of things equipment access control method of the intelligent contract based on block chain |
US20190018947A1 (en) * | 2017-07-14 | 2019-01-17 | Alibaba Group Holding Limited | Login information data processing |
CN107832275A (en) * | 2017-11-29 | 2018-03-23 | 北京欧链科技有限公司 | The generation method of intelligent Contract ID, apparatus and system in block chain |
CN108628942A (en) * | 2018-03-27 | 2018-10-09 | 深圳市网心科技有限公司 | The digital independent and wiring method of block chain node device, distributed data base |
CN108769173A (en) * | 2018-05-21 | 2018-11-06 | 阿里体育有限公司 | The block chain implementation method and equipment of the intelligent contract of operation |
CN108985930A (en) * | 2018-06-13 | 2018-12-11 | 湖南搜云网络科技股份有限公司 | Information processing method and device, block chain node and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8954370B2 (en) | Policy processor for configuration management | |
US11887192B2 (en) | Computerized system and method of navigating data with tree structure visualization using segmented access rights | |
RU2700395C2 (en) | System for guaranteeing authenticity of brand goods | |
Demir et al. | Security smells in smart contracts | |
CN109543984A (en) | Risk control method, device, electronic equipment and medium | |
CN107862425B (en) | Wind control data acquisition method, device and system and readable storage medium | |
JP2021528720A (en) | Distributed database structure for anonymous information exchange | |
CA3023084A1 (en) | Computer systems and methods for implementing in-memory data structures | |
Teperdjian | The puzzle of squaring blockchain with the general data protection regulation | |
CN109586925A (en) | Private key generation method, equipment and storage medium | |
JP2024524094A (en) | Data governance system and method | |
JP4029934B2 (en) | Distributed computing system | |
US20090112912A1 (en) | Reference Architecture Framework | |
CN109801168A (en) | A kind of method of calibration, equipment and the storage medium of the transaction of block chain | |
CN109800334A (en) | A kind of key assignments generation method, database tamper resistant method equipment and storage medium | |
CN109685506A (en) | The Signature Confirmation method of multi-signature account generation method and multi-signature account | |
Alaküla et al. | An experience report of improving business process compliance using security risk-oriented patterns | |
CN116797024A (en) | Service processing method, device, electronic equipment and storage medium | |
CN111192142A (en) | Apparatus, method and medium for information disclosure and transaction processing of consortium chain | |
CN111506784B (en) | Asset creditor matching method, device, computer equipment and storage medium | |
CN115796572A (en) | Risk enterprise identification method, apparatus, device and medium | |
CN110033145A (en) | The single method and device of the shared operation point of finance, equipment and storage medium | |
CN114065177A (en) | User equipment authentication method and device based on knowledge graph and electronic equipment | |
CN113407748A (en) | Important blank certificate management method and device | |
CN116685972A (en) | Access determination device, access determination method, and access determination program |
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 |