WO2020024898A1 - 用于搜索区块链数据的方法、装置及存储介质 - Google Patents
用于搜索区块链数据的方法、装置及存储介质 Download PDFInfo
- Publication number
- WO2020024898A1 WO2020024898A1 PCT/CN2019/098169 CN2019098169W WO2020024898A1 WO 2020024898 A1 WO2020024898 A1 WO 2020024898A1 CN 2019098169 W CN2019098169 W CN 2019098169W WO 2020024898 A1 WO2020024898 A1 WO 2020024898A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- blockchain
- data
- blockchain data
- uniform resource
- resource location
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
Definitions
- the present invention relates to a blockchain search technology, and more particularly, to a method for searching for blockchain data, and a method for searching for blockchain data for performing the above-mentioned method for searching for blockchain data.
- Device and a corresponding computer-readable storage medium are provided.
- a search engine refers to a system that automatically collects information from the World Wide Web and provides it to users for query after a certain sorting. In the process of collecting information by search engines, it uses what is called a spider to connect to hyperlinks on each web page.
- the web crawler program based on the hyperlinks to the webpage links, is like "one pass ten, ten pass 100 " in daily life, starting from a few web pages and connecting to all other web pages on the web. In theory, a web crawler can traverse most web pages if there are appropriate hyperlinks on the web pages.
- Blockchain is an intelligent peer-to-peer network that uses a distributed database to identify, disseminate, and record information, also known as the Internet of Value.
- the so-called Internet of Values means that users can easily, quickly and cost-effectively transmit value through the Internet.
- Embodiments of the present invention provide a method, a device, and a computer-readable storage medium for searching blockchain data, so that a search engine can collect information from a blockchain network and simultaneously obtain information associated with the blockchain , Such as the number of nodes in the blockchain, the identity information of the owners of the nodes in the blockchain, and / or the number of owners of the nodes in the blockchain, thereby implementing a search service for the blockchain network and The information associated with the chain ranks the search results.
- a method for searching for blockchain data including:
- a second aspect of the embodiments of the present invention further provides an apparatus for searching for blockchain data, the data apparatus includes: a processor; and a memory for storing instructions when the instructions are executed Cause the processor to perform the following operations:
- a third aspect of the embodiments of the present invention provides a method for searching blockchain data, the method including:
- a fourth aspect of the embodiments of the present invention provides an apparatus for searching blockchain data, the apparatus includes:
- a memory for storing instructions that, when executed, cause the processor to perform the following operations:
- a fifth aspect of an embodiment of the present invention provides a computer-readable storage medium having computer-readable program instructions stored thereon, the computer-readable program instructions for executing a first according to an embodiment of the present invention The method for searching blockchain data according to the aspect.
- a computer-readable storage medium having computer-readable program instructions stored thereon, the computer-readable program instructions for executing a third embodiment according to an embodiment of the present invention.
- the method for searching blockchain data according to the aspect.
- a blockchain node will also associate information associated with the blockchain (such as the number of nodes in the blockchain, the identity information of the owner of the nodes in the blockchain, and / or the block The number of owners of the nodes of the chain, etc.) are also returned to the search engine, so that the search engine can sort the search results based on the information associated with the blockchain, and optimize the ranking results so that users of the search engine can Get search results quickly and accurately.
- information associated with the blockchain such as the number of nodes in the blockchain, the identity information of the owner of the nodes in the blockchain, and / or the block The number of owners of the nodes of the chain, etc.
- blockchain nodes can process requests sent by search engines; further, by generating blockchain data as web pages, search engines can obtain, process, and store the web pages that are displayed in the form of web pages.
- Blockchain data By adding a uniform resource location address to the generated webpage, search engines can traverse the blockchain data by traversing the webpage. Therefore, through the embodiment of the present invention, the search engine can retrieve the blockchain data, so that the users of the search engine can search the information existing in the blockchain through the search engine, that is, the search service for the blockchain network is realized. .
- the search engine can retrieve the blockchain data, so that the users of the search engine can search the information existing in the blockchain through the search engine, that is, the search service for the blockchain network is realized.
- FIG. 1 shows a flowchart of a method 100 for searching blockchain data according to an embodiment of the present invention
- FIG. 2 shows a schematic diagram 200 of a blockchain data stored in a key-value manner with an attribute A1;
- FIG. 3 shows a schematic diagram 300 of a ledger to store public data and privacy data
- FIG. 4 shows an example of the blockchain data 400 with the attribute A2 stored in a key / value manner
- FIG. 5 shows a flowchart of a method 500 for searching blockchain data according to another embodiment of the present invention.
- FIG. 6 shows a schematic diagram of an apparatus 600 for searching blockchain data according to an embodiment of the present invention.
- FIG. 7 shows a schematic diagram of an apparatus 700 for searching blockchain data according to another embodiment of the present invention.
- read in the term “webpage read request” includes crawling a webpage by a search engine and obtaining a webpage by a user through a user device, where obtaining a webpage by the user device specifically refers to the user's Device to query or browse web pages generated by blockchain data.
- user equipment in the context of the present invention refers to smart terminals including, but not limited to, smart phones, tablet computers, desktops, and notebook computers.
- uniform resource location address in the present invention refers to the address of a standard resource on the Internet, also known as a Uniform Resource Locator (URL) or a web page address.
- first uniform resource location address in the content of the present invention refers to the uniform resource location address at the current level when the method for searching for blockchain data according to the present invention is executed, that is, the URL at the current level;
- second uniform resource location address in the content of the present invention refers to a uniform resource location address at a lower level when the method for searching for blockchain data according to the present invention is executed, that is, a secondary URL.
- first blockchain data in the content of the present invention refers to the blockchain data at the first uniform resource location address in the blockchain; correspondingly, the term “second region” in the present content “Blockchain data” refers to the blockchain data at the second uniform resource location address in the blockchain.
- public data in the context of the present invention refers to data that can be accessed without requiring authentication
- privacy data refers to data that requires authentication to be accessible.
- attribute A1 in the content of the present invention refers to a data format name used to indicate a data analysis method of the blockchain data or a data format analysis function name used to indicate a data analysis method of the blockchain data, Data format parsing service address, or data format parsing smart contract address.
- attribute A2 is used to mark the blockchain data as private or public. When the blockchain data is public data, “attribute A2" has a first value, and when the blockchain data is When the data is private, “attribute A2" has a second value different from the first value.
- first and second in this summary are only used to describe a reference, purpose, or something, and cannot be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated. .
- retrieving refers to the process of crawling, processing, indexing, and traversing of blockchain data by a search engine through a web crawler program
- search refers to a search engine receiving a search for content of a webpage that has been previously indexed after a user enters a keyword on a search engine page.
- the expression "the second blockchain data at the at least one second uniform resource location address is associated with the first blockchain data” means that the first blockchain data includes The hierarchical attribute and the predetermined hierarchical relationship tree indicate whether there is an association relationship of the second blockchain data at the second uniform resource location address.
- Hierarchical relationship tree in the present invention refers to a predetermined logical relationship tree indicating a hierarchical structure of a webpage generated by the accessed blockchain data.
- hierarchical attribute in the content of the present invention refers to information indicating to which layer of the above hierarchical relationship tree the uniform resource location address associated with the read webpage belongs.
- first attribute in the context of the present invention is used to mark blockchain data as private or public, where the term “first value” indicates that the associated blockchain data is public data and the term “second value” "Indicates that the blockchain data associated with it is private data.
- public ledger in the present context refers to a blockchain ledger in which only public data that can be accessed without authentication is stored.
- privacy ledger in the context of the present invention refers to a blockchain ledger in which only private data that requires access to authentication is stored.
- public area of the ledger in the present context refers to an area in the ledger for storing public data.
- privacy area of the ledger in the context of the present invention refers to the area in the ledger for storing private data.
- search engines cannot search for data located on the blockchain through current search engines.
- the embodiments of the present invention mainly focus on the following issues: search engines are currently unable to retrieve blockchain data, and thus users of search engines cannot search for blockchain data.
- Can't search for blockchain data let alone how to sort search results for blockchain data.
- the various technical solutions of the embodiments of the present invention can also solve the problem that the current blockchain nodes cannot process the Hypertext Transfer Protocol request sent by the search engine; secondly, the current search engine The retrieved web page is stored in the database, and the corresponding web page information is directly obtained from the database and provided to the user after receiving the user's search request.
- information is stored in a specific data format, not in the form of web page text.
- the current web search engines traverse the information in the network by crawling web pages through web crawlers, but the current search engines cannot traverse the blockchain data in the blockchain network.
- the current search engine cannot search for data located on the blockchain, the current search engine is even less able to sort the search results originating from the blockchain data according to the information associated with the blockchain.
- the current search engine should search for public data
- the blockchain network may store both public data and private data. In the search process, these two types of data should be distinguished.
- an embodiment of the present invention first provides a hypertext transfer protocol interface.
- the hypertext transfer protocol interface is, for example, located in a blockchain node, so that the blockchain node Ability to process Hypertext Transfer Protocol requests sent by search engines.
- the blockchain will also return to the search engine information associated with the blockchain, which information includes at least one of the following: the area The number of nodes in the blockchain, the identity information of the owners of the nodes of the blockchain, the number of owners of the nodes in the blockchain, the creation time of the blockchain, the number of nodes in the blockchain Add time, etc., so that the search engine can sort the search results after grasping this information, so that the most accurate search results are displayed in the front, so that users of the search engine can get the most accurate information.
- the embodiment of the present invention also provides a method for converting data in a specific data format such as XML or JSON into a web page. Furthermore, the embodiment of the present invention adds the uniform resource location address of other webpages as information to the webpage, so that the search engine can link to other webpages through the webpage, and implements the webpage crawling function for the blockchain network. In addition, the embodiments of the present invention also distinguish between public data and private data in the blockchain network.
- the embodiment of the present invention additionally returns information associated with the blockchain when returning a webpage, such as the number of nodes of the blockchain, the identity information of the owner of the nodes of the blockchain, and / or the block The number of owners of the nodes of the chain, so that search engines can optimize the ranking of search results based on the information associated with the blockchain.
- information associated with the blockchain such as the number of nodes of the blockchain, the identity information of the owner of the nodes of the blockchain, and / or the block
- search engines can optimize the ranking of search results based on the information associated with the blockchain.
- FIG. 1 shows a flowchart of the method 100 for searching blockchain data.
- the method 100 includes at least the following five steps. First, in method step 110 via a hypertext transfer protocol The interface receives a web page read request sent by a search engine, the web page read request includes a first uniform resource location address; then, in step 120, information associated with the blockchain is obtained and the first uniform resource location is obtained.
- the search engine can traverse the webpages associated with the blockchain data to obtain search results and optimize the ranking of the search results according to the information associated with the blockchain, thereby realizing and optimizing the search engine's Search of blockchain data.
- the first uniform resource location address which is the blockchain data pointed to by the first URL
- the first uniform resource location address can be generated in a webpage.
- the second uniform resource location address URL the first 2.
- the URL of the uniform resource location address can also be presented on the webpage. Therefore, the webpage can include both the data of the blockchain and the URL of the uniform resource location address.
- these uniform resource positioning address URLs can be sequentially arranged on the webpage. It can also be implemented by generating a logical search tree diagram associated with the data in the blockchain data according to its logical relationship.
- the search engine can add the following functions, that is, the search engine can access the entry address of the blockchain (for example: http: //test.com.homepage), so that the search engine can access the block chain.
- the search engine After receiving a webpage read request on the blockchain side, it will first obtain the first blockchain data at the URL of the uniform resource location address according to the uniform resource location address URL contained in the webpage read request, and obtain the same data as the blockchain.
- Associated information such as the number of nodes in the blockchain, the identity information of the owners of the nodes in the blockchain, and / or the number of owners of the nodes in the blockchain.
- How to determine the URL of the resource location address is determined based on the hierarchical attributes included in the first blockchain data and a predetermined hierarchical relationship tree to determine whether the at least one second uniform resource location address exists. If the predetermined hierarchical relationship tree indicates that there is at least one second uniform resource location address, the second uniform resource location address is also placed in the webpage generated above.
- the webpage and the information associated with the blockchain are returned to the search engine.
- the search engine can either directly extract the blockchain data and its access address, or further initiate a further web page read request to the blockchain network side to capture subsequent blocks. Chain data.
- the hierarchical attributes included in the blockchain data can also play a very important role. It will be based on the hierarchical attributes included in the first blockchain data and the predetermined hierarchical relationship tree. To determine whether there is at least one second uniform resource location address URL. Specifically, for example, the hierarchical attribute of the blockchain data A is "finance”, and the predetermined hierarchical relationship tree indicates that there exists the blockchain data B whose hierarchical attribute is "finance / blockchain finance", then the blockchain data B It is the next level of blockchain data of blockchain data A.
- the webpage read request is to capture the blockchain data A whose hierarchical attribute is "financial”
- a uniform resource location address URL pointing to the blockchain data B whose hierarchical attribute is "financial / blockchain finance” is also generated
- the generated webpage contains the uniform resource location address URL pointing to the blockchain data B whose hierarchical attribute is "finance / blockchain finance”.
- the blockchain data D is It is the next-level blockchain data of the blockchain data C. If the webpage read request is to capture the blockchain data C with the hierarchical attribute "China”, a uniform resource location address URL pointing to the blockchain data D with the hierarchical attribute "China / Shanghai” is also generated on the webpage That is, the generated webpage contains a uniform resource location address URL pointing to the blockchain data D with the hierarchical attribute "China / Shanghai”.
- the inventor of the present invention proposes to configure an attribute A1 for the blockchain data, and the attribute A1 is used to specify the blockchain data Parsing.
- the attribute A1 includes a data format name used to indicate a data analysis method of the blockchain data.
- the attribute A1 can also include a data format parsing function name, a data format parsing service address, or a data format parsing smart contract address for indicating a data parsing method of the public data and the private data. .
- the attribute A1 in K / V / A1 of each data indicates the specific data format of the data (for example, XML, JSON, etc.); when the search engine accesses the entry address, Displays a list of data that can be searched on the blockchain.
- the blockchain calls the corresponding parsing method to parse the data according to the value of the corresponding attribute A1 to generate the corresponding web page.
- each blockchain node can implement an HTTP server, for example, the domain name http: //test.com.homepage points to the HTTP server.
- the key apple link displays the contents of a single K / V. As for how to display it, it can be defined through different page templates.
- the attribute A1 may also be a format parsing function name or an address of a format parsing service. It can also be represented by a content code such as 1, 2, 3, which is more concise and saves storage space.
- FIG. 2 shows a schematic diagram 200 of a blockchain data stored in a key-value manner with an attribute A1.
- blockchain data such as K1, Kn includes an attribute A1
- the attribute A1 includes A data format name representing a data analysis method of blockchain data such as K1, Kn.
- the blockchain data such as K1 and the blockchain data such as Kn can also include a data format parsing function name, a data format parsing service address, or a data format parsing for indicating a data parsing method of the blockchain data. Smart contract address.
- the blockchain data such as K1 has the value of the attribute "A1" of "XML", which indicates that the parsing method of the value (Value) is an XML parsing method, and correspondingly, such as Kn's
- the blockchain data has the value of the attribute A1 which is "JSON", which indicates that the value parsing method is a JSON parsing method. That is, calling the corresponding analysis function or analysis method can parse out the blockchain data of each K1, Kn, and so on.
- Robots protocol is also known as the crawler protocol, robot protocol, etc., and its full name is "Robots Exclusion Protocol".
- the website tells search engines which pages can be crawled and which pages cannot be crawled through the Robots protocol.
- the search engine for each link address in the portal page, the search engine also needs to be informed by the Robots protocol which link addresses can be traversed and which link addresses cannot be traversed.
- the Robots protocol only tells search engines which link addresses should be traversed and which connection addresses should not be traversed to achieve retrieval of blockchain data. It does not guarantee that search engines will comply with the Robots protocol well, so the invention of the present invention People creatively think of using the properties of the blockchain data itself to control the search behavior of the search engine.
- the blockchain data disclosed in accordance with the content of the present invention includes public data and privacy data, where public data is unnecessary
- the data that can be accessed after verification and the privacy data are data that can be accessed only after verification is required, and wherein the public data and the privacy data are stored in different locations on the blockchain or the public data and the privacy data have different marks.
- the reason for setting this attribute A2 is that in the current mainstream blockchain platforms, public chains do not set restrictions on access to blockchain data at all, while alliance chains such as Fabric and Corda have all of the blockchain data Data is controlled for access rights. It can be seen that the blockchain platform has the same access control for data with different requirements without having different access control capabilities. Generally speaking, the enterprise-level blockchain usually uses the alliance chain platform to control access to all data, so that information that needs to be disclosed cannot be retrieved by external search engines.
- information such as insurance prices and terms in the blockchain is expected to be searchable by search engines without authorization; but other information such as user information, transaction information, Information such as claims records need to be controlled for access rights, otherwise it is not conducive to protecting the privacy of customers or the business secrets of insurance companies.
- FIG. 3 shows a schematic diagram 300 of a ledger to store public and private data.
- the blockchain network includes multiple ledgers, such as ledgers 301, 302, ..., 308, 309. Waiting for the nine ledgers, those skilled in the art should understand that the nine ledgers shown here are only exemplary and not restrictive, and those skilled in the art can of course implement more or fewer ledgers to achieve The number of ledgers is not the key to the content of the present invention. The key lies in distinguishing multiple ledgers.
- the first ledger 301 is marked as a public ledger, that is, only the above-mentioned public data is stored on it, such as the above-mentioned blocks.
- ledgers 302,..., 308, 309 are marked as privacy ledgers, which only store private data, such as the user information, transaction information, and claim records described above And other information.
- the number of public ledgers and privacy ledgers can be dynamically configured according to the ratio of data to be disclosed and privacy data on the blockchain. In this way, the data on the blockchain network can be treated differently, thereby providing guarantee for subsequent search services for data on the blockchain.
- first ledger 301 it is also possible to divide the first ledger 301 into two different areas, for example, to store public data on the first area, and to store private data on the second area. Differentiate and treat data on the network, thereby providing guarantee for subsequent search services for data on the blockchain.
- the public data and the private data are stored on different ledgers, or the public data and the private data are stored on different areas of the same ledger, so as to mark the public data and the private data for subsequent follow-up.
- the search phase can distinguish public data and private data based on the type of ledger or the type of ledger area, thereby providing support for subsequent searches.
- the public data and the private data are stored in different locations on the blockchain or the public data and the private data have different marks can also be implemented in other ways, such as by way of additional attribute domains.
- the public data and the privacy data may include an attribute A2, wherein the public data has an attribute A2 of, for example, 0, and the privacy data has an attribute A2 of, for example, 1.
- each blockchain data can include an attribute A2.
- the attribute A2 is, for example, 0, it indicates that the blockchain data is public data, and when the attribute A2 is a second value of 1, it indicates the area.
- Blockchain data is private data.
- attribute A2 allows administrators to dynamically adjust in real time during the operation of the blockchain, thereby improving the dynamic maintenance of data.
- Fig. 4 shows an example of data 400 stored in a key / value manner.
- the value of the first blockchain data K1 is V1, and its attribute A2 is 0.
- the first blockchain data K1 is public data, and an external search engine can access the public data without any access control or verification; and the value of the nth blockchain data Kn is Vn, and its attribute A2 is 1
- the blockchain data Kn is private data, and external search engines can require access control or authentication to access the private data. That is, the public data K1 and the privacy data Kn are stored in a key-value manner, and the public data has an attribute A2 of 0, and the private data has an attribute A2 of 1.
- the inventor of the present invention innovatively realizes that the The attributes of the data are adapted to the search engine, so as to achieve the purpose of searching the data on the blockchain network based on the search engine.
- it can also satisfy the privacy protection of the blockchain for some data that needs privacy protection.
- the above method for searching blockchain data can publicly share data that can be accessed without access control, and data that requires privacy protection to retain access control; on the other hand, it limits an internal mechanism and interface for access retrieval, which not only allows
- the external webpage link can directly link the public data in the blockchain, or let the public data in the blockchain link to each other, so that the search engine can traverse and retrieve all the information in the blockchain.
- the solution provided by the present invention can realize the interconnection and interconnection of the blockchain and Internet information, and further exert the great value of the blockchain.
- FIG. 5 shows a flowchart of a method 500 for searching for blockchain data according to another embodiment of the present invention.
- the method 500 for searching for blockchain data includes at least the following four steps. First, in method step 510, a web page and an area generated from a blockchain node are received from a blockchain node Information associated with the blockchain; then receiving a search request in method step 520; and obtaining a search result associated with the blockchain from a database based on the search request in method step 530, where the database is used to store An index generated by the webpage; finally, in step 540 of the method, the search results are sorted based on information associated with the blockchain.
- the blockchain mentioned in the above method is the blockchain to which the blockchain node belongs.
- the information associated with the blockchain includes at least one of the following: the number of nodes of the blockchain; the identity of the owner of the nodes of the blockchain Information; the number of owners of the nodes of the blockchain; the creation time of the blockchain; the joining time of the nodes of the blockchain.
- a blockchain has multiple members (electrical equipment manufacturer Gree Electric, insurance company Ping An Insurance, and a nationwide maintenance service provider). When users buy Gree's air conditioners on the blockchain, they can automatically apply for insurance in Ping An, and they can also automatically register with maintenance service providers to obtain after-sales services.
- the other blockchain although it also sells air conditioners, has only 2 members (for example, unknown electronics manufacturers, unknown insurance companies, and no maintenance service providers).
- the search engine integrates information associated with the blockchain (such as the number of nodes in the blockchain; the block After the identity information of the owner of the nodes of the chain; and / or the number of the owners of the nodes of the blockchain), it is obvious that the Gree air conditioner on the first blockchain should be displayed first.
- the above method can be implemented by a computer program product, that is, a computer-readable storage medium.
- the computer program product may include a computer-readable storage medium having computer-readable program instructions for carrying out various aspects of the present disclosure.
- the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
- the computer-readable storage medium may be, for example, but not limited to, an electric storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon A protruding structure in the hole card or groove, and any suitable combination of the above.
- RAM random access memory
- ROM read-only memory
- EPROM erasable programmable read-only memory
- flash memory flash memory
- SRAM static random access memory
- CD-ROM compact disc read only memory
- DVD digital versatile disc
- memory stick floppy disk
- mechanical encoding device such as a printer with instructions stored thereon A protruding structure in the hole card or groove, and any suitable combination of the above.
- Computer-readable storage media used herein are not to be interpreted as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or transmission through electrical wires Electrical signal.
- the memory 620 stores instructions. The instructions, when executed by the processor 610, cause the processor 610 to perform the following actions:
- the processor 610 when the instruction is executed, the processor 610 further causes the processor to perform the following operations:
- the information associated with the blockchain includes at least one of the following: the number of nodes of the blockchain; the ownership of the nodes of the blockchain The identity information of the person; the number of owners of the nodes of the blockchain; the creation time of the blockchain; the joining time of the nodes of the blockchain.
- D. determining whether there is at least one second uniform resource location address further includes:
- B. Obtaining the first blockchain data at the first uniform resource location address further includes:
- the first blockchain data and / or the second blockchain data includes a first attribute, and wherein, B. obtaining the address in the first uniform resource location
- the first blockchain data here further includes:
- the first blockchain data and / or the second blockchain data are stored in a key-value manner.
- the first attribute of the first blockchain data when the first blockchain data is public data, the first attribute of the first blockchain data is a first value; in the first When the second blockchain data is public data, the first attribute of the second blockchain data is the first value; when the first blockchain data is private data, all The first attribute of the first blockchain data is a second value different from the first value; and in a case where the second blockchain data is privacy data, the second blockchain data The first attribute is the second value.
- B. Obtaining the first blockchain data at the first uniform resource location address further includes:
- first blockchain data or the second blockchain data is stored in a public ledger; And in a case where the first blockchain data or the second blockchain data is privacy data, the first blockchain data or the second blockchain data is stored in a privacy ledger.
- B. Obtaining the first blockchain data at the first uniform resource location address further includes:
- the first blockchain data or the second blockchain data is stored in a public area of a ledger Medium; and in the case where the first blockchain data or the second blockchain data is privacy data, the first blockchain data or the second blockchain data is stored in the privacy of the ledger Area.
- the public data and the private data are stored on different ledgers, or the public data and the private data are stored on different areas of the same ledger, so as to mark the public data and the private data for subsequent follow-up.
- the search phase can distinguish between public data and private data based on the type of ledger or the type of ledger area, thereby providing support for subsequent searches.
- the memory 620 can also store other instructions. These instructions, when executed by the processor 610, cause the processor 610 to perform the following actions:
- the information associated with the blockchain includes at least one of the following: the number of nodes of the blockchain; the owner of the nodes of the blockchain Identity information; the number of owners of the nodes of the blockchain; the creation time of the blockchain; the joining time of the nodes of the blockchain.
- FIG. 7 shows a schematic block diagram of an apparatus 700 for searching blockchain data. It should be understood that the apparatus 700 may be implemented to implement the functions of the method 500 for searching for blockchain data in FIG. 5. It can be seen from FIG. 7 that the apparatus 700 for a database includes a central processing unit (CPU) 701 (such as a processor), which can be loaded according to computer program instructions stored in a read-only memory (ROM) 702 or loaded from a storage unit 708 Computer program instructions to random access memory (RAM) 703 to perform various appropriate actions and processes. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored.
- the CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704.
- An input / output (I / O) interface 705 is also connected to the bus 704.
- I / O interface 705 Multiple components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc .; an output unit 707, such as various types of displays, speakers, etc .; a storage unit 708, such as a magnetic disk, an optical disk, etc. And a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like.
- the communication unit 709 allows the apparatus 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
- the methods 100, 500 for searching for blockchain data may be implemented as a computer software program that is tangibly embodied on a machine-readable medium, such as the storage unit 708.
- part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709.
- the computer program is loaded into the RAM 703 and executed by the CPU 701, one or more actions or steps in the methods 100, 500 described above may be performed.
- the various example embodiments of the invention may be implemented in hardware or special purpose circuits, software, firmware, logic, or any combination thereof. Some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor, or other computing device.
- aspects of embodiments of the invention are illustrated or described as a block diagram, a flowchart, or using some other graphical representation, it will be understood that the blocks, devices, systems, techniques, or methods described herein may be considered non-limiting
- the examples are implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers, or other computing devices, or some combination thereof.
- the above-mentioned data processing device for a blockchain can be implemented in either a hardware form or a software form.
- a technological improvement could easily be a hardware improvement (for example, an improvement in the circuit structure of a diode, a transistor, a switch, etc.) or a software improvement (for example, a method Process improvements).
- a hardware improvement for example, an improvement in the circuit structure of a diode, a transistor, a switch, etc.
- a software improvement for example, a method Process improvements.
- many of today's method and process improvements can be achieved by programming the improved method and process into hardware circuits. In other words, the corresponding hardware is obtained by programming different programs for the hardware circuits.
- a programmable logic device Programmable Logic Device: PLD
- PLD Programmable Logic Device
- FPGA Field Programmable Gate Array
- HDL Hardware Description Language
- ABEL Advanced Boolean ExpressionLanguage
- AHDL Altera, Hardware, Description, Language
- HDCal JHDL
- Java Hardware, Description, Language
- Lava Lava
- Lola MyHDL
- PALASM RHDL
- VHDL Very-High-Speed Integrated Circuit Hardware Description Language
- Verilog Verilog
- the computer-readable program instructions or computer program products used to execute the various aspects of the present invention can also be stored in the cloud. When it is required to be called, the user can access the stored cloud for execution through the mobile Internet, fixed network or other networks.
- the computer-readable program instructions of an aspect of the present invention implement the technical solutions disclosed according to the various aspects of the present invention.
- the method for searching for blockchain data can accurately control the data on the blockchain on the one hand, so that data that can be shared publicly can be accessed without access control and requires privacy protection Data retention access control; on the other hand, it defines an internal mechanism and interface for access and retrieval, which not only allows external web links to directly link to public data in the blockchain and information associated with the blockchain, but also Let the public data in the blockchain be linked to each other, so that search engines can traverse and retrieve all the information in the blockchain.
- the solution provided by the present invention can realize the interconnection and interconnection of the blockchain and Internet information, and further exert the great value of the blockchain.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明内容提供了一种用于搜索区块链数据的方法,所述方法包括:A.经由超文本传输协议接口接收由搜索引擎发送的网页读取请求,所述网页读取请求包含第一统一资源定位地址;B.获取与区块链相关联的信息以及在所述第一统一资源定位地址处的第一区块链数据;C.判断是否存在至少一个第二统一资源定位地址,其中,在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联;D.在存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据和所述至少一个第二统一资源定位地址生成与第一统一资源定位地址相关联的网页;以及E.将所述网页和与所述区块链相关联的信息经由所述超文本传输协议接口返回至所述搜索引擎。
Description
本发明内容涉及区块链搜索技术,更为具体地涉及一种用于搜索区块链数据的方法、一种用于执行上述用于搜索区块链数据的方法的用于搜索区块链数据的装置以及一种相应的计算机可读存储介质。
搜索引擎是指自动从万维网搜集信息,经过一定整理以后,提供给用户进行查询的系统。在搜索引擎搜集信息的过程中,其利用被称为网络爬虫程序(Spider)来连上每一个网页上的超链接。网络爬虫程序根据网页链到其中的超链接,就像日常生活中所说的"一传十、十传百……"一样,从少数几个网页开始,连到网络上所有其他的网页链接。理论上,若网页上有适当的超链接,网络爬虫程序便可以遍历绝大部分网页。
区块链(Blockchain)是用分布式数据库识别、传播和记载信息的智能化对等网络,也称为价值互联网。所谓价值互联网,是指使得用户能够通过网络方便、快捷、低成本地传递价值。
发明内容
本发明的实施例提供了一种用于搜索区块链数据的方法、装置和计算机可读存储介质,使得搜索引擎可以从区块链网络中搜集信息并且同时获得与区块链相关联的信息,例如区块链的节点数量、区块链的节点的拥有者的身份信息和/或区块链的节点的拥有者的数量,从而实现了针对区块链网络的搜索服务以及根据与区块链相关联的信息对搜索结果进行排序。
为此,在本发明的实施例的第一方面中提供了一种用于搜索区块链数据的方法,所述方法包括:
A.经由超文本传输协议接口接收由搜索引擎发送的网页读取请求,所述网页读取请求包含第一统一资源定位地址;
B.获取与区块链相关联的信息以及在所述第一统一资源定位地址处的第一区块链数据;
C.判断是否存在至少一个第二统一资源定位地址,其中,在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联;
D.在存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据和所述至少一个第二统一资源定位地址生成与所述第一统一资源定位地址相关联的网页;以及
E.将所述网页和与所述区块链相关联的信息经由所述超文本传输协议接口返回至所述搜索引擎。
此外,本发明的实施例的第二方面还提供了一种用于搜索区块链数据的装置,所述数据装置包括:处理器;以及存储器,其用于存储指令,当所述指令执行时使得所述处理器执行以下操作:
A.经由超文本传输协议接口接收由搜索引擎发送的网页读取请求,所述网页读取请求包含第一统一资源定位地址;
B.获取与区块链相关联的信息以及在所述第一统一资源定位地址处的第一区块链数据;
C.判断是否存在至少一个第二统一资源定位地址,其中,在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联;
D.在存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据和所述至少一个第二统一资源定位地址生成与所述第一统一资源定位地址相关联的网页;以及
E.将所述网页和与所述区块链相关联的信息经由所述超文本传输协议接口返回至所述搜索引擎。
此外,本发明的实施例的第三方面提供了一种用于搜索区块链数据的方法,所述方法包括:
M.从区块链节点接收根据其区块链数据生成的网页和与区块链相关联的信息;
N.接收搜索请求;
O.基于所述搜索请求,从数据库中获得与区块链相关联的搜索结果, 其中,所述数据库用于存储由所述网页生成的索引;以及
P.基于与所述区块链相关联的信息对所述搜索结果进行排序。
本发明的实施例的第四方面提供了一种用于搜索区块链数据的装置,所述装置包括:
处理器;以及
存储器,其用于存储指令,当所述指令执行时使得所述处理器执行以下操作:
M.从区块链节点接收根据其区块链数据生成的网页和与区块链相关联的信息;
N.接收搜索请求;
O.基于所述搜索请求,从数据库中获得与区块链相关联的搜索结果,其中,所述数据库用于存储由所述网页生成的索引;以及
P.基于与所述区块链相关联的信息对所述搜索结果进行排序。
本发明的实施例的第五方面提供了一种计算机可读存储介质,其具有存储在其上的计算机可读程序指令,所述计算机可读程序指令用于执行根据本发明实施例的第一方面所述的用于搜索区块链数据的方法。
本发明的实施例的第六方面提供了一种计算机可读存储介质,其具有存储在其上的计算机可读程序指令,所述计算机可读程序指令用于执行根据本发明实施例的第三方面所述的用于搜索区块链数据的方法。
在本发明的实施例中,区块链节点还会将与所述区块链相关联的信息(例如区块链的节点数量、区块链的节点的拥有者的身份信息和/或区块链的节点的拥有者的数量等)一并返回给搜索引擎,从而使得搜索引擎能够基于与所述区块链相关联的信息对搜索结果进行排序,优化排序结果,使得该搜索引擎的用户能够快速精准地获得搜索结果。此外,通过增加超文本传输协议接口使得区块链节点可以处理由搜索引擎发送的请求;再者,通过将区块链数据生成为网页,使得搜索引擎可以获取、处理并存储展现为网页形式的区块链数据;此外,通过将统一资源定位地址加入到所生成的网页中,使得搜索引擎能够通过遍历网页的方式即可遍历区块链数据。因此,通过本发明的实施例,使得搜索引擎可以检索到区块链数据,从而 使得搜索引擎的用户能够通过搜索引擎搜索区块链中存在的信息,即实现了针对区块链网络的搜索服务。除了上述的优点之外,本发明的其他优势将在下文中进一步说明。
结合附图并参考以下详细说明,本发明的各实施例的特征、优点及其他方面将变得更加明显,在此以示例性而非限制性的方式示出了本发明的若干实施例,在附图中:
图1示出了依据本发明的一个实施例的用于搜索区块链数据的方法100的流程图;
图2示出了具有属性A1的采取键值方式存储的区块链数据的示意图200;
图3示出了分账本来存储公开数据和隐私数据的示意图300;
图4示出了以键值(Key/Value)方式存储的具有属性A2的区块链数据400的示例;以及
图5示出了依据本发明的另一个实施例的用于搜索区块链数据的方法500的流程图;
图6示出了依据本发明的一个实施例的用于搜索区块链数据的装置600的示意图;以及
图7示出了依据本发明的另一个实施例的用于搜索区块链数据的装置700的示意图。
以下参考附图详细描述本发明的各个示例性实施例。虽然以下所描述的示例性方法、装置包括在其它组件当中的硬件上执行的软件和/或固件,但是应当注意,这些示例仅仅是说明性的,而不应看作是限制性的。例如,考虑在硬件中独占地、在软件中独占地、或在硬件和软件的任何组合中可以实施任何或所有硬件、软件和固件组件。因此,虽然以下已经描述了示例性的方法和装置,但是本领域的技术人员应容易理解,所提供的示例并 不用于限制用于实现这些方法和装置的方式。
此外,附图中的流程图和框图示出了根据本发明的各种实施例的方法和系统的可能实现的体系架构、功能和操作。应当注意,方框中所标注的功能也可以按照不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,或者它们有时也可以按照相反的顺序执行,这取决于所涉及的功能。同样应当注意的是,流程图和/或框图中的每个方框、以及流程图和/或框图中的方框的组合,可以使用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以使用专用硬件与计算机指令的组合来实现。
本发明内容中的术语"网页读取请求"中的"读取"包括由搜索引擎去抓取网页和由用户通过用户设备来获取网页,其中,通过用户设备来获取网页具体是指用户通过用户设备来查询或者浏览由区块链数据生成的网页。
本发明内容中的术语"用户设备"是指包括但不限于智能手机、平板电脑、台式机、笔记本电脑的智能终端。
本发明内容中的术语"统一资源定位地址"是指因特网上标准的资源的地址,又称统一资源定位符(URL:Uniform Resource Locator)或网页地址。相应地,本发明内容中的术语"第一统一资源定位地址"是指依据本发明所提出的用于搜索区块链数据的方法执行时本级的统一资源定位地址,即本级URL;而本发明内容中的术语"第二统一资源定位地址"是指依据本发明所提出的用于搜索区块链数据的方法执行时下一级的统一资源定位地址,即次级URL。
本发明内容中的术语"第一区块链数据"是指区块链中在第一统一资源定位地址处的区块链数据;与之相对应地,本发明内容中的术语"第二区块链数据"是指区块链中在第二统一资源定位地址处的区块链数据。
本发明内容中的术语"公开数据"是指不需要身份验证即可访问的数据,而"隐私数据"是指需要身份验证才可访问的数据。
本发明内容中的术语"属性A1"是指用于表示所述区块链数据的数据解析方法的数据格式名或用于指示所述区块链数据的数据解析方法的数据格式解析函数名、数据格式解析服务地址、或数据格式解析智能合约地址。 而术语"属性A2"用于标记区块链数据为隐私或者公开,其中,当所述区块链数据为公开数据时,"属性A2"具有第一值,而当所述区块链数据为隐私数据时,"属性A2"具有不同于所述第一值的第二值。
本发明内容中的术语"第一"、"第二"仅用于描述指代、目的或某具体事物,而不能理解为指示或暗示相对重要性,或者隐含指明所指示的技术特征的数量。
本发明内容中的术语"多个"是指两个或两个以上。
本发明内容中出现了术语"检索"和"搜索",其中,术语"检索"是指搜索引擎通过网络爬虫程序对于区块链数据的抓取、处理、建立索引和遍历的过程,而术语"搜索"是指搜索引擎接收用户在搜索引擎页面上输入关键词后对于之前的建立过索引的网页内容的查找。
本发明内容中的表述"在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联"是指所述第一区块链数据所包括的层次属性和预先确定的层次关系树表明是否存在处于第二统一资源定位地址的第二区块链数据的关联关系。
本发明内容中的术语"层次关系树"是指预先确定的表明所访问的区块链数据所生成的网页的层次结构的逻辑关系树。
本发明内容中的术语"层次属性"是指表明与所读取的网页相关联的统一资源定位地址属于上述的层次关系树中的哪一层的信息。
本发明内容中的术语"第一属性"用于标记区块链数据为隐私或者公开,其中,术语"第一值"表示与之关联的区块链数据为公开数据,而术语"第二值"表示与之关联的区块链数据为隐私数据。
本发明内容中的术语"公开账本"是指在其中仅存储不需要身份验证即可访问的公开数据的区块链账本。
本发明内容中的术语"隐私账本"是指在其中仅存储需要身份验证才可访问的隐私数据的区块链账本。
本发明内容中的术语"账本的公开区域"是指账本中用于存储公开数据的区域。
本发明内容中的术语"账本的隐私区域"是指账本中用于存储隐私数据 的区域。
如上文所述,搜索引擎的用户通过当前的搜索引擎无法搜索位于区块链上的数据。为了实现针对区块链网络的性能优异的搜索服务,本发明的实施例主要关注以下问题:搜索引擎当前无法检索区块链数据,进而使得搜索引擎的用户无法搜索区块链数据,此外,由于无法搜索区块链数据,也就更谈不上如何对区块链数据的搜索结果进行排序了。
除了上述的主要技术问题之外,本发明的实施例的各种技术方案还能够解决如下问题,即当前的区块链节点无法处理搜索引擎发送的超文本传输协议请求;其次,当前的搜索引擎是将检索到的网页存储在数据库中,在接收到用户的搜索请求后直接从数据库中获取相应的网页信息提供给用户。然而,在区块链网络中,信息是以特定的数据格式存储的,并不是网页文本形式。再者,当前的网络搜索引擎是通过网络爬虫程序来抓取网页的方式来遍历网络中的信息的,但是当前的搜索引擎并不能遍历区块链网络中的区块链数据。
再者,由于当前的搜索引擎除了不能搜索位于区块链上的数据,当前的搜索引擎也就更谈不上对源自区块链数据的搜索结果根据与区块链关联的信息进行排序。
此外,当前的搜索引擎所搜索的都应该是公开数据,而区块链网络可能会同时存储公开数据和隐私数据,在搜索过程中应当区分这两类数据。
为解决这些问题,实现针对区块链网络的搜索服务,本发明的实施例首先提供了一种超文本传输协议接口,该超文本传输协议接口例如位于区块链节点中,使得区块链节点能够处理由搜索引擎发送的超文本传输协议请求。在使得搜索引擎能够检索区块链数据的情况下,区块链还会向搜索引擎返回与所述区块链相关联的信息,这些信息包括以下各项中的至少一项:即所述区块链的节点数量、所述区块链的节点的拥有者的身份信息、所述区块链的节点的拥有者的数量、所述区块链的创建时间、所述区块链的节点的加入时间等,从而使得搜索引擎在掌握了这些信息之后能够对搜索结果进行排序,使得最为准确的搜索结果显示在前面,从而使得搜索引擎的用户能够得到最准确的信息。
此外,本发明的实施例还提供了将诸如XML或JSON等特定的数据格式的数据转换为网页的方法。再者,本发明的实施例通过将其他网页的统一资源定位地址作为信息加入到该网页中,使得搜索引擎能够通过该网页链接到其他网页,实现了针对区块链网络的网页抓取功能。此外,本发明的实施例还针对区块链网络中的公开数据和隐私数据进行了区分处理。再者,本发明的实施例通过在返回网页时额外地返回了与区块链相关联的信息,例如区块链的节点数量、区块链的节点的拥有者的身份信息和/或区块链的节点的拥有者的数量,从而使得搜索引擎能够根据与区块链相关联的信息来对搜索结果的排序进行优化。更为具体的实现方法和本发明的其他优势请参见下文中的阐述。
图1示出了该用于搜索区块链数据的方法100的流程图,从图1中可以看出,该方法100至少包括以下五个步骤,即首先在方法步骤110中经由超文本传输协议接口接收由搜索引擎发送的网页读取请求,所述网页读取请求包含第一统一资源定位地址;然后在方法步骤120中获取与区块链相关联的信息以及在所述第一统一资源定位地址处的第一区块链数据;接下来在方法步骤130中判断是否存在至少一个第二统一资源定位地址,其中,在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联;再接下来在方法步骤140中在存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据和所述至少一个第二统一资源定位地址生成与所述第一统一资源定位地址相关联的网页;最后,在方法步骤150中将所述网页和与所述区块链相关联的信息经由所述超文本传输协议接口返回至所述搜索引擎。
通过一方面提供互联网访问接口,另一方面提供根据区块链数据来生成与区块链数据中的数据相关联的网页、随后将网页和与区块链相关联的信息一并返回给搜索引擎的方式,搜索引擎便能够对与区块链数据相关联的网页进行遍历从而获取搜索结果并且根据与区块链相关联的信息对搜索结果的排序进行优化,从而实现并且优化了搜索引擎对于区块链数据的搜索。
具体到如何生成与区块链数据中的数据相关联的网页,其实现方式能 够是多种多样的。例如能够在网页中生成第一统一资源定位地址即第一URL所指向的区块链数据,此外,在存在至少一个第二统一资源定位地址即第二统一资源定位地址URL的情况下,该第二统一资源定位地址URL也能够呈现在该网页上,所以,该网页既能够包括区块链的数据,也能够包括统一资源定位地址URL。在具有多个统一资源定位地址URL的情况下,这些统一资源定位地址URL能够顺序地排列在所述网页上。也能够通过将区块链数据根据其逻辑关系生成与区块链数据中的数据相关联的逻辑搜索树状图的方式来实现。
在具体抓取网页信息时,搜索引擎端可以增加以下功能,即搜索引擎可以访问区块链的入口地址(例如:http://test.com.homepage),以便于搜索引擎能够访问该区块链。在区块链侧接收到网页读取请求之后,首先会根据该网页读取请求所包含统一资源定位地址URL获取在该统一资源定位地址URL处的第一区块链数据并且获取与区块链相关联的信息,例如区块链的节点数量、区块链的节点的拥有者的身份信息和/或区块链的节点的拥有者的数量等信息,接下来,将会判断是否存在其他统一资源定位地址URL,具体到如何判断,则会根据所述第一区块链数据所包括的层次属性和预先确定的层次关系树来判断是否存在所述至少一个第二统一资源定位地址来判断。如果预先确定的层次关系树表明存在至少一个第二统一资源定位地址,则会将该第二统一资源定位地址也放在上述所生成的网页之中。
再接下来,将该网页以及与区块链相关联的信息返回给搜索引擎。搜索引擎在接收到该返回的网页之后,既能够直接抽取其中的区块链数据及其访问地址,也能够进一步向区块链网络侧发起进一步的网页读取请求,以抓取后续的区块链数据。
具体来看,在生成上述网页的时候,区块链数据所包括的层次属性也能够起到非常重要的作用,将会根据第一区块链数据所包括的层次属性和预先确定的层次关系树来判断是否存在至少一个第二统一资源定位地址URL。具体来看例如区块链数据A的层次属性为"金融",并且预先确定的层次关系树表明存在层次属性为"金融/区块链金融"的区块链数据B,那么区块链数据B则为区块链数据A的下一级区块链数据。如果网页读取请求 是为了抓取层次属性为"金融"的区块链数据A,则将指向层次属性为"金融/区块链金融"的区块链数据B的统一资源定位地址URL也生成在网页上,即在所生成的网页中包含指向层次属性为"金融/区块链金融"的区块链数据B的统一资源定位地址URL。
再比如,如果区块链数据C的层次属性为"中国",并且预先确定的层次关系树表明存在另一个区块链数据D的层次属性为"中国/上海",则区块链数据D则为区块链数据C的下一级区块链数据。如果网页读取请求是为了抓取层次属性为"中国"的区块链数据C,则将指向层次属性为"中国/上海"的区块链数据D的统一资源定位地址URL也生成在网页上,即在所生成的网页中包含指向层次属性为"中国/上海"的区块链数据D的统一资源定位地址URL。
也存在一种可能性,即不存在任何其他的统一资源定位地址URL,那么便能仅根据网页读取请求所包含统一资源定位地址URL所指向的区块链数据来生成上述网页。
此外,为了实现通过该链接地址对于与其相关联的区块链数据的正确解析,本发明内容的发明人提出了为区块链数据配置属性A1,该属性A1即用于指定该区块链数据的解析方式。例如该属性A1包括用于表示所述区块链数据的数据解析方法的数据格式名。本领域的技术人员应当了解,该属性A1也能够包括用于指示所述公开数据和所述隐私数据的数据解析方法的数据格式解析函数名、数据格式解析服务地址、或数据格式解析智能合约地址。
此时,当搜索引擎访问该入口地址时,在每个数据的K/V/A1中属性A1表明该数据的具体数据格式(例如,XML、JSON等);当搜索引擎访问该入口地址时,显示区块链上可以搜索的数据列表,当搜索引擎搜索任一K值时,区块链根据对应的属性A1的值调用相应的解析方法对数据进行解析后生成对应的网页。
此外,每个区块链节点可以实现一个HTTP服务器,例如域名http://test.com.homepage指向该HTTP服务器。该页面可以展现部分K/V的内容,通常情况下并不能一次全部展示,因为一次全部展示该页面会过于 庞大,同时通过下一页甚至第10页等链接的方式(http://test.com.homepage?page=10)让搜索引擎可以搜索到其它的K/V数据。同时还通过http://test.com.homepage?key=apple的链接形式显示单个K/V的内容,至于具体如何呈现,则可以通过不同的页面模板来定义。上述的属性A1除了使用具体数据格式名来表示数据格式,也可以是一个格式解析的函数名、或者一个格式解析服务的地址。也可以用一个内容代码比如1、2、3来表示,这样更简洁,可以节省存储空间。
图2示出了具有属性A1的采取键值方式存储的区块链数据的示意图200,从图2中可以看出,诸如K1、Kn的区块链数据包括属性A1,该属性A1包括用于表示诸如K1、Kn的区块链数据的数据解析方法的数据格式名。替代地,诸如K1的区块链数据和诸如Kn的区块链数据也能够包括用于指示该区块链数据的数据解析方法的数据格式解析函数名、数据格式解析服务地址、或数据格式解析智能合约地址。从图2中可以看出,诸如K1的区块链数据具有为"XML"的属性A1的值,这表明其值(Value)的解析方式为XML解析方法,与之相对应地,诸如Kn的区块链数据具有为"JSON"的属性A1的值,这表明其值(Value)的解析方式为JSON解析方法。也就是说,调用相应的解析函数或者解析方法能够解析出各个K1、Kn等的区块链数据。
在实现上述链接地址时,同样需要遵循搜索引擎所需遵守的Robots协议。具体而言,Robots协议也称为爬虫协议、机器人协议等,其全称是"网络爬虫排除标准"(Robots Exclusion Protocol),网站通过Robots协议告诉搜索引擎哪些页面可以抓取,哪些页面不能抓取。
具体到本发明内容,对于该入口网页中的各项链接地址,也需要通过Robots协议告知搜索引擎哪些链接地址可以遍历,哪些链接地址不可以遍历。但是Robots协议只是告知搜索引擎应该遍历哪些链接地址不应该遍历哪些连接地址从而实现对于区块链数据的检索,并不能够保证搜索引擎一定会很好地遵守该Robots协议,所以本发明内容的发明人创新性地想到利用区块链数据本身的属性来实现对于搜索引擎的搜索行为的控制,例如依据本发明内容所公开的区块链数据包括公开数据和隐私数据,其中,公开 数据为不需要验证即可访问的数据并且隐私数据为需要验证才可访问的数据,并且其中,公开数据和隐私数据存储在区块链的不同位置或者所述公开数据和所述隐私数据具有不同的标记。
设置该属性A2的原因在于,在目前主流的区块链平台中,公有链完全不对区块链数据的访问设置限制,而比如Fabric、Corda等联盟链则对所有区块链数据中的全部的数据都做访问权限控制。由此可见,区块链平台对于有不同要求的数据都做了一样的访问控制而不具有不同的访问控制的能力。而一般而言,企业级区块链通常使用联盟链平台,对全部数据均做访问权限控制导致需要公开的信息无法被外部搜索引擎检索到。举例来说,一个使用区块链实现的保险销售系统,区块链中的保险价格、条款等信息是希望能够被搜索引擎检索查询、无需授权的;但是其他信息,例如用户信息、交易信息、理赔记录等信息是需要进行访问权限控制的,否则既不利于保护客户隐私也不利于保护保险公司的商业秘密。
具体而言,公开数据和隐私数据存储在区块链的不同位置或者所述公开数据和所述隐私数据具有不同的标记的实现方式方法能够有很多种。
举例来说,图3示出了分账本来存储公开数据和隐私数据的示意图300,从图中可以看出,该区块链网络中包括多个账本,例如账本301、302、…、308、309等九个账本,本领域的技术人员应当了解,此处示出了九个账本仅仅是示例性的而非限制性的,本领域的技术人员当然可以实现更多个或者更少个账本,实现账本的数量多少并不是本发明内容的关键,关键在于对于多个账本进行区分,例如将第一个账本即账本301标记为公开账本,即其上仅仅存储上述的公开数据,例如上述的区块链中的保险价格、条款等信息;而将其他账本即账本302、…、308、309等八个账本标记为隐私账本,其上仅仅存储隐私数据,例如上述的用户信息、交易信息、理赔记录等信息。本领域的技术人员应当了解,公开账本和隐私账本的数量能够根据区块链上需要公开的数据和隐私数据的比例动态配置。由此能够实现对于区块链网络上的数据的区分对待,从而为后续对于区块链上的数据的搜索服务提供保障。
替代地,也能够例如将第一个账本301划分为两个不同的区域,在第 一个区域上存储公开数据,而在第二个区域上存储隐私数据,由此也能够实现对于区块链网络上的数据的区分对待,从而为后续对于区块链上的数据的搜索服务提供保障。
通过以上方式,即通过将公开数据和隐私数据存储于不同的账本之上或者将公开数据和隐私数据存储于相同的账本的不同区域之上来实现对于公开数据和所述隐私数据进行标记,以便后续搜索阶段能够基于账本类型或者账本的区域的类型来区分公开数据和隐私数据,从而为后续搜索提供支持。
附加地或者替代地,公开数据和隐私数据存储在区块链的不同位置或者所述公开数据和所述隐私数据具有不同的标记也能够通过其他方式来实现,例如通过额外的属性域的方式来实现,具体而言,公开数据和隐私数据可以包括属性A2,其中,所述公开数据具有例如为0的属性A2,而所述隐私数据具有例如为1的属性A2。
举例来说,例如每条区块链数据能够包含一个属性A2,该属性A2为例如为0时表示该区块链数据为公开数据,而当该属性A2为1的第二值时表示该区块链数据为隐私数据。相较于上述的采取分不同账本或者相同账本的不同区域来存储公开数据和隐私数据的技术方案来说,采取公开的动态调整,允许表示该区块链数据为公开数据或隐私数据的额外的属性A2的技术方案允许管理员在区块链运行过程之中实时动态地进行调整,从而提高了数据的动态维护性。
图4示出了以键值(Key/Value)方式存储的数据400的示例,从图4中可以看出,第一个区块链数据K1的值为V1,其属性A2为0,这则表明该第一区块链数据K1为公开数据,外部搜索引擎能够不需要任何访问控制或者验证即可访问该公开数据;而第n个区块链数据Kn的值为Vn,其属性A2为1,这则表明该区块链数据Kn为隐私数据,外部搜索引擎能够需要访问控制或者验证才可访问该隐私数据。也就是说,该公开数据K1和隐私数据Kn采取键值方式进行存储,并且公开数据具有为0的属性A2,而隐私数据具有为1的属性A2。本领域的技术人员应当了解,此处将属性A2的值设置为0或1仅仅是示例性的而非限制性的,其他能够实现本发明 内容所公开的发明构思的不偏离本发明内容的发明精神的技术方案也同样包括在本发明内容所附的权利要求书的保护范围之内。
针对区块链网络上的对于区块链数据的访问无法保证满足搜索引擎的诸如Robots协议的搜索要求的技术问题,本发明内容的发明人创新性地意识到能够通过改造区块链网络上的数据的属性来适配搜索引擎,从而实现基于搜索引擎来搜索区块链网络上的数据的目的,此外,在实现检索的同时还能够满足区块链对于需要进行隐私保护部分数据的隐私保护。
上述用于搜索区块链数据的方法可以公开共享的数据无需访问控制即可访问而需要隐私保护的数据保留访问控制;另一方面限定了一种供访问检索的内部机制和接口,不仅可以让外部网页链接可以直接链接区块链中的公开数据,也可以让区块链中的公开数据相互链接,从而使得搜索引擎可以对区块链中的全部信息进行遍历检索。此外,通过本发明内容所提供的解决方案可以实现区块链和互联网信息的互联互通,进一步发挥出区块链的巨大价值。
此外,在搜索引擎侧需要作出相应的改进。具体而言,图5示出了依据本发明的另一个实施例的用于搜索区块链数据的方法500的流程图。从图中可以看出,该用于搜索区块链数据的方法500至少包括以下四个步骤,即首先在方法步骤510中从区块链节点接收根据其区块链数据生成的网页和与区块链相关联的信息;然后在方法步骤520中接收搜索请求;在方法步骤530中基于所述搜索请求,从数据库中获得与区块链相关联的搜索结果,其中,所述数据库用于存储由所述网页生成的索引;最后,在方法步骤540中基于与所述区块链相关联的信息对所述搜索结果进行排序。
上述方法中所提及的区块链是所述区块链节点所属于的区块链。
在依据本发明的一个实施例中,与区块链相关联的信息包括以下各项中的至少一项:即所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;所述区块链的节点的拥有者的数量;所述区块链的创建时间;所述区块链的节点的加入时间。
具体举例而言,比如一个区块链销售空调产品的例子。一个区块链有多个成员(电器厂商格力电器、保险公司平安保险、一个全国型的维修服 务商)。用户在区块链上购买了格力的空调,就能自动在平安投保,也能自动在维修服务商注册获取售后服务。而另一个区块链虽然其也是卖空调的,但是该区块链只有2个成员(例如不知名的电器厂商、不知名的保险公司、没有维修服务商)。那终端用户在搜索引擎上搜空调产品时,会同时搜索到上面的两个结果,但是搜索引擎综合了与区块链相关联的信息(例如所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;和/或所述区块链的节点的拥有者的数量)之后,显然应该优先显示第一个区块链上的格力空调。
此外,替代地,上述方法能够通过计算机程序产品,即计算机可读存储介质来实现。计算机程序产品可以包括计算机可读存储介质,其上载有用于执行本发明内容的各个方面的计算机可读程序指令。计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是但不限于电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
图6示出了依据本发明内容的一个实施例所提出的用于搜索区块链数据的装置600的方框图。从图6中可以看出,用于搜索区块链数据的装置600包括处理器610和与处理器610耦接的存储器620。
存储器620存储有指令。指令在由处理器610执行时使得处理器610执行以下动作:
A.经由超文本传输协议接口接收由搜索引擎发送的网页读取请求,所述网页读取请求包含第一统一资源定位地址;
B.获取与区块链相关联的信息以及在所述第一统一资源定位地址处的第一区块链数据;
C.判断是否存在至少一个第二统一资源定位地址,其中,在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联;
D.在存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据和所述至少一个第二统一资源定位地址生成与所述第一统一资源定位地址相关联的网页;以及
E.将所述网页和与所述区块链相关联的信息经由所述超文本传输协议接口返回至所述搜索引擎。
在依据本发明内容的一个实施例中,当所述指令执行时使得所述处理器610还执行以下操作:
E1.在不存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据生成所述网页。
在依据本发明内容的一个实施例中,与所述区块链相关联的信息包括以下各项中的至少一项:即所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;所述区块链的节点的拥有者的数量;所述区块链的创建时间;所述区块链的节点的加入时间。
在依据本发明内容的一个实施例中,D.判断是否存在至少一个第二统一资源定位地址进一步包括:
D1.根据所述第一区块链数据所包括的层次属性和预先确定的层次关系树来判断是否存在所述至少一个第二统一资源定位地址。
在依据本发明内容的一个实施例中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:
B1.根据所述第一区块链数据的数据格式名来解析在所述第一统一资源定位地址处的第一区块链数据。
在依据本发明内容的一个实施例中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:
B2.根据所述第一区块链数据的数据格式解析函数名、数据格式解析 服务地址、或数据格式解析智能合约地址来解析在所述第一统一资源定位地址处的第一区块链数据。
在依据本发明内容的一个实施例中,所述第一区块链数据和/或所述第二区块链数据包括第一属性,并且其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:
B3.根据所述第一区块链数据的第一属性来确定是否获取在所述第一统一资源定位地址处的第一区块链数据。
在依据本发明内容的一个实施例中,所述第一区块链数据和/或所述第二区块链数据采取键值方式进行存储。
在依据本发明内容的一个实施例中,在所述第一区块链数据为公开数据的情况下,所述第一区块链数据的所述第一属性为第一值;在所述第二区块链数据为公开数据的情况下,所述第二区块链数据的所述第一属性为所述第一值;在所述第一区块链数据为隐私数据的情况下,所述第一区块链数据的所述第一属性为不同于所述第一值的第二值;在所述第二区块链数据为隐私数据的情况下,所述第二区块链数据的所述第一属性为所述第二值。
在依据本发明内容的一个实施例中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:
B4.根据所述第一区块链数据的账本存储位置来确定是否获取在所述第一统一资源定位地址处的第一区块链数据,
其中,在所述第一区块链数据或所述第二区块链数据为公开数据的情况下,所述第一区块链数据或所述第二区块链数据存储在公开账本中;以及在所述第一区块链数据或所述第二区块链数据为隐私数据的情况下,所述第一区块链数据或所述第二区块链数据存储在隐私账本中。
在依据本发明内容的一个实施例中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:
B5.根据所述第一区块链数据的存储区域位置来确定是否获取在所述第一统一资源定位地址处的第一区块链数据,
其中,在所述第一区块链数据或所述第二区块链数据为公开数据的情 况下,所述第一区块链数据或所述第二区块链数据存储在账本的公开区域中;以及在所述第一区块链数据或所述第二区块链数据为隐私数据的情况下,所述第一区块链数据或所述第二区块链数据存储在账本的隐私区域中。
通过以上方式,即通过将公开数据和隐私数据存储于不同的账本之上或者将公开数据和隐私数据存储于相同的账本的不同区域之上来实现对于公开数据和所述隐私数据进行标记,以便后续搜索阶段能够基于账本类型或者账本的区域的类型来区分公开数据和隐私数据,从而为后续所搜提供支持。
存储器620还能够存储有其他指令。这些指令在由处理器610执行时使得处理器610执行以下动作:
M.从区块链节点接收根据其区块链数据生成的网页和与区块链相关联的信息;
N.接收搜索请求;
O.基于所述搜索请求,从数据库中获得与区块链相关联的搜索结果,其中,所述数据库用于存储由所述网页生成的索引;以及
P.基于与所述区块链相关联的信息对所述搜索结果进行排序。
在依据本发明的一个实施例中,与所述区块链相关联的信息包括以下各项中的至少一项:所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;所述区块链的节点的拥有者的数量;所述区块链的创建时间;所述区块链的节点的加入时间。
图7示出了用于搜索区块链数据的装置700的示意性框图。应当理解,装置700可以实现为实现图5中的用于搜索区块链数据的方法500的功能。从图7中可以看出用于数据库的装置700包括中央处理单元(CPU)701(例如处理器),其可以根据存储在只读存储器(ROM)702中的计算机程序指令或者从存储单元708加载到随机访问存储器(RAM)703中的计算机程序指令,来执行各种适当的动作和处理。在RAM 703中,还可存储该装置700操作所需的各种程序和数据。CPU 701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。
装置700中的多个部件连接至I/O接口705,包括:输入单元706,例 如键盘、鼠标等;输出单元707,例如各种类型的显示器、扬声器等;存储单元708,例如磁盘、光盘等;以及通信单元709,例如网卡、调制解调器、无线通信收发机等。通信单元709允许该装置700通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。
上文所描述的各种方法,例如用于搜索区块链数据的方法能够由处理单元701执行。例如,在一些实施例中,用于搜索区块链数据的方法100、500可以实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元708。在一些实施例中,计算机程序的部分或者全部可以经由ROM702和/或通信单元709而载入和/或安装到该装置700上。当计算机程序加载到RAM 703并由CPU 701执行时,可以执行上文描述的方法100、500中的一个或多个动作或步骤。
一般而言,本发明的各种示例实施例可以在硬件或专用电路、软件、固件、逻辑,或其任何组合中实施。某些方面可以在硬件中实施,而其他方面可以在可以由控制器、微处理器或其他计算设备执行的固件或软件中实施。当本发明的实施例的各方面被图示或描述为框图、流程图或使用某些其他图形表示时,将理解此处描述的方框、装置、系统、技术或方法可以作为非限制性的示例在硬件、软件、固件、专用电路或逻辑、通用硬件或控制器或其他计算设备,或其某些组合中实施。
虽然上面描述了本发明的各种示例实施例可以在硬件或专用电路中实现,但是上述用于区块链的数据处理设备既可以以硬件的形式来实现,也可以通过软件的形式来实现,这是因为:在20世纪90年代,一个技术改进能够很容易地对该改进属于硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是属于软件上的改进(例如对于方法流程的改进)。然而,随着技术的持续发展,如今的很多方法流程的改进几乎都能够通过将改进的方法流程编程到硬件电路中来实现,换句话说,通过对于硬件电路编程不同的程序从而得到相应的硬件电路结构,即实现了硬件电路结构的改变,故这样的方法流程的改进也可以视为硬件电路结构的直接改进。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device:PLD)(例如现场可编 程门阵列(Field Programmable Gate Array:FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统"集成"在一片可编程逻辑器件上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今取代手工地制作集成电路芯片,这种编程也多半改用"逻辑编译器(logic compi1er)"软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language:HDL),而HDL也并非仅有-种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
用于执行本发明内容的各个方面的计算机可读程序指令或者计算机程序产品也能够存储在云端,在需要调用时,用户能够通过移动互联网、固网或者其他网络访问存储在云端上的用于执行本发明内容的一方面的计算机可读程序指令,从而实施依据本发明内容的各个方面所公开的技术方案。
综上所述,本发明内容所提出的用于搜索区块链数据的方法一方面能够对区块链上的数据作出精确控制,让可以公开共享的数据无需访问控制即可访问而需要隐私保护的数据保留访问控制;另一方面限定了一种供访问检索的内部机制和接口,不仅可以让外部网页链接可以直接链接区块链中的公开数据以及与区块链相关联的信息,也可以让区块链中的公开数据相互链接,从而使得搜索引擎可以对区块链中的全部信息进行遍历检索。此外,通过本发明内容所提供的解决方案可以实现区块链和互联网信息的互联互通,进一步发挥出区块链的巨大价值。
以上所述仅为本发明内容的实施例可选实施例,并不用于限制本发明 的实施例,对于本领域的技术人员来说,本发明的实施例可以有各种更改和变化。凡在本发明的实施例的精神和原则之内,所作的任何修改、等效替换、改进等,均应包含在本发明的实施例的保护范围之内。
虽然已经参考若干具体实施例描述了本发明的实施例,但是应当理解,本发明的实施例并不限于所公开的具体实施例。本发明的实施例旨在涵盖在所附权利要求的精神和范围内所包括的各种修改和等同布置。权利要求的范围符合最宽泛的解释,从而包含所有这样的修改及等同结构和功能。
Claims (28)
- 一种用于搜索区块链数据的方法,所述方法包括:A.经由超文本传输协议接口接收由搜索引擎发送的网页读取请求,所述网页读取请求包含第一统一资源定位地址;B.获取与区块链相关联的信息以及在所述第一统一资源定位地址处的第一区块链数据;C.判断是否存在至少一个第二统一资源定位地址,其中,在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联;D.在存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据和所述至少一个第二统一资源定位地址生成与所述第一统一资源定位地址相关联的网页;以及E.将所述网页和与所述区块链相关联的信息经由所述超文本传输协议接口返回至所述搜索引擎。
- 根据权利要求1所述的方法,所述方法还包括:E1.在不存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据生成所述网页。
- 根据权利要求1所述的方法,其中,与所述区块链相关联的信息包括以下各项中的至少一项:所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;所述区块链的节点的拥有者的数量;所述区块链的创建时间;所述区块链的节点的加入时间。
- 根据权利要求1或2所述的方法,其中,D.判断是否存在至少一个第二统一资源定位地址进一步包括:D1.根据所述第一区块链数据所包括的层次属性和预先确定的层次关系树来判断是否存在所述至少一个第二统一资源定位地址。
- 根据权利要求1或2所述的方法,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B1.根据所述第一区块链数据的数据格式名来解析在所述第一统一资源定位地址处的第一区块链数据。
- 根据权利要求1或2所述的方法,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B2.根据所述第一区块链数据的数据格式解析函数名、数据格式解析服务地址、或数据格式解析智能合约地址来解析在所述第一统一资源定位地址处的第一区块链数据。
- 根据权利要求1所述的方法,其中,所述第一区块链数据和/或所述第二区块链数据包括第一属性,并且其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B3.根据所述第一区块链数据的第一属性来确定是否获取在所述第一统一资源定位地址处的第一区块链数据。
- 根据权利要求7所述的方法,其中,所述第一区块链数据和/或所述第二区块链数据采取键值方式进行存储。
- 根据权利要求7所述的方法,其中,在所述第一区块链数据为公开数据的情况下,所述第一区块链数据的所述第一属性为第一值;在所述第二区块链数据为公开数据的情况下,所述第二区块链数据的所述第一属性为所述第一值;在所述第一区块链数据为隐私数据的情况下,所述第一区块链数据的所述第一属性为不同于所述第一值的第二值;在所述第二区块链数据为隐私数据的情况下,所述第二区块链数据的所述第一属性为所述第二值。
- 根据权利要求1所述的方法,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B4.根据所述第一区块链数据的账本存储位置来确定是否获取在所述第一统一资源定位地址处的第一区块链数据,其中,在所述第一区块链数据或所述第二区块链数据为公开数据的情况下,所述第一区块链数据或所述第二区块链数据存储在公开账本中;以及在所述第一区块链数据或所述第二区块链数据为隐私数据的情况下,所述第一区块链数据或所述第二区块链数据存储在隐私账本中。
- 根据权利要求1所述的方法,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B5.根据所述第一区块链数据的存储区域位置来确定是否获取在所述第一统一资源定位地址处的第一区块链数据,其中,在所述第一区块链数据或所述第二区块链数据为公开数据的情况下,所述第一区块链数据或所述第二区块链数据存储在账本的公开区域中;以及在所述第一区块链数据或所述第二区块链数据为隐私数据的情况下,所述第一区块链数据或所述第二区块链数据存储在账本的隐私区域中。
- 一种用于搜索区块链数据的装置,所述装置包括:处理器;以及存储器,其用于存储指令,当所述指令执行时使得所述处理器执行以下操作:A.经由超文本传输协议接口接收由搜索引擎发送的网页读取请求,所述网页读取请求包含第一统一资源定位地址;B.获取与区块链相关联的信息以及在所述第一统一资源定位地址处的第一区块链数据;C.判断是否存在至少一个第二统一资源定位地址,其中,在所述至少一个第二统一资源定位地址处的第二区块链数据与所述第一区块链数据相关联;D.在存在所述至少一个第二统一资源定位地址的情况下,根据所述第一区块链数据和所述至少一个第二统一资源定位地址生成与所述第一统一资源定位地址相关联的网页;以及E.将所述网页和与所述区块链相关联的信息经由所述超文本传输协议接口返回至所述搜索引擎。
- 根据权利要求12所述的装置,当所述指令执行时还使得所述处理器执行以下操作:E1.在不存在所述至少一个第二统一资源定位地址时,根据所述第一区块链数据生成所述网页。
- 根据权利要求12所述的装置,其中,与所述区块链相关联的信息包括以下各项中的至少一项:所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;所述区块链的节点的拥有者的数量;所述区块链的创建时间;所述区块链的节点的加入时间。
- 根据权利要求12或13所述的装置,其中,D.判断是否存在至少一个第二统一资源定位地址进一步包括:D1.根据所述第一区块链数据所包括的层次属性和预先确定的层次关系树来判断是否存在所述至少一个第二统一资源定位地址。
- 根据权利要求12或13所述的装置,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B1.根据所述第一区块链数据的数据格式名来解析在所述第一统一资源定位地址处的第一区块链数据。
- 根据权利要求12或13所述的装置,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B2.根据所述第一区块链数据的数据格式解析函数名、数据格式解析服务地址、或数据格式解析智能合约地址来解析在所述第一统一资源定位地址处的第一区块链数据。
- 根据权利要求12所述的装置,其中,所述第一区块链数据和/或所述第二区块链数据包括第一属性,并且其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B3.根据所述第一区块链数据的第一属性来确定是否获取在所述第一统一资源定位地址处的第一区块链数据。
- 根据权利要求18所述的装置,其中,所述第一区块链数据和/或所述第二区块链数据采取键值方式进行存储。
- 根据权利要求18所述的装置,其中,在所述第一区块链数据为公开数据的情况下,所述第一区块链数据的所述第一属性为第一值;在所述第二区块链数据为公开数据的情况下,所述第二区块链数据的所述第一属性为所述第一值;在所述第一区块链数据为隐私数据的情况下,所述第一区块链数据的所述第一属性为不同于所述第一值的第二值;在所述第二区块链数据为隐私数据的情况下,所述第二区块链数据的所述第一属性为所述第二值。
- 根据权利要求12所述的装置,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B4.根据所述第一区块链数据的账本存储位置来确定是否获取在所述第一统一资源定位地址处的第一区块链数据,其中,在所述第一区块链数据或所述第二区块链数据为公开数据的情况下,所述第一区块链数据或所述第二区块链数据存储在公开账本中;以及在所述第一区块链数据或所述第二区块链数据为隐私数据的情况下,所述第一区块链数据或所述第二区块链数据存储在隐私账本中。
- 根据权利要求12所述的装置,其中,B.获取在所述第一统一资源定位地址处的第一区块链数据进一步包括:B5.根据所述第一区块链数据的存储区域位置来确定是否获取在所述第一统一资源定位地址处的第一区块链数据,其中,在所述第一区块链数据或所述第二区块链数据为公开数据的情况下,所述第一区块链数据或所述第二区块链数据存储在账本的公开区域中;以及在所述第一区块链数据或所述第二区块链数据为隐私数据的情况下,所述第一区块链数据或所述第二区块链数据存储在账本的隐私区域中。
- 一种用于搜索区块链数据的方法,所述方法包括:M.从区块链节点接收根据其区块链数据生成的网页和与区块链相关联的信息;N.接收搜索请求;O.基于所述搜索请求,从数据库中获得与区块链相关联的搜索结果,其中,所述数据库用于存储由所述网页生成的索引;以及P.基于与所述区块链相关联的信息对所述搜索结果进行排序。
- 根据权利要求23所述的方法,其中,与所述区块链相关联的信息包括以下各项中的至少一项:所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;所述区块链的节点的拥有者的数量;所述区块链的创建时间;所述区块链的节点的加入时间。
- 一种用于搜索区块链数据的装置,所述装置包括:处理器;以及存储器,其用于存储指令,当所述指令执行时使得所述处理器执行以下操作:M.从区块链节点接收根据其区块链数据生成的网页和与区块链相关联的信息;N.接收搜索请求;O.基于所述搜索请求,从数据库中获得与区块链相关联的搜索结果,其中,所述数据库用于存储由所述网页生成的索引;以及P.基于与所述区块链相关联的信息对所述搜索结果进行排序。
- 根据权利要求25所述的装置,其中,与所述区块链相关联的信息包括以下各项中的至少一项:所述区块链的节点数量;所述区块链的节点的拥有者的身份信息;所述区块链的节点的拥有者的数量;所述区块链的创建时间;所述区块链的节点的加入时间。
- 一种计算机可读存储介质,其具有存储在其上的计算机可读程序指令,所述计算机可读程序指令用于执行根据权利要求1至11中任一项所述的用于搜索区块链数据的方法。
- 一种计算机可读存储介质,其具有存储在其上的计算机可读程序指令,所述计算机可读程序指令用于执行根据权利要求23或24所述的用于搜索区块链数据的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810877497.3A CN109101607B (zh) | 2018-08-03 | 2018-08-03 | 用于搜索区块链数据的方法、装置及存储介质 |
CN201810877497.3 | 2018-08-03 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020024898A1 true WO2020024898A1 (zh) | 2020-02-06 |
Family
ID=64848422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/098169 WO2020024898A1 (zh) | 2018-08-03 | 2019-07-29 | 用于搜索区块链数据的方法、装置及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109101607B (zh) |
WO (1) | WO2020024898A1 (zh) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109101607B (zh) * | 2018-08-03 | 2021-03-30 | 上海点融信息科技有限责任公司 | 用于搜索区块链数据的方法、装置及存储介质 |
CN109981657B (zh) * | 2019-03-29 | 2021-09-17 | 浙江数值跳跃网络科技有限公司 | 一种基于区块链系统的爬虫技术 |
CN110162526B (zh) * | 2019-04-18 | 2023-02-24 | 创新先进技术有限公司 | 一种块链式账本中数据记录的查询方法、装置及设备 |
CN111488606B (zh) * | 2020-04-08 | 2021-04-27 | 北京瑞策科技有限公司 | 基于业务数据区块链的数据共享方法及装置 |
CN115237997A (zh) * | 2021-04-23 | 2022-10-25 | 华为技术有限公司 | 区块链数据管理方法及装置 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106227833A (zh) * | 2016-07-26 | 2016-12-14 | 宁圣金融信息服务(上海)有限公司 | 区块链搜索引擎方法、系统和装置 |
US20180137196A1 (en) * | 2016-11-11 | 2018-05-17 | International Business Machines Corporation | Trustable web searching verification in a blockchain |
CN108062413A (zh) * | 2017-12-30 | 2018-05-22 | 平安科技(深圳)有限公司 | 网页数据处理方法、装置、计算机设备及存储介质 |
CN108171083A (zh) * | 2017-12-18 | 2018-06-15 | 深圳前海微众银行股份有限公司 | 区块链可信数据管理方法、系统及计算机可读存储介质 |
CN109033403A (zh) * | 2018-08-03 | 2018-12-18 | 上海点融信息科技有限责任公司 | 用于搜索区块链数据的方法、装置及存储介质 |
CN109101607A (zh) * | 2018-08-03 | 2018-12-28 | 上海点融信息科技有限责任公司 | 用于搜索区块链数据的方法、装置及存储介质 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6636058B2 (ja) * | 2015-07-02 | 2020-01-29 | ナスダック, インコーポレイテッドNasdaq, Inc. | 分散トランザクションデータベースにおける出所保証のシステムおよび方法 |
CN106682457A (zh) * | 2016-12-16 | 2017-05-17 | 北京握奇智能科技有限公司 | 一种基于区块链技术的图片版权保护方法和系统 |
US9992022B1 (en) * | 2017-02-06 | 2018-06-05 | Northern Trust Corporation | Systems and methods for digital identity management and permission controls within distributed network nodes |
CN107943951B (zh) * | 2017-11-24 | 2020-08-11 | 中钞信用卡产业发展有限公司杭州区块链技术研究院 | 一种区块链业务信息的检索方法及系统 |
CN108009263A (zh) * | 2017-12-13 | 2018-05-08 | 清华大学 | 一种基于供需信息的区块链网络搜索方法及系统 |
CN108347428B (zh) * | 2017-12-29 | 2020-11-20 | 北京世纪互联宽带数据中心有限公司 | 基于区块链的应用程序的注册系统、方法和装置 |
CN108305075A (zh) * | 2018-03-07 | 2018-07-20 | 广州建翎电子技术有限公司 | 一种基于区块链的贸易文档管理系统及管理方法 |
-
2018
- 2018-08-03 CN CN201810877497.3A patent/CN109101607B/zh active Active
-
2019
- 2019-07-29 WO PCT/CN2019/098169 patent/WO2020024898A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106227833A (zh) * | 2016-07-26 | 2016-12-14 | 宁圣金融信息服务(上海)有限公司 | 区块链搜索引擎方法、系统和装置 |
US20180137196A1 (en) * | 2016-11-11 | 2018-05-17 | International Business Machines Corporation | Trustable web searching verification in a blockchain |
CN108171083A (zh) * | 2017-12-18 | 2018-06-15 | 深圳前海微众银行股份有限公司 | 区块链可信数据管理方法、系统及计算机可读存储介质 |
CN108062413A (zh) * | 2017-12-30 | 2018-05-22 | 平安科技(深圳)有限公司 | 网页数据处理方法、装置、计算机设备及存储介质 |
CN109033403A (zh) * | 2018-08-03 | 2018-12-18 | 上海点融信息科技有限责任公司 | 用于搜索区块链数据的方法、装置及存储介质 |
CN109101607A (zh) * | 2018-08-03 | 2018-12-28 | 上海点融信息科技有限责任公司 | 用于搜索区块链数据的方法、装置及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN109101607A (zh) | 2018-12-28 |
CN109101607B (zh) | 2021-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020024896A1 (zh) | 用于搜索区块链数据的方法、装置及存储介质 | |
WO2020024895A1 (zh) | 用于搜索区块链数据的方法、装置及存储介质 | |
WO2020024898A1 (zh) | 用于搜索区块链数据的方法、装置及存储介质 | |
WO2020143620A1 (zh) | 显示区块链数据的方法、区块链浏览器、用户节点和介质 | |
US11023463B2 (en) | Converting and modifying a subquery for an external data system | |
CN107798038B (zh) | 数据响应方法及数据响应设备 | |
US9262420B1 (en) | Third-party indexable text | |
WO2020024903A1 (zh) | 用于搜索区块链数据的方法、设备及计算机可读存储介质 | |
US20150149431A1 (en) | Processor engine, integrated circuit and method therefor | |
WO2020024904A1 (zh) | 用于搜索区块链数据的方法、设备及可读存储介质 | |
US20220229657A1 (en) | Extensible resource compliance management | |
WO2020024899A1 (zh) | 用于搜索区块链数据的方法、装置及存储介质 | |
US11416631B2 (en) | Dynamic monitoring of movement of data | |
CN108536617B (zh) | 缓存管理方法、介质、系统和电子设备 | |
US20230153455A1 (en) | Query-based database redaction | |
US8396858B2 (en) | Adding entries to an index based on use of the index | |
WO2020024902A1 (zh) | 用于搜索区块链数据的方法、装置及存储介质 | |
US20090248186A1 (en) | Methods and Systems for Matching Configurable Manufacturing Capacity Requirements and Availability | |
US20170262507A1 (en) | Feedback mechanism for query execution | |
CN114443701A (zh) | 数据流处理方法、电子设备和计算机程序产品 | |
US10599728B1 (en) | Metadata agent for query management | |
US20210342413A1 (en) | Identifying code dependencies in web applications | |
US11222086B2 (en) | Finding content on computer networks | |
CN109828983A (zh) | Pg数据库处理方法、装置、电子设备及存储介质 | |
US11954224B1 (en) | Database redaction for semi-structured and unstructured data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19844642 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19844642 Country of ref document: EP Kind code of ref document: A1 |