Campus commodity inventory management method based on block chain

By building a campus merchandise inventory management system on the blockchain, the problem of fragmented inventory information in university settings has been solved, and trusted management and access control of cross-node inventory transfers have been achieved, improving the collaborative efficiency and transparency of campus merchandise inventory management.

CN121707474APending Publication Date: 2026-03-20ANHUI WUXING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In university settings, the lack of a unified identity authentication system and data collaboration mechanism in campus inventory management systems leads to fragmented inventory information, making it difficult to achieve coordinated inventory management among multiple entities. Furthermore, the existing system lacks a verifiable identity binding mechanism and consistency confirmation logic when transferring inventory across nodes, affecting transfer efficiency and management transparency.

Method used

A campus merchandise inventory management method is constructed using blockchain technology. By establishing a record data structure in the blockchain that records merchandise identification, inventory quantity, status, and lifecycle information, and combining public key identity information and node registration contracts, unified registration and trusted recording of inventory data are achieved. Furthermore, a transfer path calculation and cross-node dual signature mechanism are introduced to ensure a clear authorization process and on-chain consensus for inventory transfer.

Benefits of technology

It has achieved unified management of campus merchandise inventory information and reliable recording of cross-node transfers, improved the collaborative efficiency and management transparency of inventory transfers, ensured the verifiability of data and flexible control of permissions, and provided a closed-loop mechanism of pre-transfer verification, in-transfer confirmation and post-transfer traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707474A_ABST
    Figure CN121707474A_ABST
Patent Text Reader

Abstract

The invention discloses a campus commodity inventory management method based on a block chain, and relates to the technical field of campus commodity management, and the method comprises the steps: building an inventory record data structure containing commodity identification information, inventory quantity information, inventory state information and life cycle information in a plurality of campus commodity inventory management nodes, public key identity identification information on the block chain is configured for each campus commodity inventory management node; and deploying an inventory processing module in an external processing environment of the block chain, and generating allocation path information, inventory prediction information and access permission configuration information. According to the invention, the inventory record data structure containing the node identification information and the commodity life cycle information is constructed, and a block chain identity registration mechanism is combined, so that the inventory data and the management node identity can be effectively bound, and unified registration and credible recording of the inventory information among a plurality of campus commodity inventory management nodes are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of campus merchandise management technology, specifically a blockchain-based method for campus merchandise inventory management. Background Technology

[0002] In university settings, inventory management of campus goods exists in multiple scattered locations such as campus convenience stores, club material warehouses, and student entrepreneurship platforms. These management entities are usually operated independently by different departments, student organizations, or service units, lacking a unified identity authentication system and data collaboration mechanism. This results in fragmented inventory information and fragmented management systems, making it difficult to form an inventory linkage management model based on a university-wide perspective. Existing inventory management methods mostly rely on centralized management platforms. While these platforms can perform functions such as inventory change registration and product transfer applications, they have many limitations in multi-entity collaborative scenarios. For example, there is a lack of verifiable identity binding mechanisms between nodes, a lack of consistent confirmation logic for cross-node inventory transfers, the inability to dynamically authorize transfer actions based on the academic calendar cycle, and difficulty in versioning and controlling access permissions for inventory data. These problems are particularly prominent in campus scenarios, directly affecting inventory transfer efficiency and management transparency. Furthermore, existing inventory management systems can already realize basic functions such as inventory registration, transfer application, and permission settings, and meet daily management needs to a certain extent. However, in the scenario of campus commodity management involving multiple stakeholders, with the deepening of collaboration granularity and the improvement of control requirements, higher demands are placed on the verifiability of inventory data, the auditability of operational behavior, and the flexibility of permission control. Especially in management scenarios that require node identity binding, traceable operational behavior, logical conditional control of permission settings, and hierarchical access permissions based on roles, existing systems still have room for improvement in terms of data connectivity, permission expression capabilities, and audit links. Therefore, this invention proposes a blockchain-based campus commodity inventory management method. Summary of the Invention

[0003] The purpose of this invention is to provide a blockchain-based campus merchandise inventory management method to solve the problems mentioned in the background section.

[0004] This invention can be achieved through the following technical solution: a blockchain-based campus merchandise inventory management method, comprising the following steps: Step 1: Establish an inventory record data structure that includes product identification information, inventory quantity information, inventory status information, and lifecycle information in multiple campus merchandise inventory management nodes, and configure public key identity identification information for each campus merchandise inventory management node in the blockchain; Step 2: Deploy the inventory processing module in the external blockchain processing environment to generate transfer path information, inventory forecast information and access permission configuration information, and submit the inventory change request data structure containing operation type information, node identification information, inventory change data and signature authentication information to the blockchain through the interface; Step 3: Verify the field integrity and signature authentication information of the inventory change request data structure through the contract program used to perform inventory verification. After successful verification, write the changed data into the corresponding inventory record data structure and generate hash digest information before and after the change. Step 4: For transfer requests across campus inventory management nodes, the transfer initiator and the transfer recipient generate signature confirmation data respectively. After receiving the signature confirmation data from the two nodes, the blockchain performs synchronous writing of inventory status and records operation status identification information and logical timestamp information. Step 5: Generate allocation cycle control parameter information based on the campus calendar cycle, write it into the blockchain, and determine whether the time of the inventory change request data structure is within the authorized cycle range when verifying the data structure. The write operation is only performed when the control conditions are met. Step Six: Authenticated users, based on their role type, read the inventory status snapshot data structure of the designated campus merchandise inventory management node through the blockchain interface. The snapshot data structure includes merchandise identification information, inventory quantity information, inventory status information, and status confirmation time information.

[0005] A further technical improvement of the present invention is that, when establishing a commodity inventory record data structure in multiple campus commodity inventory management nodes, a unique node identification information is generated for each campus commodity inventory management node. This node identification information includes the department code information to which the node belongs, geographical location information, and node functional role type information. The node identification information is bound to the public key identity information of the campus commodity inventory management node, and the registration process is completed through the node registration contract on the blockchain, including writing the node identification information and the initial commodity inventory record data structure into the blockchain. Before each change in product inventory, it is determined whether the node belongs to the authorized node set based on the node identification information. Only when the campus product inventory management node has completed registration and has the corresponding operation permissions is it allowed to submit the product inventory change request data structure to the blockchain.

[0006] A further technical improvement of the present invention is that the step of generating allocation path information includes: Based on the inventory quantity information and inventory status information in the inventory record data structure of each campus commodity inventory management node, a set of inventory status fields is constructed. The inventory status information indicates whether the inventory record is in an available transfer state. Nodes with inventory quantity information greater than the receiving inventory threshold are marked as available transfer receiving nodes. Upon receiving a goods transfer request, the transfer priority parameters of the requested goods are read. The transfer priority parameters include the upper limit of response time and priority level identification information. The allocation priority parameter is weighted with the path distance and historical average travel time of each path in the path graph structure to generate a path evaluation value. From multiple available paths that meet the passage conditions, the path with the lowest evaluation value is selected as the target transfer path, and the target transfer path information is submitted to the blockchain as part of the inventory change request data structure. The inventory change request data structure contains the signature confirmation data generated by the transfer initiating node and the transfer receiving node, respectively.

[0007] A further technical improvement of the present invention lies in: a method for obtaining an optional path, comprising: Establish a set of access condition fields for each path in the path graph structure. The set of access condition fields includes a running status field to indicate whether the campus commodity inventory management node in the path is in a running state, a path authorization field to indicate whether the path is allowed to be used by the current allocation initiating node, and a time period field to limit the time range of the path. After receiving a commodity transfer request, the system sequentially reads the set of access condition fields corresponding to each path in the path graph structure, and determines whether the running status field is in a running state, whether the path authorization field is consistent with the permission configuration of the transfer initiating node, and whether the current time is within the passable time range limited by the time period field. In the path graph structure, paths that meet all the requirements of the running status field, path authorization field, and time period field are set as optional paths that meet the passage conditions. When performing path evaluation value calculation and target allocation path information selection, only these optional paths are selected.

[0008] A further technical improvement of the present invention is that the step of verifying the inventory change request data structure includes: Extract the field names, field types, and required field values ​​from the inventory change request data structure, and verify the completeness of the fields according to the predefined inventory change field specifications in the blockchain, including determining whether there are any missing fields, whether the field types meet the predefined type requirements, and whether the field values ​​are within the allowed value range. Based on the signature authentication information contained in the inventory change request data structure, the public key address of the inventory change initiator is recovered using the elliptic curve digital signature algorithm. The validity of the signature authentication information is then verified by comparing the public key address with the node identifier information specified in the inventory change request data structure to see if the public key address has been bound and registered in the blockchain. If the field integrity verification and signature authentication information verification pass, the contract logic for executing inventory writing is invoked to write the inventory change data into the inventory record data structure corresponding to the node identification information. Hash digest information is calculated based on the inventory record data structure before and after writing, respectively, for on-chain evidence of inventory status changes.

[0009] A further technical improvement of the present invention is that, based on generating allocation cycle control parameter information according to the campus calendar cycle, it includes: Record inventory management behavior data of each campus merchandise inventory management node within a preset observation period. The inventory management behavior data includes the number of failed inventory changes, the frequency of inventory transfer operations, and records of violations. The behavioral stability score of each campus commodity inventory management node is calculated based on inventory management behavior data, and the behavioral stability score is bound to its node identification information and written into the blockchain. Determine if the behavior stability score is lower than the behavior score limit threshold. If it is lower, mark the status of the campus commodity inventory management node as not eligible to participate in the transfer cycle control. When generating allocation cycle control parameter information, the allocation cycle control parameter information is generated only for campus commodity inventory management nodes that are not currently marked as not eligible to participate in allocation cycle control, based on the campus calendar cycle, and the allocation cycle control parameter information and node identification information are written into the blockchain together.

[0010] A further technical improvement of the present invention is that step six further includes: When generating the inventory status snapshot data structure, a snapshot version number is configured for each inventory change operation record, and the snapshot version number and status confirmation time information are written together into the blockchain. When a user submits an inventory status read request, the range of snapshot version number information that the user can access is limited according to the user's role type; Role types include administrator role, audit role, and regular view role. Administrator role can access all snapshot version number information, audit role can access the most recent snapshot version number information, and regular view role can only access the currently valid snapshot version number information. Based on the specified results, the corresponding inventory status snapshot data structure is read from the blockchain, and the inventory status snapshot data structure containing product identification information, inventory quantity information, inventory status information, and status confirmation time information is returned to the accessing user.

[0011] Compared with the prior art, the present invention has the following beneficial effects: This invention constructs an inventory record data structure that includes node identification information and product lifecycle information, and combines it with a blockchain identity registration mechanism to effectively bind inventory data with management node identities, thereby achieving unified registration and reliable recording of inventory information among multiple campus product inventory management nodes. Furthermore, by deploying an off-chain inventory processing module and an on-chain inventory verification contract, this invention achieves structured submission of inventory change data, field integrity verification, and signature authentication verification, effectively avoiding problems such as malicious forgery and missing fields. At the same time, it introduces transfer path calculation logic and a cross-node "dual signature" mechanism to ensure that the inventory transfer process has a clear authorization process and an on-chain consensus mechanism, thus solving the trust barrier between multiple entities in the transfer process. On the other hand, this invention combines the campus calendar cycle to generate transfer cycle control parameters, and combines user role and behavior scoring mechanism to implement transfer permission management. At the same time, it generates status snapshots and version numbers for each inventory change, so that users with different permissions can accurately read the corresponding snapshot data. Moreover, it has a closed-loop mechanism of pre-transfer verification, in-transfer confirmation, and post-transfer traceability, which improves the collaborative efficiency and supervision capability of campus commodity inventory management. Attached Figure Description

[0012] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.

[0013] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0014] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.

[0015] Please see Figure 1 As shown, this invention provides a blockchain-based campus merchandise inventory management method, comprising the following steps: Step 1: Establish an inventory record data structure that includes product identification information, inventory quantity information, inventory status information, and lifecycle information in multiple campus merchandise inventory management nodes, and configure public key identity identification information for each campus merchandise inventory management node in the blockchain; By uniformly modeling the core inventory information of goods by field and writing it into the blockchain, each campus goods inventory management node has an on-chain identity, ensuring that subsequent inventory operations can be traced and authorized based on the node identity, which is the foundation for ensuring the reliable operation of the entire system.

[0016] When establishing a commodity inventory record data structure in multiple campus commodity inventory management nodes, a unique node identification information is generated for each campus commodity inventory management node. This node identification information includes the department code information to which the node belongs, geographical location information, and node functional role type information. The node identification information is bound to the public key identity information of the campus commodity inventory management node, and the registration process is completed through the node registration contract on the blockchain, including writing the node identification information and the initial commodity inventory record data structure into the blockchain. Before each change in product inventory, it is determined whether the node belongs to the authorized node set based on the node identification information. Only when the campus product inventory management node has completed registration and has the corresponding operation permissions is it allowed to submit the product inventory change request data structure to the blockchain.

[0017] Specifically, in this embodiment, each campus merchandise inventory management node is assigned a department code. This department code can be a fixed-length department number; for example, "ECO01" represents the School of Economics' warehouse node, and "LIB03" represents the library convenience store's inventory node. This code is maintained uniformly by the administrator to ensure that it is unique across the entire campus.

[0018] Based on the physical deployment location of each campus merchandise inventory management node, corresponding geographic location information is generated. The geographic location information can be represented by latitude and longitude coordinates (such as 31.2243 degrees north latitude and 121.4768 degrees east longitude) or building code information (such as "Building C, Basement 1"), which is used to distinguish nodes in different physical locations within the same department.

[0019] Set the node function role type information for each campus merchandise inventory management node. The role types include three categories: transfer initiation node, inventory receiving node, and read-only access node. The effective scope of the role can be restricted by time window. For example, the temporary storage point in the canteen can be set as a transfer initiation node from 10:00 am to 2:00 pm every day, and only as an inventory receiving node at other times.

[0020] The department code information, geographical location information and node function role type information of the above-mentioned nodes are assembled into node identification information, and the node identification information is bound to the public key identity information of the campus commodity inventory management node. The public key identity information is obtained through a pre-generated key pair and generated using an elliptic curve algorithm (such as secp256k1), which is used for data signature authentication of subsequent inventory change requests.

[0021] Next, the bound node identification information is registered through the node registration contract on the blockchain. After receiving the binding information, the node registration contract automatically verifies the integrity of its fields and the validity of its signature. After successful verification, the node identification information is written into the blockchain along with the initial product inventory record data structure. The initial product inventory record data structure includes product identification information, inventory quantity information, inventory status information, and lifecycle information for various products. For example, the product identification information "SNK001" is a brand of milk tea, the initial inventory quantity is 200 pieces, the inventory status is "available", and the lifecycle information is "valid until June 30, 2025".

[0022] Finally, before each change in product inventory, it is determined whether the node belongs to the authorized node set based on the node identification information. The authorized node set is stored and managed by the on-chain permission control data structure. Only when the campus product inventory management node has completed registration and has the corresponding operation permissions will the blockchain allow the product inventory change request data structure to be submitted to the blockchain. If the node is an unregistered node or the permissions are not enabled, the blockchain will reject the inventory change request and record the verification failure log to prevent forgery or unauthorized operation.

[0023] Step 2: Deploy the inventory processing module in the external blockchain processing environment to generate transfer path information, inventory forecast information and access permission configuration information, and submit the inventory change request data structure containing operation type information, node identification information, inventory change data and signature authentication information to the blockchain through the interface; By leveraging off-chain processing capabilities, intelligent execution of business logic such as inventory allocation and forecasting is achieved, and standardized interfaces are used to connect with on-chain systems. The inventory change request data structure embeds operation type, node identity, and signature authentication information, providing data support for subsequent on-chain verification and synchronized inventory data writing, which is crucial for achieving collaborative on-chain and off-chain management.

[0024] The steps for generating allocation route information include: Based on the inventory quantity information and inventory status information in the inventory record data structure of each campus commodity inventory management node, a set of inventory status fields is constructed. The inventory status information indicates whether the inventory record is in an available transfer state. Nodes with inventory quantity information greater than the receiving inventory threshold are marked as available transfer receiving nodes. Upon receiving a goods transfer request, the transfer priority parameters of the requested goods are read. The transfer priority parameters include the upper limit of response time and priority level identification information. The allocation priority parameter is weighted with the path distance and historical average travel time of each path in the path graph structure to generate a path evaluation value. From multiple available paths that meet the passage conditions, the path with the lowest evaluation value is selected as the target transfer path, and the target transfer path information is submitted to the blockchain as part of the inventory change request data structure. The inventory change request data structure contains the signature confirmation data generated by the transfer initiating node and the transfer receiving node, respectively.

[0025] Specifically, the system reads the inventory record data structure maintained by each of the multiple campus merchandise inventory management nodes, extracting inventory quantity and status information. Inventory status information indicates whether the merchandise inventory record is in a transferable state, while inventory quantity information reflects the inventory quantity level. In the processing logic, all campus merchandise inventory management nodes with transferable inventory status and inventory quantity exceeding a preset receiving inventory threshold are marked as transfer receiving nodes, thus constructing a set of inventory status fields. For example, if a beverage product in campus merchandise inventory management node A has an inventory status of "available for transfer," an inventory quantity of 120 units, and a receiving inventory threshold of 80 units, then node A will be marked as a transfer receiving node.

[0026] Before calculating the path evaluation value, the path graph structure is first obtained. In this embodiment, the path graph structure can be constructed in one of the following ways: (1) Based on campus map data, manually configure path connection relationships according to the actual geographical location and connectivity of each campus commodity inventory management node, and form a graph structure data set; (2) Based on historical commodity transfer trajectory records, the frequency of occurrence and travel time of each transfer path are statistically analyzed, and connection relationships and path attribute fields are automatically generated; (3) Deploy sensing devices at key nodes of campus road passages and automatically construct path topology based on the actual passage trajectory of logistics tasks.

[0027] Each edge of the path graph structure represents a walkable path between two campus merchandise inventory management nodes, and includes fields for path distance and historical average travel time, providing a data foundation for subsequent path evaluation value calculation.

[0028] After the path graph structure is established, a set of access condition fields is configured for each path in the path graph structure. The access condition field set includes: a running status field indicating whether the campus commodity inventory management node in the path is in a running state; a path authorization field indicating whether the path is allowed to be used by the current transfer initiating node; and a time period field limiting the time range within which the path can be traveled. Upon receiving a commodity transfer request, the access condition field set corresponding to each path in the path graph structure is read sequentially, and it is determined whether the running status field indicates a running state, whether the path authorization field matches the permission configuration of the transfer initiating node, and whether the current time is within the time range limited by the time period field. Only when all three conditions are met is the path set as an optional path that meets the access conditions. Subsequent path evaluation value calculations and target transfer path information selection operations are only performed from the optional path set.

[0029] Extract the allocation priority parameters attached to the allocation request for the requested goods. The allocation priority parameters include the upper limit of response time and priority level information. The upper limit of response time indicates the longest response time limit that must be met for this allocation, and the priority level information is used to indicate the business urgency of the current allocation, for example, using levels 0-3 to distinguish low, medium, high, and urgent allocation scenarios.

[0030] The allocation priority parameters are weighted and combined with the path distance and historical average travel time of the optional paths included in the pre-established route map structure to form a path evaluation value. The weighting rule can be expressed by the following formula: Path Evaluation Value = α × Path Distance + β × Historical Average Travel Time + γ × Priority Level Identifier Value, where α, β, and γ are system-preset weighting coefficients. Through this calculation method, the selection of allocation routes not only considers logistics distance and traffic efficiency but also takes into account the urgency of the allocation operation. For example, a path that is the shortest but has a large fluctuation in travel time and a low priority may have a higher path evaluation value than another slightly longer but faster-responding path.

[0031] Finally, among the identified alternative paths, the one with the lowest evaluation value is selected as the target allocation path.

[0032] The selected target allocation path information will be encapsulated in the inventory change request data structure, and both the allocation initiating node and the allocation receiving node will generate signature confirmation data. Once the signature confirmation data from both nodes is completed, the inventory change request data structure will be submitted to the blockchain as a trusted execution record of the inventory change.

[0033] Step 3: Verify the field integrity and signature authentication information of the inventory change request data structure through the contract program used to perform inventory verification. After successful verification, write the changed data into the corresponding inventory record data structure and generate hash digest information before and after the change. Smart contracts automatically review the data structure of inventory change requests to ensure the data format is legal and the identity is trustworthy. Verified inventory change data is then written to the blockchain as an immutable on-chain record. Simultaneously, generating hash digest information enables on-chain confirmation and auditing of the inventory status change process, providing a robust mechanism for enhancing system security and traceability.

[0034] The steps for validating the data structure of inventory change requests include: Extract the field names, field types, and required field values ​​from the inventory change request data structure, and verify the completeness of the fields according to the predefined inventory change field specifications in the blockchain, including determining whether there are any missing fields, whether the field types meet the predefined type requirements, and whether the field values ​​are within the allowed value range. Based on the signature authentication information contained in the inventory change request data structure, the public key address of the inventory change initiator is recovered using the elliptic curve digital signature algorithm. The validity of the signature authentication information is then verified by comparing the public key address with the node identifier information specified in the inventory change request data structure to see if the public key address has been bound and registered in the blockchain. If the field integrity verification and signature authentication information verification pass, the contract logic for executing inventory writing is invoked to write the inventory change data into the inventory record data structure corresponding to the node identification information. Hash digest information is calculated based on the inventory record data structure before and after writing, respectively, for on-chain evidence of inventory status changes.

[0035] Specifically, the system extracts the field names, field types, and required field values ​​from the inventory change request data structure. It then verifies the completeness of the fields according to predefined inventory change field specifications in the blockchain. These specifications include a field format definition table, a field type requirement table, and a field value range rule table. In practice, if the inventory change request data structure contains missing fields (e.g., a missing inventory change operation type field), field types that do not match their definitions (e.g., the inventory quantity field should be an unsigned integer but is a floating-point number), or field values ​​that exceed the allowed range (e.g., the changed quantity is negative or exceeds the maximum inventory capacity), the contract refuses to execute subsequent operations and returns an error code to prompt the front-end to refactor.

[0036] Based on the signature authentication information contained in the inventory change request data structure, the public key address of the initiator is recovered using the elliptic curve digital signature algorithm. In this embodiment, the secp256k1 curve parameters are used as the mathematical basis for the signature verification algorithm. The signer's public key address is deduced by parsing the r and s values ​​in the signature field and combining them with the message digest hash. Then, the public key address is compared with the node identifier information specified in the inventory change request data structure to see if they have been bound and registered in the blockchain. This binding relationship is confirmed through the node registration table stored in the node registration contract deployed on the blockchain. If the binding information is missing or inconsistent, the inventory change request is rejected.

[0037] If the field integrity check and signature authentication information verification pass, the contract logic for executing the inventory write is invoked to write the inventory change data into the inventory record data structure corresponding to the node identification information. The inventory record data structure is pre-initialized on-chain as a key-value mapping table when the smart contract is deployed. Its key is a combination of node identification information and product identification information, and its values ​​are inventory quantity information, inventory status information, and lifecycle information.

[0038] Finally, hash digests are calculated based on the inventory record data structure before and after the write operation, and these hash digests are stored on the blockchain for traceability and consistency verification during subsequent inventory status changes. Specifically, the SHA-256 hash function can be used to generate pre-change and post-change hash digests for the serialized inventory record data structure, and these digests are recorded in the blockchain record associated with the operation timestamp and change type to form an immutable inventory operation history.

[0039] Step 4: For transfer requests across campus inventory management nodes, the transfer initiator and the transfer recipient generate signature confirmation data respectively. After receiving the signature confirmation data from the two nodes, the blockchain performs synchronous writing of inventory status and records operation status identification information and logical timestamp information. A dual-signature mechanism ensures consistency between the initiator and recipient in cross-node transfer operations, preventing inventory errors caused by unauthorized or unilateral actions. Operation status identifiers and logical timestamps record state changes and sequential dependencies during the transfer process, supporting inventory data consistency and historical auditing in multi-party collaboration.

[0040] Step 5: Generate allocation cycle control parameter information based on the campus calendar cycle, write it into the blockchain, and determine whether the time of the inventory change request data structure is within the authorized cycle range when verifying the data structure. The write operation is only performed when the control conditions are met. Based on the allocation cycle control parameter information generated from the campus calendar cycle, the following are included: Record inventory management behavior data of each campus merchandise inventory management node within a preset observation period. The inventory management behavior data includes the number of failed inventory changes, the frequency of inventory transfer operations, and records of violations. The behavioral stability score of each campus commodity inventory management node is calculated based on inventory management behavior data, and the behavioral stability score is bound to its node identification information and written into the blockchain. Determine if the behavior stability score is lower than the behavior score limit threshold. If it is lower, mark the status of the campus commodity inventory management node as not eligible to participate in the transfer cycle control. When generating allocation cycle control parameter information, the allocation cycle control parameter information is generated only for campus commodity inventory management nodes that are not currently marked as not eligible to participate in allocation cycle control, based on the campus calendar cycle, and the allocation cycle control parameter information and node identification information are written into the blockchain together.

[0041] Specifically, the system records inventory management behavior data for each campus merchandise inventory management node within a preset observation period. In this embodiment, the preset observation period can be the most recent seven consecutive calendar days. During this time period, the system fully records the inventory operation behavior of each campus merchandise inventory management node. This includes: the number of failed inventory change operations, whether there are abnormal fluctuations in the number of daily inventory transfer operations, and whether there are any violations of operating procedures, such as repeatedly submitting invalid requests or bypassing authorized paths to perform transfers.

[0042] A behavioral stability score is calculated for each campus merchandise inventory management node based on inventory management behavior data. The scoring model can be set as a weighted scoring model, where 10 points are deducted for each failed inventory change, 5 points are deducted for each abnormal fluctuation in operation frequency per day, and 20 points are deducted for each violation record, with a maximum score of 100 points. A score below 60 points is considered unstable. The scoring results will be bound to the identification information of the campus merchandise inventory management node and written to the blockchain for status judgment in subsequent allocation cycle control.

[0043] The system determines whether the behavior stability score is below the behavior score limit threshold. If it is, the status of the campus merchandise inventory management node is marked as ineligible to participate in the allocation cycle control. During this process, all campus merchandise inventory management nodes with scores below 60 are considered ineligible to participate in the cycle allocation, and their node status field in the blockchain is updated to "frozen" to prevent them from submitting inventory change requests during the allocation cycle.

[0044] Finally, when generating allocation cycle control parameters, the system only generates these parameters based on the campus calendar cycle for campus merchandise inventory management nodes that are not currently marked as ineligible for allocation cycle control. These parameters, along with node identification information, are then written into the blockchain. For example, if the calendar designates "two weeks before the start of the semester" as a concentrated replenishment window, the system will bind the node identification information that meets the behavioral scoring criteria to the allocation authorization field for that time period as "allowed," and write this information uniformly into the blockchain. This achieves precise control over the periodic operational permissions of participating nodes.

[0045] By incorporating campus calendar cycle information into the inventory allocation control mechanism, time-based restrictions can be placed on inventory changes. For example, some allocations can be suspended during exam periods, or replenishment can be concentrated at the start of the school year. Writing allocation cycle control parameters into the blockchain helps achieve compliant and well-planned inventory management strategies, representing a governance approach tailored to the actual operational rhythm of campuses.

[0046] Step Six: Authenticated users, based on their role type, read the snapshot data structure of the inventory status of the designated campus merchandise inventory management node through the blockchain interface. The snapshot data structure includes merchandise identification information, inventory quantity information, inventory status information, and status confirmation time information. Furthermore, step six includes: When generating the inventory status snapshot data structure, a snapshot version number is configured for each inventory change operation record, and the snapshot version number and status confirmation time information are written together into the blockchain. When a user submits an inventory status read request, the range of snapshot version number information that the user can access is limited according to the user's role type; Role types include administrator role, audit role, and regular view role. Administrator role can access all snapshot version number information, audit role can access the most recent snapshot version number information, and regular view role can only access the currently valid snapshot version number information. Based on the specified results, the corresponding inventory status snapshot data structure is read from the blockchain, and the inventory status snapshot data structure containing product identification information, inventory quantity information, inventory status information, and status confirmation time information is returned to the accessing user.

[0047] Specifically, after each inventory change operation is completed, a corresponding inventory status snapshot data structure is generated, and a unique snapshot version number is set in this data structure. This snapshot version number can be generated based on a combination of a logical timestamp and the inventory change operation number, such as "SN-20251108-00023", which indicates that this snapshot is the 23rd inventory change snapshot generated on November 8, 2025. Subsequently, the snapshot version number information and the inventory status confirmation time information are written into the blockchain as part of the on-chain evidence.

[0048] When a user submits a request to read the inventory status, their role type is identified based on their completed authentication. There are three role types: Administrator, Auditor, and Regular Viewer. Different role types have different snapshot read permission ranges: Administrators can access all snapshot version numbers, including all historical snapshot versions; Auditors can access the most recent snapshot version numbers, such as the last 10; Regular Viewers can only access the latest snapshot version number that is currently valid.

[0049] Based on the access user's role type and corresponding permission scope, the system filters the set of snapshot version numbers that the user can access from the blockchain. Taking the audit role as an example, if its permission is configured to "access the most recent 10 snapshots", the system will read the latest 10 snapshot version numbers corresponding to the current node from the chain and generate a snapshot retrieval list.

[0050] After filtering the snapshot version number information, the corresponding inventory status snapshot data structure is read from the blockchain. Each inventory status snapshot data structure contains fields such as product identification information, inventory quantity information, inventory status information, and status confirmation time information, which represent the confirmed changes on the blockchain. After the data structure is read, the inventory status snapshot data structure is returned to the accessing user to ensure that they can traceably obtain the true inventory status within their authorized scope, meeting the requirements of hierarchical access control.

[0051] Based on the user's role type, hierarchical access management is implemented for the inventory status snapshot data structure. By reading the snapshot data structure generated on-chain through the blockchain interface, data consistency and access transparency are guaranteed. At the same time, it supports parallel access by multiple roles and differentiated information display, improving the flexibility and security of system services.

[0052] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0053] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A blockchain-based method for campus merchandise inventory management, characterized in that, include: Step 1: Establish an inventory record data structure containing product identification information, inventory quantity information, inventory status information, and lifecycle information in multiple campus merchandise inventory management nodes, and configure public key identity identification information on the blockchain for each campus merchandise inventory management node; Step 2: Deploy the inventory processing module in the external blockchain processing environment to generate transfer path information, inventory forecast information and access permission configuration information, and submit the inventory change request data structure containing operation type information, node identification information, inventory change data and signature authentication information to the blockchain through the interface; Step 3: Verify the field integrity and signature authentication information of the inventory change request data structure through the contract program used to perform inventory verification. After successful verification, write the changed data into the corresponding inventory record data structure and generate hash digest information before and after the change. Step 4: For transfer requests across campus inventory management nodes, the transfer initiator and the transfer recipient generate signature confirmation data respectively. After receiving the signature confirmation data from the two nodes, the blockchain performs synchronous writing of inventory status and records operation status identification information and logical timestamp information. Step 5: Generate allocation cycle control parameter information based on the campus calendar cycle, write it into the blockchain, and determine whether the time is within the authorized cycle when verifying the inventory change request data structure. Only perform the write operation when the control conditions are met. Step Six: Authenticated users, based on their role type, read the inventory status snapshot data structure of the designated campus merchandise inventory management node through the blockchain interface.

2. The campus merchandise inventory management method based on blockchain according to claim 1, characterized in that, When establishing a commodity inventory record data structure in multiple campus commodity inventory management nodes, a unique node identification information is generated for each campus commodity inventory management node. This node identification information includes the department code information to which the node belongs, geographical location information, and node functional role type information. The node identification information is bound to the public key identity information of the campus commodity inventory management node, and the registration process is completed through the node registration contract on the blockchain, including writing the node identification information and the initial commodity inventory record data structure into the blockchain. Before each change in product inventory, it is determined whether the node belongs to the authorized node set based on the node identification information. Only when the campus product inventory management node has completed registration and has the corresponding operation permissions is it allowed to submit the product inventory change request data structure to the blockchain.

3. The campus merchandise inventory management method based on blockchain according to claim 1, characterized in that, The steps for generating allocation route information include: Based on the inventory quantity information and inventory status information in the inventory record data structure of each campus commodity inventory management node, a set of inventory status fields is constructed. The inventory status information indicates whether the inventory record is in an available transfer state. Nodes with inventory quantity information greater than the receiving inventory threshold are marked as available transfer receiving nodes. Upon receiving a goods transfer request, the transfer priority parameters of the requested goods are read. The transfer priority parameters include the upper limit of response time and priority level identification information. The allocation priority parameter is weighted with the path distance and historical average travel time of each path in the path graph structure to generate a path evaluation value. From multiple available paths that meet the passage conditions, the path with the lowest evaluation value is selected as the target transfer path, and the target transfer path information is submitted to the blockchain as part of the inventory change request data structure. The inventory change request data structure contains the signature confirmation data generated by the transfer initiating node and the transfer receiving node, respectively.

4. The campus merchandise inventory management method based on blockchain according to claim 3, characterized in that, Methods for obtaining optional paths include: Establish a set of access condition fields for each path in the path graph structure. The set of access condition fields includes a running status field to indicate whether the campus commodity inventory management node in the path is in a running state, a path authorization field to indicate whether the path is allowed to be used by the current allocation initiating node, and a time period field to limit the time range of the path. After receiving a commodity transfer request, the system sequentially reads the set of access condition fields corresponding to each path in the path graph structure, and determines whether the running status field is in a running state, whether the path authorization field is consistent with the permission configuration of the transfer initiating node, and whether the current time is within the passable time range limited by the time period field. In the path graph structure, paths that meet all the requirements of the running status field, path authorization field, and time period field are set as optional paths that meet the passage conditions. When performing path evaluation value calculation and target allocation path information selection, only these optional paths are selected.

5. The campus merchandise inventory management method based on blockchain according to claim 1, characterized in that, The steps for validating the data structure of inventory change requests include: Extract the field names, field types, and required field values ​​from the inventory change request data structure, and verify the integrity of the fields according to the predefined inventory change field specifications in the blockchain; Based on the signature authentication information contained in the inventory change request data structure, the public key address of the inventory change initiator is recovered using the elliptic curve digital signature algorithm. The validity of the signature authentication information is then verified by comparing the public key address with the node identifier information specified in the inventory change request data structure to see if the public key address has been bound and registered in the blockchain. If the field integrity verification and signature authentication information verification pass, the contract logic for executing inventory writing is invoked to write the inventory change data into the inventory record data structure corresponding to the node identification information. Hash digest information is calculated based on the inventory record data structure before and after writing, respectively, for on-chain evidence of inventory status changes.

6. The campus merchandise inventory management method based on blockchain according to claim 5, characterized in that, Integrity checks include: determining whether there are any missing fields, whether the field type meets the predefined type requirements, and whether the field value is within the allowed value range.

7. The campus merchandise inventory management method based on blockchain according to claim 1, characterized in that, Based on the allocation cycle control parameter information generated from the campus calendar cycle, the following are included: Record inventory management behavior data of each campus merchandise inventory management node within a preset observation period. The inventory management behavior data includes the number of failed inventory changes, the frequency of inventory transfer operations, and records of violations. The behavioral stability score of each campus commodity inventory management node is calculated based on inventory management behavior data, and the behavioral stability score is bound to its node identification information and written into the blockchain. Determine if the behavior stability score is lower than the behavior score limit threshold. If it is lower, mark the status of the campus commodity inventory management node as not eligible to participate in the transfer cycle control. When generating allocation cycle control parameter information, the allocation cycle control parameter information is generated only for campus commodity inventory management nodes that are not currently marked as not eligible to participate in allocation cycle control, based on the campus calendar cycle, and the allocation cycle control parameter information and node identification information are written into the blockchain together.

8. A campus merchandise inventory management method based on blockchain according to claim 1, characterized in that, Step six further includes: When generating the inventory status snapshot data structure, a snapshot version number is configured for each inventory change operation record, and the snapshot version number and status confirmation time information are written together into the blockchain. When a user submits an inventory status read request, the range of snapshot version number information that the user can access is limited according to the user's role type; Based on the specified results, the corresponding inventory status snapshot data structure is read from the blockchain, and the inventory status snapshot data structure containing product identification information, inventory quantity information, inventory status information, and status confirmation time information is returned to the accessing user.

9. A campus merchandise inventory management method based on blockchain according to claim 8, characterized in that, Role types include administrator roles, review roles, and regular viewer roles; Administrators have access to all snapshot version number information; The auditing role has access to the version number information of the most recent snapshots; Normally, users can only access the currently valid snapshot version number information for a character.