CN116341023A - Block chain-based service address verification method, device, equipment and storage medium - Google Patents

Block chain-based service address verification method, device, equipment and storage medium Download PDF

Info

Publication number
CN116341023A
CN116341023A CN202310593866.7A CN202310593866A CN116341023A CN 116341023 A CN116341023 A CN 116341023A CN 202310593866 A CN202310593866 A CN 202310593866A CN 116341023 A CN116341023 A CN 116341023A
Authority
CN
China
Prior art keywords
service
service address
bloom filter
target sub
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310593866.7A
Other languages
Chinese (zh)
Other versions
CN116341023B (en
Inventor
荆博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202310593866.7A priority Critical patent/CN116341023B/en
Publication of CN116341023A publication Critical patent/CN116341023A/en
Application granted granted Critical
Publication of CN116341023B publication Critical patent/CN116341023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Storage Device Security (AREA)

Abstract

The disclosure provides a business address verification method, a device, equipment and a storage medium based on a blockchain, relates to the field of computers, in particular to a blockchain technology, and can be applied to a cloud platform. The method comprises the following steps: extracting a target sub-service address to be verified from a block chain; determining whether the target sub-service address is in a bloom filter or not to obtain a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform; determining whether the target sub-service address exists in a database, and obtaining a second verification result of the target sub-service address; and determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result. By the technical scheme, the safety of service data in the service platform can be improved.

Description

Block chain-based service address verification method, device, equipment and storage medium
Technical Field
The disclosure relates to the field of computers, in particular to a blockchain technology, which can be applied to a cloud platform, and particularly relates to a blockchain-based service address verification method, device, equipment and storage medium.
Background
In the service processing process, if the service platform only uses one service address to process all service data, all service processing records are disclosed, and a third party can know the service scale, the service processing frequency and the like of the service platform. Moreover, if the business address is breached or compromised, all accounts in the business platform will be affected.
Therefore, new requirements are put on the business process in the business platform.
Disclosure of Invention
The present disclosure provides a method, apparatus, device and storage medium for verifying a service address based on a blockchain.
According to an aspect of the present disclosure, there is provided a blockchain-based service address verification method, the method including:
extracting a target sub-service address to be verified from a block chain;
determining whether the target sub-service address is in a bloom filter or not to obtain a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform;
determining whether the target sub-service address exists in a database, and obtaining a second verification result of the target sub-service address;
And determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result.
According to an aspect of the present disclosure, there is provided a blockchain-based service address verification apparatus including:
the address extraction module is used for extracting a target sub-service address to be verified from the block chain;
the first verification module is used for determining whether the target sub-service address is in a bloom filter or not to obtain a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform;
the second verification module is used for determining whether the target sub-service address exists in the database and obtaining a second verification result of the target sub-service address;
and the address verification module is used for determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the blockchain-based business address verification method of any embodiment of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the blockchain-based service address verification method of any embodiment of the present disclosure.
According to the technology disclosed by the invention, the safety of service data processing in the service platform can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a blockchain-based business address verification method provided in accordance with an embodiment of the present disclosure;
FIG. 2a is a flow chart of another blockchain-based service address verification method provided in accordance with embodiments of the present disclosure;
FIG. 2b is a schematic update diagram of a bloom filter provided in accordance with an embodiment of the present disclosure;
FIG. 2c is a schematic diagram of a bloom filter and database update provided in accordance with an embodiment of the present disclosure;
FIG. 3a is a flow chart of yet another blockchain-based service address verification method provided in accordance with embodiments of the present disclosure;
FIG. 3b is a schematic diagram of verification of a target sub-service address provided in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a block chain based service address verification device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device for implementing a blockchain-based business address verification method of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a flowchart of a block chain based service address verification method provided in accordance with an embodiment of the present disclosure. The embodiment of the disclosure is suitable for the condition that the sub-service address of the service platform is validated. The method may be performed by a blockchain-based service address verification device, which may be implemented in software and/or hardware, configurable in a full number of nodes of a blockchain network. As shown in fig. 1, the blockchain-based service address verification method of the present embodiment may include:
s101, extracting a target sub-service address to be verified from a block chain;
s102, determining whether the target sub-service address is in a bloom filter or not to obtain a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform;
s103, determining whether the target sub-service address exists in a database, and obtaining a second verification result of the target sub-service address;
s104, determining whether the target sub-service address belongs to the legal service address of the service platform according to the first verification result and the second verification result.
In the embodiment of the disclosure, a new sub-service address is generated for the service platform in response to new service data in the service platform, and the new service data is processed by adopting the new sub-service address, that is, the service platform has a plurality of sub-service addresses for processing different service data in the service platform. For example, in the event that a new user applies for a refill in the service platform, the service platform may generate a new sub-checkout address (i.e., sub-service address) for the new refill order (i.e., new service data) and store the new sub-checkout address in association with the new refill order for the user in the database. By the processing, compared with the service platform which adopts a unique service address to process all the service data, the leakage of service scale, service processing frequency and the like of the service platform can be avoided, so that the security of service processing in the service platform is improved. By storing the new sub-checkout in association with the new business data in the database, subsequent validation of the new sub-checkout is facilitated.
Among these, bloom Filters (BF) are a very long binary vector and a series of random mapping functions. Bloom filters may be used to record data and query whether certain data exists. In the disclosed embodiments, a bloom filter may be created in advance and an initial bit in the bloom filter may be set to 0.
And updating the bloom filter according to the new sub-service address under the condition that the new sub-service address is generated for the service platform according to the new service data. Illustratively, the bit corresponding to the new sub-service address is selected from the bloom filter and the corresponding bit is set to 1.
In the service processing process, a bloom filter is used for verifying whether the sub-service address belongs to a legal service address of the service platform. Under the condition that the user node needs the service platform to process the service, the service data to be processed and the sub-service address associated with the service data can be sent to the blockchain network, and the service data and the sub-service address are stored into the blockchain by the block generating node in the blockchain network. The method comprises the steps of maintaining a total node in a blockchain network, tracking the blockchain network, continuously acquiring new blocks in the blockchain, and analyzing the new blocks to obtain service data to be processed and sub-service addresses associated with the service data as target sub-service addresses to be verified.
The full node also determines whether the target sub-service address is in a bloom filter or not, and a first verification result of the target sub-service address is obtained; and determining whether the target sub-service address exists in the database, obtaining a second verification result of the target sub-service address, and determining whether the target sub-service address belongs to a legal service address of the service platform by combining the first verification result and the second verification result. Under the condition that the target sub-service address belongs to the legal service address of the service platform, continuing to process the service data associated with the target sub-service address; and under the condition that the target sub-service address belongs to an illegal service address of the service platform, refusing to process the service data associated with the target sub-service address. The validity verification is carried out on the target sub-service address by combining the bloom filter and the database, so that the security of service processing in the service platform can be further improved.
According to the technical scheme, a new sub-service address is generated for new service data in the service platform, and a bloom filter is updated according to the new sub-service address; in the service processing process, the target sub-service address to be verified is extracted from the block chain, and whether the target sub-service address belongs to the legal service address of the service platform is verified by combining a bloom filter and a database, so that the security of service processing in the service platform can be improved.
Fig. 2a is a flow chart of another blockchain-based service address verification method provided in accordance with an embodiment of the present disclosure. This embodiment is an alternative to the embodiments described above. Referring to fig. 2a, the blockchain-based service address verification method of the present embodiment may include:
s201, extracting a target sub-service address to be verified from a block chain;
s202, determining whether the target sub-service address is in a bloom filter or not, and obtaining a first verification result of the target sub-service address; the bloom filter is updated by: generating a new sub-service address for new service data in the service platform based on a hierarchical deterministic encryption technology; updating the bloom filter according to the new sub-service address and the number of the multiple hashes;
S203, determining whether the target sub-service address exists in a database, and obtaining a second verification result of the target sub-service address;
s204, according to the first verification result and the second verification result, determining whether the target sub-service address belongs to a legal service address of the service platform.
In the disclosed embodiment, the bloom filter is updated by: under the condition that new service data exists in the service platform, generating a new sub-service address for the service platform by adopting a root public key or a father public key based on a hierarchical deterministic encryption technology; the bloom filter is updated based on the new sub-service address and the number of multiple hashes. The root public key may be preset according to the root private key, and the parent public key may be generated in advance according to the root public key.
Referring to fig. 2b, a public key of the service platform is generated as a parent public key according to a private key of the service platform, a child public key is generated by adopting the parent public key, a new child service address is generated for the service platform by adopting the child public key, and a bloom filter is updated according to the new child service address. By generating a new sub-service address for the service platform under the condition of new service data based on the hierarchical deterministic encryption technology, the risk of leakage or cracking of the new sub-service address can be reduced. It should be noted that, referring to fig. 2c, in the case that new service data exists in the service platform, not only a new sub-service address is generated for the service platform, and the bloom filter is updated by using the new sub-service address, but also the new service data and the new sub-service address are associated and stored in the database to update the database.
The number of the multiple hashes can be represented by K, and the value of the multiple hashes is a natural number greater than 1, and can be preset. The accuracy of validity verification of the target sub-service address is positively correlated with the number of the multiple hashes. Illustratively, independent K hash functions are established by using multiple hash, the K hash functions are adopted, K bits corresponding to the new sub-service address are determined in the bloom filter, and the value of the determined K bits is set to be 1, so that the bloom filter is updated. By using the multiple hash update bloom filter, the accuracy of validity verification of the target sub-service address can be improved.
In an alternative embodiment, the updating the bloom filter according to the new sub-service address and the number of multiple hashes includes: generating K hash values according to the new sub-service address and K preset values by adopting a preset hash function; wherein K is the number of the multiple hashes; performing low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and performing modulo operation on the length of a bloom filter to obtain K index numbers; and updating the corresponding bit of the K index numbers in the bloom filter.
In the embodiment of the disclosure, K different preset values are added to the new sub-service address to obtain K different combinations, and each combination is used as an input of a hash function to obtain a plurality of outputs of the hash function. Taking K as 3 as an example, assuming that there are one hash function H () and three preset values A, B and C, three independent hash function values can be calculated using the following formula: h (a+key), H (b+key), and H (c+key), wherein the key is a new sub-service address; three independent hash function values are used as indexes to set the three bits of the bloom filter to 1. The preset hash function is a single fixed hash function, for example, a SHA256 () function can be selected, and the security is relatively high.
And, because the hash value output by the hash function has a large value interval, the low-order truncation operation is performed on the K hash values, and the low-order truncation operation is performed on the K hash values, that is, a bit string with a certain length is truncated from the low order of the K hash values, for example, a bit string with a 32-bit length at the tail is truncated from the K hash values, as a truncated character. By truncating the hash value low, the probability of the truncated character high order 0 can be reduced.
And converting the truncated character into an integer, performing modulo operation on the length of the bloom filter to obtain K index numbers, and updating the bit corresponding to the K index numbers in the bloom filter to 1. It should be noted that the length of the truncated character is related to the length of the bloom filter, that is, the length of the truncated character needs to ensure that the converted integer is larger than the length of the bloom filter. By adopting a single hash function, the bloom filter is updated according to the new sub-service address and K preset values, and compared with the bloom filter updated by adopting K different hash functions, the update efficiency of the bloom filter can be improved.
According to the technical scheme, under the condition that new service data exist, the security of the new sub-service address can be improved by generating the new sub-service address for the service platform based on the hierarchical deterministic encryption technology; and updating the bloom filter according to the new sub-service address and K preset values by adopting a single hash function, so that the updating efficiency of the bloom filter can be improved.
In an alternative embodiment, the bloom filter is constructed by: determining the length of a bloom filter according to the number of sub-service addresses in the service platform and the misjudgment rate; determining the number of multiple hashes used by the bloom filter according to the false positive rate; and constructing a bloom filter according to the length of the bloom filter and the number of the multiple hashes.
In the embodiment of the present disclosure, the platform side may set n as the scale of the service processing, that is, the number of sub-service addresses that may be derived, estimated for the service platform. Setting a false judgment rate of a bloom filter, namely setting the probability of wrongly judging an address as a legal service address of the service platform as epsilon. The length of the bloom filter may be determined according to the following formula:
Figure SMS_1
where m is the length of the bloom filter, i.e., the bit string of how many bits the bloom filter is. And, the number of multiple hashes that need to be used by the bloom filter can be calculated by the following formula:
Figure SMS_2
where K is the number of multiple hashes.
The bloom filter is constructed according to the length of the bloom filter and the number of multiple hashes used by the bloom filter, and the initial bit of the bloom filter is set to 0. The length of the bloom filter and the number of multiple hashes used by the bloom filter are determined by combining the number of sub-service addresses and the misjudgment rate in the service platform, so that the bloom filter is constructed, the bloom filter can meet the service requirements of the service platform, and the bloom filter is convenient to use for verifying the validity of the target sub-service addresses.
Fig. 3a is a flow chart of another blockchain-based service address verification method provided in accordance with an embodiment of the present disclosure. This embodiment is an alternative to the embodiments described above. Referring to fig. 3a, the blockchain-based service address verification method of the present embodiment may include:
s301, extracting a target sub-service address to be verified from a block chain;
s302, generating K hash values according to K preset values and new sub-service addresses by adopting a preset hash function;
s303, performing low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and performing modulo operation on the length of a bloom filter to obtain K index numbers;
s304, determining whether the target sub-service address is in the bloom filter according to the bit positions corresponding to the K index numbers in the bloom filter, and obtaining a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform;
s305, determining whether the target sub-service address exists in a database, and obtaining a second verification result of the target sub-service address;
S306, determining whether the target sub-service address belongs to the legal service address of the service platform according to the first verification result and the second verification result.
K different preset values are added to the target sub-service address to obtain K different combinations, and the K different combinations are used as the input of the hash function to obtain a plurality of outputs of the hash function. That is, a single hash function is adopted, and hash operation is carried out on the target sub-service address according to K preset values, so that K hash values are obtained; performing low-order truncation on the K hash values to obtain truncated characters, for example, intercepting a bit string with the length of 32 bits from the low order as the truncated characters, converting the truncated characters into integers, performing modulo operation on the length of a bloom filter to obtain K index numbers, and judging whether the corresponding bit positions of the K index numbers in the bloom filter are 1; if the corresponding bit of the K index numbers in the bloom filter is 1, the target sub-service address is in the bloom filter; if the corresponding bit of any one index number in the bloom filter is 0, the target sub-service address must not be in the bloom filter. By adopting a single hash function, whether the target sub-service address is in the bloom filter or not is verified according to the target sub-service address and K preset values, and verification efficiency of the target sub-service address can be improved.
According to the technical scheme, whether the target sub-service address is in the bloom filter or not is verified according to the target sub-service address and K preset values by adopting a single hash function, and verification efficiency of the target sub-service address can be improved.
In an optional implementation manner, the determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result includes: and determining that the target sub-service address belongs to a legal service address of the service platform under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined to be in a database according to the second verification result.
In the embodiment of the disclosure, if the target sub-service address is in the bloom filter and the target sub-service address is also in the database, determining that the target sub-service address belongs to a legal service address of the service platform can control the service platform to process target service data associated with the target sub-service address. Taking the recharging service of the service platform as an example, the recharging service of the service platform can be subjected to subsequent service processing. By determining that the target sub-service address belongs to the legal service address of the service platform only when the target sub-service address is in the bloom filter and in the database, erroneous judgment of the bloom filter can be avoided, and verification accuracy is further improved.
In an optional implementation manner, the determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result includes: and under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined not to be in a database according to the second verification result, determining that the target sub-service address belongs to an illegal service address of the service platform, and adding the target sub-service address into a misjudgment blacklist.
In the disclosed embodiments, a false positive blacklist may also be maintained for illegitimate business addresses that are stored in the bloom filter, but not in the database. Under the condition that any sub-service address needs to be validated, whether the sub-service address belongs to a misjudgment blacklist or not can be determined, if the sub-service address belongs to the misjudgment blacklist, the validation operation of the sub-service address can be stopped, and the illegal service address is used as the validation result of the sub-service address, so that the validation efficiency of the service address is further improved.
Referring to fig. 3b, a full node in a blockchain network extracts at least one target sub-service address in service data from a new block, detects whether the target sub-service address in the service data hits a misjudgment blacklist, and if the target sub-service address in the service data hits the misjudgment blacklist, determines that the target sub-service address is an illegal service address of a service platform, and stops processing the service data; if the target sub-service address in the service data does not hit the misjudgment blacklist, determining whether the target sub-service address hits the bloom filter; if the target sub-service address does not hit the bloom filter, determining that the target sub-service address is an illegal service address of the service platform, and stopping processing the service data; if the target sub-service address hits the bloom filter, continuing to determine whether the target sub-service address hits the database; if the target sub-service address hits the bloom filter and hits the database, the target sub-service address is determined to be the legal service address of the service platform, and the service data can be processed continuously. In addition, if the target sub-service address hits the bloom filter but does not hit the database, the target sub-service address is added to the misjudgment blacklist.
Fig. 4 is a schematic structural diagram of a block chain-based service address verification device according to an embodiment of the present disclosure. The embodiment of the disclosure is suitable for the condition that the sub-service address of the service platform is validated. The apparatus may be implemented in software and/or hardware and may be configured in a user node of a blockchain network. As shown in fig. 4, the blockchain-based service address verification device 400 of the present embodiment may include:
an address extraction module 410, configured to extract a target sub-service address to be verified from the blockchain;
a first verification module 420, configured to determine whether the target sub-service address is in a bloom filter, and obtain a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform;
a second verification module 430, configured to determine whether the target sub-service address exists in the database, and obtain a second verification result of the target sub-service address;
and the address verification module 440 is configured to determine whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result.
In an alternative embodiment, the bloom filter is updated by:
generating a new sub-service address for new service data in the service platform based on a hierarchical deterministic encryption technology;
and updating the bloom filter according to the new sub-service address and the number of the multiple hashes.
In an alternative embodiment, the bloom filter is specifically updated by:
generating K hash values according to the new sub-service address and K preset values by adopting a preset hash function; wherein K is the number of the multiple hashes;
performing low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and performing modulo operation on the length of a bloom filter to obtain K index numbers;
and updating the corresponding bit of the K index numbers in the bloom filter.
In an alternative embodiment, the bloom filter is constructed by:
determining the length of a bloom filter according to the number of sub-service addresses in the service platform and the misjudgment rate;
determining the number of multiple hashes used by the bloom filter according to the false positive rate;
and constructing a bloom filter according to the length of the bloom filter and the number of the multiple hashes.
In an alternative embodiment, the first verification module 420 includes:
the hash value unit is used for generating K hash values according to K preset values and the new sub-service addresses by adopting a preset hash function;
the index number unit is used for carrying out low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and carrying out modulo operation on the length of the bloom filter to obtain K index numbers;
and the first verification unit is used for determining whether the target sub-service address is in the bloom filter according to the corresponding bit of the K index numbers in the bloom filter.
In an alternative embodiment, the address verification module 440 is specifically configured to:
and determining that the target sub-service address belongs to a legal service address of the service platform under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined to be in a database according to the second verification result.
In an alternative embodiment, the address verification module 440 is specifically configured to:
and under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined not to be in a database according to the second verification result, determining that the target sub-service address belongs to an illegal service address of the service platform, and adding the target sub-service address into a misjudgment blacklist.
According to the technical scheme, the novel sub-service address is built for the service platform according to the novel service data, the bloom filter is adopted to perform validity verification on the sub-service address of the service platform, and a novel multiple hash generation mode is provided by adopting a single hash function and a plurality of preset values, so that the safety of platform transaction can be improved, and the verification efficiency of the sub-service address can be improved.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 5 is a block diagram of an electronic device for implementing a blockchain-based business address verification method of embodiments of the present disclosure. Fig. 5 illustrates a schematic block diagram of an example electronic device 500 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 may also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in electronic device 500 are connected to I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the blockchain-based service address verification method. For example, in some embodiments, the blockchain-based service address verification method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the blockchain-based business address verification method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the blockchain-based service address verification method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
Artificial intelligence is the discipline of studying the process of making a computer mimic certain mental processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.) of a person, both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligent software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
Cloud computing (cloud computing) refers to a technical system that a shared physical or virtual resource pool which is elastically extensible is accessed through a network, resources can comprise servers, operating systems, networks, software, applications, storage devices and the like, and resources can be deployed and managed in an on-demand and self-service mode. Through cloud computing technology, high-efficiency and powerful data processing capability can be provided for technical application such as artificial intelligence and blockchain, and model training.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (16)

1. The service address verification method based on the block chain comprises the following steps:
extracting a target sub-service address to be verified from a block chain;
determining whether the target sub-service address is in a bloom filter or not to obtain a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform;
determining whether the target sub-service address exists in a database, and obtaining a second verification result of the target sub-service address;
and determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result.
2. The method of claim 1, wherein the bloom filter is updated by:
Generating a new sub-service address for new service data in the service platform based on a hierarchical deterministic encryption technology;
and updating the bloom filter according to the new sub-service address and the number of the multiple hashes.
3. The method of claim 2, wherein the updating the bloom filter according to the new sub-service address and the number of multiple hashes comprises:
generating K hash values according to the new sub-service address and K preset values by adopting a preset hash function; wherein K is the number of the multiple hashes;
performing low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and performing modulo operation on the length of a bloom filter to obtain K index numbers;
and updating the corresponding bit of the K index numbers in the bloom filter.
4. The method of claim 1, wherein the bloom filter is constructed by:
determining the length of a bloom filter according to the number of sub-service addresses in the service platform and the misjudgment rate;
determining the number of multiple hashes used by the bloom filter according to the false positive rate;
and constructing a bloom filter according to the length of the bloom filter and the number of the multiple hashes.
5. The method of claim 1, wherein the determining whether the target sub-service address is in a bloom filter comprises:
generating K hash values according to K preset values and new sub-service addresses by adopting a preset hash function;
performing low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and performing modulo operation on the length of a bloom filter to obtain K index numbers;
and determining whether the target sub-service address is in the bloom filter according to the corresponding bit of the K index numbers in the bloom filter.
6. The method according to any one of claims 1-5, wherein the determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result comprises:
and determining that the target sub-service address belongs to a legal service address of the service platform under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined to be in a database according to the second verification result.
7. The method according to any one of claims 1-5, wherein the determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result comprises:
And under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined not to be in a database according to the second verification result, determining that the target sub-service address belongs to an illegal service address of the service platform, and adding the target sub-service address into a misjudgment blacklist.
8. A blockchain-based service address verification device, comprising:
the address extraction module is used for extracting a target sub-service address to be verified from the block chain;
the first verification module is used for determining whether the target sub-service address is in a bloom filter or not to obtain a first verification result of the target sub-service address; the bloom filter updates according to a new sub-service address generated for new service data in the service platform;
the second verification module is used for determining whether the target sub-service address exists in the database and obtaining a second verification result of the target sub-service address;
and the address verification module is used for determining whether the target sub-service address belongs to a legal service address of the service platform according to the first verification result and the second verification result.
9. The apparatus of claim 8, wherein the bloom filter is updated by:
generating a new sub-service address for new service data in the service platform based on a hierarchical deterministic encryption technology;
and updating the bloom filter according to the new sub-service address and the number of the multiple hashes.
10. The apparatus of claim 9, wherein the bloom filter is updated specifically by:
generating K hash values according to the new sub-service address and K preset values by adopting a preset hash function; wherein K is the number of the multiple hashes;
performing low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and performing modulo operation on the length of a bloom filter to obtain K index numbers;
and updating the corresponding bit of the K index numbers in the bloom filter.
11. The apparatus of claim 8, wherein the bloom filter is constructed by:
determining the length of a bloom filter according to the number of sub-service addresses in the service platform and the misjudgment rate;
determining the number of multiple hashes used by the bloom filter according to the false positive rate;
And constructing a bloom filter according to the length of the bloom filter and the number of the multiple hashes.
12. The apparatus of claim 8, wherein the first verification module comprises:
the hash value unit is used for generating K hash values according to K preset values and the new sub-service addresses by adopting a preset hash function;
the index number unit is used for carrying out low-order truncation on the K hash values to obtain truncated characters, converting the truncated characters into integers, and carrying out modulo operation on the length of the bloom filter to obtain K index numbers;
and the first verification unit is used for determining whether the target sub-service address is in the bloom filter according to the corresponding bit of the K index numbers in the bloom filter.
13. The apparatus of any of claims 8-12, wherein the address verification module is specifically configured to:
and determining that the target sub-service address belongs to a legal service address of the service platform under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined to be in a database according to the second verification result.
14. The apparatus of any of claims 8-12, wherein the address verification module is specifically configured to:
And under the condition that the target sub-service address is determined to be in a bloom filter according to the first verification result and the target sub-service address is determined not to be in a database according to the second verification result, determining that the target sub-service address belongs to an illegal service address of the service platform, and adding the target sub-service address into a misjudgment blacklist.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the blockchain-based business address verification method of any of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the blockchain-based business address verification method of any of claims 1-7.
CN202310593866.7A 2023-05-24 2023-05-24 Block chain-based service address verification method, device, equipment and storage medium Active CN116341023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310593866.7A CN116341023B (en) 2023-05-24 2023-05-24 Block chain-based service address verification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310593866.7A CN116341023B (en) 2023-05-24 2023-05-24 Block chain-based service address verification method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116341023A true CN116341023A (en) 2023-06-27
CN116341023B CN116341023B (en) 2023-08-29

Family

ID=86879005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310593866.7A Active CN116341023B (en) 2023-05-24 2023-05-24 Block chain-based service address verification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116341023B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046521A (en) * 2019-04-24 2019-07-23 成都派沃特科技股份有限公司 Decentralization method for secret protection
CN110704438A (en) * 2019-09-26 2020-01-17 深圳前海微众银行股份有限公司 Method and device for generating bloom filter in block chain
US20200328889A1 (en) * 2018-03-29 2020-10-15 NEC Laboratories Europe GmbH Method and system of preserving privacy for usage of lightweight blockchain clients
CN113946871A (en) * 2021-11-22 2022-01-18 杭州电子科技大学 Privacy preserving data record integration method, system and computer readable storage medium
CN115811546A (en) * 2022-11-17 2023-03-17 上海大学 System and method for realizing network cooperative distributed processing for scientific and technological service
US20230108083A1 (en) * 2020-01-17 2023-04-06 Fetch.AI Limited Transaction verification system and method of operation thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200328889A1 (en) * 2018-03-29 2020-10-15 NEC Laboratories Europe GmbH Method and system of preserving privacy for usage of lightweight blockchain clients
CN110046521A (en) * 2019-04-24 2019-07-23 成都派沃特科技股份有限公司 Decentralization method for secret protection
CN110704438A (en) * 2019-09-26 2020-01-17 深圳前海微众银行股份有限公司 Method and device for generating bloom filter in block chain
US20230108083A1 (en) * 2020-01-17 2023-04-06 Fetch.AI Limited Transaction verification system and method of operation thereof
CN113946871A (en) * 2021-11-22 2022-01-18 杭州电子科技大学 Privacy preserving data record integration method, system and computer readable storage medium
CN115811546A (en) * 2022-11-17 2023-03-17 上海大学 System and method for realizing network cooperative distributed processing for scientific and technological service

Also Published As

Publication number Publication date
CN116341023B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
US10447525B2 (en) Validating correlation between chains of alerts using cloud view
CN108985066B (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
WO2019199769A1 (en) Cyber chaff using spatial voting
CN114565513A (en) Method and device for generating confrontation image, electronic equipment and storage medium
CN110730164A (en) Safety early warning method, related equipment and computer readable storage medium
CN110826036A (en) User operation behavior safety identification method and device and electronic equipment
CN114157480B (en) Method, device, equipment and storage medium for determining network attack scheme
CN113312560B (en) Group detection method and device and electronic equipment
CN109905366A (en) Terminal device safe verification method, device, readable storage medium storing program for executing and terminal device
CN113312611A (en) Password detection method, device, equipment and computer readable storage medium
CN117474091A (en) Knowledge graph construction method, device, equipment and storage medium
CN113904943A (en) Account detection method and device, electronic equipment and storage medium
US20120260339A1 (en) Imposter Prediction Using Historical Interaction Patterns
CN116341023B (en) Block chain-based service address verification method, device, equipment and storage medium
CN115328621B (en) Transaction processing method, device, equipment and storage medium based on block chain
US20220321598A1 (en) Method of processing security information, device and storage medium
CN113935069B (en) Data verification method, device and equipment based on block chain and storage medium
CN113591464B (en) Variant text detection method, model training method, device and electronic equipment
CN113591440B (en) Text processing method and device and electronic equipment
US20220374603A1 (en) Method of determining location information, electronic device, and storage medium
CN115086054B (en) Malicious domain name detection method and device based on self-attention generation antagonistic network and electronic equipment
CN115774878A (en) Request processing method and device, electronic equipment and storage medium
CN116094772A (en) Interface attack detection method and device, electronic equipment and storage medium
CN116451648A (en) Message keyword matching method, device, equipment and storage medium
CN116248340A (en) Interface attack detection method and device, electronic equipment and 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