A resource allocation method and device based on a blockchain and static code, and a medium

By combining blockchain and static codes, resource codes and timestamps are generated, solving the problems of complex resource allocation and traceability, achieving simplified management and reliable traceability, and ensuring the reliability of resource allocation.

CN111930497BActive Publication Date: 2025-11-07INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010588154.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-24
Publication Date
2025-11-07
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

In existing technologies, the resource allocation process is complex and difficult to trace, especially when there are large quantities of resources or quality issues, making management and record keeping difficult.

Method used

A resource allocation method based on blockchain and static codes is adopted. Static codes are generated by generating resource codes, timestamps and serial numbers, and then written into the blockchain platform to achieve the binding of resources with static codes.

Benefits of technology

It simplifies resource allocation management, ensures the traceability of resource allocation and the authenticity and reliability of data, prevents tampering, and protects user interests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111930497B_ABST
    Figure CN111930497B_ABST
Patent Text Reader

Abstract

The application discloses a resource allocation method and device based on a blockchain and a static code, and a medium. The method comprises the following steps: determining a resource to be allocated; determining a resource code corresponding to the resource, and / or determining a serial number corresponding to the resource; generating a static code according to the source code, a timestamp, the serial number, and a corresponding code feature prefix, and writing the static code into a pre-created blockchain platform; and binding the static code with the resource, so as to allocate the resource. The serial number is added in the generation process of the static code, which can facilitate a production manager to record and input the static code. Moreover, since the blockchain platform is distributed storage, data tampering of a single node cannot take effect, so that the data on the blockchain platform is real and credible. When an abnormal situation occurs, each node in the blockchain platform can trace the static code at any time, thereby protecting the interests of users.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of resource allocation, in particular to a resource allocation method and device based on a blockchain and a static code, and a medium. BACKGROUND

[0002] With the development of science and technology, users need to allocate corresponding resources in the process of handling business, enterprises or institutions in the process of generating and processing. However, in the prior art, the allocation of resources still has the following problems:

[0003] 1. When the number of resources is large, the allocation process of the resources and the management record after the allocation of the resources will be more complex.

[0004] 2. When the quality of the allocated resources is problematic, the user has difficulty in tracing back. SUMMARY

[0005] In order to solve the above problems, the present application provides a resource allocation method based on a blockchain and a static code, which comprises: determining a resource to be allocated; determining a resource code corresponding to the resource based on the type of the resource and a preset correspondence, and / or determining a serial number corresponding to the resource according to the order of allocating the resource; generating a static code corresponding to the resource according to at least one of the resource code, the current timestamp and the serial number, and a corresponding code feature prefix, and writing the static code into a pre-created blockchain platform; and binding the static code with the resource to facilitate the allocation of the resource.

[0006] In one example, before generating the static code corresponding to the resource according to at least one of the resource code, the current timestamp and the serial number, and the corresponding code feature prefix, the method further comprises: generating a check code according to at least one of the resource code, the current timestamp and the serial number, and a preset algorithm; and generating the static code corresponding to the resource according to at least one of the resource code, the current timestamp and the serial number, and the corresponding code feature prefix, comprises: generating a digital code according to at least one of the resource code, the timestamp and the serial number, and the check code; and generating the static code corresponding to the resource according to the digital code and the corresponding code feature prefix.

[0007] In one example, generating the check code according to at least one of the resource code, the current timestamp and the serial number, and the preset algorithm comprises: concatenating the resource code, the timestamp and the serial number, and then obtaining a hash value by using a hash algorithm; and using all or part of the characters of the hash value as the check code.

[0008] In one example, the generating the digital code according to at least one of the resource code, the timestamp, the serial number, and the check code comprises: concatenating the resource code, the timestamp, the serial number, and the check code to generate the digital code.

[0009] In one example, the method further comprises: writing the generation process of the static code into the blockchain platform, wherein the generation process comprises at least one of the preset correspondence, the resource code, the serial number, the timestamp, the preset algorithm, the check code, and the code feature prefix.

[0010] In one example, the method further comprises: generating a corresponding smart contract and deploying it in the blockchain platform, wherein the smart contract is configured to: determine the resource code corresponding to the resource based on the type of the resource and the preset correspondence; determine the serial number corresponding to the resource according to the order of allocating the resource; generate the static code corresponding to the resource according to at least one of the resource code, the current timestamp, and the serial number, and the corresponding code feature prefix; and write the static code into the pre-created blockchain platform.

[0011] In one example, determining the serial number corresponding to the resource according to the order of allocating the resource comprises: determining the sequence corresponding to the resource code; determining the order of allocating the resource in the sequence; and determining the serial number corresponding to the resource according to the order.

[0012] In one example, determining the resource to be allocated comprises: determining the resource to be allocated according to the received service request; and determining the serial number corresponding to the resource according to the order of allocating the resource comprises: determining the application when the service request is executed; determining the application ID corresponding to the application; determining the sequence corresponding to the application ID; determining the order of allocating the resource in the sequence; and determining the serial number corresponding to the resource according to the order.

[0013] In another aspect, the present application also provides a resource allocation device based on a blockchain and a static code, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: determine a resource to be allocated; determine a resource code corresponding to the resource based on a type of the resource and a preset correspondence relationship, and / or determine a sequence number corresponding to the resource according to an order of allocating the resource; generate a static code corresponding to the resource according to at least one of the resource code, a current timestamp, the sequence number, and a corresponding code feature prefix, and write the static code into a pre-created blockchain platform; and bind the static code with the resource to facilitate allocation of the resource.

[0014] In another aspect, the present application also provides a non-volatile computer storage medium for resource allocation based on a blockchain and a static code, which stores computer executable instructions configured to: determine a resource to be allocated; determine a resource code corresponding to the resource based on a type of the resource and a preset correspondence relationship, and / or determine a sequence number corresponding to the resource according to an order of allocating the resource; generate a static code corresponding to the resource according to at least one of the resource code, a current timestamp, the sequence number, and a corresponding code feature prefix, and write the static code into a pre-created blockchain platform; and bind the static code with the resource to facilitate allocation of the resource.

[0015] The resource allocation method based on a blockchain provided by the present application can bring the following beneficial effects:

[0016] In the process of resource allocation, by setting a static code and binding the static code with the resource, the allocation of the resource can be more easily managed. Moreover, by adding a sequence number in the generation process of the static code, the production manager can further record and input the static code, and even if a large number of static codes are generated in the process of allocating the resource, the sequence number can be used for management and recording. Furthermore, since the blockchain platform is distributed storage, data tampering of a single node will not take effect, thus ensuring the authenticity and credibility of the data on the blockchain platform. When an abnormal situation occurs, each node in the blockchain platform can trace the static code at any time, thus protecting the interests of the user. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate certain illustrative embodiments of the present application and together with the description serve to explain the present application. In the drawings:

[0018] Figure 1 A flowchart of a resource allocation method based on a blockchain and a static code in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a resource allocation device based on a blockchain and a static code in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a resource allocation method based on a blockchain and a static code in an embodiment of the present application. DETAILED DESCRIPTION

[0021] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described below in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0022] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the drawings.

[0023] As shown in Figure 1 the present application provides a resource allocation method based on a blockchain and a static code, wherein the static code is a built-in rule for generating a digital code, and can generate a long-term valid code. The method comprises:

[0024] S101, determining a resource to be allocated.

[0025] The reason for resource allocation can be various, for example, it can be that a user places an order on a network or handles a business, and needs to allocate corresponding resources to the user. It can also be that an enterprise allocates corresponding resources to a subordinate manufacturer or a distributor in the production process of a product. It can also be that when making a charitable donation, the donated resources need to be allocated to a corresponding institution or individual. The reason for resource allocation is not further limited here.

[0026] The type of resource can include products, goods, and the like with entities. For example, the entity resource can be sports equipment, teaching resources such as books, etc. It can also be electronic products such as computers, mobile phones, chips, etc. It can also be household resources such as tables, chairs, kitchen utensils, etc. The type of resource can also include virtual products without entities, for example, the resource can be currency, tokens, digital currency, etc. stored in electronic form, it can also be digital tickets such as tickets, entrance tickets, and coupons purchased by a user through a network and stored in the network, and it can also be a program, an account ID, an account password, etc. The types of resources contained and how to classify the types are not limited here.

[0027] In determining the resource to be allocated, it can be determined in various ways such as actively or passively. For example, it can be determined passively after receiving the corresponding service request of the user through the service. It can also be determined actively after the product is produced and processed. How to determine the resource to be allocated is not limited here.

[0028] The determined resource to be allocated refers to the relevant information of the determined resource to be allocated, which can include the type of the resource, the quantity of the resource, the source of the resource, the target of the allocation and other relevant information, which is not described here.

[0029] S102, based on the type of the resource and the preset corresponding relationship, determine the resource code corresponding to the resource, and / or, according to the order of allocating the resource, determine the sequence number corresponding to the resource.

[0030] When the resource to be allocated is determined, the resource code and / or sequence number can be determined according to the relevant information of the resource, so as to generate the static code corresponding to the resource.

[0031] Specifically, the resource code corresponding to the resource can be determined according to the type of the resource and the preset corresponding relationship. The main function of the resource code is to classify the resource according to the relevant information of the resource. The type of the resource can be determined based on the nature of the resource itself, or can be determined according to the tool used for allocation (such as program or APP, etc.), or can be determined according to the target of the resource allocation, which is not described here. The corresponding relationship of the resource code can be set by the resource allocator or the corresponding application developer, or can be set by multiple allocators or developers after agreeing on the rules. The resource code can be composed of 1-4 digits, such as 8801 shown in Figure 3 .

[0032] The sequence number corresponding to the resource can also be determined according to the order of allocating the resource. The sequence number can refer to the order number corresponding to the resource from the beginning of the system to the allocation of the resource. It can also refer to the order number at the moment of generating the code, which can be composed of 4-10 digits, which can be automatically generated by the corresponding platform or system according to the order of the code request. Here, the code request corresponds to the process of resource allocation. Each resource may need to generate several static codes in the process of allocation, so there are several code requests. For example, as shown in Figure 3 , when the first code request is received, the sequence number can be defined as 00000001, when the second code request is received, the sequence number can be defined as 00000002, and so on.

[0033] Further, when generating the serial number, if all resources use one sequence, it is likely to cause the serial number to be too long. Therefore, each resource code can be made to exclusively use one sequence. When determining the serial number, first determine the sequence corresponding to the resource code, and then in the sequence corresponding to the resource code, generate the code request according to the order of allocating the resource.

[0034] Alternatively, when allocating resources is based on received service requests, resources are allocated, the application used to execute the service request can be determined first. Among them, the service request can be a purchase request, and the corresponding resource can be a purchased product, or the service request can be a storage request of the relevant information of the product or other resources in the process of generating processing or after completion. The application can be an APP on a terminal such as a smart phone, a tablet computer, etc., or an application for various operating systems on a computer. Generally, each application will have its corresponding application ID, which can also be called APPID. The application ID can uniquely identify the corresponding application in the application store on the device. Therefore, the application ID corresponding to the required application can be determined, and then each application ID exclusively uses one sequence, and the serial number corresponding to the resource is determined according to the order of allocating the resource in the sequence.

[0035] S103, according to at least one of the resource code, the current timestamp, the serial number, and the corresponding code characteristic prefix, generate the static code corresponding to the resource, and write the static code into the pre-created blockchain platform.

[0036] After determining the resource code and the serial number, the static code corresponding to the resource can be generated according to one or more of the resource code, the current timestamp, the serial number, and the corresponding code characteristic prefix, and the static code is written into the pre-created blockchain platform. Among them, the digital code can be generated according to at least one of the resource code, the timestamp, and the serial number, and then the static code is generated according to the code characteristic prefix and the digital code. The timestamp can be the UTC time at the moment of code generation, which can be accurate to milliseconds, and has many formats such as "YYYYMMDDhhmmssSSS", "YYYYMMDDhhmmss", "YYYYMMDDhhmm", "YYYYMMDDhh", "YYYYMMDD", "YYMMDD", "YYYYMM", "YYMM", etc. Here, the specific format is not limited, and the specific format can be, for example Figure 3 1582179788 shown.

[0037] Specifically, the blockchain (Blockchain) is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. computer technology, which is essentially a decentralized database.

[0038] Firstly, a blockchain platform created based on a blockchain framework can be determined. The blockchain framework can be any blockchain framework capable of implementing the corresponding functions of the embodiments of the present application, such as Bitcoin, Ethereum, Fabric, Corda, etc. The blockchain platform can refer to a platform for storing a blockchain, such as a distributed system, etc. Of course, the blockchain platform can also directly represent the blockchain itself, which is not limited here.

[0039] The blockchain platform includes a plurality of nodes, which can include a party generating a static code, such as an enterprise, an institution, etc., and a party receiving the static code, such as a user conducting a business, etc., which will not be described here.

[0040] When generating the digital code, it can be obtained by splicing in the corresponding order, for example, in the order of resource code, timestamp, serial number, and other orders which will not be described here. In the splicing process, only the resource code, timestamp, and serial number can be spliced, or corresponding characters can be added to the resource code, timestamp, and serial number, such as adding “-”, “_”, “.”, etc. between the resource code and the timestamp, which is not limited here. After splicing, the spliced string can be directly used as a digital code, or a corresponding algorithm can be performed on the spliced string to obtain a digital code. The algorithm referred to here is usually a reversible algorithm, so that the subsequent user nodes can perform corresponding verification.

[0041] After generating the digital code, a code feature prefix can be added before the digital code, and then a static code can be generated through the code feature prefix and the digital code. The code feature prefix is a specific URL starting with http and ending with “ / ”, which complies with the url writing rules. Usually, the static code generated here can be represented as a two-dimensional code, and the common two-dimensional code can be a QR two-dimensional code, i.e. QR Code, which stands for Quick Response. After generating the static code, the static code can be written into the blockchain platform for storage, and the corresponding nodes can perform corresponding business operations or verification after obtaining the static code. Of course, before writing the static code into the blockchain platform, the static code can be encrypted through the public key of the corresponding node, and then written into the blockchain platform. The corresponding node can use its own private key to decrypt the static code to obtain the static code.

[0042] S104, binding the static code with the resource to facilitate allocation of the resource.

[0043] Once the static code of a resource is determined, it can be bound to the resource to facilitate subsequent resource allocation and static code verification. This binding is typically one-to-one; that is, each resource corresponds uniquely to each static code, and information about the resource can be obtained by scanning each static code. After binding, the corresponding binding relationship can be stored, either within the relevant system or platform, or in a pre-created blockchain platform.

[0044] In one embodiment, after determining the resource code and / or serial number, a checksum can be generated based on one or more of the resource code, timestamp, and serial number using a preset algorithm. Specifically, the resource code, timestamp, and serial number can be concatenated, and then a hash value is obtained using a hash algorithm. The hash value, or a portion of the hash value (e.g., the last 1-6 digits), is then used as the checksum. The hash algorithm can include, for example, hash256, and the concatenation method can be as described in the previous embodiment, and will not be repeated here. Verification using a checksum can prevent static codes from being guessed and misused. Specifically, for example... Figure 3 AE8M in the code is the checksum.

[0045] In this case, when generating a digital code, in addition to one or more of the resource code, timestamp, and serial number, a check digit can also be added to generate the digital code. For example, one or more of the resource code, timestamp, and serial number can be concatenated to obtain a string, and then this string can be concatenated with the check digit. The concatenated result is recorded as the digital code.

[0046] Furthermore, the generation process of static codes can be written into the blockchain platform to facilitate verification. The generation process refers to the entire process from preparation to the final generation of the static code. The correspondences, algorithms, and related data used in this process can all be written into the blockchain platform as part of the generation process. Specifically, this may include preset correspondences, resource codes, serial numbers, timestamps, preset algorithms, checksums, and code feature prefixes. When a node performs verification, it can first extract the numerical code portion from the parameters corresponding to the code, then calculate the checksum using a preset algorithm, and verify the checksum's validity. If the checksum is valid, the numerical code can be further broken down to obtain its individual parts, and these parts can be compared to determine their correctness.

[0047] Of course, the corresponding smart contract can also be generated in advance and deployed in the blockchain platform. The smart contract can be used for code generation and related processing, and can be used for: determining a resource code corresponding to the resource based on the type of the resource and a preset correspondence relationship; determining a sequence number corresponding to the resource according to an order of allocating the resource; generating a static code corresponding to the resource according to at least one of the resource code, a current timestamp and the sequence number, and a corresponding code feature prefix; and writing the static code into a pre-created blockchain platform.

[0048] Since the smart contract on the blockchain platform is public, each node can check whether the smart contract meets the pre-agreement and deploy it on its own node. Therefore, the degree of automation is improved, and the degree of trust of each node is also increased. The smart contract can only be changed by upgrading, needs to be deployed synchronously by each node, and once deployed, it can only be executed by the program without human intervention, thereby enhancing the credibility of the data.

[0049] As shown in Figure 2 The embodiment of the application also provides a static coding device based on a blockchain, which comprises:

[0050] at least one processor; and

[0051] a memory in communication connection with the at least one processor; wherein

[0052] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0053] determine a resource to be allocated;

[0054] determine a resource code corresponding to the resource based on the type of the resource and a preset correspondence relationship, and / or determine a sequence number corresponding to the resource according to an order of allocating the resource;

[0055] generate a static code corresponding to the resource according to at least one of the resource code, a current timestamp and the sequence number, and a corresponding code feature prefix, and write the static code into a pre-created blockchain platform;

[0056] bind the static code to the resource to facilitate allocation of the resource.

[0057] The embodiment of the application also provides a non-volatile computer storage medium for static coding based on a blockchain, which stores computer executable instructions, and the computer executable instructions are configured to:

[0058] determine a resource to be allocated;

[0059] determine the resource encoding corresponding to the resource based on the type of the resource and a preset correspondence, and / or determine a sequence number corresponding to the resource according to an order in which the resource is allocated;

[0060] generate a static code corresponding to the resource according to at least one of the resource encoding, a current timestamp, and the sequence number, and a corresponding code feature prefix, and write the static code into a pre-created blockchain platform;

[0061] bind the static code to the resource, so as to allocate the resource.

[0062] Each of the embodiments in the present application is described in a progressive manner, and the same and similar parts of each of the embodiments can be referred to each other. Each of the embodiments mainly describes the difference from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.

[0063] The device and medium provided by the embodiments of the present application are one-to-one corresponding to the method, and therefore, the device and medium also have the similar beneficial technical effects as the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be described here.

[0064] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0065] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The function of the device specified in one flow or multiple flows and / or blocks Figure 1 The function of the device specified in one flow or multiple flows and / or blocks

[0066] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the multiple flows or blocks.

[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the multiple flows or blocks.

[0068] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0069] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.

[0070] Computer readable media includes permanent and non-permanent, moveable and non- moveable media that can be implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that is accessible to a computing device. According to the definition provided herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0071] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0072] The above description is merely illustrative of the application, and not restrictive. Various modifications and changes can become apparent to those skilled in the art. Incorporating any modification, equivalent substitution, improvement, etc. within the spirit and principle of the application, shall be included in the scope of the claims of the application.

Claims

1. A resource allocation method based on blockchain and static code, characterized in that, The method comprises: determining a resource to be allocated; determining a resource code corresponding to the resource based on the type of the resource and a preset correspondence, and / or determining a sequence number corresponding to the resource according to the order of allocating the resource; concatenating the resource code, timestamp, and sequence number, and obtaining a hash value through a hash algorithm; the timestamp is the UTC time at the moment of code generation, accurate to milliseconds; using all or part of the bits in the hash value as a check code; generating a digital code by concatenating the resource code, timestamp, sequence number, and check code; generating a static code corresponding to the resource according to the digital code and a corresponding code feature prefix, and writing the static code into a pre-created blockchain platform; binding the static code with the resource to facilitate allocation of the resource; each resource corresponds to one static code, and the information of the resource corresponding to each static code is obtained by scanning each static code; determining a resource to be allocated, comprising: determining a resource to be allocated according to a received service request; determining a sequence number corresponding to the resource according to the order of allocating the resource, comprising: determining an application for executing the service request; determining an application ID corresponding to the application; determining a sequence corresponding to the application ID; determining the order of allocating the resource in the sequence; determining a sequence number corresponding to the resource according to the order; The method further comprises: encrypting the static code through the public key of the corresponding node and writing it into the blockchain platform; wherein the static code is obtained by decrypting the static code using the private key of the corresponding node; writing the generation process of the static code into the blockchain platform, wherein the generation process comprises at least one of the preset correspondence, the resource code, the sequence number, the timestamp, the preset algorithm, the check code, and the code feature prefix; The method further comprises: generating a corresponding smart contract and deploying it in the blockchain platform, wherein the smart contract is used to: determine a resource code corresponding to the resource based on the type of the resource and a preset correspondence; each resource code has a unique sequence; determine a sequence number corresponding to the resource according to the order of allocating the resource; generate a static code corresponding to the resource according to at least one of the resource code, the current timestamp, and the sequence number, and a corresponding code feature prefix; write the static code into a pre-created blockchain platform.

2. A blockchain and static code based resource allocation device, characterized by, comprise: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the resource allocation method based on blockchain and static code in claim 1. 3.A non-transitory computer storage medium storing computer-executable instructions for resource allocation based on blockchain and static code, the computer-executable instructions comprising instructions for: The computer executable instructions are set to perform the resource allocation method based on blockchain and static code in claim 1. ​

Citation Information

Patent Citations

  • Urban resource digitization management method and device and computer storage medium

    CN110781645A

  • Block chain-based electronic coupon issuing method and device, and medium

    CN110930196A