CN109871408A - A kind of multi-type database adaptation method, device, electronic equipment and storage medium - Google Patents

A kind of multi-type database adaptation method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109871408A
CN109871408A CN201910164464.9A CN201910164464A CN109871408A CN 109871408 A CN109871408 A CN 109871408A CN 201910164464 A CN201910164464 A CN 201910164464A CN 109871408 A CN109871408 A CN 109871408A
Authority
CN
China
Prior art keywords
type
database
operational order
block chain
adaptation
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
CN201910164464.9A
Other languages
Chinese (zh)
Other versions
CN109871408B (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.)
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething 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 Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910164464.9A priority Critical patent/CN109871408B/en
Publication of CN109871408A publication Critical patent/CN109871408A/en
Application granted granted Critical
Publication of CN109871408B publication Critical patent/CN109871408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application discloses a kind of multi-type database adaptation methods, this method utilization includes the multi-type database adaptation rule of the corresponding relationship between the operational order (standard operating instruction) of the first kind of every kind of function and the operational order (practical operation instruction) of the Second Type of all types of database identical functions, the operational order (standard operating instruction) for the first kind that target block chain network is sent is converted to the operational order (practical operation instruction) of the Second Type of corresponding actual database, so that possibly can not originally handle the database of this format can also instruct to carry out corresponding operation according to the practical operation after conversion, so that user is not necessarily to install certain types of database again through complicated installation process again because type of database mismatches, increase the versatility of database, the user experience is improved.The application further simultaneously discloses a kind of multi-type database adaptive device, electronic equipment and computer readable storage medium, has above-mentioned beneficial effect.

Description

A kind of multi-type database adaptation method, device, electronic equipment and storage medium
Technical field
This application involves block chain technical field, in particular to a kind of multi-type database adaptation method, device, electronics are set Standby and computer readable storage medium.
Background technique
The characteristic of decentralization and unsuppressible-suppression as possessed by block chain technology, so that block chain technology is very suitable to For storage data quantity is big but the lesser significant data of volume of each data, such as just by block chain skill in bit coin network Art carrys out store transaction data as the account book of record bit coin transaction.
With block chain technology development and bit coin it is burning hot, occur a variety of different types of block chains successively, often One block chain equipment will exist as a node for forming the block chain network, to store the number stored in the block chain According to.
The block chain network of different type or different purposes is often for the considerations of preventing with other data collisions, it is desirable that belongs to Node device in it responds matched operational order using certain types of database.When not installed in node device It is required that user can only install this database again when the database of type.Sometimes certain node device may be simultaneously as not Node device with block chain network exists, and will lead to need to install a plurality of types of databases in its equipment, this Situation can not only bring the dislike of user, and can greatly occupy the remaining computing resource in the poor equipment of performance.
Therefore, how overcoming in the prior art must use specific type of data matched with affiliated block chain network to come in fact Technological deficiency present in the mode of the storage of existing data, is those skilled in the art's urgent problem to be solved.
Summary of the invention
The purpose of the application is to provide a kind of multi-type database adaptation method, device, electronic equipment and computer-readable Storage medium, it is intended to which solving the prior art must use specific type of data matched with affiliated block chain network to carry out storing data The problem that versatility present in mode is poor, user is poor using physical examination.
To achieve the above object, this application provides a kind of multi-type database adaptation methods, comprising:
Receive the operational order for the first kind that block chain network issues;
Detect the type of database of the actual installation in current block chain node device, the determining class with the database The type of the adaptable operational order of type is Second Type;
The operational order of the first kind is converted into Second Type by preset multi-type database adaptation rule Operational order;Wherein, the multi-type database adaptation rule includes the operational order of the first kind of every kind of function and each Corresponding relationship between the operational order of the Second Type of types of database identical function;
Corresponding operation is carried out to the database by the operational order of the Second Type.
Optionally, before the operational order for receiving the first kind that target block chain network issues, further includes:
Obtain the operational order that the Second Type of identical function is indicated in all types of databases;
Being generated according to the same or similar part in the operational order of each Second Type indicates the first of identical function The operational order of type;
Establish the behaviour of the operational order of the first kind of every kind of function and the Second Type of all types of database identical functions Corresponding relationship between instructing, and the multi-type database adaptation rule is generated according to each corresponding relationship.
Optionally, the multi-type database adaptation method further include:
When the number of types of database of the actual installation in the current block chain node device is greater than 1, by any choosing A kind of type of the database taken out is as actual database type.
Optionally, using a kind of type of the database arbitrarily selected as actual database type, comprising:
Calculate separately the finger between the corresponding operational order of each type of database and the operational order of the first kind Enable similarity;
The type for possessing the database of supreme command similarity is elected to be the actual database type.
Optionally, the multi-type database adaptation method further include:
The format for the information that the database returns is converted to by the multi-type database adaptation rule can be by institute State the format of target block chain network identification.
To achieve the above object, present invention also provides a kind of multi-type database adaptive device, which includes:
First kind operational order receiving unit, for receiving the operational order for the first kind that block chain network issues;
Second Type operational order determination unit, for detecting data of the actual installation in current block chain node device The type in library, the type of the determining operational order adaptable with the type of the database are Second Type;
Operational order type conversion unit, for by preset multi-type database adaptation rule by the first kind Operational order be converted to the operational order of Second Type;Wherein, the multi-type database adaptation rule includes every kind of function The first kind operational order and all types of database identical functions Second Type operational order between corresponding relationship;
Operational order execution unit after conversion carries out the database for the operational order by the Second Type Corresponding operation.
Optionally, the multi-type database adaptive device further include:
Each Second Type operation instruction obtaining unit, the standard operating instruction for being issued in reception target block chain network Before, the operational order that the Second Type of identical function is indicated in all types of databases is obtained;
First kind operational order generation unit, for the identical or phase in the operational order according to each Second Type The operational order for indicating the first kind of identical function is generated like part;
Corresponding relationship establish and adaptation rule generation unit, for establish every kind of function the first kind operational order with Corresponding relationship between the operational order of the Second Type of all types of database identical functions, and generated according to each corresponding relationship The multi-type database adaptation rule.
Optionally, the multi-type database adaptive device further include:
Actual database type selection unit, for working as data of the actual installation in the current block chain node device When the number of types in library is greater than 1, using a kind of type of the database arbitrarily selected as actual database type.
Optionally, the polymorphic type actual database selection unit includes:
Instruct similarity calculation subelement, for calculate separately the corresponding operational order of each type of database with it is described Instruction similarity between the operational order of the first kind;
Supreme command similarity type of database chooses subelement, for that will possess the database of supreme command similarity Type is elected to be the actual database type.
Optionally, the multi-type database adaptive device further include:
The format of return information format conversion unit, the information for returning to the database passes through the polymorphic type number The format that can be identified by the target block chain network is converted to according to library adaptation rule.
To achieve the above object, the application still further provides a kind of electronic equipment, and the electronic equipment includes storage It is suitable to be stored with the polymorphic type actual database that can be run on the processor on the memory for device, processor and bus With program, the polymorphic type actual database adaptation procedure is by the bus transfer to the processor, and by the processing The polymorphic type actual database adaptation method as described in above content is realized when device executes.
To achieve the above object, the application still further provides a kind of computer readable storage medium, the computer Polymorphic type actual database adaptation procedure is stored on readable storage medium storing program for executing, the polymorphic type actual database adaptation procedure can quilt One or more processor executes, to realize the polymorphic type actual database adaptation method as described in above content.
Obviously, technical solution provided herein utilizes the operational order (mark for the first kind for including every kind of function Quasi- operational order) it is corresponding between the operational order (practical operation instruction) of the Second Type of all types of database identical functions close The multi-type database adaptation rule of system, (standard operation refers to the operational order for the first kind that target block chain network is sent Enable) be converted to corresponding actual database Second Type operational order (practical operation instruction) so that originally possibly can not locate The database for managing this format can also instruct to carry out corresponding operation, so that user is not necessarily to according to the practical operation after conversion Certain types of database is installed again through complicated installation process again because type of database mismatches, increases database Versatility, the user experience is improved.The application additionally provide simultaneously a kind of multi-type database adaptive device, electronic equipment and Computer readable storage medium has above-mentioned beneficial effect, and details are not described herein.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of multi-type database adaptation method provided by the embodiments of the present application;
Fig. 2 is a kind of schematic diagram of the corresponding relationship of dedicated adaptation rule provided by the embodiments of the present application;
Fig. 3 is a kind of schematic diagram of the corresponding relationship of General adaptive rule provided by the embodiments of the present application;
Fig. 4 is a kind of flow chart of standard operating instruction generation method provided by the embodiments of the present application;
Fig. 5 is that one kind is selected in polymorphic type actual database in multi-type database adaptation method provided by the embodiments of the present application Take the flow chart of method;
Fig. 6 is a kind of structural block diagram of diversiform data adaptive device provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
Embodiment one
Referring to Figure 1, Fig. 1 is a kind of flow chart of multi-type database adaptation method provided by the embodiments of the present application, The following steps are included:
S101: the operational order for the first kind that block chain network issues is received;
After receiving the operational order (being known as standard operating instruction in the present invention) that block chain network issues, determine that operation refers to The type of order, wherein the first kind may refer to any one type, the operational order of the first kind can for it is a kind of with it is existing A kind of corresponding operational order of the database of type, or customized operational order.
S102: the type of database of the detection actual installation in current block chain node device, it is determining and database The type of the adaptable operational order of type is Second Type;
Determine the type of database of the actual installation in current block chain node device, the database that can detecte Type is referred to as actual database type, and the type for the operational order being adapted with actual database type is determined as second Type (is referred to as standard operating instruction relative to what block chain network issued, the operational order of Second Type herein can be claimed For practical operation instruction), in order to realize the conversion of operational order type, this is because in the first kind with Second Type in phase When different in the instruction of congenerous, block chain network can not identify the operational order of Second Type used in block chain link point, And block chain node can not also identify that it is received before not installing the database being adapted with the operational order of the first kind The first kind operational order.
It further, can also basis if there are many databases of type for actual installation on current block chain node device Actual conditions pick out one of most suitable conduct actual database type, and will be corresponding with the actual database type Operational order is determined as Second Type.Concrete mode can according to each type of operational order on description identical function with the Similarity, all particular/special requirements that may be present between the operational order of one type etc., herein and are not specifically limited.
S103: the operational order of the first kind is converted to by Second Type by preset multi-type database adaptation rule Operational order;
On the basis of S102, this step is intended to complete operational order by preset multi-type database adaptation rule Conversion (conversion that standard operating instruction to practical operation instructs) from the first kind to Second Type, so that current block chain link Point device can complete block chain according to the operational order after conversion under the premise of specially not installing certain types of database The task and relevant operation that network issues.Wherein, multi-type database adaptation rule includes the behaviour of the first kind of every kind of function Make the corresponding relationship between the operational order of the Second Type of instruction and all types of database identical functions.
Wherein, according to the operational order of the first kind whether be existing a certain type operational order, the adaptation rule is also Dedicated adaptation rule or General adaptive as shown in Figure 3 rule as shown in Figure 2 can be embodied in.
For the adaptation rule form of expression of the operational order of existing a certain type, i.e., Fig. 2 corresponds to the operation of the first kind To require the block chain network using certain type of database to provide a kind of dedicated adaptation rule, it is assumed that A block chain network It is required that being instructed using T generic operation corresponding with the database of X class, then being identical to providing one kind in such cases can be by T class Operational order is converted to the operational order transformation rule that can be identified by a variety of other types of databases, i.e., is targetedly the area A Block chain network provides a kind of dedicated adaptation rule, so that as must no longer be equipped with X in the node device of A block chain network The database of class could normally handle the instruction of the T generic operation from A block chain network.But in such cases, once being changed to It is required that when using other block chain networks of non-X class database, it is also necessary to provide and be adapted to the corresponding operational order of non-X class database Adaptation rule between type and other operational order types.
In view of needing the database creation and other number of types of each type respectively when using dedicated adaptation rule According to the special instruction transformation rule between library, more troublesome and management is responsible for, can also be according to existing a plurality of types of databases point The operational order type not used generates the new operational order of one kind as standard operating instruction, all answers in all block chain networks When with the standard block chain network, it is only necessary to provide according to corresponding between the standard operating instruction and other types of operational order The General adaptive rule that relationship creates can (corresponding relationship for including in the General adaptive rule that such mode is formed can join See Fig. 3).In other words, standard operating instruction at this time is (to correspond respectively to every kind according to the operational order of a variety of existing types The database of type) handled after obtain, treatment process namely establishes the process of corresponding relationship, that is to say, that at this time Standard operating instruction will send operational order, General adaptive to specific block chain node device as the operational order on a upper layer Rule changes it to practical operation instruction corresponding with the type of actual database by the corresponding relationship that inside includes, in turn Realize higher versatility.
By General adaptive rule in the way of generate standard operating instruction in the case where, due to and there is no one can In the database for just directly handling standard operating instruction without conversion, that is to say, that simple standard operating instruction will not have In all senses, it is intended only as in corresponding relationship for determining that the source operational order of object run instruction uses, therefore can use up can Its length of the shortening of energy, reduces the flow expended in data transmission procedure, increases information exchange efficiency.
S104: corresponding operation is carried out to database by the operational order of Second Type.
The present embodiment using include every kind of function the first kind operational order (standard operating instruction) with it is all types of The multi-type database of corresponding relationship between the operational order (practical operation instruction) of the Second Type of database identical function is suitable With rule, the operational order (standard operating instruction) for the first kind that target block chain network is sent is converted into corresponding actual number According to the operational order (practical operation instruction) of the Second Type in library, so that possibly can not originally handle the database of this format It can be instructed according to the practical operation after conversion to carry out corresponding operation, so that user is not necessarily to mismatch again because of type of database Certain types of database is installed again through complicated installation process, increases the versatility of database, improves user Experience.
Embodiment two
Fig. 4 is referred to, Fig. 4 is a kind of flow chart of General adaptive rule generating method provided by the embodiments of the present application, On the basis of embodiment one, the present embodiment is intended to provide a kind of generation method of General adaptive rule, is not necessarily to each type of Database provides respectively dedicated adaptation rule, includes the following steps:
S201: the operational order that the Second Type of identical function is indicated in all types of databases is obtained;
S202: being generated according to the same or similar part in the operational order of each Second Type indicates the first of identical function The operational order of type;
In order to make the operational order (standard operating instruction) and current existing type of database pair of the first kind The operational order relevance for the Second Type answered is stronger, therefore the present embodiment will be according to the phase in the operational order of each Second Type With or similar portion come generate indicate identical function the first kind operational order (standard operating instruction).
S203: the operational order of the first kind of every kind of function and the Second Type of all types of database identical functions are established Operational order between corresponding relationship, and according to each corresponding relationship generate multi-type database adaptation rule.
On the basis of S202, corresponding relationship easily very can be established according to the process for finding identical point, and according to each Corresponding relationship generates General adaptive rule.
Under by the way of General adaptive rule, it is necessary first to determine one it is more upper, more rich in versatility Operational order type can specifically select original one kind, can also voluntarily create, can be according to when using voluntarily creating Different modes is created in conjunction with the position of keyword in every kind of existing operational order or meaning, and due to voluntarily creating mode Under existing various types of databases can not directly handle the standard operating instruction voluntarily created, that is to say, that simple mark Quasi- operational order, which will not have, to be intended only as in corresponding relationship in all senses for determining the source operational order of object run instruction It uses, therefore its length can be shortened as far as possible, reduce the flow expended in data transmission procedure, increase information exchange effect Rate.
Embodiment three
Fig. 5 is referred to, Fig. 5 is that one kind is real in polymorphic type in multi-type database adaptation method provided by the embodiments of the present application The flow chart of border database choosing method, on the basis of the various embodiments described above, the present embodiment is in current block chain node A kind of method that the scene of a plurality of types of databases provides determining actual type is installed, is included the following steps:
S301: the finger between the corresponding operational order of each type of database and the operational order of the first kind is calculated separately Enable similarity;
S302: the type for possessing the database of supreme command similarity is elected to be actual database type.
Instruction similarity indicates the respectively practical operation when indicating the operational order of identical function of different types of database Difference between instruction, similarity are higher, it is meant that the difference of the data of both types is smaller, instructs in the actual operation process The executive mode degree of coupling it is higher, be less susceptible to malfunction, therefore the present embodiment will possess the database of supreme command similarity Type is elected to be actual database type, and the conversion operation of subsequent step is carried out according to the actual database type being elected to be.
Because situation is complicated, it can not enumerate and be illustrated, those skilled in the art should be able to recognize according to the application The basic skills principle combination actual conditions of offer may exist many examples, in the case where not paying enough creative works, It should within the scope of protection of this application.
Example IV
Fig. 6 is referred to, Fig. 6 is a kind of structural block diagram of diversiform data adaptive device provided by the embodiments of the present application, should Device may include:
First kind operational order receiving unit 100, the operation for receiving the first kind that block chain network issues refer to It enables;
Second Type operational order determination unit 200, for detecting actual installation in current block chain node device The type of database, the type of the determining operational order adaptable with the type of database are Second Type;
Operational order type conversion unit 300, for by preset multi-type database adaptation rule by the first kind Operational order be converted to the operational order of Second Type;Wherein, multi-type database adaptation rule includes the of every kind of function Corresponding relationship between the operational order of the Second Type of the operational order of one type and all types of database identical functions;
Operational order execution unit 400 after conversion carries out database for the operational order by Second Type corresponding Operation.
Further, which can also include:
Each Second Type operation instruction obtaining unit, the standard operating instruction for being issued in reception target block chain network Before, the operational order that the Second Type of identical function is indicated in all types of databases is obtained;
First kind operational order generation unit, for the same or similar portion in the operational order according to each Second Type The mitogenetic operational order at the first kind for indicating identical function;
Corresponding relationship establish and adaptation rule generation unit, for establish every kind of function the first kind operational order with Corresponding relationship between the operational order of the Second Type of all types of database identical functions, and multiclass is generated according to each corresponding relationship Type database adaptation rule.
Further, which can also include:
Actual database type selection unit, for when database of the actual installation in current block chain node device When number of types is greater than 1, using a kind of type of the database arbitrarily selected as actual database type.
Wherein, which may include: again
Similarity calculation subelement is instructed, for calculating separately the corresponding operational order of each type of database and first Instruction similarity between the operational order of type;
Supreme command similarity type of database chooses subelement, for that will possess the database of supreme command similarity Type is elected to be actual database type.
Further, which can also include:
The format of return information format conversion unit, the information for returning to database is adapted to by multi-type database Rule is converted to the format that can be identified by target block chain network.
The present embodiment exists as the Installation practice for corresponding to above method embodiment, and there is embodiment of the method to be had Whole beneficial effects, no longer repeat one by one herein.
Hereinbefore by some embodiments between the conversion of operational order how realizing disparate databases type into Detailed description is gone, the application also provides a kind of entity hardware device corresponding with this method, this partial content principle and side Case part is corresponding, and details are not described herein again for the part of realization principle, will form carry out to the hardware of the entity hardware device below Description refers to Fig. 7, and Fig. 7 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application:
The electronic equipment 500 includes memory 510, processor 520 and bus 530, and being stored on memory 510 can be The polymorphic type actual database adaptation procedure run on processor 520, the polymorphic type actual database adaptation procedure pass through bus 530 are transferred to processor 520, and the reality of the polymorphic type as described in above-described embodiment can be realized when being executed by processor 520 Each step in the database adaptation method of border.
Wherein, memory 510 includes at least a type of readable storage medium storing program for executing, and readable storage medium storing program for executing includes flash memory, hard Disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 510 It can be the internal storage unit of electronic equipment 500, such as the hard disk of the electronic equipment 500 in some embodiments.Memory 510 are also possible to match on the External memory equipment of the electronic equipment 500, such as the electronic equipment 500 in further embodiments Standby plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) Card, flash card (Flash Card) etc..Further, memory 510 can also be simultaneously by internal storage unit and external storage Equipment forms simultaneously.Further, what memory 510 can be not only used for that storage is installed in the electronic equipment 500 various answers With software and Various types of data, can be also used for temporarily storing the data that has exported or will export.
Processor 520 can be in some embodiments central processing unit (Central Processing Unit, CPU), Controller, microcontroller, microprocessor or other data processing chips, the program code for being stored in run memory 510 Or processing data, such as polymorphic type actual database adaptation procedure etc..
Bus 530 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA) Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, only with one pair in Fig. 7 It is indicated to hollow index line, it is not intended that an only bus or a type of bus.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.In several embodiments provided herein, it should be understood that disclosed system, device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of unit, only A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit It connects, can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product To be stored in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, which is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) executes the method gone out given in each embodiment of the application All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.
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 multi-type database adaptation method characterized by comprising
Receive the operational order for the first kind that block chain network issues;
Detect the type of database of the actual installation in current block chain node device, the determining type phase with the database The type of the operational order of adaptation is Second Type;
The operational order of the first kind is converted to the behaviour of Second Type by preset multi-type database adaptation rule It instructs;Wherein, the multi-type database adaptation rule include the first kind of every kind of function operational order with it is all types of Corresponding relationship between the operational order of the Second Type of database identical function;
Corresponding operation is carried out to the database by the operational order of the Second Type.
2. multi-type database adaptation method according to claim 1, which is characterized in that receiving target block chain network Before the operational order of the first kind issued, further includes:
Obtain the operational order that the Second Type of identical function is indicated in all types of databases;
The first kind for indicating identical function is generated according to the same or similar part in the operational order of each Second Type Operational order;
The operation for establishing the operational order and the Second Type of all types of database identical functions of the first kind of every kind of function refers to Corresponding relationship between order, and the multi-type database adaptation rule is generated according to each corresponding relationship.
3. multi-type database adaptation method according to claim 1, which is characterized in that further include:
When the number of types of database of the actual installation in the current block chain node device is greater than 1, will arbitrarily select A kind of database type as actual database type.
4. multi-type database adaptation method according to claim 3, which is characterized in that a kind of number that will arbitrarily select According to the type in library as actual database type, comprising:
Calculate separately the instruction phase between the corresponding operational order of each type of database and the operational order of the first kind Like degree;
The type for possessing the database of supreme command similarity is elected to be the actual database type.
5. multi-type database adaptation method according to any one of claims 1 to 4, which is characterized in that further include:
The format for the information that the database returns is converted to by the multi-type database adaptation rule can be by the mesh Mark the format of block chain network identification.
6. a kind of multi-type database adaptive device characterized by comprising
First kind operational order receiving unit, for receiving the operational order for the first kind that block chain network issues;
Second Type operational order determination unit, for detecting database of the actual installation in current block chain node device Type, the type of the determining operational order adaptable with the type of the database are Second Type;
Operational order type conversion unit, for by preset multi-type database adaptation rule by the behaviour of the first kind Make the operational order that instruction is converted to Second Type;Wherein, the multi-type database adaptation rule includes the of every kind of function Corresponding relationship between the operational order of the Second Type of the operational order of one type and all types of database identical functions;
Operational order execution unit after conversion carries out the database for the operational order by the Second Type corresponding Operation.
7. multi-type database adaptive device according to claim 6, which is characterized in that further include:
Each Second Type operation instruction obtaining unit, for receive the standard operating instruction that issues of target block chain network it Before, obtain the operational order that the Second Type of identical function is indicated in all types of databases;
First kind operational order generation unit, for the same or similar portion in the operational order according to each Second Type The mitogenetic operational order at the first kind for indicating identical function;
Corresponding relationship establish and adaptation rule generation unit, for establish every kind of function the first kind operational order with it is all kinds of Corresponding relationship between the operational order of the Second Type of type database identical function, and according to each corresponding relationship generation Multi-type database adaptation rule.
8. multi-type database adaptive device according to claim 6, which is characterized in that further include:
Actual database type selection unit, for when database of the actual installation in the current block chain node device When number of types is greater than 1, using a kind of type of the database arbitrarily selected as actual database type.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes memory, processor and bus, the storage The multi-type database adaptation procedure that can be run on the processor, the multi-type database adaptation procedure are stored on device It can realize by the bus transfer to the processor, and when being executed by the processor such as any one of claim 1 to 5 institute The multi-type database adaptation method stated.
10. a kind of computer readable storage medium, which is characterized in that be stored with polymorphic type on the computer readable storage medium Database adaptation procedure, the pre-installation program can be executed by one or more processor, to realize such as claim 1 to 5 Any one of described in multi-type database adaptation method.
CN201910164464.9A 2019-03-05 2019-03-05 Multi-type database adaptation method, device, electronic equipment and storage medium Active CN109871408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910164464.9A CN109871408B (en) 2019-03-05 2019-03-05 Multi-type database adaptation method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910164464.9A CN109871408B (en) 2019-03-05 2019-03-05 Multi-type database adaptation method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109871408A true CN109871408A (en) 2019-06-11
CN109871408B CN109871408B (en) 2023-07-14

Family

ID=66919658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910164464.9A Active CN109871408B (en) 2019-03-05 2019-03-05 Multi-type database adaptation method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109871408B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111192143A (en) * 2019-12-25 2020-05-22 达闼科技成都有限公司 Data processing method, data processing device, storage medium and block link point
WO2021057064A1 (en) * 2019-09-23 2021-04-01 平安科技(深圳)有限公司 Data interaction conversion method and apparatus based on artificial intelligence, device, and medium
CN112749177A (en) * 2019-10-31 2021-05-04 北京国双科技有限公司 Database data processing method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158975A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and system for accessing distinct type data-base
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database
US20130110798A1 (en) * 2011-10-27 2013-05-02 Microsoft Corporation Intercepting and processing database commands
CN103823815A (en) * 2012-11-19 2014-05-28 中国联合网络通信集团有限公司 Server and database access method
CN106156330A (en) * 2016-07-06 2016-11-23 北京金山安全管理系统技术有限公司 A kind of data base's adaptation method and database adapter
CN106383754A (en) * 2016-09-19 2017-02-08 北京众享比特科技有限公司 Database backup and recovery system based on block chain technology, and database backup method based on block chain technology, and database recovery method based on block chain technology
CN106933869A (en) * 2015-12-30 2017-07-07 北京京东尚科信息技术有限公司 A kind of method and apparatus of operating database
CN107239479A (en) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 A kind of method and device of data storage and inquiry based on block chain
US20180196836A1 (en) * 2017-01-09 2018-07-12 Sap Se Database management system with dynamic allocation of database requests
CN108647361A (en) * 2018-05-21 2018-10-12 中国工商银行股份有限公司 A kind of date storage method, apparatus and system based on block chain

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158975A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and system for accessing distinct type data-base
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database
US20130110798A1 (en) * 2011-10-27 2013-05-02 Microsoft Corporation Intercepting and processing database commands
CN103823815A (en) * 2012-11-19 2014-05-28 中国联合网络通信集团有限公司 Server and database access method
CN106933869A (en) * 2015-12-30 2017-07-07 北京京东尚科信息技术有限公司 A kind of method and apparatus of operating database
CN106156330A (en) * 2016-07-06 2016-11-23 北京金山安全管理系统技术有限公司 A kind of data base's adaptation method and database adapter
CN106383754A (en) * 2016-09-19 2017-02-08 北京众享比特科技有限公司 Database backup and recovery system based on block chain technology, and database backup method based on block chain technology, and database recovery method based on block chain technology
US20180196836A1 (en) * 2017-01-09 2018-07-12 Sap Se Database management system with dynamic allocation of database requests
CN107239479A (en) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 A kind of method and device of data storage and inquiry based on block chain
CN108647361A (en) * 2018-05-21 2018-10-12 中国工商银行股份有限公司 A kind of date storage method, apparatus and system based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GANESH B. SOLANKE & K. RAJESWARI: "SQL to NoSQL transformation system using data adapter and analytics", 《2017 IEEE INTERNATIONAL CONFERENCE ON TECHNOLOGICAL INNOVATIONS IN COMMUNICATION, CONTROL AND AUTOMATION (TICCA)》 *
张武能等: "面向数据库模式变更的代码演化推荐方法", 《计算机科学》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057064A1 (en) * 2019-09-23 2021-04-01 平安科技(深圳)有限公司 Data interaction conversion method and apparatus based on artificial intelligence, device, and medium
CN112749177A (en) * 2019-10-31 2021-05-04 北京国双科技有限公司 Database data processing method and device
CN111192143A (en) * 2019-12-25 2020-05-22 达闼科技成都有限公司 Data processing method, data processing device, storage medium and block link point

Also Published As

Publication number Publication date
CN109871408B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN109871408A (en) A kind of multi-type database adaptation method, device, electronic equipment and storage medium
CN110245220A (en) Electronic document signs method, apparatus and server, storage medium
CN106462516A (en) Dynamically adjustable multi-line bus shared by multi-protocol devices
CN112445729B (en) Operation address determination method, PCIe system, electronic device and storage medium
CN110175833B (en) Computer device, method, system and medium for binding bank card information
CN110362450A (en) A kind of log data acquisition method, device and computer readable storage medium
CN109146095A (en) The treating method and apparatus of multiservice system problem
CN109976823A (en) A kind of application program launching method, device and terminal device
CN112527449B (en) Cluster node label creation method and system, electronic equipment and storage medium
CN110166304A (en) A kind of method of combination, device, electronic equipment and the storage medium of cross-domain SFC
CN106202440A (en) Data processing method, device and equipment
CN105825172A (en) Mobile-terminal-based multi-fingerprint matching method and system
CN103399832A (en) Ordering method of out-of-order return data between buses
CN109697281A (en) The online method, apparatus and electronic equipment for merging document
CN102638403B (en) Method and device for processing messages
CN107844520A (en) Electronic installation, vehicle data introduction method and storage medium
CN109120731B (en) Universal communication method, system and device
CN104932982B (en) A kind of Compilation Method and relevant apparatus of message memory access
CN110399166A (en) Store method, device, equipment and the storage medium of ME Nonce value
CN109753510A (en) A kind of acquisition methods of target data, system, electronic equipment and storage medium
CN109460241A (en) A kind of pre-installation method, system, electronic equipment and the storage medium of operating system
CN109324838A (en) Execution method, executive device and the terminal of SCM program
CN105787791A (en) Service request processing method and apparatus
CN107169517A (en) Method for judging repeated strokes, terminal equipment and computer readable storage medium
CN107741887A (en) A kind of communication interaction method and apparatus of inter-module

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
TA01 Transfer of patent application right

Effective date of registration: 20210909

Address after: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Xunlei Networking Technologies, Ltd.

Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Address before: 518052 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240621

Address after: 518000, 2101 to 2107, Xunlei Building, No. 3709 Baishi Road, Gaoxin District, Yuehai Street, Nanshan District, Shenzhen, Guangdong Province

Patentee after: Xunlei Networking Technologies, Ltd.

Country or region after: China

Address before: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: Xunlei Networking Technologies, Ltd.

Country or region before: China

Patentee before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right