Blockchain-based library seat management system and method

CN122797908APending Publication Date: 2026-09-22BEIJING POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610655929.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-13
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

在基于区块链实现图书馆座位管理的过程中,当同一图书馆座位的占用操作与释放操作分别作为独立交易被写入区块链,且由于交易传播路径差异或区块打包顺序不同,导致两类操作在链上同时存在时,会形成图书馆座位状态的冲突记录;由于区块链以交易确认结果作为状态更新依据,而缺乏对同一图书馆座位多源状态之间先后关系的统一约束机制,从而导致状态表达不一致;而现有技术不能根据图书馆座位在区块链中同时存在占用记录和释放记录情况下的状态冲突程度去调整图书馆座位当前状态判定,进而造成图书馆座位状态识别错误,导致座位重复分配或错误释放,影响座位资源调度的准确性和系统运行的可靠性

Benefits of technology

1.本发明通过引入图书馆座位状态映射序列,将区块链中分散存在的占用记录与释放记录进行统一结构化表达,并进一步通过位置索引、间隔距离以及排列顺序等多维度特征,对占用记录与释放记录之间的相对位置关系进行量化计算,从而构建出图书馆座位状态冲突程度值,实现了对链上多源状态冲突的精细刻画。相较于现有仅依赖单一交易确认结果进行状态判定的方式,该技术方案能够在占用记录与释放记录同时存在的情况下,基于序列化结构对状态先后关系进行重构,并通过冲突程度值反映冲突强度差异,使得状态判定不再依赖单一时间顺序或单笔交易,而是建立在多维度综合计算基础之上,从根本上解决了区块链环境下由于交易传播路径差异及打包顺序不一致所导致的状态表达不一致问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122797908A_ABST
    Figure CN122797908A_ABST
Patent Text Reader

Abstract

The application discloses a library seat management system and method based on a block chain, relates to the technical field of library seat management, and specifically comprises the following steps: obtaining occupation records and release records associated with target library seats in a block chain, embedding operation feature identifiers into the occupation records and the release records, and judging whether the occupation records and the release records exist simultaneously in the block chain according to the operation feature identifiers; in the case that the occupation records and the release records exist simultaneously, performing sequence mapping processing on the occupation records and the release records according to the operation feature identifiers to form a library seat state mapping sequence. The application solves the problem that state conflicts cannot be quantified and determined due to the simultaneous existence of occupation records and release records of library seats in a block chain environment, realizes dynamic adjustment of seat state determination based on a conflict degree, and improves state recognition accuracy and resource scheduling reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of library seating management technology, and more specifically to a blockchain-based library seating management system and method. Background Technology

[0002] Blockchain-based library seat management utilizes the decentralized, immutable, and traceable characteristics of blockchain to manage the processes of seat reservation, allocation, usage, and default records in the form of on-chain data and smart contracts, thereby achieving reliable scheduling and efficient utilization of seat resources. Existing technologies typically rely on consortium blockchains or private blockchains, digitizing user identity information, seat status information, and operation records, and generating transaction data through encryption algorithms, which is then written into the blockchain. In practice, users typically initiate seat reservation requests via their terminals. After identity authentication, the system invokes smart contracts to automatically match and allocate seat resources, simultaneously storing the reservation information on the blockchain. Secondly, when users arrive at the library to check in or scan a code to take their seats, the system triggers another on-chain verification process to update the seat usage status. During use, the system can automatically monitor for late check-ins or overstaying based on time rules, releasing seats or recording default information through smart contracts. Finally, all user behavior data (such as reservations, cancellations, and default records) is stored immutably on the blockchain for subsequent credit evaluation or resource optimization scheduling.

[0003] The existing technology has the following shortcomings: In the process of implementing library seat management based on blockchain, when the occupancy and release operations of the same library seat are written to the blockchain as independent transactions, and due to differences in transaction propagation paths or different block packaging orders, the two types of operations exist simultaneously on the chain, resulting in conflict records of library seat states. Since the blockchain uses transaction confirmation results as the basis for state updates, it lacks a unified constraint mechanism for the sequential relationship between multiple sources of states of the same library seat, leading to inconsistent state expressions. Furthermore, existing technologies cannot adjust the current state determination of library seats based on the degree of state conflict when occupancy and release records exist simultaneously in the blockchain, thus causing errors in library seat state identification, resulting in duplicate allocation or incorrect release of seats, affecting the accuracy of seat resource scheduling and the reliability of system operation.

[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide a blockchain-based library seating management system and method to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a blockchain-based library seat management method, specifically including the following steps: S1. Obtain the occupancy and release records associated with the target library seat in the blockchain, embed operation feature identifiers into the occupancy and release records, and determine whether the library seat has both occupancy and release records in the blockchain based on the operation feature identifiers. S2. When both occupancy and release records exist, perform sequence mapping processing on the occupancy and release records based on the operation feature identifier to form a library seat status mapping sequence. S3. Calculate the positional relationship between the occupancy record and the release record in the state mapping sequence based on the library seat state mapping sequence, and determine the degree of conflict of library seat state. S4. Based on the degree of conflict of library seat status, the occupied records and released records in the status mapping sequence are weighted and rearranged to form the current status determination result of the library seat. S5. Based on the current status determination result of the library seats, combined with the newly written occupancy and release records in the blockchain, update the conflict degree value of the library seat status, and dynamically adjust the current status determination result of the library seats according to the updated conflict degree value.

[0007] Preferably, S1 is as follows: The transaction data containing library seat identifiers in the blockchain is parsed. Based on the library seat identifier matching conditions, the occupancy and release records associated with the target library seats are extracted from the blockchain transaction data and a set of occupancy and release records is formed according to the blockchain writing order. In the set of occupancy and release records, an operation feature identifier is embedded in each occupancy and release record. The operation feature identifier includes an operation type identifier and a source path identifier. By writing the operation feature identifier into the transaction field corresponding to the occupancy and release records, a set of occupancy and release records with operation feature identifiers is formed. Based on the set of occupancy and release records with operation feature identifiers, the operation type identifier in the operation feature identifier is identified. When the operation type identifier corresponding to the occupancy record and the operation type identifier corresponding to the release record exist at the same time, it is determined whether the library seat has both an occupancy record and a release record in the blockchain.

[0008] Preferably, S2 specifically includes the following steps: S201. When both occupancy records and release records exist, extract the operation feature identifiers from the occupancy records and release records, and perform identifier alignment processing on the occupancy records and release records according to the operation type identifier and source path identifier in the operation feature identifiers to form a sequence of occupancy records and release records arranged uniformly according to the operation feature identifiers. S202. Based on the sequence of occupied and released records after the identifier alignment process, according to the combination relationship between the operation type identifier and the source path identifier, perform sequence mapping processing on the occupied and released records, and map the occupied and released records to the corresponding sequence positions to form a mapping sequence with corresponding relationship. S203. Combine the blockchain writing order to perform order correction processing on the mapping sequence, so that the occupancy record and release record are arranged according to a unified order rule to form a library seat status mapping sequence.

[0009] Preferably, S202 is specifically as follows: Based on the sequence of occupied and released records after the identifier alignment process, the operation type identifier and source path identifier in each occupied and released record are combined to generate a corresponding combined identifier value. The occupied and released records are then grouped and arranged according to the combined identifier value to form an initial mapping sequence. According to the order of the combined identifier values ​​in the initial mapping sequence, the occupancy record and release record are processed by sequence mapping. Each occupancy record and release record is assigned to the corresponding sequence position index, and the sequence correspondence between the occupancy record and release record is established to form a mapping sequence with position index. The mapping sequence is sequentially integrated based on the location index. The occupied and released records are rearranged according to the location index so that the occupied and released records form a continuous arrangement relationship under the same library seat dimension, forming a mapping sequence with a corresponding relationship.

[0010] Preferably, S3 specifically includes the following steps: S301. Based on the library seat status mapping sequence, extract the position indices of the occupancy record and release record in the status mapping sequence, and perform corresponding association processing on the occupancy record and release record according to the position index order to form a position relationship sequence of the occupancy record and release record in the status mapping sequence. S302. Based on the positional relationship sequence, calculate the positional relationship between the occupancy record and the release record in the state mapping sequence. Quantify the interval distance and arrangement order between the position indices to form the calculation result of the positional relationship between the occupancy record and the release record in the state mapping sequence. S303. Based on the positional relationship calculation results, the interval distance in the positional relationship calculation results is accumulated and the arrangement order is marked with a direction. The accumulated interval distance value and the direction mark are combined and mapped. The combined result is segmented and assigned according to the preset interval division standard to determine the degree of conflict of library seat status.

[0011] Preferably, S303 is as follows: Based on the position relationship calculation results, the interval distance in the position relationship calculation results is accumulated. According to the corresponding order of the occupancy record and the release record in the state mapping sequence, the interval distance between adjacent position indices is summed in turn to form a sequence of accumulated interval distance values. Based on the order of the positional relationship calculation results, the occupancy records and release records are processed with directional identification. According to the arrangement relationship of the occupancy record before or after the release record, each group of positional relationships is assigned a corresponding directional identification, and a directional identification sequence is formed. The sequence of cumulative interval distance values ​​and the sequence of direction identifiers are combined and mapped. The combined mapping result is divided into intervals according to the preset interval division standard. The combined mapping result is then segmented and assigned values ​​according to the assignment rules corresponding to different intervals to determine the degree of conflict in library seat status.

[0012] Preferably, S4 is as follows: Based on the degree of conflict in library seat status, the occupancy and release records in the status mapping sequence are weighted and processed. According to the interval range corresponding to the degree of conflict in library seat status, the occupancy and release records are mapped to the corresponding weight intervals respectively, and weight values ​​are assigned to the occupancy and release records according to the corresponding weight intervals, forming a weight sequence of occupancy and release records. Based on the weight sequence of the occupancy and release records, the occupancy and release records in the state mapping sequence are rearranged. The occupancy and release records are sorted according to the size of the weight values. If the weight values ​​are the same, they are arranged in order according to the position index in the state mapping sequence to form the rearranged state mapping sequence. Based on the rearranged state mapping sequence, the state determination process is performed according to the order of the occupied and released records in the sequence. The operation type identifier corresponding to the record that is prioritized in the sequence is used as the basis for determination to determine the current state of the library seat.

[0013] Preferably, S5 is as follows: Based on the current status determination of library seats, combined with the newly written occupancy and release records in the blockchain, the operation type identifier and source path identifier in the newly added occupancy and release records are extracted and processed, and the newly added occupancy and release records are incorporated into the state mapping sequence. The position index of the newly added occupancy and release records is assigned according to the position index generation rules in the state mapping sequence, and the position relationship sequence of occupancy and release records in the state mapping sequence is updated. Based on the updated positional relationship sequence of occupancy and release records in the state mapping sequence, the positional relationship is calculated, the positional relationship calculation result is re-acquired, and the interval distance is accumulated and the arrangement order is directionally marked based on the positional relationship calculation result. Through combined mapping processing and interval division assignment rules, the library seat status conflict degree value is updated. Based on the updated library seat status conflict level value, the occupancy and release records in the status mapping sequence are reweighted and rearranged. The occupancy and release records are sorted according to the updated weight value, and the operation type identifier corresponding to the priority record is extracted according to the sorted order. The current status determination result of the library seat is dynamically adjusted.

[0014] Preferably, a blockchain-based library seat management system includes an on-chain record identification module, a state sequence construction module, a conflict degree quantification module, a weight rearrangement determination module, and a dynamic conflict control module. The on-chain record identification module obtains the occupancy and release records associated with the target library seat in the blockchain, embeds operation feature identifiers into the occupancy and release records, and determines whether the library seat has both occupancy and release records in the blockchain based on the operation feature identifiers. The status sequence construction module performs sequence mapping on the occupancy and release records based on the operation feature identifiers when both occupancy and release records exist simultaneously, thus forming a library seat status mapping sequence. The conflict level quantification module calculates the positional relationship between occupancy records and release records in the state mapping sequence based on the library seat state mapping sequence to determine the conflict level value of the library seat state. The weighted rearrangement judgment module assigns weights to the occupied and released records in the state mapping sequence based on the degree of conflict of library seat status and performs rearrangement processing to form the current status judgment result of the library seat. The dynamic conflict control module updates the conflict level value of the library seats based on the current status determination result of the library seats and the newly written occupancy and release records in the blockchain. It then dynamically adjusts the current status determination result of the library seats based on the updated conflict level value.

[0015] The technical effects and advantages provided by the present invention in the above technical solution are as follows: 1. This invention introduces a library seat state mapping sequence to unify and structurally represent the scattered occupancy and release records in the blockchain. Furthermore, it quantifies the relative positional relationship between occupancy and release records using multi-dimensional features such as location index, interval distance, and arrangement order, thereby constructing a library seat state conflict degree value. This achieves a fine-grained characterization of multi-source state conflicts on the chain. Compared to existing methods that rely solely on a single transaction confirmation result for state determination, this technical solution can reconstruct the sequential relationship of states based on a serialized structure when occupancy and release records coexist. The conflict degree value reflects the difference in conflict intensity, ensuring that state determination no longer depends on a single time sequence or a single transaction, but is based on multi-dimensional comprehensive calculations. This fundamentally solves the problem of inconsistent state representation caused by differences in transaction propagation paths and inconsistent packaging orders in the blockchain environment.

[0016] 2. This invention, through weight allocation and rearrangement, directly incorporates the conflict level value into the state decision-making process. This allows the priority of occupancy and release records in the state mapping sequence to dynamically change with the conflict level. The current state of a library seat is determined by the operation type identifier corresponding to the priority record. Simultaneously, by combining newly written occupancy and release records in the blockchain, the state conflict level value is continuously updated, achieving dynamic adjustment of the state determination result. This process not only improves the accuracy of library seat state identification and avoids duplicate allocation or erroneous release of seats, but also enhances the system's adaptability to asynchronous on-chain data writing, enabling real-time correction of seat resource scheduling as data changes, thereby improving the reliability, stability, and resource utilization efficiency of the overall management process. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0018] Figure 1 This is a schematic diagram of the process of the present invention.

[0019] Figure 2 This is a schematic diagram of the modules of the present invention. Detailed Implementation

[0020] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.

[0021] This invention provides, for example Figure 1 The blockchain-based library seating management method shown includes the following steps: S1. Obtain the occupancy and release records associated with the target library seat in the blockchain, embed operation feature identifiers into the occupancy and release records, and determine whether the library seat has both occupancy and release records in the blockchain based on the operation feature identifiers. In this embodiment, S1 specifically refers to: The transaction data containing library seat identifiers in the blockchain is parsed. Based on the library seat identifier matching conditions, the occupancy and release records associated with the target library seats are extracted from the blockchain transaction data and a set of occupancy and release records is formed according to the blockchain writing order. By reading data blocks stored in the blockchain in block height order one by one and extracting the transaction data list contained in each data block, the library seat identification information is obtained by locating the preset field position in each transaction data. The library seat identification is then compared item by item with the identification corresponding to the target library seat to filter out the transaction data associated with the target library seat. Further, based on the operation type identification recorded in the transaction data, transaction data containing the occupancy operation identification is classified as occupancy records, and transaction data containing the release operation identification is classified as release records. Subsequently, the occupancy records and release records are sorted according to the ascending order of block height and the arrangement order of transaction data within the same block to form a set of occupancy records and release records with a time sequence relationship. For example, when the transaction data of library seat identification A01 records occupancy operation, release operation, and re-occupancy operation in multiple consecutive data blocks, after parsing and matching each record, a set of records arranged in the writing order can be formed, thus fully reflecting the operation process of the target library seat in the blockchain.

[0022] A blockchain is a collection of data blocks connected sequentially in chronological order, with each block containing several transaction data. A library seat identifier is a unique code used to identify a specific library seat. Transaction data consists of basic data units recorded within a data block, including operation type, identifier information, and additional fields. Parsing is the process of reading, identifying, and splitting the transaction data's fields. The library seat identifier matching condition is the basis for determining whether transaction data corresponds to a target library seat. Blockchain transaction data is the collection of all transaction records within a data block. The target library seat is the specific seat object that needs to be processed. Occupancy and release records represent transaction data for performing occupancy and release operations on a library seat, respectively. The blockchain write order refers to the sequence in which transaction data is recorded in the blockchain, including block order and the order of transactions within a block. The set of occupancy and release records is an ordered data set formed after filtering and sorting, used to describe the historical state changes of the target library seat in the blockchain.

[0023] In the set of occupancy and release records, an operation feature identifier is embedded in each occupancy and release record. The operation feature identifier includes an operation type identifier and a source path identifier. By writing the operation feature identifier into the transaction field corresponding to the occupancy and release records, a set of occupancy and release records with operation feature identifiers is formed. When processing sets of occupancy and release records, an additional field can be added to the original transaction data structure for each record to carry operation feature identification information. In specific implementation, an identifier field position can be reserved in the transaction data to encode the operation type identifier as a fixed-length character or numerical value to distinguish between occupancy and release operations. At the same time, the source path identifier is encoded as an identifier indicating the transaction source path, such as node source number or transmission path number. Then, the operation type identifier and source path identifier are written into the transaction field according to a preset combination order, so that each occupancy and release record carries a complete operation feature identifier. For example, when the occupancy operation of a library seat comes from path A and the release operation comes from path B, the occupancy operation identifier and the node A path identifier can be combined and written into the corresponding record, and the release operation identifier and the node B path identifier can be combined and written into the corresponding record, thus forming a set of records with distinguishable capabilities. This processing method enables operations of different sources and types to form distinguishable feature information on the chain, providing a data foundation for subsequent conflict identification and state determination.

[0024] Each occupancy and release record refers to a single transaction data related to a library seat in the blockchain, corresponding to an occupancy operation and a release operation, respectively. The operation feature identifier is the identification information attached to the transaction data, used to describe the attribute characteristics of the transaction. The operation type identifier is a part of the operation feature identifier, used to distinguish between occupancy and release operations. The source path identifier is another part of the operation feature identifier, used to characterize the source path information of the transaction data from its generation to being written into the blockchain. The set of occupancy and release records with operation feature identifiers refers to the set of records formed after the identifier is embedded on the basis of the original record set. Each record contains an operation type identifier and a source path identifier, which can simultaneously reflect the operation category and source information, enabling subsequent processing to be analyzed based on richer data dimensions.

[0025] Based on the set of occupancy and release records with operation feature identifiers, the operation type identifier in the operation feature identifier is identified. When the operation type identifier corresponding to the occupancy record and the operation type identifier corresponding to the release record exist at the same time, it is determined whether the library seat has both an occupancy record and a release record in the blockchain.

[0026] In the set of occupancy and release records with operation feature identifiers, the operation type identifiers contained in each record can be extracted one by one, and a classification list of operation type identifiers can be established. Operation type identifiers representing occupancy operations are classified into the occupancy category, and operation type identifiers representing release operations are classified into the release category. Then, the classification list is traversed and checked. By determining whether the occupancy category contains at least one record and whether the release category contains at least one record, it can be determined whether the two types of operations exist simultaneously. For example, when there are records with the operation type identifier "occupancy" and records with the operation type identifier "release" in the record set corresponding to a certain library seat, the existence of occupancy and release records can be confirmed by checking the existence of the two types of identifiers. The reason for adopting this approach is that the operation type identifiers have clearly classified the original transaction behavior. By identifying and classifying the identifiers, it is possible to avoid directly parsing complex transaction content, thereby improving the certainty and consistency of the judgment process.

[0027] The operation type identifier in the operation feature identifier is the identification information used to distinguish between occupancy and release operations, and it usually exists in the transaction data field in a preset encoding form. The operation type identifier corresponding to the occupancy record refers to the encoded information in the record that identifies the occupancy behavior, and the operation type identifier corresponding to the release record refers to the encoded information in the record that identifies the release behavior. The simultaneous existence of the operation type identifier corresponding to the occupancy record and the operation type identifier corresponding to the release record indicates that two different types of operation type identifiers are detected at the same time in the record set associated with the same library seat. Based on this feature, the state of the record set can be determined. When both types of operation type identifiers appear at the same time, it means that the library seat has a coexistence of occupancy and release operations in the blockchain, providing a basic judgment condition for subsequent state conflict analysis.

[0028] S2. When both occupancy and release records exist, perform sequence mapping processing on the occupancy and release records based on the operation feature identifier to form a library seat status mapping sequence. In this embodiment, S2 specifically includes the following steps: S201. When both occupancy records and release records exist, extract the operation feature identifiers from the occupancy records and release records, and perform identifier alignment processing on the occupancy records and release records according to the operation type identifier and source path identifier in the operation feature identifiers to form a sequence of occupancy records and release records arranged uniformly according to the operation feature identifiers. When processing the operation feature identifiers in occupancy and release records, the operation type identifier and source path identifier can be extracted from each record first, and the extraction results can be uniformly encoded. For example, the operation type identifier and source path identifier can be concatenated in a fixed order to form a combined identifier sequence value. Then, the occupancy and release records can be sorted according to the combined identifier sequence value. This can be done by first classifying by operation type identifier and then sorting by source path identifier, so that similar operations are continuously distributed in the sequence. During the sorting process, the order of arrangement can be determined by comparing the lexicographical order or numerical size of the combined identifier sequence values, thereby achieving identifier alignment. For example, when the records corresponding to a library seat contain occupancy and release records with different source paths, sorting by combined identifier can arrange records with the same source path or the same operation type in adjacent positions, thus forming a uniformly arranged sequence of occupancy and release records. The reason for using this process is that sorting by unified identifier can eliminate the order differences caused by different source paths, so that subsequent sequence mapping processing has a consistent data foundation.

[0029] The operation feature identifiers in the occupancy and release records are identification information embedded in the transaction data, used to describe record attributes; the operation type identifier is a component of the operation feature identifiers, used to distinguish between occupancy and release behaviors; the source path identifier is another component of the operation feature identifiers, used to indicate the path source of the transaction from its generation to being written to the blockchain; the identifier alignment process is the process of sorting and rearranging the occupancy and release records according to a unified identifier rule, achieving consistency in record positions by combining identifier values; the sequence of occupancy and release records is an ordered data set formed after identifier alignment processing, in which each record is arranged according to the combination relationship between the operation type identifier and the source path identifier, so that the records in the same sequence have a unified sorting benchmark, thereby providing standardized input for subsequent sequence mapping processing.

[0030] S202. Based on the sequence of occupied and released records after the identifier alignment process, according to the combination relationship between the operation type identifier and the source path identifier, perform sequence mapping processing on the occupied and released records, and map the occupied and released records to the corresponding sequence positions to form a mapping sequence with corresponding relationship. S203. Combine the blockchain writing order to perform order correction processing on the mapping sequence, so that the occupancy record and release record are arranged according to a unified order rule to form a library seat status mapping sequence.

[0031] When performing sequence correction processing on the mapping sequence based on the blockchain write order, the block height information and the transaction arrangement position within the block corresponding to each occupancy and release record can be extracted from the existing mapping sequence. The block height and the position within the block are then combined to form a sequence identifier value. Subsequently, the mapping sequence is re-sorted based on the sequence identifier value, so that the record arrangement simultaneously satisfies the constraints of the position index order and the blockchain write order. During the sorting process, when there is a discrepancy between the position index order and the blockchain write order, the record position is adjusted according to the blockchain write order first, while maintaining the relative order between records with the same combined identifier value. For example, if the mapping sequence of a library seat contains a position index order of 1, 2, 3, but the record with an earlier block height corresponding to the blockchain write order is located in the third position, the sequence correction processing can adjust this record to the beginning of the sequence, making the overall arrangement consistent with the blockchain write order. This processing method can introduce the original time sequence information of the blockchain while preserving the sequence mapping relationship, making the record arrangement more consistent with the actual writing process.

[0032] Blockchain write order refers to the order in which transaction data is recorded in the blockchain, including the block height order and the order of transactions within the block; order correction processing refers to the process of readjusting the existing mapping sequence according to the blockchain write order, correcting the arrangement deviation in the mapping sequence by introducing the original order information of the blockchain; arranging according to a unified order rule means that the position index order and the blockchain write order are considered simultaneously during the sorting process to form a consistent sorting basis; the library seat status mapping sequence refers to the ordered set of records formed after order correction processing, in which the occupancy records and release records are arranged according to a unified order rule and the existing mapping relationship is consistent with the blockchain write order, used to reflect the continuous process of changes in library seat status.

[0033] In this embodiment, S202 specifically is Based on the sequence of occupied and released records after the identifier alignment process, the operation type identifier and source path identifier in each occupied and released record are combined to generate a corresponding combined identifier value. The occupied and released records are then grouped and arranged according to the combined identifier value to form an initial mapping sequence. Based on the sequence of occupancy and release records after identifier alignment, the operation type identifier and source path identifier in each occupancy and release record can be combined. Specifically, the operation type identifier and source path identifier are concatenated or mapped in a preset order to form a uniquely corresponding combined identifier value. For example, the occupancy operation identifier and source path number are combined into one code, and the release operation identifier and another source path number are combined into another code. Then, the occupancy and release records are grouped and arranged according to the combined identifier value. This can be done by sorting and comparing the combined identifier values ​​or by hash mapping, grouping records with the same combined identifier value into the same group, and sorting the groups according to the size of the combined identifier value or a preset priority. After grouping and arranging, the groups are connected sequentially according to the sorting results. This process forms an initial mapping sequence. For example, when there are occupancy and release records for the same library seat from different source paths, records with the same source path and the same operation type can be grouped together by combining identifier values ​​and arranged in order according to the combined identifier values, thus forming an initial mapping sequence with a grouping structure. In each occupancy and release record, the operation type identifier and the source path identifier are used to represent the operation category and source information, respectively. The combination processing refers to uniformly encoding or splicing the two types of identifiers to generate a combined identifier value. The combined identifier value is used to uniquely identify the feature combination of the record. Grouping and arranging refers to classifying the records according to the combined identifier values ​​and arranging them in order. The initial mapping sequence refers to the ordered set of records formed after grouping and sorting by combined identifier values, providing structured input for subsequent sequence mapping processing.

[0034] According to the order of the combined identifier values ​​in the initial mapping sequence, the occupancy record and release record are processed by sequence mapping. Each occupancy record and release record is assigned to the corresponding sequence position index, and the sequence correspondence between the occupancy record and release record is established to form a mapping sequence with position index. Based on the order of the combined identifier values ​​in the initial mapping sequence, the occupied and released records can be traversed one by one, and each record can be assigned a continuously increasing sequence position index. Specifically, starting from the first record in the initial mapping sequence, the combined identifier values ​​are read sequentially, and position numbers are assigned to the records according to the order of arrangement, such as assigning them the first position, second position, and third position in sequence, thus completing the establishment of the sequence position index. During the position index allocation process, the occupied and released records can be further associated based on the relationship between the combined identifier values ​​of adjacent records. For example, when occupied and released records have the same source path identifier or an adjacent arrangement relationship, a one-to-one correspondence is established between them to identify their relative associated positions in the sequence; for example, for the same library seat... In a record set, if an occupied record is located in the second position and its corresponding released record is located in the third position, the order relationship between the two can be clearly defined through the position index, and they can be bound into a set of corresponding records through the association mark, thus forming a mapping sequence with position index. Here, the arrangement order of the combined identifier value in the initial mapping sequence refers to the order relationship of the records formed after sorting according to the combined identifier value. The sequence mapping process refers to the process of numbering the records with position and assigning association marks. The sequence position index is the number information used to represent the position of the record in the sequence. The sequence correspondence between the occupied record and the released record refers to the association relationship between the records established based on the position index. The mapping sequence with position index is an ordered set of records containing position number and correspondence information, used to describe the structured order relationship between the records.

[0035] The mapping sequence is sequentially integrated based on the location index. The occupied and released records are rearranged according to the location index so that the occupied and released records form a continuous arrangement relationship under the same library seat dimension, forming a mapping sequence with a corresponding relationship.

[0036] When sequentially integrating mapping sequences based on position indices, the entire mapping sequence with position indices can be traversed, and the occupied and released records can be rearranged according to the numerical order of the position indices. Specifically, a sorting algorithm can be used to sort the position indices in ascending order, placing records with smaller position indices at the beginning of the sequence and records with larger position indices at the end, thus completing the rearrangement based on position indices. During the rearrangement process, the same library seat is considered as a unified processing scope, and occupied and released records belonging to the same library seat are processed together, ensuring that the sequential relationship between records remains consistent through the position index. For example, if a library seat's mapping sequence contains records with position indices of 3, 1, and 2, after sorting, the order can be adjusted to 1, 2, and 3, making the original... Dispersed records are arranged in a continuous sequence, and combined with the correspondence established in the previous sequence, the occupied records and their corresponding released records are kept adjacent or ordered and spaced apart in the sequence. This process can eliminate the order offset caused by the mapping process, and make the records form a unified arrangement structure under the same library seat dimension. Among them, the sequential integration process refers to the overall sorting and reorganization of the mapping sequence; the rearrangement according to the position index refers to the arrangement of records based on the position index; the same library seat dimension refers to the data organization based on a single library seat; the continuous arrangement relationship means that the records are arranged in the sequence according to the position index to form an uninterrupted order; and the mapping sequence with correspondence relationship means that the existing correspondence between occupied records and released records is still maintained after the rearrangement is completed.

[0037] S3. Calculate the positional relationship between the occupancy record and the release record in the state mapping sequence based on the library seat state mapping sequence, and determine the degree of conflict of library seat state. In this embodiment, S3 specifically includes the following steps: S301. Based on the library seat status mapping sequence, extract the position indices of the occupancy record and release record in the status mapping sequence, and perform corresponding association processing on the occupancy record and release record according to the position index order to form a position relationship sequence of the occupancy record and release record in the status mapping sequence. Based on the library seat status mapping sequence, each occupied and released record in the sequence can be traversed and read, and the corresponding sequence position number can be extracted as a position index. By sorting the records according to their position indices from smallest to largest, the order of each record in the status mapping sequence can be determined. On this basis, the relative positional relationship between the occupied and released records in the sequence can be used for corresponding association processing. For example, for each occupied record, the nearest released record after it or the nearest released record before it can be found, and the two can be paired to form a pair of corresponding relationships. In specific implementation, a sequential scanning method can be used. When an occupied record is encountered, the release record that meets the conditions can be retrieved, the difference between the position indices of the two can be recorded, and an association can be established. For example, when the occupied record is located at position index 2 and the released record is located at position index 5 in the status mapping sequence of a library seat, the correspondence between the two can be established by traversing and matching, and the position difference value of 3 can be recorded, thus gradually forming a complete sequence of the positional relationship between occupied and released records. This processing method can transform the originally discrete records into structured data with clear correspondences, which is convenient for subsequent calculation of the degree of conflict.

[0038] The library seat status mapping sequence is an ordered set of records formed after sequence mapping and order correction, which includes the arrangement information of occupied and released records. The position index of the occupied and released records in the status mapping sequence is the number information indicating the position of each record in the sequence, used to describe the order of the records. The position index order refers to the arrangement relationship according to the position number from smallest to largest, reflecting the time or logical order of the records in the sequence. The corresponding association processing is the process of establishing a matching relationship between occupied and released records, realizing the association between records through the position index. The position relationship sequence of occupied and released records in the status mapping sequence is a set of multiple sets of correspondences between occupied and released records, where each set of relationships contains the position index information of the corresponding record, used to describe the structured positional relationship between records.

[0039] S302. Based on the positional relationship sequence, calculate the positional relationship between the occupancy record and the release record in the state mapping sequence. Quantify the interval distance and arrangement order between the position indices to form the calculation result of the positional relationship between the occupancy record and the release record in the state mapping sequence. Based on the positional relationship sequence, the positional relationship between occupancy records and release records in the state mapping sequence can be calculated item by item. Specifically, the positional relationship sequence is first traversed, extracting the position indices corresponding to each pair of occupancy and release records, and calculating the positional difference between them as the interval distance. Then, based on the size relationship between the occupancy record position indices and the release record position indices, the arrangement order is determined. For example, when the occupancy record position index is less than the release record position index, it is marked as a forward arrangement; when the occupancy record position index is greater than the release record position index, it is marked as a reverse arrangement. After extracting the interval distance and arrangement order, the interval distance can be processed hierarchically and quantized in conjunction with the arrangement order to form a unified quantified representation. For example, if one pair of occupancy record position indices is 2 and the release record position index is 6, the interval distance can be calculated as 4 and marked as a forward arrangement; while another pair of occupancy record position indices is 7 and the release record position index is 3, the interval distance is 4 and marked as a reverse arrangement. By performing the same processing on multiple pairs of records, a complete positional relationship calculation result can be formed. This process can transform the original positional relationship into unified quantified data, providing standardized input for subsequent conflict degree calculations.

[0040] The positional relationship sequence is a data set consisting of multiple sets of correspondences between occupied and released records. Each set of relationships contains the position index information of the corresponding record. The positional relationship between occupied and released records in the state mapping sequence refers to the relative positional distribution of the two types of records in the sequence. The interval distance between position indices is the difference between the position numbers of two records, used to reflect the distance relationship between the records. The arrangement order is the sequential relationship between occupied and released records in the sequence, used to distinguish arrangement features in different directions. Quantization processing is a process of uniformly encoding and classifying the interval distance and arrangement order. The calculation result of the positional relationship between occupied and released records in the state mapping sequence is a data set formed after quantization of the interval distance and arrangement order. Each data point represents a quantized positional relationship between a set of occupied and released records, used for subsequent calculation of the degree of conflict.

[0041] S303. Based on the positional relationship calculation results, the interval distance in the positional relationship calculation results is accumulated and the arrangement order is marked with a direction. The accumulated interval distance value and the direction mark are combined and mapped. The combined result is segmented and assigned according to the preset interval division standard to determine the degree of conflict of library seat status.

[0042] In this embodiment, S303 specifically refers to: Based on the position relationship calculation results, the interval distance in the position relationship calculation results is accumulated. According to the corresponding order of the occupancy record and the release record in the state mapping sequence, the interval distance between adjacent position indices is summed in turn to form a sequence of accumulated interval distance values. Based on the positional relationship calculation results, the interval distance of each group of occupied and released records can be traversed and processed in the corresponding order. Specifically, the positional relationship calculation results are first sorted according to the corresponding order of the occupied and released records in the state mapping sequence. Then, the interval distance between adjacent groups of records is extracted sequentially and accumulated item by item. The current interval distance is superimposed with the previous accumulated result to form a progressively increasing sequence of accumulated values. For example, when the positional relationship calculation results contain three groups of interval distances of 2, 3, and 4, after processing in order, the first item is 2, the second item is the result of superimposing 2 and 3, and the third item is the result of superimposing the first two items with 4. The result is a complete sequence of cumulative interval distance values. Through this step-by-step accumulation process, the originally scattered interval distances can be transformed into a continuous numerical sequence that reflects the overall distribution trend, which can be used for comprehensive measurement in the subsequent conflict determination process. Among them, the positional relationship calculation result is a data set formed after quantifying the positional relationship between the occupied record and the released record, the interval distance is the difference between the position indices, the accumulation process is the process of continuously superimposing multiple interval distances in a predetermined order, the sequential summation refers to the summation operation performed item by item in the order of arrangement, and the cumulative interval distance value sequence is an ordered numerical set formed after the accumulation process, which is used to characterize the cumulative characteristics of multiple positional relationships as a whole.

[0043] Based on the order of the positional relationship calculation results, the occupancy records and release records are processed with directional identification. According to the arrangement relationship of the occupancy record before or after the release record, each group of positional relationships is assigned a corresponding directional identification, and a directional identification sequence is formed. Based on the order of the positional relationship calculation results, the sequential position of each group of occupied and released records in the state mapping sequence can be determined item by item. Specifically, this is achieved by comparing the position indices of the occupied and released records. When the occupied record's position index is less than the released record's position index, the group is marked as having an occupied record preceding the released record; conversely, when the occupied record's position index is greater than the released record's position index, it is marked as having an occupied record following the released record. After determining the order, each group of records can be assigned a preset direction identifier value. For example, the preceding order can be marked as the first direction identifier, and the following order as the second direction identifier. These direction identifiers are then recorded sequentially according to the order of the positional relationship calculation results, thus forming a direction identifier sequence. For instance, when two groups of records correspond to a certain library seat... In the record, if one group of occupied records has a position index of 2 and a release record has a position index of 5, it is determined that the occupied record is located before the release record and is assigned a corresponding direction identifier. If another group of occupied records has a position index of 7 and a release record has a position index of 3, it is determined that the occupied record is located after the release record and is assigned a different direction identifier. After being arranged in this way, a complete direction identifier sequence is formed. Here, the arrangement order in the position relationship calculation result refers to the relative arrangement order of the occupied records and the release records in the state mapping sequence. The direction identifier processing refers to the process of marking the records according to the arrangement relationship. The arrangement relationship of the occupied record being located before or after the release record is the relative position relationship determined by comparing the position indices. Assigning a corresponding direction identifier means assigning different identifier values ​​according to the arrangement relationship. The direction identifier sequence is an ordered set formed by recording each direction identifier in the order of arrangement, which is used to reflect the directional distribution characteristics among multiple groups of records.

[0044] The sequence of cumulative interval distance values ​​and the sequence of direction identifiers are combined and mapped. The combined mapping result is divided into intervals according to the preset interval division standard. The combined mapping result is then segmented and assigned values ​​according to the assignment rules corresponding to different intervals to determine the degree of conflict in library seat status.

[0045] When combining and mapping the interval distance accumulation value sequence with the direction identifier sequence, the two sequences can be matched item by item according to their corresponding positions. The interval distance accumulation value and the direction identifier at the same position can be combined and encoded, for example, by splicing the identifier or mapping number to form a combined mapping result sequence. Then, the combined mapping result is divided into intervals according to the preset interval division standard. In specific implementation, multiple continuous intervals can be set according to the numerical range of the interval distance accumulation value, and the combination results of different directions can be classified and assigned to the corresponding intervals in combination with the direction identifier. After completing the interval division, the combined mapping result is segmented and assigned values ​​according to the assignment rules corresponding to different intervals. For example, a lower value is assigned to the combination with a small interval distance and the same direction, and a higher value is assigned to the combination with a large interval distance or opposite direction. The assigned values ​​are then integrated according to the sequence order to finally form the library seat status conflict degree value. For example, when the interval distance accumulation value is 3 and the direction is... When the identifier is a preceding relationship, it can be classified into a low-conflict interval and assigned a smaller value. When the cumulative interval distance is 8 and the direction identifier is a reverse relationship, it can be classified into a high-conflict interval and assigned a larger value. The final conflict level value is formed by integrating all the combined results after segmenting and assigning values. Among them, the cumulative interval distance value sequence and the direction identifier sequence represent the distance feature and direction feature of the positional relationship, respectively. The combined mapping process is the process of combining the two types of features. The preset interval division standard is the interval rule set according to the numerical range. The interval division is the process of classifying the combined mapping results into different numerical ranges. The assignment rule corresponding to different intervals is the numerical mapping relationship set for each interval. The combined mapping result is the data set after the combination of interval distance and direction identifier. The segmented assignment is the process of assigning values ​​to the data according to the interval. The conflict level value of the library seat status is a numerical result that comprehensively reflects the conflict intensity between the occupancy record and the release record.

[0046] S4. Based on the degree of conflict of library seat status, the occupied records and released records in the status mapping sequence are weighted and rearranged to form the current status determination result of the library seat. In this embodiment, S4 specifically refers to: Based on the degree of conflict in library seat status, the occupancy and release records in the status mapping sequence are weighted and processed. According to the interval range corresponding to the degree of conflict in library seat status, the occupancy and release records are mapped to the corresponding weight intervals respectively, and weight values ​​are assigned to the occupancy and release records according to the corresponding weight intervals, forming a weight sequence of occupancy and release records. When assigning weights to occupied and released records in a state mapping sequence based on the conflict level of library seats, the conflict level can first be divided into intervals, such as low-conflict, medium-conflict, and high-conflict intervals from low to high. Then, based on the correspondence between occupied and released records in the state mapping sequence, the conflict level associated with each group of records is mapped to the corresponding interval, and different weight values ​​are assigned to occupied and released records according to the interval level. Specifically, a mapping relationship between intervals and weight values ​​can be established, assigning smaller weight values ​​to low-conflict intervals and larger weight values ​​to high-conflict intervals. The weight values ​​can also be differentiated by combining the operation type identifiers of the occupied and released records. For example, when a library seat's conflict level is in a high-conflict interval, a lower weight value can be assigned to the corresponding occupied record, and a higher weight value to the corresponding released record, prioritizing the released record in subsequent sorting. After processing all records in the same way, a weighted sequence of occupied and released records is formed, providing a quantitative basis for subsequent reordering.

[0047] The library seat status conflict level value is a numerical information reflecting the intensity of the conflict between occupancy and release records; weight allocation processing is the process of assigning numerical weights to records based on the conflict level; the interval range corresponding to the library seat status conflict level value is a number of numerical intervals formed according to the conflict level, used to distinguish different conflict levels; mapping to the corresponding weight interval refers to the process of mapping the conflict level value to a specific interval range; assigning weight values ​​is the process of assigning numerical identifiers to occupancy and release records according to the interval range; the weight sequence of occupancy and release records is an ordered data set formed after weight allocation processing, in which each record corresponds to a weight value, used to indicate the priority of the record in subsequent rearrangement processing.

[0048] Based on the weight sequence of the occupancy and release records, the occupancy and release records in the state mapping sequence are rearranged. The occupancy and release records are sorted according to the size of the weight values. If the weight values ​​are the same, they are arranged in order according to the position index in the state mapping sequence to form the rearranged state mapping sequence. When performing rearrangement based on the weight sequence of occupancy and release records, each occupancy and release record in the state mapping sequence is first bound to its corresponding weight value. Then, all records are sorted according to the weight values. Specifically, a sorting algorithm can be used to compare the weight values, placing records with larger weight values ​​at the beginning of the sequence and records with smaller weight values ​​at the end. During the sorting process, when there are records with the same weight value, the order is further determined by the position index in the state mapping sequence. The order of records is determined by comparing the position indexes, prioritizing records with smaller position indices. For example, if there are three records for a library seat with weight values ​​of 5, 3, and 5, the two records with a weight value of 5 can be placed at the beginning by weight sorting, and then these two records can be sorted by position index, thus forming a complete ordered arrangement. This rearrangement method can adjust the record order by introducing weight priority while maintaining the original sequence structure information, making the subsequent state determination criteria clearer.

[0049] The weight sequence of occupied and released records is the set of weight values ​​corresponding to each record, used to represent the priority of the record in the sequence; the reordering process refers to the process of re-sorting the records according to the weight sequence; the weight value size rule is the basis for sorting according to the weight value; the case of the same weight value refers to the situation where multiple records have the same weight value; the state mapping sequence is an ordered set formed by arranging the original records according to the mapping relationship; the position index order is the order in which the position numbers of the records in the sequence are arranged; the order arrangement refers to the process of sorting according to the position index when the weight values ​​are the same; the reordered state mapping sequence is a new ordered set of records formed after weight sorting and position index sorting, where the record order reflects both the weight priority and the original position relationship.

[0050] Based on the rearranged state mapping sequence, the state determination process is performed according to the order of the occupied and released records in the sequence. The operation type identifier corresponding to the record that is prioritized in the sequence is used as the basis for determination to determine the current state of the library seat.

[0051] Based on the rearranged state mapping sequence, the system can scan records one by one according to their order of occupancy and release. Specifically, it reads records starting from the beginning of the sequence and extracts the operation type identifier for each record, prioritizing the records in the sequence for initial judgment. During the judgment process, if the operation type identifier for the first record is an occupancy operation, the current library seat status is determined to be occupied; if it is a release operation, the current library seat status is determined to be vacant. For example, in the rearranged state mapping sequence, if the operation type identifier for the first record is an occupancy operation, this operation is directly used as the judgment criterion; if it is a release operation, the library seat is determined to be vacant. Through this judgment process based on priority-based record arrangement, the current state can be determined using the rearranged sequence, which already incorporates weight and order information.

[0052] The status determination process refers to the process of identifying the status of library seats based on the order of the records. The operation type identifier corresponding to the record with priority in the sequence refers to the operation type information contained in the record at the first position in the rearranged status mapping sequence. The determination basis is the direct reference information used to determine the current status of the library seat. The current status determination result of the library seat is the final status information determined according to the operation type identifier, which is used to indicate whether the library seat is currently occupied or released.

[0053] S5. Based on the current status determination result of the library seats, combined with the newly written occupancy and release records in the blockchain, update the conflict degree value of the library seat status, and dynamically adjust the current status determination result of the library seats according to the updated conflict degree value.

[0054] In this embodiment, S5 specifically refers to: Based on the current status determination of library seats, combined with the newly written occupancy and release records in the blockchain, the operation type identifier and source path identifier in the newly added occupancy and release records are extracted and processed, and the newly added occupancy and release records are incorporated into the state mapping sequence. The position index of the newly added occupancy and release records is assigned according to the position index generation rules in the state mapping sequence, and the position relationship sequence of occupancy and release records in the state mapping sequence is updated. Based on the current status determination of library seats, newly written occupancy and release records in the blockchain can be obtained in real time, and operation type identifiers and source path identifiers can be extracted from each new record. After the identifier extraction is completed, the new occupancy and release records are merged into the original state mapping sequence according to the blockchain writing order, and new position indexes are assigned to the new records according to the existing position index generation rules, such as incrementally assigning according to the maximum position index in the current sequence, or mapping the position according to the block height and transaction order. After the position index allocation is completed, the entire sequence containing the new records is retraced, and the position relationship sequence is updated according to the correspondence between occupancy and release records. For example, when a new occupancy record is inserted at the end of the sequence, a new correspondence is established by searching forward the most recent release record. For example, when the original sequence of a library seat is an alternating arrangement of occupancy and release records, and a new occupancy record is added in a new block, by merging it into the sequence and assigning a new position index, the association between the occupancy record and the subsequent release record can be re-established, thereby forming the updated position relationship sequence of occupancy and release records in the state mapping sequence.

[0055] The current status of a library seat is determined based on the seat status information determined by the rearranged state mapping sequence. Newly written occupancy and release records in the blockchain are newly added transaction data, including operation type identifiers and source path identifiers. The operation type identifier distinguishes between occupancy and release operations, and the source path identifier represents the transaction's source path. Merging into the state mapping sequence refers to inserting new records into the existing sequence in a predetermined order to form an extended sequence. The position index generation rule is the rule used to assign a sequence position number to each record. Position index allocation refers to assigning a corresponding number to new records according to the generation rule. The positional relationship sequence of occupancy and release records in the state mapping sequence is a set of record correspondences established through the position index. After new records are merged, this needs to be reconstructed to reflect the latest record distribution.

[0056] Based on the updated positional relationship sequence of occupancy and release records in the state mapping sequence, the positional relationship is calculated, the positional relationship calculation result is re-acquired, and the interval distance is accumulated and the arrangement order is directionally marked based on the positional relationship calculation result. Through combined mapping processing and interval division assignment rules, the library seat status conflict degree value is updated. Based on the updated positional relationship sequence of occupancy and release records in the status mapping sequence, the position indices of each group of occupancy and release records can be re-traversed and extracted. The updated interval distance is obtained by comparing the corresponding position indices, and the arrangement order is determined according to the size pattern of the occupancy and release record position indices. On this basis, all interval distances are accumulated in the corresponding order, and the direction identifier is processed for each group of arrangement orders. The accumulated interval distance value and the direction identifier are matched item by item to form a combined mapping result. Subsequently, according to the pre-set interval division standard, the combined mapping result is divided into different numerical intervals, and the combined mapping result is segmented and assigned values ​​according to the assignment rules corresponding to each interval, thereby completing the update of the library seat status conflict degree value. For example, when a new record is added, causing the interval distance between a group of occupancy and release records to change from a smaller value to a larger value, and the arrangement order changes, by recalculating the interval distance and combining it with the direction identifier for combined mapping, this group of relationships can be divided into a higher conflict interval and assigned a higher value, thereby reflecting the updated conflict change.

[0057] The updated positional relationship sequence of occupancy and release records in the status mapping sequence is a set of record correspondences re-established after the introduction of new records; the positional relationship calculation refers to the requantization of the positional index relationship between each group of occupancy and release records; the positional relationship calculation result is a data set formed after quantization by interval distance and arrangement order; the interval distance is the difference between the position indices of occupancy and release records, and the accumulation processing is the continuous superposition of multiple interval distances according to the corresponding order; the arrangement order is the front-to-back relationship of occupancy and release records in the sequence, and the direction label processing is the marking of records according to the arrangement relationship; the combination mapping processing is the process of correspondingly combining the accumulated value of interval distance with the direction label; the interval division assignment rule is the rule of segmenting the combination result according to the numerical range and assigning numerical values; the library seat status conflict degree value is the numerical result updated through the above processing, used to reflect the change in the conflict intensity between the current occupancy and release records.

[0058] Based on the updated library seat status conflict level value, the occupancy and release records in the status mapping sequence are reweighted and rearranged. The occupancy and release records are sorted according to the updated weight value, and the operation type identifier corresponding to the priority record is extracted according to the sorted order. The current status determination result of the library seat is dynamically adjusted.

[0059] Based on the updated conflict level of library seats, the occupancy and release records in the state mapping sequence can be reweighted. Specifically, firstly, based on the interval to which the updated conflict level of library seats belongs, each occupancy and release record is reassigned a corresponding weight value, forming an updated weight sequence. Then, based on the updated weight sequence, the occupancy and release records in the state mapping sequence are sorted. By comparing the weight values, records with higher weight values ​​are placed at the beginning of the sequence, and records with lower weight values ​​are placed at the end. After sorting, the operation type identifier corresponding to the first record in the sequence is extracted as a criterion to re-determine the current state of the library seats. For example, when the updated conflict level of library seats increases, release records that were originally of lower priority may be given higher weight, thus placing them at the beginning of the sequence after reordering, changing the current state of the library seats from occupied to released. Through this dynamic adjustment process based on conflict changes, real-time correction of the library seat status can be achieved.

[0060] The updated conflict level value for library seats is the conflict intensity value recalculated after the introduction of new records; the weight allocation process is the process of reassigning weight values ​​to occupied and released records based on the updated conflict level; the reordering process is the process of reordering the records according to the weight values; the updated weight value size rule is the numerical relationship based on the sorting process; the sorted arrangement order is the order of records formed by arranging them according to their weight values; the operation type identifier corresponding to the priority record is the operation type information contained in the record that is first in the sorted order; the current status determination result of the library seats is the status information determined according to the operation type identifier of the priority record. By updating the weight allocation and sorting results, the current status of the library seats can be dynamically adjusted.

[0061] like Figure 2 The blockchain-based library seat management system shown includes an on-chain record identification module, a state sequence construction module, a conflict degree quantification module, a weight rearrangement determination module, and a dynamic conflict control module. The on-chain record identification module obtains the occupancy and release records associated with the target library seat in the blockchain, embeds operation feature identifiers into the occupancy and release records, and determines whether the library seat has both occupancy and release records in the blockchain based on the operation feature identifiers. The status sequence construction module performs sequence mapping on the occupancy and release records based on the operation feature identifiers when both occupancy and release records exist simultaneously, thus forming a library seat status mapping sequence. The conflict level quantification module calculates the positional relationship between occupancy records and release records in the state mapping sequence based on the library seat state mapping sequence to determine the conflict level value of the library seat state. The weighted rearrangement judgment module assigns weights to the occupied and released records in the state mapping sequence based on the degree of conflict of library seat status and performs rearrangement processing to form the current status judgment result of the library seat. The dynamic conflict control module updates the conflict level value of the library seats based on the current status determination result of the library seats and the newly written occupancy and release records in the blockchain. It then dynamically adjusts the current status determination result of the library seats based on the updated conflict level value.

[0062] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0063] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

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

[0065] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

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

[0067] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0068] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A blockchain-based library seat management method, characterized in that, Specifically, the following steps are included: S1. Obtain the occupancy and release records associated with the target library seat in the blockchain, embed operation feature identifiers into the occupancy and release records, and determine whether the library seat has both occupancy and release records in the blockchain based on the operation feature identifiers. S2. When both occupancy and release records exist, perform sequence mapping processing on the occupancy and release records based on the operation feature identifier to form a library seat status mapping sequence. S3. Calculate the positional relationship between the occupancy record and the release record in the state mapping sequence based on the library seat state mapping sequence, and determine the degree of conflict of library seat state. S4. Based on the degree of conflict of library seat status, the occupied records and released records in the status mapping sequence are weighted and rearranged to form the current status determination result of the library seat. S5. Based on the current status determination result of the library seats, combined with the newly written occupancy and release records in the blockchain, update the conflict degree value of the library seat status, and dynamically adjust the current status determination result of the library seats according to the updated conflict degree value.

2. The blockchain-based library seat management method according to claim 1, characterized in that, S1 specifically refers to: The transaction data containing library seat identifiers in the blockchain is parsed. Based on the library seat identifier matching conditions, the occupancy and release records associated with the target library seats are extracted from the blockchain transaction data and a set of occupancy and release records is formed according to the blockchain writing order. In the set of occupancy and release records, an operation feature identifier is embedded in each occupancy and release record. The operation feature identifier includes an operation type identifier and a source path identifier. By writing the operation feature identifier into the transaction field corresponding to the occupancy and release records, a set of occupancy and release records with operation feature identifiers is formed. Based on the set of occupancy and release records with operation feature identifiers, the operation type identifier in the operation feature identifier is identified. When the operation type identifier corresponding to the occupancy record and the operation type identifier corresponding to the release record exist at the same time, it is determined whether the library seat has both an occupancy record and a release record in the blockchain.

3. The blockchain-based library seat management method according to claim 1, characterized in that, S2 specifically includes the following steps: S201. When both occupancy records and release records exist, extract the operation feature identifiers from the occupancy records and release records, and perform identifier alignment processing on the occupancy records and release records according to the operation type identifier and source path identifier in the operation feature identifiers to form a sequence of occupancy records and release records arranged uniformly according to the operation feature identifiers. S202. Based on the sequence of occupied and released records after the identifier alignment process, according to the combination relationship between the operation type identifier and the source path identifier, perform sequence mapping processing on the occupied and released records, and map the occupied and released records to the corresponding sequence positions to form a mapping sequence with corresponding relationship. S203. Combine the blockchain writing order to perform order correction processing on the mapping sequence, so that the occupancy record and release record are arranged according to a unified order rule to form a library seat status mapping sequence.

4. The blockchain-based library seat management method according to claim 3, characterized in that, S202 specifically refers to Based on the sequence of occupied and released records after the identifier alignment process, the operation type identifier and source path identifier in each occupied and released record are combined to generate a corresponding combined identifier value. The occupied and released records are then grouped and arranged according to the combined identifier value to form an initial mapping sequence. According to the order of the combined identifier values ​​in the initial mapping sequence, the occupancy record and release record are processed by sequence mapping. Each occupancy record and release record is assigned to the corresponding sequence position index, and the sequence correspondence between the occupancy record and release record is established to form a mapping sequence with position index. The mapping sequence is sequentially integrated based on the location index. The occupied and released records are rearranged according to the location index so that the occupied and released records form a continuous arrangement relationship under the same library seat dimension, forming a mapping sequence with a corresponding relationship.

5. The blockchain-based library seat management method according to claim 1, characterized in that, S3 specifically includes the following steps: S301. Based on the library seat status mapping sequence, extract the position indices of the occupancy record and release record in the status mapping sequence, and perform corresponding association processing on the occupancy record and release record according to the position index order to form a position relationship sequence of the occupancy record and release record in the status mapping sequence. S302. Based on the positional relationship sequence, calculate the positional relationship between the occupancy record and the release record in the state mapping sequence. Quantify the interval distance and arrangement order between the position indices to form the calculation result of the positional relationship between the occupancy record and the release record in the state mapping sequence. S303. Based on the positional relationship calculation results, the interval distance in the positional relationship calculation results is accumulated and the arrangement order is marked with a direction. The accumulated interval distance value and the direction mark are combined and mapped. The combined result is segmented and assigned according to the preset interval division standard to determine the degree of conflict of library seat status.

6. The blockchain-based library seat management method according to claim 5, characterized in that, S303 specifically refers to: Based on the position relationship calculation results, the interval distance in the position relationship calculation results is accumulated. According to the corresponding order of the occupancy record and the release record in the state mapping sequence, the interval distance between adjacent position indices is summed in turn to form a sequence of accumulated interval distance values. Based on the order of the positional relationship calculation results, the occupancy records and release records are processed with directional identification. According to the arrangement relationship of the occupancy record before or after the release record, each group of positional relationships is assigned a corresponding directional identification, and a directional identification sequence is formed. The sequence of cumulative interval distance values ​​and the sequence of direction identifiers are combined and mapped. The combined mapping result is divided into intervals according to the preset interval division standard. The combined mapping result is then segmented and assigned values ​​according to the assignment rules corresponding to different intervals to determine the degree of conflict in library seat status.

7. The blockchain-based library seat management method according to claim 1, characterized in that, S4 specifically refers to: Based on the degree of conflict in library seat status, the occupancy and release records in the status mapping sequence are weighted and processed. According to the interval range corresponding to the degree of conflict in library seat status, the occupancy and release records are mapped to the corresponding weight intervals respectively, and weight values ​​are assigned to the occupancy and release records according to the corresponding weight intervals, forming a weight sequence of occupancy and release records. Based on the weight sequence of the occupancy and release records, the occupancy and release records in the state mapping sequence are rearranged. The occupancy and release records are sorted according to the size of the weight values. If the weight values ​​are the same, they are arranged in order according to the position index in the state mapping sequence to form the rearranged state mapping sequence. Based on the rearranged state mapping sequence, the state determination process is performed according to the order of the occupied and released records in the sequence. The operation type identifier corresponding to the record that is prioritized in the sequence is used as the basis for determination to determine the current state of the library seat.

8. The blockchain-based library seat management method according to claim 1, characterized in that, S5 specifically refers to: Based on the current status determination of library seats, combined with the newly written occupancy and release records in the blockchain, the operation type identifier and source path identifier in the newly added occupancy and release records are extracted and processed, and the newly added occupancy and release records are incorporated into the state mapping sequence. The position index of the newly added occupancy and release records is assigned according to the position index generation rules in the state mapping sequence, and the position relationship sequence of occupancy and release records in the state mapping sequence is updated. Based on the updated positional relationship sequence of occupancy and release records in the state mapping sequence, the positional relationship is calculated, the positional relationship calculation result is re-acquired, and the interval distance is accumulated and the arrangement order is directionally marked based on the positional relationship calculation result. Through combined mapping processing and interval division assignment rules, the library seat status conflict degree value is updated. Based on the updated library seat status conflict level value, the occupancy and release records in the status mapping sequence are reweighted and rearranged. The occupancy and release records are sorted according to the updated weight value, and the operation type identifier corresponding to the priority record is extracted according to the sorted order. The current status determination result of the library seat is dynamically adjusted.

9. A blockchain-based library seat management system, used to implement the blockchain-based library seat management method according to any one of claims 1-8, characterized in that, It includes an on-chain record identification module, a state sequence construction module, a conflict degree quantification module, a weight rearrangement determination module, and a dynamic conflict control module; The on-chain record identification module obtains the occupancy and release records associated with the target library seat in the blockchain, embeds operation feature identifiers into the occupancy and release records, and determines whether the library seat has both occupancy and release records in the blockchain based on the operation feature identifiers. The status sequence construction module performs sequence mapping on the occupancy and release records based on the operation feature identifiers when both occupancy and release records exist simultaneously, thus forming a library seat status mapping sequence. The conflict level quantification module calculates the positional relationship between occupancy records and release records in the state mapping sequence based on the library seat state mapping sequence to determine the conflict level value of the library seat state. The weighted rearrangement judgment module assigns weights to the occupied and released records in the state mapping sequence based on the degree of conflict of library seat status and performs rearrangement processing to form the current status judgment result of the library seat. The dynamic conflict control module updates the conflict level value of the library seats based on the current status determination result of the library seats and the newly written occupancy and release records in the blockchain. It then dynamically adjusts the current status determination result of the library seats based on the updated conflict level value.