CN107590189A - Intelligent contract performs method, apparatus, equipment and storage medium - Google Patents
Intelligent contract performs method, apparatus, equipment and storage medium Download PDFInfo
- Publication number
- CN107590189A CN107590189A CN201710679724.7A CN201710679724A CN107590189A CN 107590189 A CN107590189 A CN 107590189A CN 201710679724 A CN201710679724 A CN 201710679724A CN 107590189 A CN107590189 A CN 107590189A
- Authority
- CN
- China
- Prior art keywords
- trade company
- node
- list
- contract
- search key
- 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
Links
Abstract
The applicable field of computer technology of the present invention, there is provided a kind of intelligent contract, which performs method, apparatus, equipment and storage medium, this method, to be included:The intelligent contract for receiving user's input performs request, execution request includes search key, obtain is that the tree index that trade company establishes is associated in intelligent contract in advance, list corresponding with search key is generated in the inverted list of tree index, whether the list for detecting generation is empty, when the list non-NULL of generation, travel through all paths of tree index, the trade company of search covering search key in the node that traversal has access to, the trade company of the covering search key searched is added into contract to perform in merchant list, the trade company performed to contract in merchant list performs the intelligent contract associated with search key, so as to while intelligent contract execution efficiency is improved, improve the validity and security for performing intelligent contract.
Description
Technical field
The invention belongs to field of computer technology, more particularly to a kind of intelligent contract to perform method, apparatus, equipment and storage
Medium.
Background technology
Intelligent contract is that agreement terms are embedded into soft and hardware, promotes the execution of contract by agreement and user interface.
In recent years, the rise of block chain technology is that intelligent contract creates condition, and it can not only support programmable contract, and have and go
Centralization, can not distort, transparent procedures and it is traceable the features such as.The intelligent contract of environment boosting trusty on block chain
Flourish.Existing block chain intelligence contract is participated and draw jointly by multi-party users, and intelligent contract is deposited into block link network
In network, when program when condition meets that is briefly described finished writing in advance just performs contract automatically.This intelligent contract based on description
Execution method decision logic is excessively simple, is not suitable for the requirement performed under special scenes to intelligent contract, on the one hand can not root
Free burial ground for the destitute is made by oneself according to user preference only to select to perform the trade company for partly meeting condition in contract, does not on the other hand account for trade company completely
The network structure that is formed in cooperation or process of exchange, and the network constraint of network structure can guarantee that working closely between trade company, can
To greatly promote the validity and security that intelligent contract performs.
Existing intelligent contract structure and execution substantially flow are:Multi-party users participate and draw intelligent contract jointly;Contract
Spread by P2P networks and be stored in block chain;Block chain judges when and whether the intelligent contract is held according to the description of contract
OK.For example, if the description of " dealing money is more than 1,000,000 " is added in intelligent contract, when dealing money is more than 1,000,000
Contract will perform automatically.It is this based on being briefly described as whether performing the method for contract and be not suitable under some special scenes
Complicated to intelligent contract performs requirement, it is impossible to and various dimensions weigh the execution condition of contract, thus so that the application of intelligent treaty
It is extremely limited, it is difficult to meet that user requires.
The content of the invention
It is an object of the invention to provide a kind of intelligent contract to perform method, apparatus, equipment and storage medium, it is intended to solves
Existing intelligent contract performs the less efficient of method search trade company, causes the problem of contract execution efficiency is low and security is not high.
On the one hand, the invention provides a kind of intelligent contract to perform method, and methods described comprises the steps:
The intelligent contract for receiving user's input performs request, and described perform asks to include search key;
It is that the tree index that trade company establishes is associated in the intelligent contract in advance to obtain, in the inverted list of the tree index
It is middle to generate list corresponding with the search key;
Whether the list for detecting the generation is empty, when the list non-NULL of the generation, travels through the tree index
All paths, the trade company of the search covering search key, the covering that will be searched in the node for traveling through and having access to
The trade company of the search key is added to contract and performed in merchant list;
The trade company performed to the contract in merchant list performs the intelligent contract associated with the search key.
On the other hand, the invention provides a kind of intelligent contract performs device, described device to include:
Request reception unit, the intelligent contract for receiving user's input perform request, and described perform asks to include searching
Rope keyword;
List generation unit, for obtaining in advance to associate the tree index that trade company establishes in the intelligent contract, in institute
State and list corresponding with the search key is generated in the inverted list of tree index;
Trade company's search unit, whether the list for detecting the generation is empty, when the list non-NULL of the generation, time
All paths of the tree index are gone through, the business of the search covering search key in the node for traveling through and having access to
Family, the trade company of the covering search key searched is added to contract and performed in merchant list;And
Contract execution unit, the trade company for being performed to the contract in merchant list performs closes with the search key
The intelligent contract of connection.
On the other hand, present invention also offers a kind of user equipment, including memory, processor and it is stored in described deposit
In reservoir and the computer program that can run on the processor, realized such as during computer program described in the computing device
The step of intelligent contract performs method.
On the other hand, present invention also offers a kind of computer-readable recording medium, the computer-readable recording medium
Computer program is stored with, realizes that the intelligent contract such as performs the step of method when the computer program is executed by processor
Suddenly.
The intelligent contract that the present invention receives user's input performs request, and execution request includes search key, obtains
It is that the tree index that trade company establishes is associated in intelligent contract in advance, generation and search key pair in the inverted list of tree index
The list answered, whether the list for detecting generation is empty, when the list non-NULL of generation, travels through all paths of tree index,
The trade company of search covering search key in the node having access to is traveled through, the trade company of the covering search key searched is added
Performed to contract in merchant list, the trade company in merchant list is performed to contract and performs the intelligence conjunction associated with search key
About, so that while intelligent contract execution efficiency is improved, the validity and security for performing intelligent contract are improved.
Brief description of the drawings
Fig. 1 is the implementation process figure that the intelligent contract that the embodiment of the present invention one provides performs method;
Fig. 2 is the implementation process figure that the intelligent contract that the embodiment of the present invention two provides performs method;
Fig. 3 is the structural representation for the intelligent contract performs device that the embodiment of the present invention three provides;
Fig. 4 is the structural representation for the intelligent contract performs device that the embodiment of the present invention four provides;And
Fig. 5 is the structural representation for the user equipment that the embodiment of the present invention five provides.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
It is described in detail below in conjunction with specific implementation of the specific embodiment to the present invention:
Embodiment one:
Fig. 1 shows that the intelligent contract that the embodiment of the present invention one provides performs the implementation process of method, for convenience of description,
The part related to the embodiment of the present invention is illustrate only, details are as follows:
In step S101, the intelligent contract for receiving user's input performs request, and performing request includes search key.
The embodiment of the present invention is applied to network intelligence contract system, and contract execution condition is weighed by various dimensions to facilitate,
Realize the purpose for performing intelligent contract automatically.In embodiments of the present invention, before the trade company that search can perform intelligent contract, use
Family sets last set keyword as the search key persistently searched for for intelligent contract first, is made by oneself to screen satisfaction
Adopted contract performs the trade company of condition, wherein, the search key of user's setting performs included in the intelligent contract of user's input please
In asking.For example, user inputs search key in the input frame of search key first, then triggering intelligent contract execution please
Ask.
In step s 102, it is that the tree index that trade company establishes is associated in intelligent contract in advance to obtain, in tree index
List corresponding with search key is generated in inverted list.
In embodiments of the present invention, trade company all in the Merchant web of user preset is covered in tree index, wherein,
On the one hand, network constraint be present between these trade companies in Merchant web, can ensure exist often between trade company by network constraint
Property cooperation or transaction so that the contact between trade company it is even closer and more have reality and Practical significance, the opposing party
Face, these trade companies in Merchant web are associated with intelligent contract, i.e., these trade companies are the trade company of signed intelligence contract, so as to
Improve accuracy, validity and the security for performing contract.After the intelligent contract for receiving user's input performs request, first
Search key corresponding to obtaining execution request, it is that the tree-shaped rope that trade company establishes is associated in intelligent contract in advance then to obtain
Draw, and list corresponding with search key is generated in the inverted list of tree index.
In step s 103, whether the list for detecting generation is empty, when the list non-NULL of generation, travels through tree index
All paths, the trade company of search covering search key, the covering searched is searched for crucial in the node that traversal has access to
The trade company of word is added to contract and performed in merchant list.
In embodiments of the present invention, first detect search key in the inverted list of tree index corresponding list whether
For sky, i.e. the contract according to corresponding to whether there is in the trade company that inverted list confirmation tree index includes and meet search key performs
The trade company of condition.If search key corresponding list non-NULL in the inverted list of tree index, illustrates tree index bag
The trade company for meeting that contract corresponding to search key performs condition in the trade company contained be present, you can be searched according to tree index
The trade company of intelligent contract is can perform, now starts to perform the trade company of intelligent contract according to tree index search.If search is crucial
Word corresponding list in the inverted list of tree index is sky, then illustrates satisfaction search is not present in the trade company that tree index includes
Contract corresponding to keyword performs the trade company of condition, therefore, does not temporarily perform intelligent contract to any trade company.
Preferably, in all path process of traversal tree index, in the node that has access to of traversal search covering search
During the trade company of rope keyword, an individual path of tree index is selected first, then along the road of root node to non-root node
Footpath scans for, if some node in individual path is unsatisfactory for, along route searching condition, terminating this branch path
The search in footpath, trade company search, covering search key is added to contract and performed in merchant list, afterwards, traversal tree
All individual paths of type index, all trade companies for meeting contract execution condition that tree index is included all are added to contract
Perform in merchant list, so as to improve the speed of trade company's search and the effect of search.
In step S104, the trade company in merchant list is performed to contract and performs the intelligence conjunction associated with search key
About.
In embodiments of the present invention, intelligent contract can for government to meet the trade company of condition provide transaction return tax it is preferential,
To meeting that the trade company of condition carries out the contract such as grade, the trade company that contract performs in merchant list is interrelated and meets to use for association
The search key constraint of family setting, i.e., these trade companies not only cover whole search keys, and have cooperation between each other.
After obtaining contract and performing merchant list, these trade companies execution performed to contract in merchant list associates with search key
Intelligent contract, so as to while intelligent contract execution efficiency is improved, improve the validity and safety for performing intelligent contract
Property.
In embodiments of the present invention, after user provides execution condition (such as last set keyword), business be present
The trade company of all search keys is covered in lasting search in the Merchant web of incidence relation, then performs phase to the trade company searched
Contract is answered, so as to combine the business association relation between trade company and the self-condition of trade company, is improving intelligent contract execution efficiency
Meanwhile improve the validity and security for performing intelligent contract.
Embodiment two:
Fig. 2 shows that the intelligent contract that the embodiment of the present invention two provides performs the implementation process of method, for convenience of description,
The part related to the embodiment of the present invention is illustrate only, details are as follows:
In step s 201, the Merchant web that trade company's composition is associated in intelligent contract is obtained, calculates trade company in Merchant web
Core values.
The embodiment of the present invention is applied to network intelligence contract system, and contract execution condition is weighed by various dimensions to facilitate,
Realize the purpose for performing intelligent contract automatically.In embodiments of the present invention, obtain what is be made up of the trade company of signed contract first
Merchant web, the core values of the trade company of these signed contracts are calculated using k core texture decomposition methods.
In step S202, the tree index according to corresponding to core values establish Merchant web.
In embodiments of the present invention, the trade company in the 1st layer of root node of tree index can form 0 core texture, and the 2nd layer every
Trade company under individual node can form 1 core texture, and the rest may be inferred, and trade company's group in tree under each node is formed under its father node
A part for trade company's group, each leaf node forms whole business to the node (including leaf node) of the path process of root node in tree
A connected component in the trade network of family, the i.e. at least paths of each trade company under this part to another trade company,
Each trade company is only present in a tree node.Information in root node (is not cooperated including independent trade company with other trade companies
The trade company crossed), the row of falling that is established under the k values for the k core textures that trade company's group is formed, whole network according to all trade companies under the node
Table and child node information, the information of non-root node are stored in informational table of nodes, and informational table of nodes includes forming k core textures
Trade company, the k values for the k core textures that trade company's group is formed, the trade company lacked with its father node compared with are corresponding in row under the node
Positional information, child node information and parent information in table.
Preferably, establishing Merchant web according to the core values of trade company corresponding to tree index when, first build tree-shaped rope
The root node drawn, the trade company trade company that core values are zero being arranged in the root node of tree index, and according in Merchant web
The type of trade company establishes inverted list corresponding to root node, then the relation according to the trade company of core values non-zero in Merchant web,
The trade company of core values non-zero is divided into different remaining trade companies to collect, all remaining trade company collection are finally traveled through, according to remaining business
The trade company that remaining trade company concentrates, is respectively set to by non-root node corresponding to the core values structure of family concentration trade company according to core values
Trade company in the corresponding non-root node of tree index, so that the trade company in tree index meets network constraint, and then drop
The low dimension of search condition, improve the speed of search trade company.
In step S203, the intelligent contract for receiving user's input performs request, and performing request includes search key.
In embodiments of the present invention, before the trade company that search can perform intelligent contract, user sets for intelligent contract first
Last set keyword has been determined as the search key persistently searched for, to screen the business for meeting that self-defined contract performs condition
Family, wherein, the search key of user's setting is included in the intelligent contract execution request of user's input.For example, user is first
Search key is inputted in the input frame of search key, intelligent contract is then triggered and performs request.
In step S204, it is that the tree index that trade company establishes is associated in intelligent contract in advance to obtain, in tree index
List corresponding with search key is generated in inverted list.
In embodiments of the present invention, trade company all in the Merchant web of user preset is covered in tree index, wherein,
On the one hand, network constraint be present between these trade companies in Merchant web, can ensure exist often between trade company by network constraint
Property cooperation or transaction so that the contact between trade company it is even closer and more have reality and Practical significance, the opposing party
Face, these trade companies in Merchant web are associated with intelligent contract, i.e., these trade companies are the trade company of signed intelligence contract, so as to
Improve accuracy, validity and the security for performing contract.After the intelligent contract for receiving user's input performs request, first
Search key corresponding to obtaining execution request, it is that the tree-shaped rope that trade company establishes is associated in intelligent contract in advance then to obtain
Draw, and list corresponding with search key is generated in the inverted list of tree index.
In step S205, whether the list for detecting generation is empty, when the list non-NULL of generation, from the son section of root node
A child node is selected in point, the child node of selection is arranged to present node.
In embodiments of the present invention, first detect search key in the inverted list of tree index corresponding list whether
For sky, i.e. the contract according to corresponding to whether there is in the trade company that inverted list confirmation tree index includes and meet search key performs
The trade company of condition.If search key corresponding list non-NULL in the inverted list of tree index, illustrates tree index bag
The trade company for meeting that contract corresponding to search key performs condition in the trade company contained be present, you can be searched according to tree index
The trade company of intelligent contract is can perform, now, a child node is selected from the child node of root node, the child node of selection is set
For present node, to carry out trade company's search.If search key corresponding list in the inverted list of tree index is sky,
Illustrate the trade company for meeting that contract corresponding to search key performs condition is not present in the trade company that tree index includes, it is temporarily not right
Any trade company performs intelligent contract.
In step S206, according to the inverted list of the nodal information table look-up root node of present node, present node is confirmed
Trade company's group whether cover the search key of user's input, the trade company in trade company's group forms k core textures, is then to perform step
Rapid S208, otherwise perform step S207.
In step S207, when trade company's group of present node does not cover the search key of user's input, prosthomere will be worked as
The brotgher of node of point is arranged to present node.
In step S208, when the search key of trade company's group covering user's input of present node, prosthomere is worked as in confirmation
Whether point is leaf node, is then to perform step S209, otherwise performs step S210.
In embodiments of the present invention, according to the inverted list of the nodal information table look-up root node of present node, confirm current
Whether trade company's group of node covers the search key of user's input, that is, checks the business lacked in this present node than its father node
Family only focuses on the trade company lacked whether in the list of given search key in the information of inverted list, the trade company lacked to
In the list for determining search key, then these trade companies are excluded from corresponding list, renewal user gives search key list letter
Breath, if can not cover all search keys after renewal form information, illustrating trade company's group of present node, not cover user defeated
The search key entered, now, the brotgher of node of present node is arranged to present node, to search for next individual path,
If all search keys can also be covered after renewal form information, illustrate that trade company's group of present node covers user's input
Search key, now, confirm whether present node is leaf node, to be confirmed whether the trade company in present node trade company group
It is added to contract to perform in merchant list, so as to improve the speed of search and the effect of search.
In step S209, when present node is leaf node, the trade company in present node trade company group is added to conjunction
About perform in merchant list, the brotgher of node of present node is arranged to present node.
In step S210, when present node is not leaf node, trade company is carried out to present node and confirms operation, with true
Recognize and whether the trade company in present node trade company group is added to contract and performed in merchant list, and by the brotgher of node of present node
It is arranged to present node.
In embodiments of the present invention, if present node is leaf node, first by the business in present node trade company group
Family is added to contract and performed in merchant list, and the brotgher of node of present node then is arranged into present node, next to search for
Bar individual path, if present node is not leaf node, trade company is carried out to present node first and confirms operation, to confirm to be
Trade company in the no group by present node trade company is added to contract and performed in merchant list, then sets the brotgher of node of present node
Present node is set to, to search for next individual path.
Preferably, when carrying out trade company's confirmation operation to present node, first according to the node of the child node of present node
The inverted list of information table look-up root node, then confirms whether trade company's group of the child node of present node covers searching for user's input
Rope keyword, if all child nodes of present node do not cover the search key of user's input, obtain present node
Trade company in trade company's group, the trade company of acquisition is added to contract and performed in merchant list, if the one or more of present node
Child node covers the search key of user's input, then confirms whether the one or more child node is leaf node, if
For leaf node when, by the trade company in the one or more child node trade company group be added to contract perform merchant list in, if
The one or more child node is not leaf node, then further carrying out trade company to the one or more child node confirms operation,
To be confirmed whether that the trade company in the one or more child node trade company group is added into contract performs in merchant list, until covering
When the child node of search key does not cover search key for leaf node or all child nodes, terminate trade company and confirm
Operation, so as to improve the speed of search and the effect of search.
In step S211, the trade company in merchant list is performed to contract and performs the intelligence conjunction associated with search key
About.
In embodiments of the present invention, intelligent contract can for government to meet the trade company of condition provide transaction return tax it is preferential,
To meeting that the trade company of condition carries out the contract such as grade, the trade company that contract performs in merchant list is interrelated and meets to use for association
The search key constraint of family setting, i.e., these trade companies not only cover whole search keys, and have cooperation between each other.
After obtaining contract and performing merchant list, these trade companies execution performed to contract in merchant list associates with search key
Intelligent contract, so as to while intelligent contract execution efficiency is improved, improve the validity and safety for performing intelligent contract
Property.
Embodiment three:
Fig. 3 shows the structure for the intelligent contract performs device that the embodiment of the present invention three provides, and for convenience of description, only shows
Go out the part related to the embodiment of the present invention, including:
Request reception unit 31, the intelligent contract for receiving user's input perform request, and execution request includes searching
Rope keyword.
In embodiments of the present invention, before the trade company that search can perform intelligent contract, user sets for intelligent contract first
Last set keyword has been determined as the search key persistently searched for, to screen the business for meeting that self-defined contract performs condition
Family, wherein, the search key of user's setting is included in the intelligent contract that request reception unit 31 receives and performed in request.Example
Such as, user inputs search key in the input frame of search key first, then triggers intelligent contract and performs request.
List generation unit 32, for obtaining in advance to associate the tree index that trade company establishes in intelligent contract, in tree-shaped
List corresponding with search key is generated in the inverted list of index.
In embodiments of the present invention, trade company all in the Merchant web of user preset is covered in tree index, wherein,
On the one hand, network constraint be present between these trade companies in Merchant web, can ensure exist often between trade company by network constraint
Property cooperation or transaction so that the contact between trade company it is even closer and more have reality and Practical significance, the opposing party
Face, these trade companies in Merchant web are associated with intelligent contract, i.e., these trade companies are the trade company of signed intelligence contract, so as to
Improve accuracy, validity and the security for performing contract.After the intelligent contract for receiving user's input performs request, list
Generation unit 32 obtain first the execution request corresponding to search key, then obtain in advance be intelligent contract in associate trade company
The tree index of foundation, and list corresponding with search key is generated in the inverted list of tree index.
Trade company's search unit 33, whether the list for detecting generation is empty, when the list non-NULL of generation, travels through tree-shaped
All paths of index, the trade company of search covering search key, the covering searched is searched in the node that traversal has access to
The trade company of rope keyword is added to contract and performed in merchant list.
In embodiments of the present invention, first detect search key in the inverted list of tree index corresponding list whether
For sky, i.e. the contract according to corresponding to whether there is in the trade company that inverted list confirmation tree index includes and meet search key performs
The trade company of condition.If search key corresponding list non-NULL in the inverted list of tree index, illustrates tree index bag
The trade company for meeting that contract corresponding to search key performs condition in the trade company contained be present, you can be searched according to tree index
The trade company of intelligent contract is can perform, now, trade company's search unit 33 starts to perform the business of intelligent contract according to tree index search
Family.If search key corresponding list in the inverted list of tree index is sky, illustrate the trade company that tree index includes
In the trade company for meeting that contract corresponding to search key performs condition is not present, therefore, temporarily intelligence is not performed to any trade company
Contract.
Preferably, in all paths of traversal tree index, search covering search is crucial in the node that traversal has access to
During the trade company of word, an individual path of tree index is selected first, is carried out then along the path of root node to non-root node
Search, if some node in individual path is unsatisfactory for, along route searching condition, terminating searching for this individual path
Rope, trade company search, covering search key is added to contract and performed in merchant list, afterwards, travels through tree index
All individual paths, by tree index include it is all meet contract perform condition trade companies be all added to contract perform business
In the list of family, so as to improve the speed of trade company's search and the effect of search.
Contract execution unit 34, the trade company for being performed to contract in merchant list perform the intelligence associated with search key
Can contract.
In embodiments of the present invention, intelligent contract can for government to meet the trade company of condition provide transaction return tax it is preferential,
To meeting that the trade company of condition carries out the contract such as grade, the trade company that contract performs in merchant list is interrelated and meets to use for association
The search key constraint of family setting, i.e., these trade companies not only cover whole search keys, and have cooperation between each other.
Obtain contract perform merchant list after, contract execution unit 34 to contract perform merchant list in these trade companies perform with
The intelligent contract of search key association, intelligent contract is performed so as to while intelligent contract execution efficiency is improved, improve
Validity and security.
In embodiments of the present invention, request reception unit 31 receives the intelligent contract that user inputs and performs request, the execution
Request includes search key, and it is that the tree-shaped rope that trade company establishes is associated in intelligent contract in advance that list generation unit 32, which obtains,
Draw, list corresponding with search key, the table of the detection generation of trade company's search unit 33 are generated in the inverted list of tree index
Whether single be empty, when the list non-NULL of generation, travels through all paths of tree index, is searched in the node that traversal has access to
The trade company of search key is covered, the trade company of the covering search key searched is added into contract performs in merchant list,
The trade company that contract execution unit 34 is performed to contract in merchant list performs the intelligent contract associated with search key, so that
While improving intelligent contract execution efficiency, the validity and security for performing intelligent contract are improved.
In embodiments of the present invention, each unit of intelligent contract performs device can be real by corresponding hardware or software unit
Existing, each unit can be independent soft and hardware unit, can also be integrated into a soft and hardware unit, herein not limiting
Invention.
Example IV:
Fig. 4 shows the structure for the intelligent contract performs device that the embodiment of the present invention four provides, and for convenience of description, only shows
Go out the part related to the embodiment of the present invention, including:
Core values computing unit 41, trade company's composition Merchant web is associated in intelligent contract for obtaining, calculates Merchant web
The core values of middle trade company.
Index establishes unit 42, for tree index corresponding to establishing Merchant web according to core values.
In embodiments of the present invention, core values computing unit 41 obtains the trade company being made up of the trade company of signed contract first
Network, the core values of the trade company of these signed contracts are calculated using k core texture decomposition methods, then index establishes unit 42
The tree index according to corresponding to core values establish Merchant web.
In embodiments of the present invention, the trade company in the 1st layer of root node of tree index can form 0 core texture, and the 2nd layer every
Trade company under individual node can form 1 core texture, and the rest may be inferred, and trade company's group in tree under each node is formed under its father node
A part for trade company's group, each leaf node forms whole business to the node (including leaf node) of the path process of root node in tree
A connected component in the trade network of family, the i.e. at least paths of each trade company under this part to another trade company,
Each trade company is only present in a tree node.Information in root node (is not cooperated including independent trade company with other trade companies
The trade company crossed), the row of falling that is established under the k values for the k core textures that trade company's group is formed, whole network according to all trade companies under the node
Table and child node information, the information of non-root node are stored in informational table of nodes, and informational table of nodes includes forming k core textures
Trade company, the k values for the k core textures that trade company's group is formed, the trade company lacked with its father node compared with are corresponding in row under the node
Positional information, child node information and parent information in table.
Preferably, establishing Merchant web according to the core values of trade company corresponding to tree index when, first build tree-shaped rope
The root node drawn, the trade company trade company that core values are zero being arranged in the root node of tree index, and according in Merchant web
The type of trade company establishes inverted list corresponding to root node, then the relation according to the trade company of core values non-zero in Merchant web,
The trade company of core values non-zero is divided into different remaining trade companies to collect, all remaining trade company collection are finally traveled through, according to remaining business
The trade company that remaining trade company concentrates, is respectively set to by non-root node corresponding to the core values structure of family concentration trade company according to core values
Trade company in the corresponding non-root node of tree index, so that the trade company in tree index meets network constraint, and then drop
The low dimension of search condition, improve the speed of search trade company.
Request reception unit 43, the intelligent contract for receiving user's input perform request, and execution request includes searching
Rope keyword.
In embodiments of the present invention, before the trade company that search can perform intelligent contract, user sets for intelligent contract first
Last set keyword has been determined as the search key persistently searched for, to screen the business for meeting that self-defined contract performs condition
Family, wherein, the search key of user's setting is included in the intelligent contract that request reception unit 43 receives and performed in request.Example
Such as, user inputs search key in the input frame of search key first, then triggers intelligent contract and performs request.
List generation unit 44, for obtaining in advance to associate the tree index that trade company establishes in intelligent contract, in tree-shaped
List corresponding with search key is generated in the inverted list of index.
In embodiments of the present invention, trade company all in the Merchant web of user preset is covered in tree index, wherein,
On the one hand, network constraint be present between these trade companies in Merchant web, can ensure exist often between trade company by network constraint
Property cooperation or transaction so that the contact between trade company it is even closer and more have reality and Practical significance, the opposing party
Face, these trade companies in Merchant web are associated with intelligent contract, i.e., these trade companies are the trade company of signed intelligence contract, so as to
Improve accuracy, validity and the security for performing contract.After the intelligent contract for receiving user's input performs request, list
Generation unit 44 obtain first the execution request corresponding to search key, then obtain in advance be intelligent contract in associate trade company
The tree index of foundation, and list corresponding with search key is generated in the inverted list of tree index.
Trade company's search unit 45, whether the list for detecting generation is empty, when the list non-NULL of generation, travels through tree-shaped
All paths of index, the trade company of search covering search key, the covering searched is searched in the node that traversal has access to
The trade company of rope keyword is added to contract and performed in merchant list.
In embodiments of the present invention, first detect search key in the inverted list of tree index corresponding list whether
For sky, i.e. the contract according to corresponding to whether there is in the trade company that inverted list confirmation tree index includes and meet search key performs
The trade company of condition.If search key corresponding list non-NULL in the inverted list of tree index, illustrates tree index bag
The trade company for meeting that contract corresponding to search key performs condition in the trade company contained be present, you can be searched according to tree index
The trade company of intelligent contract is can perform, now trade company's search unit 45 starts to perform the business of intelligent contract according to tree index search
Family.If search key corresponding list in the inverted list of tree index is sky, illustrate the trade company that tree index includes
In the trade company for meeting that contract corresponding to search key performs condition is not present, therefore, temporarily intelligence is not performed to any trade company
Contract.
Preferably, in all paths of traversal tree index, search covering search is crucial in the node that traversal has access to
During the trade company of word, a child node is selected first from the child node of root node, the child node of selection is arranged to present node,
To carry out trade company's search, then according to the inverted list of the nodal information table look-up root node of present node, present node is confirmed
Whether trade company's group covers the search key of user's input, that is, checks in this present node falling than the trade company that its father node lacks
The information of table is arranged, only focuses on the trade company lacked whether in the list of given search key.The trade company lacked is in given search
In the list of keyword, then these trade companies are excluded from corresponding list, renewal user gives search key form information, if more
All search keys can not be covered after new table information, then illustrate that trade company's group of present node does not cover the search of user's input
Keyword, now, the brotgher of node of present node is arranged to present node, to search for next individual path, if renewal table
All search keys can also be covered after single information, then illustrate that trade company's group of present node covers the search key of user's input
Word, now, confirm whether present node is leaf node, to be confirmed whether the trade company in present node trade company group being added to conjunction
About perform in merchant list, so as to improve the speed of search and the effect of search.
If present node is leaf node, the trade company in present node trade company group is added to contract first and performs business
In the list of family, the brotgher of node of present node is then arranged to present node, to search for next individual path, if currently
Node is not leaf node, then carrying out trade company to present node first confirms operation, to be confirmed whether present node trade company group
In trade company be added to contract perform merchant list in, the brotgher of node of present node is then arranged to present node, to search
Next individual path of rope.
It is further preferred that when carrying out trade company's confirmation operation to present node, first according to the child node of present node
Nodal information table look-up root node inverted list, then confirming trade company's group of child node of present node, whether to cover user defeated
The search key entered, if all child nodes of present node do not cover the search key of user's input, obtain current
Trade company in trade company's group of node, the trade company of acquisition is added to contract and performed in merchant list, if one of present node
Or multiple child nodes cover the search key of user's input, then confirm whether the one or more child node is leaf section
Point, during if leaf node, the trade company in the one or more child node trade company group is added to contract and performs merchant list
In, if the one or more child node is not leaf node, it is true that trade company further is carried out to the one or more child node
Recognize operation, to be confirmed whether that the trade company in the one or more child node trade company group is added into contract performs in merchant list,
Until when covering the child node of search key and not covering search key for leaf node or all child nodes, terminate
Trade company confirms operation, so as to improve the speed of search and the effect of search.
Contract execution unit 46, the trade company for being performed to contract in merchant list perform the intelligence associated with search key
Can contract.
In embodiments of the present invention, intelligent contract can for government to meet the trade company of condition provide transaction return tax it is preferential,
To meeting that the trade company of condition carries out the contract such as grade, the trade company that contract performs in merchant list is interrelated and meets to use for association
The search key constraint of family setting, i.e., these trade companies not only cover whole search keys, and have cooperation between each other.
Obtain contract perform merchant list after, contract execution unit 46 to contract perform merchant list in these trade companies perform with
The intelligent contract of search key association, intelligent contract is performed so as to while intelligent contract execution efficiency is improved, improve
Validity and security.
It is therefore preferred that trade company's search unit 45 includes:
First setting unit 451, for selecting a child node from the child node of root node, the child node of selection is set
It is set to present node;
First confirmation unit 452, for the inverted list of the nodal information table look-up root node according to present node, confirm to work as
Whether trade company's group of front nodal point covers the search key of user's input, and the trade company in trade company's group forms k core textures;
Second setting unit 453, for when trade company's group of present node does not cover the search key that user inputs, inciting somebody to action
The brotgher of node of present node is arranged to present node;
Second confirmation unit 454, for when trade company's group of present node covers the search key that user inputs, confirming
Whether present node is leaf node;
First list adds unit 455, for when present node is leaf node, by the business in present node trade company group
Family is added to contract and performed in merchant list, and the brotgher of node of present node is arranged into present node;And
Second list adds unit 456, for when present node is not leaf node, it is true to carry out trade company to present node
Recognize operation, to be confirmed whether that the trade company in present node trade company group is added into contract performs in merchant list, and prosthomere will be worked as
The brotgher of node of point is arranged to present node.
In embodiments of the present invention, each unit of intelligent contract performs device can be real by corresponding hardware or software unit
Existing, each unit can be independent soft and hardware unit, can also be integrated into a soft and hardware unit, herein not limiting
Invention.
Embodiment five:
Fig. 5 shows the structure for the user equipment that the embodiment of the present invention five provides, and for convenience of description, illustrate only and this
The related part of inventive embodiments.
The user equipment 5 of the embodiment of the present invention includes processor 50, memory 51 and is stored in memory 51 and can
The computer program 52 run on processor 50.The processor 50 realizes that above-mentioned each intelligence is closed when performing computer program 52
About perform the step in embodiment of the method, such as the step S101 to the step S201 to S211 shown in S104, Fig. 2 shown in Fig. 1.
Or the function of each unit in above-mentioned each device embodiment is realized during the execution computer program 52 of processor 50, such as shown in Fig. 3
The function of unit 41 to 46 shown in unit 31 to 34, Fig. 4.
In embodiments of the present invention, realize that above-mentioned each intelligent contract performs when the processor 50 performs computer program 52
During step in embodiment of the method, the intelligent contract for receiving user's input performs request, and execution request includes searching for key
Word, it is that the tree index that trade company establishes is associated in intelligent contract in advance to obtain, generation and search in the inverted list of tree index
List corresponding to keyword, whether the list for detecting generation is empty, when the list non-NULL of generation, travels through all of tree index
Path, the trade company of search covering search key in the node that traversal has access to, by the covering search key searched
Trade company is added to contract and performed in merchant list, and the trade company performed to contract in merchant list performs what is associated with search key
Intelligent contract, so as to while intelligent contract execution efficiency is improved, improve the validity and security for performing intelligent contract.
The equipment that the user equipment 5 can perform intelligent contract for PC, server etc., the user equipment 5
The step of middle processor 50 is realized when performing computer program 52 specifically refers to the description of method in embodiment one, herein not
Repeat again.
Embodiment six:
In embodiments of the present invention, there is provided a kind of computer-readable recording medium, the computer-readable recording medium are deposited
Computer program is contained, the computer program realizes that above-mentioned each intelligent contract is performed in embodiment of the method when being executed by processor
The step of, for example, the step S101 to the step S201 to S211 shown in S104, Fig. 2 shown in Fig. 1.Or the computer program
The function of each unit in above-mentioned each device embodiment, such as unit 31 to 34 shown in Fig. 3, Fig. 4 institute are realized when being executed by processor
Show the function of unit 41 to 46.
In embodiments of the present invention, the intelligent contract for receiving user's input performs request, and execution request includes search
Keyword, obtain in advance be intelligent contract in associate trade company establish tree index, in the inverted list of tree index generation with
List corresponding to search key, whether the list for detecting generation is empty, when the list non-NULL of generation, travels through tree index
All paths, the trade company of search covering search key, the covering searched is searched for crucial in the node that traversal has access to
The trade company of word is added to contract and performed in merchant list, and the trade company in merchant list is performed to contract and is performed and search key pass
The intelligent contract of connection, so as to while intelligent contract execution efficiency is improved, improve the validity and peace for performing intelligent contract
Quan Xing.The intelligent contract that the computer program is realized when being executed by processor performs method and further refers to preceding method implementation
The description of step, will not be repeated here in example.
The computer-readable recording medium of the embodiment of the present invention can include that any of computer program code can be carried
Entity or device, recording medium, for example, the memory such as ROM/RAM, disk, CD, flash memory.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.
Claims (10)
1. a kind of intelligent contract performs method, it is characterised in that methods described comprises the steps:
The intelligent contract for receiving user's input performs request, and described perform asks to include search key;
It is that the tree index that trade company establishes is associated in the intelligent contract in advance to obtain, raw in the inverted list of the tree index
Into list corresponding with the search key;
Whether the list for detecting the generation is empty, when the list non-NULL of the generation, travels through all of the tree index
Path, the trade company of the search covering search key in the node for traveling through and having access to, by described in the covering searched
The trade company of search key is added to contract and performed in merchant list;
The trade company performed to the contract in merchant list performs the intelligent contract associated with the search key.
2. the method as described in claim 1, it is characterised in that receive user input intelligent contract perform request the step of it
Before, methods described also includes:
The Merchant web that trade company's composition is associated in the intelligent contract is obtained, calculates the core values of trade company in the Merchant web;
The tree index according to corresponding to the core values establish the Merchant web.
3. method as claimed in claim 2, it is characterised in that the tree according to corresponding to the core values establish the Merchant web
The step of type indexes, including:
The root node of the tree index is built, the trade company that the core values are zero is arranged to the root node of the tree index
In trade company, the inverted list according to corresponding to the type of trade company in the Merchant web establishes the root node;
According to relation of the trade company of the core values non-zero in the Merchant web, the trade company of the core values non-zero is divided
Collect to different remaining trade companies;
All remaining trade company's collection are traveled through, it is non-corresponding to the core values structure of trade company according to remaining trade company's collection
Root node, the trade company that the remaining trade company concentrates is respectively set to the correspondence of the tree index according to the core values
Non-root node in trade company, the trade company in the non-root node establishes the informational table of nodes of the non-root node.
4. the method as described in claim 1, it is characterised in that all paths of the tree index are traveled through, in the traversal
Search covers the trade company of the search key in the node having access to, by the trade company of the covering search key searched
The step being added in contract execution merchant list, including:
A child node is selected from the child node of the tree index root node, the child node of the selection is arranged to described
Present node;
According to the inverted list of root node described in the nodal information table look-up of the present node, the trade company of the present node is confirmed
Organize and whether cover the search key that the user inputs, the trade company in trade company's group forms k core textures;
When trade company's group of the present node does not cover the search key of user's input, by the brother of the present node
Younger brother's node is arranged to present node;
When trade company's group of the present node covers the search key of user's input, whether the present node is confirmed
For leaf node;
When the present node is the leaf node, the trade company in present node trade company group is added into the contract and held
In row merchant list, the brotgher of node of the present node is arranged to present node;
When the present node is not the leaf node, trade company is carried out to the present node and confirms operation, to confirm to be
Trade company in the no group by the present node trade company is added to the contract and performed in merchant list, and by the present node
The brotgher of node is arranged to present node.
5. method as claimed in claim 4, it is characterised in that the step of trade company confirms operation is carried out to the present node,
Including:
According to the inverted list of root node described in the nodal information table look-up of the child node of the present node, work as prosthomere described in confirmation
Whether trade company's group of the child node of point covers the search key of user's input;
When all child nodes of the present node do not cover the search key of user's input, present node is obtained
Trade company in trade company's group, the trade company of the acquisition is added into the contract and performed in merchant list.
6. a kind of intelligent contract performs device, it is characterised in that described device includes:
Request reception unit, the intelligent contract for receiving user's input perform request, and described perform asks to include search pass
Keyword;
List generation unit, for obtaining in advance to associate the tree index that trade company establishes in the intelligent contract, in the tree
Generation list corresponding with the search key in the inverted list of type index;
Trade company's search unit, whether the list for detecting the generation is empty, when the list non-NULL of the generation, travels through institute
All paths of tree index are stated, the trade company of the search covering search key in the node for traveling through and having access to will
The trade company of the covering search key searched is added to contract and performed in merchant list;And
Contract execution unit, the trade company for being performed to the contract in merchant list perform what is associated with the search key
Intelligent contract.
7. device as claimed in claim 6, it is characterised in that described device also includes:
Core values computing unit, trade company's composition Merchant web is associated in the intelligent contract for obtaining, calculates trade company's net
The core values of Luo Zhong trade companies;And
Index establishes unit, for tree index corresponding to establishing the Merchant web according to the core values.
8. device as claimed in claim 6, it is characterised in that trade company's search unit includes:
First setting unit, for selecting a child node from the child node of the tree index root node, by the selection
Child node be arranged to the present node;
First confirmation unit, for the inverted list of root node described in the nodal information table look-up according to the present node, confirm
Whether trade company's group of the present node covers the search key of user input, and the trade company in trade company's group forms k
Core texture;
Second setting unit, during search key for not covering user input when trade company's group of the present node,
The brotgher of node of the present node is arranged to present node;
Second confirmation unit, during search key for covering user's input when the trade company group of the present node, really
Recognize whether the present node is leaf node;
First list adds unit, for when the present node is the leaf node, by present node trade company group
In trade company add the contract and perform in merchant list, the brotgher of node of the present node is arranged to present node;With
And
Second list adds unit, for when the present node is not the leaf node, being carried out to the present node
Trade company confirms operation, to be confirmed whether that the trade company in present node trade company group is added into the contract performs merchant list
In, and the brotgher of node of the present node is arranged to present node.
9. a kind of user equipment, including memory, processor and it is stored in the memory and can be on the processor
The computer program of operation, it is characterised in that realize such as claim 1 to 5 described in the computing device during computer program
The step of any one methods described.
10. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer program, and its feature exists
In when the computer program is executed by processor the step of realization such as any one of claim 1 to 5 methods described.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710679724.7A CN107590189B (en) | 2017-08-10 | 2017-08-10 | Intelligent contract execution method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710679724.7A CN107590189B (en) | 2017-08-10 | 2017-08-10 | Intelligent contract execution method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107590189A true CN107590189A (en) | 2018-01-16 |
CN107590189B CN107590189B (en) | 2020-05-22 |
Family
ID=61041597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710679724.7A Active CN107590189B (en) | 2017-08-10 | 2017-08-10 | Intelligent contract execution method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107590189B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108898490A (en) * | 2018-06-25 | 2018-11-27 | 北京奇虎科技有限公司 | Execution method, node, system, electronic equipment and the storage medium of intelligent contract |
CN108965399A (en) * | 2018-06-25 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | Execution method, apparatus, equipment and the storage medium of intelligent contract |
CN112131252A (en) * | 2020-08-16 | 2020-12-25 | 中信银行股份有限公司 | Service processing method and device, electronic equipment and readable storage medium |
CN113888173A (en) * | 2021-12-07 | 2022-01-04 | 深圳前海微众银行股份有限公司 | Intelligent contract calling method, device and equipment based on block chain |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110213659A1 (en) * | 2010-02-26 | 2011-09-01 | Marcus Fontoura | System and Method for Automatic Matching of Contracts in an Inverted Index to Impression Opportunities Using Complex Predicates and Confidence Threshold Values |
CN104268247A (en) * | 2014-09-30 | 2015-01-07 | 北京首钢自动化信息技术有限公司 | Master data imputation method based on fuzzy analytic hierarchy process |
CN106850622A (en) * | 2017-02-07 | 2017-06-13 | 杭州秘猿科技有限公司 | A kind of user identity management method based on license chain |
-
2017
- 2017-08-10 CN CN201710679724.7A patent/CN107590189B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110213659A1 (en) * | 2010-02-26 | 2011-09-01 | Marcus Fontoura | System and Method for Automatic Matching of Contracts in an Inverted Index to Impression Opportunities Using Complex Predicates and Confidence Threshold Values |
CN104268247A (en) * | 2014-09-30 | 2015-01-07 | 北京首钢自动化信息技术有限公司 | Master data imputation method based on fuzzy analytic hierarchy process |
CN106850622A (en) * | 2017-02-07 | 2017-06-13 | 杭州秘猿科技有限公司 | A kind of user identity management method based on license chain |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108898490A (en) * | 2018-06-25 | 2018-11-27 | 北京奇虎科技有限公司 | Execution method, node, system, electronic equipment and the storage medium of intelligent contract |
CN108965399A (en) * | 2018-06-25 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | Execution method, apparatus, equipment and the storage medium of intelligent contract |
CN112131252A (en) * | 2020-08-16 | 2020-12-25 | 中信银行股份有限公司 | Service processing method and device, electronic equipment and readable storage medium |
CN113888173A (en) * | 2021-12-07 | 2022-01-04 | 深圳前海微众银行股份有限公司 | Intelligent contract calling method, device and equipment based on block chain |
Also Published As
Publication number | Publication date |
---|---|
CN107590189B (en) | 2020-05-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107590189A (en) | Intelligent contract performs method, apparatus, equipment and storage medium | |
CN101119326B (en) | Method and device for managing instant communication conversation record | |
CN106649464A (en) | Method of building Chinese address tree and device | |
CN107870964B (en) | Statement ordering method and system applied to answer fusion system | |
CN108133038A (en) | A kind of entity level emotional semantic classification system and method based on dynamic memory network | |
CN103500175B (en) | A kind of method based on sentiment analysis on-line checking microblog hot event | |
CN112199608B (en) | Social media rumor detection method based on network information propagation graph modeling | |
CN106296195A (en) | A kind of Risk Identification Method and device | |
CN104298785B (en) | Searching method for public searching resources | |
CN110457404A (en) | Social media account-classification method based on complex heterogeneous network | |
CN104717124A (en) | Friend recommendation method, device and server | |
CN105721279B (en) | A kind of the relationship cycle method for digging and system of subscribers to telecommunication network | |
CN107680003A (en) | The node tree generation method and device of project supervision task | |
CN107918657A (en) | The matching process and device of a kind of data source | |
CN105678590A (en) | topN recommendation method for social network based on cloud model | |
CN111753207A (en) | Collaborative filtering model of neural map based on comments | |
CN110909230A (en) | Network hotspot analysis method and system | |
CN102063497B (en) | Open type knowledge sharing platform and entry processing method thereof | |
CN105608118B (en) | Result method for pushing based on customer interaction information | |
CN112765313B (en) | False information detection method based on original text and comment information analysis algorithm | |
CN105843809A (en) | Data processing method and device | |
CN106844338A (en) | Detection method based on the entity row of the network form of dependence between attribute | |
CN112417267A (en) | User behavior analysis method and device, computer equipment and storage medium | |
CN116775855A (en) | Automatic TextRank Chinese abstract generation method based on Bi-LSTM | |
CN111143454A (en) | Text output method and device and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |