A blockchain-based urban data storage method and system

By storing and managing urban credit data on the blockchain, the problem of user credit behavior cannot be accumulated in other places is solved, the integrity and security of credit information is achieved, the convenience and fairness of user services are improved, and management costs are reduced.

CN119048227BActive Publication Date: 2025-02-28HANGZHOU SCENE INNOVATION CENTER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411539054.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-28
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Current users' credit behavior cannot be accumulated in other places, which limits the integrity and reliability of credit information, affects the convenience and fairness of users' access to financial and social services in different cities, and increases the management costs of each city and institution.

Method used

Adopting a blockchain-based urban data storage method, each city node collects user's credit behavior data and credit tags, encrypts and uploads it to the blockchain, realizing decentralized storage of data and off-site calls, and ensuring the security and accuracy of data through the voting mechanism of multi-city nodes.

Benefits of technology

It realizes the accumulation of user credit behavior in other places, improves the integrity and security of credit information, improves the convenience and fairness of users to obtain financial and social services in different cities, and reduces the management costs of various cities and institutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention provides a city data storage method and system based on blockchain, which relates to the technical field of data storage. The method comprises: a city node collects credit behavior data of a target user in a current city; the city node adds a credit label to the target user according to the credit behavior data; the city node broadcasts a content identifier of a data packet to a blockchain; when the current city node inquires about the credit of the target user, it initiates a query request to a target city node in a different place that contains the credit behavior data of the target user; the current city node searches for a smart contract according to a transaction ID and a content identifier position, and retrieves the content identifier; the current city node downloads a data packet from a data storage system according to the content identifier; the current city node decrypts the data packet by a key; and determines the comprehensive credit of the target user according to the credit label of each city node for the target user and a city credit score ranking table of each city node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage technology, and in particular to a blockchain-based urban data storage method and system. Background Art

[0002] At present, each city, region or institution usually has an independent credit information system, and credit, social security and other data cannot be interoperable.

[0003] At the same time, credit data involves personal privacy, and laws and regulations have strict restrictions on cross-regional data sharing. The transmission and storage of data across regions increases security risks and makes it easy to become a target of cyber attacks.

[0004] For the above reasons, users' credit behavior cannot be accumulated across locations, which not only limits the integrity and reliability of users' credit information, but also affects the convenience and fairness of users' access to financial and social services in different cities, and increases the management costs of various cities and institutions. Summary of the invention

[0005] In order to solve the technical problem that the current user's credit behavior cannot be accumulated remotely, which not only limits the integrity and reliability of the user's credit information, but also affects the convenience and fairness of users in obtaining financial and social services in different cities, and increases the management costs of various cities and institutions, the present invention provides a blockchain-based city data storage method and system.

[0006] The technical solution provided by the embodiment of the present invention is as follows:

[0007] First aspect:

[0008] An embodiment of the present invention provides a blockchain-based urban data storage method, comprising:

[0009] S1: City nodes collect the target user’s credit behavior data in the current city;

[0010] S2: The city node adds a credit tag to the target user based on the credit behavior data;

[0011] S3: The city node packages the credit behavior data and the credit label into a data packet, encrypts the data packet, and uploads it to the data storage system;

[0012] S4: the data storage system returns the content identifier of the data packet and records the storage location of the data packet;

[0013] S5: The city node broadcasts the content identifier of the data packet to the blockchain;

[0014] S6: The blockchain returns the transaction ID and content identifier location to the city node;

[0015] S7: When the current city node queries the credit of the target user, it initiates a query request to a target city node in a different location that contains the credit behavior data of the target user;

[0016] S8: The target city node collects the voting results of other city nodes. When the number of support votes cast by other city nodes is greater than the preset number, the target city node generates a key for the current city node and returns the key, transaction ID, and content identifier location to the current city node.

[0017] S9: The current city node searches for the smart contract based on the transaction ID and the content identifier location, and retrieves the content identifier;

[0018] S10: The current city node downloads the data packet from the data storage system according to the content identifier;

[0019] S11: The current city node decrypts the data packet using the key and obtains the credit behavior data and credit label of the target user recorded by other city nodes;

[0020] S12: The current city node determines the comprehensive credit of the target user according to the credit labels of the target user in each city node and in combination with the city credit score ranking table of each city node.

[0021] Second aspect:

[0022] An embodiment of the present invention provides a blockchain-based urban data storage system, including:

[0023] processor;

[0024] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the blockchain-based urban data storage method as described in the first aspect is implemented.

[0025] The third aspect:

[0026] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the blockchain-based urban data storage method as described in the first aspect is implemented.

[0027] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0028] In the present invention, a city data storage architecture is constructed based on blockchain technology. After collecting the credit behavior data and credit labels of users in the city, each city node can encrypt and store them in the blockchain for call by other city nodes, ensuring that the information between each city node is updated synchronously, realizing the off-site accumulation of users' credit behavior, improving the integrity and security of users' credit information, improving the convenience and fairness of users in obtaining financial and social services in different cities, and reducing the management costs of various cities and institutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 A flowchart of a blockchain-based urban data storage method provided by an embodiment of the present invention;

[0031] Figure 2 A schematic diagram of the structure of a blockchain-based urban data storage system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0033] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0034] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0035] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0036] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0037] Reference Manual Attached Figure 1 , showing a flow chart of a blockchain-based urban data storage method provided in an embodiment of the present invention.

[0038] The embodiment of the present invention provides a blockchain-based urban data storage method, which can be implemented by a blockchain-based urban data storage device, which can be a terminal or a server. The processing flow of the blockchain-based urban data storage method may include the following steps:

[0039] S1: City nodes collect the credit behavior data of target users in the current city.

[0040] Among them, credit behavior data include: credit card usage, loan repayment records, public facility usage records, water, electricity and gas bill payment status, public transportation usage records and participation in social activities, etc.

[0041] S2: The city node adds a credit label to the target user based on the credit behavior data.

[0042] Specifically, credit labels can be automatically added to target users through support vector machines, logistic regression algorithms, etc.

[0043] Optionally, when the city node considers the target user to have good credit, the credit tag , when the city node believes that the target user has poor credit, the credit label .

[0044] S3: The city node packages the credit behavior data and credit labels into data packets, encrypts them, and uploads them to the data storage system.

[0045] In a possible implementation, the credit behavior data and the credit tag are packaged into a data packet in S3 and then encrypted, specifically:

[0046] The data packet is encrypted using the public key of the city node and a pseudo-random number:

[0047]

[0048] in, E Indicates encrypted data packets. PK represents the public key, C Represents the original data packet, N represents a pseudo-random number, Enc Represents an encryption function.

[0049] Optionally, a key pair (public key and private key) may be generated by an elliptic curve cryptographic algorithm, an RSA algorithm, or the like.

[0050] Since the cost of uploading data to the blockchain is high, in order to reduce the amount of calculation and lower the cost of data storage, the present invention provides a new key generation method.

[0051] In a possible implementation, the public key and the private key are generated as follows:

[0052] Input initial parameters to the chaotic system and configure the master key for the city node:

[0053]

[0054] in, MK Represents the master key, x and y Two numerical values ​​generated for the chaotic system.

[0055] It should be noted that the numerical values ​​generated by the chaotic system are highly unpredictable and sensitive. These characteristics help to improve the security and randomness of the key generation process, making it difficult for attackers to predict and crack them.

[0056] Randomly obtain a large prime number as a generator, and generate a public key with the attributes of the city node based on the master key and the attributes of the city node:

[0057]

[0058] in, PK represents the public key, X i Represents the first public key parameter, Y i Represents the second public key parameter, g represents the generator, H 1 represents the first hash function, i Indicates the attribute index value of the city node. H 2 represents the second hash function.

[0059] Alternatively, the first hash function and the second hash function may specifically be a SHA-256 hash function, a SHA-3 hash function, a Blake2 hash function, a RIPEMD-160 hash function, and the like.

[0060] Optionally, the city node attributes include: administrative level (eg, provincial, municipal, district). City nodes with different attributes have different permissions.

[0061] Based on the master key and the attributes of the city node, a private key with the attributes of the city node is generated:

[0062]

[0063] in, SK Represents the private key, D i Represents the first private key parameter, K i Represents the second private key parameter, and mod represents the modulus operation.

[0064] In the present invention, public and private keys are generated based on the master key and by using simple hash and modulo operations, which has a small amount of calculation and is suitable for resource-constrained environments. The generated key pair requires a small storage space, and the public and private keys can be directly used in the encryption and decryption process, avoiding complex key management and storage requirements.

[0065] Furthermore, by introducing the attribute index value of the city node into the key generation process, the generated public-private key pair is tightly bound to the specific city node, ensuring that each node has a unique key pair, which helps with identity authentication and permission control.

[0066] S4: The data storage system returns a content identifier of the data packet and records the storage location of the data packet.

[0067] Optionally, the content identifier is specifically a hash value of the data packet. This means that each data packet has a unique identifier that is closely related to the data packet content. Any modification to the data packet content will result in a change in the hash value, making it easy to detect whether the data packet has been tampered with.

[0068] S5: The city node broadcasts the content identifier of the data packet to the blockchain.

[0069] It should be noted that recording the content identifier and storage location of the data packet on the blockchain can achieve decentralized storage and access. This design allows data to be accessed by multiple nodes without relying on a single centralized storage system, enhancing the reliability and availability of the system. By utilizing the trustless nature of the blockchain, city nodes do not need to trust the operator of the data storage system, but only need to trust the consensus mechanism and recorded data on the blockchain.

[0070] S6: The blockchain returns the transaction ID and content identifier location to the city node.

[0071] S7: When the current city node queries the credit of the target user, it initiates a query request to the target city node in a different location that contains the credit behavior data of the target user.

[0072] S8: The target city node collects the voting results of other city nodes. When the number of support votes from other city nodes is greater than the preset number, the target city node generates a key for the current city node and returns the key, transaction ID and content identifier location to the current city node.

[0073] Among them, those skilled in the art can set the size of the preset number according to actual conditions, and the present invention does not limit it.

[0074] It should be noted that the voting mechanism is used to decide whether to allow access to data, which increases the security of data access. Multiple city nodes participate in voting to ensure that data can only be accessed when the vast majority of nodes agree, avoiding the risks brought by single-node decision-making. Voting through a consensus mechanism can effectively verify the legitimacy and correctness of the data and ensure that the returned data is accurate.

[0075] S9: The current city node searches for the smart contract based on the transaction ID and the content identifier location and retrieves the content identifier.

[0076] It should be noted that the operations of smart contracts are recorded on the blockchain, and any modification or access operations are transparent and traceable, which enhances the credibility of the system.

[0077] S10: The current city node downloads the data packet from the data storage system according to the content identifier.

[0078] S11: The current city node decrypts the data packet using the key and obtains the credit behavior data and credit label of the target user recorded by other city nodes.

[0079] In a possible implementation manner, the target city node in S11 decrypts the data packet using a key, specifically:

[0080] Use the private key of the target city node to decrypt the data packet:

[0081]

[0082] in, C Represents the original data packet, SK Represents the private key, E Indicates encrypted data packets. DEC Represents the decryption function.

[0083] S12: The current city node determines the comprehensive credit of the target user based on the credit labels of the target user in each city node and the city credit score ranking table of each city node.

[0084] Optionally, the city credit score ranking table is stored in the blockchain, and the city credit score ranking table includes the credit score and ranking of each city node.

[0085] It should be noted that the credit score and ranking data stored in the blockchain are open and transparent to all nodes and can be viewed by any participant. This enhances the transparency of the system and helps build trust. The credit scores and rankings of all city nodes are based on the same rules and algorithms, and these rules and algorithms are open and transparent on the blockchain, ensuring the fairness of the evaluation process.

[0086] In a possible implementation, the credit score of a city node is specifically:

[0087]

[0088] in, Cre i Indicates i The credit of a city node, T i Indicates i The online time rating of city nodes, l 1 represents the weight coefficient of online time rating, P i Indicates i The positive behavior scores of city nodes, l 2 represents the weight coefficient of positive behavior score, N i Indicates i The negative behavior scores of city nodes, l 3 represents the weight coefficient of negative behavior score.

[0089] Among them, those skilled in the art can set the weight coefficient of online time scoring according to actual conditions. l 1. Weight coefficient of positive behavior score l 2 and the weight coefficient of negative behavior score l The size of 3 is not limited in the present invention.

[0090] In the present invention, by incorporating online time, positive behavior and negative behavior into the scoring system, the performance of city nodes is comprehensively evaluated to avoid the deviation that may be caused by a single indicator. Online time scoring can encourage nodes to stay online for a long time, improve the reliability and stability of the system, and ensure the availability of the network. Through positive behavior scoring, city nodes are encouraged to participate in beneficial activities, such as continuously verifying transactions, submitting new transactions, and responding to requests from other nodes. Through negative behavior scoring, bad behaviors are punished, such as submitting expired, duplicate or incorrect transaction information, and unverified transactions, to suppress negative behaviors.

[0091] Optionally, the online time rating is specifically:

[0092]

[0093] in, t i Indicates i exp represents the exponential function with a natural constant as the base.

[0094] It should be noted that the use of Sigmoid function to calculate the online time score can achieve smooth transition and nonlinear enhancement of the online time score, suppress the influence of extreme values, and has good mathematical properties and computational efficiency. This method can not only effectively distinguish nodes with different online time, but also ensure the stability and rationality of the scoring system, and is suitable for various practical application scenarios.

[0095] Optionally, the positive behavior score is specifically:

[0096]

[0097] in, P i,1 Indicates i The continuous verification of newly generated transaction behaviors by city nodes, α 1 represents the weight coefficient for continuously verifying newly generated transactions. P i,2 Indicates i The score of the continuous transaction submission behavior of the city node, α 2 represents the weight coefficient of continuous transaction submission behavior. P i,3 Indicates i The score of a city node's active response to other city nodes' requests, α 3 represents the weight coefficient of actively responding to requests from other city nodes.

[0098] It should be noted that by scoring the behaviors of continuously verifying newly generated transactions, continuously submitting transactions, and actively responding to requests from other city nodes, the positive performance of city nodes in the network can be comprehensively evaluated. At the same time, different types of positive behaviors (such as verification, submission, and response) all play an important role in the network. By refining the scoring, nodes can be encouraged to actively participate and contribute in multiple aspects, improving the efficiency and stability of the overall network.

[0099] Among them, technicians in this field can set the weight coefficient for continuous verification of newly generated transaction behaviors according to actual conditions. α 1. Weight coefficient for continuous transaction submission α 2 and the weight coefficient of actively responding to requests from other city nodes α The size of 3 is not limited in the present invention.

[0100] The scores for continuously verifying newly generated transactions are as follows:

[0101]

[0102] in, VN i Indicates the first i The number of times a city node verifies newly generated transactions, TN Indicates the total number of blockchain transactions within a preset time period.

[0103] The scores for continuous transaction submission are as follows:

[0104]

[0105] in, GN i Indicates the first i The number of new transactions submitted by the city node.

[0106] The scores for actively responding to requests from other city nodes are as follows:

[0107]

[0108] in, Indicates i The average response time of a city node in response to requests from other city nodes, t 0 indicates the response time threshold.

[0109] Among them, those skilled in the art can set the size of the response time threshold according to actual conditions, and the present invention does not limit it.

[0110] Optionally, the negative behavior score is specifically:

[0111]

[0112] in, N i,1 Indicates i The score of the city node's behavior of continuously submitting expired transaction verification information, β 1 represents the weight coefficient for continuously submitting expired transaction verification information. N i,2 Indicates i The score of the repeated transaction behavior submitted by the city nodes continuously, β 2 represents the weight coefficient for continuous submission of repeated transactions. N i,3 Indicates i The score of the behavior of continuously submitting incorrect verification information for the city nodes, β3 represents the weight coefficient for continuously submitting incorrect verification information. N i,4 Indicates i The score of the city nodes that have not verified transactions continuously, β 4 represents the weight coefficient for the behavior of continuously not verifying the transaction.

[0113] It should be noted that by scoring a variety of negative behaviors (such as submitting expired transactions, duplicate transactions, incorrect verification information, and not verifying transactions), the negative behaviors of nodes can be more comprehensively identified and evaluated. At the same time, scoring and punishing the behavior of submitting incorrect verification information can effectively reduce the error information in the system and improve the data accuracy and reliability of the system.

[0114] Among them, those skilled in the art can set the weight coefficient of the behavior of continuously submitting expired transaction verification information according to actual conditions. β 1. Weight coefficient for continuous submission of repeated transactions β 2. Weight coefficient for continuous submission of incorrect verification information β 3 and the weight coefficient of the continuous failure to verify the transaction β 4 Size is not limited in the present invention.

[0115] The scores for continuously submitting expired transaction verification information are as follows:

[0116]

[0117] in, ON i Indicates the first i The number of times a city node submits expired transaction verification information, TN Indicates the total number of blockchain transactions within a preset time period.

[0118] The specific scores for continuous submission of repeated transactions are:

[0119]

[0120] in, RN i Indicates the first i The number of duplicate transactions submitted by a city node.

[0121] The specific scores for the behavior of continuously submitting incorrect verification information are:

[0122]

[0123] in, WN i Indicates the first iThe number of times a city node submitted incorrect verification information.

[0124] The scores for continued failure to verify transactions are as follows:

[0125]

[0126] in, n.t. i Indicates i The duration of time that a city node does not verify any transaction, n.t. 0 indicates the duration threshold.

[0127] Among them, those skilled in the art can set the duration threshold value according to actual conditions, and the present invention does not limit it.

[0128] In a possible implementation, S12 specifically includes sub-steps S121 to S125:

[0129] S121: Obtain the credit label of each city node for the target user m , when the city node believes that the target user has good credit, the credit label , when the city node believes that the target user has poor credit, the credit label .

[0130] S122: Obtain the credit score of each city node in the city credit score ranking table.

[0131] S123: Determine the weight of each city node according to the credit score of each city node:

[0132]

[0133] in, m i Indicates i The weight of a city node, Cre i Indicates i The credit of a city node, I Represents a collection of city nodes.

[0134] It should be noted that the evaluation weight of each city node is based on its own credit score, ensuring that nodes with high credit have greater influence in the comprehensive evaluation and improving the fairness of the evaluation. At the same time, the weight is calculated dynamically and can be automatically adjusted as the credit score of the city node changes, maintaining the real-time and accuracy of the evaluation.

[0135] S124: Calculate the comprehensive credit score of the target user:

[0136]

[0137] in, M Indicates the comprehensive credit score. m i Indicates i The credit label of the target user for each city node.

[0138] It should be noted that by obtaining the credit labels of multiple city nodes, the credit performance of target users in different cities can be fully reflected, avoiding the deviation that may be caused by the evaluation of a single node. The information of multiple data sources is used to ensure the comprehensiveness and accuracy of credit assessment.

[0139] S125: Determine whether the comprehensive credit score of the target user is higher than the credit score threshold. If so, determine that the comprehensive credit of the target user is good. Otherwise, determine that the comprehensive credit of the target user is poor.

[0140] Among them, those skilled in the art can set the credit score threshold according to actual conditions, and the present invention does not limit it.

[0141] In the present invention, the system can comprehensively and accurately evaluate the credit status of the target user. The multi-node, multi-dimensional comprehensive evaluation not only improves the fairness and accuracy of the evaluation results, but also enhances the anti-manipulation and adaptability of the system.

[0142] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0143] In the present invention, a city data storage architecture is constructed based on blockchain technology. After collecting the credit behavior data and credit labels of users in the city, each city node can encrypt and store them in the blockchain for call by other city nodes, ensuring that the information between each city node is updated synchronously, realizing the off-site accumulation of users' credit behavior, improving the integrity and security of users' credit information, improving the convenience and fairness of users in obtaining financial and social services in different cities, and reducing the management costs of various cities and institutions.

[0144] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a blockchain-based urban data storage system provided by the present invention.

[0145] The present invention also provides a blockchain-based urban data storage system 20, which is applied to the above-mentioned blockchain-based urban data storage method, including:

[0146] Processor 201;

[0147] The memory 202 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 201, the blockchain-based urban data storage method as described in the method embodiment is implemented.

[0148] The blockchain-based urban data storage system 20 provided by the present invention can execute the above-mentioned blockchain-based urban data storage method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0149] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0150] In the present invention, a city data storage architecture is constructed based on blockchain technology. After collecting the credit behavior data and credit labels of users in the city, each city node can encrypt and store them in the blockchain for call by other city nodes, ensuring that the information between each city node is updated synchronously, realizing the off-site accumulation of users' credit behavior, improving the integrity and security of users' credit information, improving the convenience and fairness of users in obtaining financial and social services in different cities, and reducing the management costs of various cities and institutions.

[0151] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0152] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0153] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0154] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0155] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0156] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0157] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0158] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0159] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0162] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0163] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the blockchain-based urban data storage method as described in the method embodiment is implemented.

[0164] A computer-readable storage medium provided by the present invention can implement the steps and effects of the blockchain-based urban data storage method of the above-mentioned method embodiment. To avoid repetition, the present invention will not go into details.

[0165] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0166] In the present invention, a city data storage architecture is constructed based on blockchain technology. After collecting the credit behavior data and credit labels of users in the city, each city node can encrypt and store them in the blockchain for call by other city nodes, ensuring that the information between each city node is updated synchronously, realizing the off-site accumulation of users' credit behavior, improving the integrity and security of users' credit information, improving the convenience and fairness of users in obtaining financial and social services in different cities, and reducing the management costs of various cities and institutions.

[0167] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0168] There are a few points to note:

[0169] (1) The drawings of the embodiments of the present invention only involve structures related to the embodiments of the present invention. Other structures may refer to conventional designs.

[0170] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0171] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0172] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A blockchain-based urban data storage method, characterized in that: include: S1: City nodes collect the target user’s credit behavior data in the current city; S2: The city node adds a credit tag to the target user based on the credit behavior data; S3: The city node packages the credit behavior data and the credit label into a data packet, encrypts the data packet, and uploads it to the data storage system; S4: the data storage system returns the content identifier of the data packet and records the storage location of the data packet; S5: The city node broadcasts the content identifier of the data packet to the blockchain; S6: The blockchain returns the transaction ID and content identifier location to the city node; S7: When the current city node queries the credit of the target user, it initiates a query request to a target city node in a different location that contains the credit behavior data of the target user; S8: The target city node collects the voting results of other city nodes. When the number of support votes cast by other city nodes is greater than the preset number, the target city node generates a key for the current city node and returns the key, transaction ID, and content identifier location to the current city node. S9: The current city node searches for the smart contract based on the transaction ID and the content identifier location, and retrieves the content identifier; S10: The current city node downloads the data packet from the data storage system according to the content identifier; S11: The current city node decrypts the data packet using the key and obtains the credit behavior data and credit label of the target user recorded by other city nodes; S12: The current city node determines the comprehensive credit of the target user according to the credit labels of the target user in each city node and the city credit score ranking table of each city node; Wherein, the S12 specifically includes: S121: Obtain the credit label of each city node for the target user m , when the city node believes that the target user has good credit, the credit label , when the city node believes that the target user has poor credit, the credit label ; S122: Obtaining the credit score of each city node in the city credit score ranking table; S123: Determine the weight of each city node according to the credit score of each city node; S124: Calculate the comprehensive credit score of the target user: in, M Indicates the comprehensive credit score. μ i Indicates i The weight of a city node, m i Indicates i The credit label of the target user for each city node. I Represents a collection of city nodes; S125: Determine whether the comprehensive credit score of the target user is higher than a credit score threshold; if so, determine that the comprehensive credit of the target user is good; otherwise, determine that the comprehensive credit of the target user is poor.

2. The method for storing urban data based on blockchain according to claim 1, characterized in that: The step S3 packs the credit behavior data and the credit tag into a data packet and then performs encryption processing, specifically: The data packet is encrypted using the public key of the city node and a pseudo-random number: in, E Indicates encrypted data packets. PK represents the public key, C Represents the original data packet, N represents a pseudo-random number, Enc Represents an encryption function.

3. The method for storing urban data based on blockchain according to claim 2 is characterized in that: The target city node in S11 decrypts the data packet using the key, specifically: Use the private key of the target city node to decrypt the data packet: in, C Represents the original data packet, SK Represents the private key, E Indicates encrypted data packets. DEC Represents the decryption function.

4. The method for storing urban data based on blockchain according to claim 1 is characterized in that: The content identifier is a hash value of the data packet.

5. The blockchain-based urban data storage method according to claim 1 is characterized in that: The city credit score ranking table is stored in the blockchain.

6. The method for storing urban data based on blockchain according to claim 5 is characterized in that: The city credit score ranking table includes the credit score and ranking of each city node.

7. The blockchain-based urban data storage method according to claim 6 is characterized in that: The credit scores of the city nodes are specifically: in, Cre i Indicates i The credit of a city node, T i Indicates i The online time rating of city nodes, λ 1 represents the weight coefficient of online time rating, P i Indicates i The positive behavior scores of city nodes, λ 2 represents the weight coefficient of positive behavior score, N i Indicates i The negative behavior scores of city nodes, λ 3 represents the weight coefficient of negative behavior score.

8. The method for storing urban data based on blockchain according to claim 1, characterized in that: The weights of the city nodes are specifically as follows: in, μ i Indicates i The weight of a city node, Cre i Indicates i The credit of a city node, I Represents a collection of city nodes.

9. A blockchain-based urban data storage system, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the blockchain-based urban data storage method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Credit recording and inquiring method and device based on block chain and electronic equipment

    CN110135844A

  • Block chain technology-based smart city metropolitan area network architecture method

    CN113037464A