A room allocation method, system and medium

CN122905313APending Publication Date: 2026-10-13SHAZHOU PROFESSIONAL INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611095403.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]上述方式虽然能够完成基础分房,但在多订单、多客房同时调配的场景下,仍存在以下缺陷:一是订单信息、客房状态、客户偏好和历史反馈之间缺少统一的匹配表达,难以形成可直接用于批量调配的订单—客房匹配关系;二是不可分配客房通常仅在分房结果生成前进行简单过滤,未与后续传输求解过程形成一致约束,容易出现约束重复校验或局部冲突;三是客户偏好和历史入住反馈多作为静态参考信息使用,不能随订单取消、客户未到、换房、续住和入住评价等反馈持续更新;四是现有代价或评分通常由固定权重生成,难以同时表达匹配收益、房态变化、清扫状态、维修状态和运营因素;五是在房态或反馈发生变化时,常需要重新执行全量分配计算,缺少对受影响订单、客房及同房型关联客房的局部更新机制

Benefits of technology

本发明通过结合客户偏好标签、房型标签、反馈类型标签、订单特征和客房特征,对待调配订单、可分配客房、实时房态、清扫状态、维修状态、历史入住反馈和运营收益数据进行统一处理,使订单与客房之间形成可计算、可约束、可更新的匹配关系;同时,通过候选匹配集和屏蔽匹配集的划分,将可分配关系与不可分配关系在后续计算过程中持续区分,避免维修占用、锁房、停用、清扫未完成或房型不匹配的客房进入有效调配过程,从而使客房调配结果更加符合实际房态和订单需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905313A_ABST
    Figure CN122905313A_ABST
Patent Text Reader

Abstract

The application discloses a kind of guest room allocation method, system and medium, comprising the following steps: obtaining to be allocated order, assignable guest room, real-time room state, cleaning state, maintenance state, customer preference, historical check-in feedback and operation income data, generate order feature, guest room feature and related label;According to the matching relationship of order and guest room, assignable matching and non-assignable matching are divided;Combined with customer preference, room type and historical feedback, generate matching income, and form dynamic cost matrix together with room state, cleaning, maintenance and other operation factors;Then according to order demand and guest room available condition, the transmission relationship between order and guest room is solved, and the guest room allocation result is generated;After order cancellation, customer does not arrive, room change, renewal and check-in feedback occur, update corresponding feedback data and locally adjust dynamic cost matrix.The application relates to the technical field of hotel room management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hotel room management technology, and in particular to a method, system and medium for room allocation. Background Technology

[0002] Hotel room allocation typically involves selecting available rooms for pending bookings based on information such as check-in date, room type requirements, stay duration, real-time room availability, cleaning status, maintenance status, and customer preferences. Current room allocation methods often employ manual allocation, fixed-rule allocation, or automatic allocation based on a single rating, such as sorting rooms by room type, availability, floor preference, or order priority.

[0003] While the above methods can complete basic room allocation, they still have the following drawbacks in scenarios involving multiple orders and multiple rooms being allocated simultaneously: First, there is a lack of a unified matching expression between order information, room status, customer preferences, and historical feedback, making it difficult to form an order-room matching relationship that can be directly used for batch allocation; Second, unallocable rooms are usually only filtered simply before the room allocation results are generated, without forming consistent constraints with the subsequent transmission and solution process, which can easily lead to duplicate constraint verification or local conflicts; Third, customer preferences and historical check-in feedback are mostly used as static reference information and cannot be continuously updated with feedback such as order cancellations, customer absences, room changes, stay extensions, and check-in reviews; Fourth, existing costs or scores are usually generated with fixed weights, making it difficult to simultaneously express matching benefits, room status changes, cleaning status, maintenance status, and operational factors; Fifth, when room status or feedback changes, it is often necessary to re-execute the full allocation calculation, lacking a mechanism for partial updates to affected orders, rooms, and related rooms of the same room type.

[0004] Therefore, how to provide a method, system, and medium for room allocation is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a method, system, and medium for room allocation. This invention fully utilizes customer preference learning, order-room matching modeling, dynamic cost matrix construction, and optimal transmission solution techniques to uniformly process data on orders to be allocated, available rooms, real-time room status, cleaning status, maintenance status, historical occupancy feedback, and operational revenue. This generates a candidate matching set, a masked matching set, and an order-room transmission matrix, thereby forming the room allocation result. Simultaneously, this invention converts order cancellations, customer absences, room changes, extended stays, and occupancy feedback into feedback data, performing closed-loop updates to the matching revenue and dynamic cost matrix. This allows the room allocation process to be continuously adjusted based on real-time room status constraints, changes in customer preferences, and historical feedback information.

[0006] A method for allocating guest rooms according to an embodiment of the present invention includes the following steps: Acquire data on pending orders, available rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical occupancy feedback, and operational revenue; generate order characteristics, room characteristics, customer preference tags, room type tags, feedback type tags, order demand margin, room availability margin, and unallocatable tags. Order features and room features are combined into an order-room matching context, and candidate matching sets and masked matching sets are divided based on unassignable labels; The Thompson sampling posterior unit, which is jointly indexed by customer preference label, room type label and feedback type label, is called on the candidate matching set to obtain the matching benefit sample and posterior confidence parameter, and the matching benefit of the masked matching set is set to invalid value; The basic cost is generated based on the matched revenue sample, the basic cost is corrected using the posterior confidence parameter, and the operating cost determined by real-time room status, cleaning status, maintenance status, order characteristics and guest room characteristics is superimposed to form a dynamic cost matrix; An entropy-regularized optimal transmission model is constructed using the dynamic cost matrix, order demand margin, room availability margin, and shielded matching set. The Greenkhorn algorithm is used to select a single order row and a room column for scaling and updating based on the marginal residual and posterior confidence parameters of the entropy regularized optimal transmission model, so as to obtain the order-room transmission matrix. Based on the order-room transfer matrix, room allocation results are generated, and feedback such as order cancellation, customer absence, room change, extended stay, and check-in is converted into new feedback type labels and feedback reward values. The corresponding Thompson sampling posterior units are updated, and the dynamic cost matrix is ​​locally reconstructed based on the updated Thompson sampling posterior units.

[0007] Optionally, the generation of the order features, room features, customer preference tags, room type tags, feedback type tags, order demand margin, room availability margin, and unassignable tags includes: Based on the check-in date, room type requirements, check-in duration, and customer preferences in the orders to be allocated, the orders are coded according to the preset order field order to generate order features; Based on the room floor, room orientation, cleaning status, maintenance status, room status and room type of the allocable rooms, the room features are generated by encoding them in the order of the preset room fields. Generate customer preference tags based on customer preferences for floor level, orientation, quietness, and room attributes. Based on the correspondence between room type requirements and guest room types, room type tags are generated; Based on historical check-in feedback, such as order cancellation status, customer no-show status, room change status, stay extension status, and review status, generate feedback type tags; Based on the check-in date, room type requirements, and check-in duration of each order to be allocated within the same allocation batch, order demand weights are generated, and the order demand weights are normalized to generate order demand margins. Based on the cleaning status, maintenance status, and room status of each allocable guest room during the period corresponding to the order check-in date, a guest room availability weight is generated, and the guest room availability weight is normalized to generate a guest room availability margin. When any of the following conditions are met: room type demand does not match room type, cleaning status is incomplete, maintenance status is under maintenance and occupied, or room status is unavailable for sale, the unassignable tag of the corresponding order-room matching relationship will be set to valid.

[0008] Optionally, the division of the candidate matching set and the masked matching set includes: The order occupancy period is generated based on the order check-in date and check-in duration in the order characteristics. The unavailable period of a guest room is generated based on the room status in the guest room characteristics. The unavailable period of a guest room includes the period during which the guest room is occupied, the period during which the room is locked, and the period during which the room is not in use. The time overlap between the period when an order is occupied and the period when a room is unavailable is compared to generate a time matching result. The room type requirements in the order characteristics are compared with the room types in the room characteristics to generate room type matching results; The cleaning status, maintenance status and room status of the guest room features are compared with the preset assignable statuses to generate guest room status matching results. A matching determination result is generated based on the time matching result, room type matching result, and guest room status matching result; When the matching result indicates any of the following situations: the order occupancy period overlaps with the room unavailability period, the room type requirement does not match the room type, the cleaning status is not completed, the maintenance status is maintenance occupancy, or the room status is locked or disabled, the corresponding order-room matching context will be assigned to the masked matching set. When the matching result indicates that there is no overlap between the order occupancy period and the room unavailability period, the room type demand matches the room type, the cleaning status is completed, the maintenance status is not maintenance occupancy and the room status is available for sale, the corresponding order-room matching context will be assigned to the candidate matching set.

[0009] Optionally, the generation of the matched gain samples and posterior confidence parameters includes: A posterior index key is generated based on customer preference tags, room type tags, and feedback type tags, and a Thompson sampling posterior unit table is constructed according to the posterior index key; For each Thompson sampling posterior unit in the Thompson sampling posterior unit table, configure the success parameter, failure parameter, sample count parameter, and benchmark value of the revenue corresponding to the posterior index key; Based on the evaluation status, extended stay status, room change status, order cancellation status, and customer absence status corresponding to the posterior index key in the historical check-in feedback, a historical feedback reward value is generated, and the revenue success parameter, revenue failure parameter, and sample count parameter in the corresponding Thompson sampling posterior unit are updated according to the historical feedback reward value. For the order-room matching context in the candidate matching set, read the customer preference tag, room type tag and feedback type tag corresponding to the order-room matching context, and generate the current posterior index key; Based on the current posterior index key, retrieve the corresponding Thompson sampling posterior unit in the Thompson sampling posterior unit table. If the retrieval is successful, call the corresponding Thompson sampling posterior unit. If the retrieval fails, generate an initial Thompson sampling posterior unit corresponding to the current posterior index key and write the initial Thompson sampling posterior unit into the Thompson sampling posterior unit table. The revenue sample value is generated based on the revenue success parameter and revenue failure parameter in the called Thompson sampling posterior unit, and a matching revenue sample is generated based on the revenue sample value and the revenue benchmark value. Based on the success parameters, failure parameters, and sample count parameters in the invoked Thompson sampling posterior unit, a posterior confidence parameter is generated, and the matching benefit sample and posterior confidence parameter are written into the corresponding order-room matching context.

[0010] Optionally, the formation of the dynamic cost matrix includes: Read the matching revenue sample, posterior confidence parameter, order features, room features, real-time room status, cleaning status, maintenance status, candidate matching set, and masked matching set from the order-room matching context; Based on the candidate matching set, identify the order-room matching context that participates in the cost calculation, and based on the masked matching set, identify the order-room matching context that does not participate in the cost calculation; For the order-room matching context involved in cost calculation, the cost of the matching revenue sample is reverse-mapped to generate the base cost; The confidence correction magnitude is generated based on the posterior confidence parameter, and the base cost is corrected according to the confidence correction magnitude to generate the corrected base cost; Vacancy loss cost is generated based on real-time room status; cleaning conversion cost is generated based on cleaning status; maintenance occupancy cost is generated based on maintenance status; room type deviation cost is generated based on room type demand in order characteristics and room type in guest room characteristics; and consecutive stay switching cost is generated based on stay duration in order characteristics and room status in guest room characteristics. The operating cost is generated by combining the costs of vacancy loss, cleaning and conversion, maintenance and occupancy, room type deviation, and consecutive stay switching. The base cost and operational cost are combined to generate candidate matrix elements corresponding to the order-room matching context that participate in the cost calculation; For order-room matching contexts that do not participate in cost calculation, set the corresponding matrix element as a non-transferable cost; By using the order index as the row and the room index as the column, candidate matrix elements and non-transferable costs are written into the corresponding matrix positions to form a dynamic cost matrix.

[0011] Optionally, the construction of the entropy-regularized optimal transmission model includes: Read the dynamic cost matrix, order demand margin, room availability margin, candidate matching set, and masked matching set; Establish order-to-room transfer variables according to the order row and room column of the dynamic cost matrix, and associate each order-to-room transfer variable with the matrix element at the corresponding position in the dynamic cost matrix to generate a cost transfer item; Based on the order demand margin, the order-room transfer variables in the same order line are summed and constrained to generate row margin constraints; Based on the available room margin, the order-room transfer variables in the same room column are summed and constrained to generate column margin constraints; Based on the candidate matching set, the corresponding order-room transmission variable is limited to non-negative variables, and based on the masked matching set, the corresponding order-room transmission variable is fixed to zero, thus generating a transmission feasible domain. By combining the cost transmission term, entropy regularization term, row marginal constraints, column marginal constraints, and transmission feasible region, an entropy regularized optimal transmission model is constructed. The transmission kernel matrix is ​​generated based on the dynamic cost matrix and entropy regularization coefficient in the entropy regularization optimal transmission model, and the elements of the transmission kernel matrix corresponding to the masked matching set are set to zero according to the transmission feasible region.

[0012] Optionally, the Greenkhorn algorithm includes: Read the transmission kernel matrix, order demand margin, room availability margin, candidate matching set, masked matching set, dynamic cost matrix, and Thompson sampling posterior unit update flag; Construct a feasible bipartite graph of order-guest room based on the candidate matching set, delete the corresponding edges in the feasible bipartite graph of order-guest room based on the masked matching set, and fix the elements of the transmission kernel matrix corresponding to the masked matching set to zero; Connectivity partitioning is performed on the order-room feasible bipartite graph to generate a feasible allocation subgraph. Sub-transmission kernel matrix, sub-order demand margin, and sub-room availability margin are extracted from the transmission kernel matrix, order demand margin, and room availability margin according to the feasible allocation subgraph. For sub-order demand margins and sub-room availability margins within the same feasible allocation sub-graph, perform margin registration to generate independent scaling units; The order scaling vector and the guest room scaling vector are initialized based on independent scaling units, and a sub-order-guest room transmission matrix is ​​generated based on the order scaling vector, the sub-transmission kernel matrix, and the guest room scaling vector. The marginal residuals of order rows and guest room columns are calculated based on the sub-order-guest room transfer matrix. A local kernel refresh set is generated based on the Thompson sampling posterior unit update marker. The local kernel refresh set includes the order rows, guest room columns and related guest room columns of the same room type that have undergone posterior changes. Based on the local kernel refresh set, the corresponding matrix elements are read from the updated dynamic cost matrix, the corresponding local transmission kernel elements are regenerated, and the local transmission kernel elements are written back to the corresponding sub-transmission kernel matrix. Based on the subtransmission kernel matrix after the write-back, the affected order row marginal residuals and guest room column marginal residuals are recalculated, and one of the single order row and single guest room column with the largest marginal residual is selected from each independent scaling unit as the current object to be scaled; When the current object to be scaled is an order row, update the order scaling factor according to the ratio of the corresponding sub-order demand margin to the current row's transmission volume and value; when the current object to be scaled is a guest room column, update the guest room scaling factor according to the ratio of the corresponding sub-guest room's available margin to the current column's transmission volume and value. The sub-order-guest room transmission matrix is ​​regenerated based on the updated order scaling vector, sub-transmission kernel matrix, and guest room scaling vector, while keeping the transmission volume corresponding to the masked matching set at zero; Repeat the local kernel refresh, marginal residual calculation, current object to be scaled selection and scaling factor update until the marginal residual of the order row and the marginal residual of the guest room column of each independent scaling unit meet the preset convergence threshold. The sub-order-guest room transfer matrix output by each independent scaling unit is backfilled into the global transfer matrix according to the original order index and the original guest room index to obtain the order-guest room transfer matrix.

[0013] Optionally, the method for generating and updating the room allocation results in a closed loop includes: Read orders—guest room transmission matrix, candidate matching set, masked matching set, order features, guest room features, customer preference tags, room type tags, feedback type tags, and dynamic cost matrix; Based on the transmission volume corresponding to the same order line in the order-guest room transmission matrix, the candidate matching set associated with the order line is sorted to generate a candidate guest room sequence, and the order-guest room matching relationship corresponding to the masked matching set is excluded from the candidate guest room sequence; Read the corresponding room characteristics sequentially according to the candidate room sequence, and verify the order occupancy period, real-time room status, cleaning status, maintenance status, room availability margin and room type label in combination with the order characteristics to generate a pending order-room binding record; When the same guest room corresponds to multiple pending order-guest room binding records, the valid order-guest room binding record is determined based on the corresponding transmission volume, matrix elements in the dynamic cost matrix, and sorting position in the candidate guest room sequence. The pending orders that are not determined to be valid order-guest room binding records are returned to the corresponding candidate guest room sequence for further selection. Based on valid order-room binding records, a room allocation result is generated, which includes order identifier, room identifier, order occupancy period, room type tag, customer preference tag, matching status, and allocation time. After the room allocation results are executed, the order cancellation status, customer absence status, room change status, extended stay status, and check-in feedback status are obtained based on the order identifier and room identifier, and converted into new feedback type labels and feedback reward values; Based on the new feedback type label and the customer preference label and room type label in the room allocation results, a feedback posterior index key is generated, and the corresponding Thompson sampling posterior unit is located according to the feedback posterior index key. Update the success, failure, and sample count parameters in the corresponding Thompson sampling posterior unit based on the feedback return value, and generate a Thompson sampling posterior unit update tag containing the order identifier, room identifier, and room type label; Based on the updated labels of the Thompson sampling posterior unit, the affected order-room matching context is determined. The updated Thompson sampling posterior unit is applied to the affected order-room matching context to regenerate the matching revenue sample and posterior confidence parameter. The dynamic cost matrix is ​​then locally reconstructed based on the regenerated matching revenue sample and posterior confidence parameter.

[0014] Optionally, a guest room allocation system, implementing the guest room allocation method according to any one of claims 1-8, includes the following modules: The data generation module acquires data on orders to be allocated, available guest rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical occupancy feedback, and operational revenue, and generates order characteristics, guest room characteristics, customer preference tags, room type tags, feedback type tags, order demand margin, guest room availability margin, and unallocatable tags. The matching processing module generates an order-room matching context based on order features and room features, and divides the candidate matching set and the masked matching set according to the unassignable tags; The posterior sampling module calls the Thompson sampling posterior unit based on customer preference labels, room type labels, and feedback type labels to generate matching benefit samples and posterior confidence parameters for the candidate matching set; The cost construction module forms a dynamic cost matrix based on matching revenue samples, posterior confidence parameters, order features, room features, real-time room status, cleaning status, and maintenance status. The transmission solution module constructs an entropy-regularized optimal transmission model based on the dynamic cost matrix, order demand margin, room availability margin, candidate matching set, and masked matching set, and uses the Greenkhorn algorithm to generate the order-room transmission matrix. The allocation and update module generates room allocation results based on the order-room transmission matrix, and updates the Thompson sampling posterior unit and dynamic cost matrix based on order cancellation, customer absence, room change, extended stay, and check-in feedback.

[0015] Optionally, a computer-readable storage medium stores a computer program that, when executed by a processor, implements a room allocation method as described in any one of claims 1 to 8.

[0016] The beneficial effects of this invention are: This invention combines customer preference tags, room type tags, feedback type tags, order characteristics, and room characteristics to uniformly process data on orders to be allocated, available rooms, real-time room status, cleaning status, maintenance status, historical occupancy feedback, and operational revenue. This creates a calculable, constrainable, and updatable matching relationship between orders and rooms. Simultaneously, by dividing the data into candidate matching sets and masked matching sets, it continuously distinguishes between allocatable and non-allocatable relationships during subsequent calculations. This prevents rooms occupied by maintenance, locked, out of service, incomplete cleaning, or with mismatched room types from entering the effective allocation process, thus ensuring that the room allocation results better match the actual room status and order requirements.

[0017] This invention generates matching benefit samples and posterior confidence parameters by calling a Thompson sampling posterior unit indexed by customer preference labels, room type labels, and feedback type labels. These results are then used in conjunction with real-time room status, cleaning status, maintenance status, order features, and guest room features to construct a dynamic cost matrix. This allows guest room allocation to no longer rely solely on fixed rules or static ratings, but to simultaneously consider customer preferences, historical occupancy feedback, guest room operational status, and order demand. By constructing an entropy-regularized optimal transmission model using the dynamic cost matrix, order demand margin, guest room availability margin, and masked matching set, a holistic order-guest room transmission matrix can be generated even when multiple orders and multiple guest rooms exist simultaneously, reducing matching conflicts caused by localized room allocation.

[0018] This invention improves the Greenkhorn algorithm by constructing a feasible bipartite graph of orders and guest rooms based on the candidate matching set. It then performs connected component partitioning and edge registration on the feasible bipartite graph, enabling different feasible allocation subgraphs to be solved as independent scaling units. Furthermore, after order cancellation, customer absence, room change, extended stay, and check-in feedback trigger Thompson sampling posterior unit updates, only the affected order rows, guest room columns, and related guest room columns of the same room type undergo local kernel refresh and dynamic cost matrix local reconstruction. This allows the system to continuously correct subsequent guest room allocation processes based on actual execution feedback, reducing full recalculation and forming a closed-loop processing mechanism from allocation result generation to feedback write-back and cost update. Attached Figure Description

[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a guest room allocation method proposed in this invention; Figure 2 This is a flowchart illustrating the generation of the order-room transmission matrix based on the entropy regularization optimal transmission model and the Greenkhorn algorithm in this invention. Detailed Implementation

[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0021] refer to Figures 1-2 A method for allocating guest rooms includes the following steps: Acquire data on pending orders, available rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical occupancy feedback, and operational revenue; generate order characteristics, room characteristics, customer preference tags, room type tags, feedback type tags, order demand margin, room availability margin, and unallocatable tags. Order features and room features are combined into an order-room matching context, and candidate matching sets and masked matching sets are divided based on unassignable labels; The Thompson sampling posterior unit, which is jointly indexed by customer preference label, room type label and feedback type label, is called on the candidate matching set to obtain the matching benefit sample and posterior confidence parameter, and the matching benefit of the masked matching set is set to invalid value; The basic cost is generated based on the matched revenue sample, the basic cost is corrected using the posterior confidence parameter, and the operating cost determined by real-time room status, cleaning status, maintenance status, order characteristics and guest room characteristics is superimposed to form a dynamic cost matrix; An entropy-regularized optimal transmission model is constructed using the dynamic cost matrix, order demand margin, room availability margin, and shielded matching set. The Greenkhorn algorithm is used to select a single order row and a room column for scaling and updating based on the marginal residual and posterior confidence parameters of the entropy regularized optimal transmission model, so as to obtain the order-room transmission matrix. Based on the order-room transfer matrix, room allocation results are generated, and feedback such as order cancellation, customer absence, room change, extended stay, and check-in is converted into new feedback type labels and feedback reward values. The corresponding Thompson sampling posterior units are updated, and the dynamic cost matrix is ​​locally reconstructed based on the updated Thompson sampling posterior units.

[0022] In this embodiment, the generation of order features, room features, customer preference tags, room type tags, feedback type tags, order demand margin, room availability margin, and unassignable tags includes: Based on the check-in date, room type requirements, check-in duration, and customer preferences in the orders to be allocated, the orders are coded according to the preset order field order to generate order features; Based on the room floor, room orientation, cleaning status, maintenance status, room status and room type of the allocable rooms, the room features are generated by encoding them in the order of the preset room fields. Specifically, the preset order field order is: order check-in date, room type requirement, check-in duration, and customer preference; the preset room field order is: room floor, room orientation, cleaning status, maintenance status, room status, and room type. Each field is written to its corresponding feature position in the above order. The date field is converted to a time interval code, the category field is converted to a discrete code, the status field is converted to a status code, and the customer preference field is converted to a preference code. Generate customer preference tags based on customer preferences for floor level, orientation, quietness, and room attributes. Based on the correspondence between room type requirements and guest room types, room type tags are generated; Based on historical check-in feedback, such as order cancellation status, customer no-show status, room change status, stay extension status, and review status, generate feedback type tags; Based on the check-in date, room type requirements, and check-in duration of each order to be allocated within the same allocation batch, order demand weights are generated, and the order demand weights are normalized to generate order demand margins. Based on the cleaning status, maintenance status, and room status of each allocable guest room during the period corresponding to the order check-in date, a guest room availability weight is generated, and the guest room availability weight is normalized to generate a guest room availability margin. When any of the following conditions are met: room type demand does not match room type, cleaning status is incomplete, maintenance status is occupied for maintenance, or room status is unavailable for sale, the unassignable tag of the corresponding order-room matching relationship will be set to valid. The unassignable tags are generated one by one according to the order-room matching relationship. When any of the following conditions are met: the room type requirement does not match the room type, the cleaning status is incomplete, the maintenance status is occupied for maintenance, or the room status is unavailable, the unassignable tag for the corresponding order-room matching relationship is set to valid. When the room type requirement matches the room type, the cleaning status is completed, the maintenance status is normal, and the room status is available, the unassignable tag for the corresponding order-room matching relationship is set to invalid. In Example 1, order features, room features, and various tags are generated using a unified coding dictionary. The order check-in date is converted into a continuous date number according to the hotel's business days; the check-in duration is converted into an integer value according to the number of check-in days; the room type requirement is converted into a discrete value according to the room type codes of standard king room, twin room, family room, and suite; customer preferences are converted into preference codes according to floor preference, orientation preference, quietness preference, and room attribute preference, respectively; the room floor is converted into a numerical code according to the actual floor number; the room orientation is converted into an orientation code according to east, south, west, north, and combinations thereof; the cleaning status is converted into a status code according to not cleaned, cleaning in progress, and cleaned; the maintenance status is converted into a status code according to normal, pending maintenance, and maintenance occupied; and the room status is converted into a status code according to available, sold, locked, and unavailable. Convert to room status coding; within the same allocation batch, the order demand margin is obtained by normalizing the number of rooms required for each order within the corresponding check-in date and check-in duration, and the room availability margin is obtained by normalizing the number of available rooms that are available for sale, cleaned, and not under maintenance during the corresponding check-in date period; for example, in an allocation batch containing 20 orders to be allocated and 60 rooms, if an order requires 1 twin room and stays for 2 nights, the demand weight of the order is recorded as 1. If a room is available for sale, cleaned, and in normal condition during the 2 nights, the availability weight of the room is recorded as 1. When the room type does not match, the cleaning status is not cleaned or cleaning in progress, the maintenance status is under maintenance, or the room status is locked or unavailable, the unassignable tag of the corresponding order-room matching relationship is set to valid.

[0023] In this embodiment, the division of the candidate matching set and the masked matching set includes: The order occupancy period is generated based on the order check-in date and check-in duration in the order characteristics. Specifically, the order occupancy period is determined by the order check-in date and check-in duration. The order check-in date is the hotel's business day number, and the check-in duration is the number of consecutive nights. For example, if the order check-in date is August 1, 2026, and the check-in duration is 2 nights, then the order occupancy period is the two business nights from August 1, 2026, to August 3, 2026, before check-out. The room unavailability period is generated from the occupancy record, lock record, and deactivation record corresponding to the room status. The room occupancy period comes from confirmed check-in orders, the lock record comes from the operation lock record, and the deactivation period comes from the maintenance deactivation record. The time matching result is generated by comparing whether there is a date overlap between the order occupancy period and the room unavailability period. When there is at least one overlapping business night, the time matching result is a mismatch; when there is no overlapping business night, the time matching result is a match. The unavailable period of a guest room is generated based on the room status in the guest room characteristics. The unavailable period of a guest room includes the period during which the guest room is occupied, the period during which the room is locked, and the period during which the room is not in use. The time overlap between the period when an order is occupied and the period when a room is unavailable is compared to generate a time matching result. The room type requirements in the order characteristics are compared with the room types in the room characteristics to generate room type matching results; Specifically, the room type matching result is generated by comparing the room type requirements in the order features with the room type in the guest room features according to a unified room type code. The unified room type code includes codes for king room, twin room, family room, suite, and equivalent alternative room types. When the room type requirement code and the guest room type code are the same, the room type matching result is a match. When the room type requirement code and the guest room type code are different and there is no pre-configured equivalent alternative relationship, the room type matching result is a mismatch. For example, a matching result is generated when the order room type requirement is twin room and the guest room type is twin room; a mismatch result is generated when the order room type requirement is twin room and the guest room type is king room; a matching result is generated when the order room type requirement is standard king room and the guest room type is superior king room and there is an equivalent alternative relationship. The cleaning status, maintenance status and room status of the guest room features are compared with the preset assignable statuses to generate guest room status matching results. Specifically, the guest room status matching result is generated jointly by the cleaning status, maintenance status, and room status. The cleaning status includes not cleaned, cleaning in progress, and completed; the maintenance status includes normal, pending maintenance, and maintenance occupied; and the room status includes available for sale, occupied, locked, and unavailable. When the cleaning status is completed, the maintenance status is normal or pending maintenance and does not affect check-in, and the room status is available for sale, the guest room status matching result meets the preset allocable status. When any of the following states is met: cleaning not cleaned or cleaning in progress, maintenance occupied, room status occupied, locked, or unavailable, the guest room status matching result does not meet the preset allocable status. The matching judgment result is jointly determined by the time matching result, the room type matching result, and the guest room status matching result. When all three meet the matching conditions, the corresponding order-guest room matching context is written into the candidate matching set. When any result does not meet the matching conditions, the corresponding order-guest room matching context is written into the masked matching set. A matching determination result is generated based on the time matching result, room type matching result, and guest room status matching result; When the matching result indicates any of the following situations: the order occupancy period overlaps with the room unavailability period, the room type requirement does not match the room type, the cleaning status is not completed, the maintenance status is maintenance occupancy, or the room status is locked or disabled, the corresponding order-room matching context will be assigned to the masked matching set. When the matching result indicates that the order occupancy period and the room unavailability period do not overlap, the room type demand matches the room type, the cleaning status is completed, the maintenance status is not maintenance occupancy and the room status is available for sale, the corresponding order-room matching context will be assigned to the candidate matching set. Specifically, the matching result is generated jointly by the time matching result, the room type matching result, and the guest room status matching result. When there is at least one business night overlap between the order occupancy period and the guest room unavailability period, the time matching result is a mismatch. When the room type demand code and the guest room type code are inconsistent, the room type matching result is a mismatch. When the cleaning status is not completed, the maintenance status is maintenance occupied, and the room status is locked or unavailable, the guest room status matching result is a mismatch. When any matching result is a mismatch, the corresponding order-guest room matching context is assigned to the masked matching set. When all three matching results are a match, the corresponding order-guest room matching context is assigned to the candidate matching set.

[0024] In this embodiment, the generation of the matching benefit sample and the posterior confidence parameter includes: A posterior index key is generated based on customer preference tags, room type tags, and feedback type tags, and a Thompson sampling posterior unit table is constructed according to the posterior index key; For each Thompson sampling posterior unit in the Thompson sampling posterior unit table, configure the success parameter, failure parameter, sample count parameter, and benchmark value of the revenue corresponding to the posterior index key; Based on the evaluation status, extended stay status, room change status, order cancellation status, and customer absence status corresponding to the posterior index key in the historical check-in feedback, a historical feedback reward value is generated, and the revenue success parameter, revenue failure parameter, and sample count parameter in the corresponding Thompson sampling posterior unit are updated according to the historical feedback reward value. Specifically, the historical feedback return value is a normalized value. When the historical check-in feedback is positive or a stay extension, the historical feedback return value is recorded as 1. When the historical check-in feedback is negative, a room change, an order cancellation, or a customer not arriving, the historical feedback return value is recorded as 0. For the Thompson sampling posterior unit corresponding to the same posterior index key, if the historical feedback return value is 1, the success parameter is incremented by 1. If the historical feedback return value is 0, the failure parameter is incremented by 1. The sample count parameter is incremented by 1 after each feedback is written. For example, if the current success parameter of a certain posterior index key is 12, the failure parameter is 5, and the sample count parameter is 17, if a stay extension feedback is added, the success parameter is updated to 13, the failure parameter is 5, and the sample count parameter is 18. If a room change feedback is added, the success parameter is updated to 12, the failure parameter is 6, and the sample count parameter is 18. For the order-room matching context in the candidate matching set, read the customer preference tag, room type tag and feedback type tag corresponding to the order-room matching context, and generate the current posterior index key; Based on the current posterior index key, retrieve the corresponding Thompson sampling posterior unit in the Thompson sampling posterior unit table. If the retrieval is successful, call the corresponding Thompson sampling posterior unit. If the retrieval fails, generate an initial Thompson sampling posterior unit corresponding to the current posterior index key and write the initial Thompson sampling posterior unit into the Thompson sampling posterior unit table. Specifically, the current posterior index key is generated by concatenating the customer preference tag, room type tag, and feedback type tag corresponding to the current order-room matching context in a fixed order, such as "high floor preference - twin room - extended stay feedback". The system uses the current posterior index key as the retrieval key in the Thompson sampling posterior unit table. If the same retrieval key exists in the table, the system reads the revenue success parameter, revenue failure parameter, sample count parameter, and revenue benchmark value from the corresponding Thompson sampling posterior unit. If the same retrieval key does not exist in the table, a new Thompson sampling posterior unit is created, and the initial revenue success parameter and initial revenue failure parameter are both set to 1, the initial sample count parameter is set to 0, and the revenue benchmark value is set to the current order revenue or the average revenue of the same room type. Based on the success and failure parameters of the revenue in the invoked Thompson sampling posterior unit, a revenue sample value is generated, and a matching revenue sample is generated based on the revenue sample value and the revenue benchmark value. ; in, Indicates the first The order and the first Revenue sample value for each guest room, This indicates the success parameter corresponding to the current posterior index key. This indicates the failure parameter corresponding to the current posterior index key. Indicates the first The order and the first Benchmark revenue per guest room Indicates the matching profit sample; Based on the success parameters, failure parameters, and sample count parameters in the invoked Thompson sampling posterior unit, a posterior confidence parameter is generated, and the matching benefit sample and posterior confidence parameter are written into the corresponding order-room matching context. Specifically, the Thompson sampling posterior unit table uses a posterior index key formed by concatenating customer preference tags, room type tags, and feedback type tags as the retrieval field. Each posterior index key corresponds to one Thompson sampling posterior unit. Each Thompson sampling posterior unit includes at least a revenue success parameter, a revenue failure parameter, a sample count parameter, and a revenue benchmark value. The initial revenue success parameter and initial revenue failure parameter are both set to 1, the initial sample count parameter is set to 0, and the revenue benchmark value is taken as the current order price, the average price of the same room type, or the historical average revenue of customers with the same preferences. Historical check-in feedback is converted into historical feedback reward values ​​and written to the corresponding posterior index key. When the historical feedback is positive, continues the stay, or has no feedback, the historical feedback is considered as positive. When a room change is completed and check-in is complete, the historical feedback value is recorded as 1. When the historical feedback is negative, room change, order cancellation, or customer not arriving, the historical feedback value is recorded as 0, and the revenue success parameter, revenue failure parameter, and sample count parameter are updated accordingly. For example, in a Thompson sampling posterior unit with the posterior index key "high floor preference - twin room - positive feedback", when the revenue success parameter is 18, the revenue failure parameter is 4, the sample count parameter is 22, and the revenue benchmark value is 420 yuan, the posterior unit is sampled using a Beta distribution to obtain the revenue sample value. Then, the revenue sample value is multiplied by 420 yuan to generate a matching revenue sample, and the posterior confidence parameter is generated based on the revenue success parameter, revenue failure parameter, and sample count parameter. In Example 1, the order-room matching context in the masked matching set does not call the Thompson sampling posterior unit, and the system writes its matching benefit sample as a preset invalid value. The preset invalid value is a marker value that does not participate in benefit ranking and cost correction, and is represented by a null value marker, a negative benefit boundary value, or an unavailable status code. For example, the matching benefit sample is set to NULL, -1, or INVALID. When the dynamic cost matrix is ​​generated subsequently, the system converts the corresponding order-room matrix elements into non-transferable costs according to the preset invalid value, and fixes the corresponding transmission amount to 0 when constructing the entropy regularized optimal transmission model, so that the order-room matching relationship corresponding to the masked matching set does not participate in effective allocation.

[0025] In this embodiment, the formation of the dynamic cost matrix includes: Read the matching revenue sample, posterior confidence parameter, order features, room features, real-time room status, cleaning status, maintenance status, candidate matching set, and masked matching set from the order-room matching context; Based on the candidate matching set, identify the order-room matching context that participates in the cost calculation, and based on the masked matching set, identify the order-room matching context that does not participate in the cost calculation; For the order-room matching context involved in cost calculation, the cost of the matching revenue sample is reverse-mapped to generate the base cost; Specifically, the matching revenue samples are first normalized within the same allocation batch, and then reverse cost mapping is performed. The normalization process uses the maximum matching revenue sample of the candidate matching set within the allocation batch as a benchmark, and converts the matching revenue sample of each order-room matching context into a revenue ratio value. The larger the revenue ratio value, the lower the corresponding base cost. For example, if the maximum matching revenue sample within the same allocation batch is 600 yuan, and the matching revenue sample of a certain order-room matching context is 480 yuan, then its revenue ratio value is 0.8, and the base cost can be set to 0.2. If another matching revenue sample is 300 yuan, then the revenue ratio value is 0.5, and the base cost can be set to 0.5. The confidence correction magnitude is generated based on the posterior confidence parameter, and the base cost is corrected according to the confidence correction magnitude to generate the corrected base cost; Specifically, the posterior confidence parameter is determined based on the sample count parameter and payoff parameter of the corresponding Thompson sampling posterior unit, and is used to represent the confidence level of the matching payoff sample. When the posterior confidence parameter indicates a low confidence level, a larger confidence correction cost is added to the base cost; when the posterior confidence parameter indicates a high confidence level, a smaller confidence correction cost is added to the base cost. For example, if the base cost of a certain order-room matching context is 0.2, and the posterior sample size is 3, the confidence correction cost is set to 0.15, and the corrected base cost is 0.35; if the posterior sample size is 50, the confidence correction cost is set to 0.02, and the corrected base cost is 0.22. Vacancy loss cost is generated based on real-time room status; cleaning conversion cost is generated based on cleaning status; maintenance occupancy cost is generated based on maintenance status; room type deviation cost is generated based on room type demand in order characteristics and room type in guest room characteristics; and consecutive stay switching cost is generated based on stay duration in order characteristics and room status in guest room characteristics. Specifically, the operating cost consists of vacancy loss cost, cleaning and conversion cost, maintenance occupancy cost, room type deviation cost, and consecutive stay switching cost. The system generates vacancy loss cost based on the number of vacant nights during the period corresponding to the order's check-in date, cleaning and conversion cost based on whether the cleaning status changes from incomplete to completed, maintenance occupancy cost based on whether the maintenance status is pending maintenance or maintenance occupancy, room type deviation cost based on whether the room type requirement in the order characteristics matches the room type in the room characteristics, and consecutive stay switching cost based on the check-in duration in the order characteristics and the consecutive occupancy period in the room characteristics. For example, if an order is for 2 nights, and the costs are: incomplete room cleaning (0.1), pending maintenance (0.2), room type deviation (0.3), and room change required (0.4), then the operating cost is the combined value of the above costs. The operating cost is generated by combining the costs of vacancy loss, cleaning and conversion, maintenance and occupancy, room type deviation, and consecutive stay switching. The base cost and operational cost are combined to generate candidate matrix elements corresponding to the order-room matching context that participate in the cost calculation; For order-room matching contexts that do not participate in cost calculation, set the corresponding matrix element as a non-transferable cost; Specifically, the non-transferable cost is used to mark the order-room matrix elements corresponding to the masked matching set. The system sets the non-transferable cost to a boundary value greater than the maximum value of the candidate matrix elements in the same dynamic cost matrix, or sets it to an unavailable status code, and fixes the corresponding transmission amount to 0 when constructing the entropy regularized optimal transmission model. For example, if the maximum cost of the candidate matrix elements in the same allocation batch is 1.2, then the non-transferable cost can be set to 100 or INVALID; when a room is under maintenance or locked, the corresponding order-room matrix element is written with the non-transferable cost. Based on the order index as rows and the room index as columns, candidate matrix elements and non-transferable costs are written into the corresponding matrix positions to form a dynamic cost matrix; Specifically, the dynamic cost matrix is ​​arranged according to the order index and room index within the same allocation batch. The matrix rows correspond to the orders to be allocated, and the matrix columns correspond to the allocable rooms. The element in the (i)th row and (j)th column of the matrix corresponds to the order-room matching context of the (i)th order and the (j)th room. For example, when the allocation batch includes 20 orders and 60 rooms, a dynamic cost matrix with 20 rows and 60 columns is generated. Candidate matrix elements are written to the corresponding positions of the candidate matching set, and non-transferable costs are written to the corresponding positions of the masked matching set. In Example 1, when forming the dynamic cost matrix, all types of costs are uniformly converted to the same value scale before being written into the matrix. The value scale can be a normalized range of 0 to 1. The system first determines the order-room matching context to be calculated based on the candidate matching set, and then generates the basic cost, the modified basic cost, and the operating cost in sequence, and writes the combined value of the modified basic cost and the operating cost into the corresponding matrix position. When the real-time room status, cleaning status, maintenance status, matching revenue sample, or posterior confidence parameter of the same order or the same room changes, only the matrix elements of the affected order row, the affected room column, and the related room column of the same room type are recalculated. For example, if a dispatch batch includes 30 orders and 80 rooms, the dynamic cost matrix is ​​30 rows and 80 columns. If the 12th room changes from uncleaned to cleaned, the system only updates the matrix elements affected by the cleaning status in the 12th column and the room column of the same room type as the 12th room.

[0026] In this embodiment, the construction of the entropy-regularized optimal transmission model includes: Read the dynamic cost matrix, order demand margin, room availability margin, candidate matching set, and masked matching set; Establish order-to-room transfer variables according to the order row and room column of the dynamic cost matrix, and associate each order-to-room transfer variable with the matrix element at the corresponding position in the dynamic cost matrix to generate a cost transfer item; Based on the order demand margin, the order-room transfer variables in the same order line are summed and constrained to generate row margin constraints; Based on the available room margin, the order-room transfer variables in the same room column are summed and constrained to generate column margin constraints; In Example 1, the order demand margin is the proportion of demand that each order to be allocated should be assigned in the transmission matrix, and the room availability margin is the proportion of allocation that each allocatable room can carry in the transmission matrix. Row margin constraints ensure that the sum of all room transmission variables corresponding to the same order equals the order demand margin of that order, and column margin constraints ensure that the sum of all order transmission variables corresponding to the same room equals the room availability margin of that room. For example, if the order demand margins for 3 orders are 0.4, 0.3, and 0.3, and the room availability margins for 4 rooms are 0.25, 0.25, 0.25, and 0.25, then the transmission volume and value for each order row are fixed at 0.4, 0.3, and 0.3, respectively, and the transmission volume and value for each room column are fixed at 0.25. Based on the candidate matching set, the corresponding order-room transmission variable is limited to non-negative variables, and based on the masked matching set, the corresponding order-room transmission variable is fixed to zero, thus generating a transmission feasible domain. By combining the cost transport term, entropy regularization term, row margin constraint, column margin constraint, and transport feasible region, an entropy-regularized optimal transport model is constructed: ; in, This represents the transmission matrix composed of each order-to-room transmission variable. Indicates the first The order and the first Orders between guest rooms—guest room transfer variables, Represents the first in the dynamic cost matrix Line 1 Column matrix elements, Indicates the order index. Indicates the guest room index. Indicates the number of orders to be allocated. Indicates the number of rooms available for allocation. Represents the entropy regularization coefficient. Represents the logarithmic term of the order-room transfer variable; The transmission kernel matrix is ​​generated based on the dynamic cost matrix and entropy regularization coefficient in the entropy regularization optimal transmission model, and the elements of the transmission kernel matrix corresponding to the mask matching set are set to zero according to the transmission feasible region. In Example 1, the entropy-regularized optimal transport model uses the dynamic cost matrix as the cost input and the order demand margin and room availability margin as row and column constraint inputs. The system establishes an order-room transport variable for each order-room matrix position in the dynamic cost matrix. The transport variable corresponding to the candidate matching set is allowed to take non-negative values, while the transport variable corresponding to the masked matching set is fixed at 0. The entropy regularization coefficient is used to control the smoothness of the transport matrix and can take values ​​between 0.01 and 1. For example, in a batch of 30 orders and 80 rooms, the dynamic cost matrix is ​​30 rows and 80 columns, and the transport variables form a 30 row and 80 column transport matrix. The system generates a transport kernel matrix based on the dynamic cost matrix and the entropy regularization coefficient, and sets the transport kernel matrix elements corresponding to maintenance occupancy, room locking, shutdown, or time conflict to 0. Then, the processed transport kernel matrix is ​​input into the Greenkhorn algorithm for row and column margin scaling.

[0027] In this embodiment, the Greenkhorn algorithm includes: Read the transmission kernel matrix, order demand margin, room availability margin, candidate matching set, masked matching set, dynamic cost matrix, and Thompson sampling posterior unit update flag; Construct a feasible bipartite graph of order-guest room based on the candidate matching set, delete the corresponding edges in the feasible bipartite graph of order-guest room based on the masked matching set, and fix the elements of the transmission kernel matrix corresponding to the masked matching set to zero; Specifically, the order-room feasible bipartite graph includes order nodes, room nodes, and feasible matching edges. Order nodes correspond to orders to be allocated, and room nodes correspond to available rooms. Each order-room matching context in the candidate matching set generates a feasible matching edge connecting the corresponding order node and room node. Order-room matching contexts in the masked matching set do not generate feasible matching edges. If a corresponding kernel element already exists in the transmission kernel matrix, that kernel element is fixed to 0 and remains unchanged during subsequent scaling. For example, if 10 orders and 30 rooms form 300 matching relationships, of which 80 belong to the masked matching set, then feasible matching edges are generated only based on the 220 candidate matching relationships, and the 80 masked kernel elements are set to 0. Connectivity partitioning is performed on the order-room feasible bipartite graph to generate a feasible allocation subgraph. Sub-transmission kernel matrix, sub-order demand margin, and sub-room availability margin are extracted from the transmission kernel matrix, order demand margin, and room availability margin according to the feasible allocation subgraph. Specifically, the feasible bipartite graph of orders and guest rooms is partitioned into connected components based on feasible matching edges. Order nodes and guest room nodes that can be reached from each other through one or more feasible matching edges are grouped into the same feasible allocation subgraph. If there is no connecting path between two nodes formed by feasible matching edges, they are divided into different feasible allocation subgraphs. For example, orders O1 and O2 can both match guest rooms R1 and R2, while order O3 can only match guest room R8, and there is no feasible matching edge connecting R8 to O1 and O2. In this case, O1, O2, R1, and R2 form one feasible allocation subgraph, and O3 and R8 form another feasible allocation subgraph. For sub-order demand margins and sub-room availability margins within the same feasible allocation sub-graph, perform margin registration to generate independent scaling units; Specifically, marginal registration refers to the process of aligning the total amount of sub-order demand margins and sub-room availability margins within the same feasible allocation subgraph. The system calculates the sum of demand margins for all order nodes and the sum of availability margins for all room nodes within the feasible allocation subgraph. When the two are inconsistent, the smaller sum is used as the registration benchmark, and the margin on the larger side is scaled proportionally to make the total registered sub-order demand margin equal to the total sub-room availability margin. For example, if the sum of order demand margins in a feasible allocation subgraph is 0.6 and the sum of room availability margins is 0.5, then each order demand margin in the subgraph is scaled by a ratio of 0.5 / 0.6 before participating in independent scaling. The order scaling vector and the guest room scaling vector are initialized based on independent scaling units, and a sub-order-guest room transmission matrix is ​​generated based on the order scaling vector, the sub-transmission kernel matrix, and the guest room scaling vector. The marginal residuals of order rows and guest room columns are calculated based on the sub-order-guest room transfer matrix. A local kernel refresh set is generated based on the Thompson sampling posterior unit update marker. The local kernel refresh set includes the order rows, guest room columns and related guest room columns of the same room type that have undergone posterior changes. Specifically, the system sums the order row transmission volume for each sub-order-guest room transmission matrix by row, and compares it with the corresponding sub-order demand margin to obtain the order row marginal residual; it also sums the guest room column transmission volume by column, and compares it with the corresponding sub-guest room availability margin to obtain the guest room column marginal residual. When an order is cancelled, a customer does not arrive, a room change occurs, a stay is extended, or check-in feedback causes the corresponding Thompson sampling posterior unit to be updated, the system generates a posterior unit update flag and writes the order row, guest room column, and guest room columns with the same room type label associated with the update flag into the local kernel refresh set. For example, if order O5 experiences a room change feedback and the original guest room R12 is a twin room, then the order row containing O5, the guest room column containing R12, and the guest room columns that are also twin rooms are written into the local kernel refresh set. Based on the local kernel refresh set, the corresponding matrix elements are read from the updated dynamic cost matrix, the corresponding local transmission kernel elements are regenerated, and the local transmission kernel elements are written back to the corresponding sub-transmission kernel matrix. Based on the subtransmission kernel matrix after the write-back, the affected order row marginal residuals and guest room column marginal residuals are recalculated, and one of the single order row and single guest room column with the largest marginal residual is selected from each independent scaling unit as the current object to be scaled; Specifically, after the local transmission kernel element is written back to the corresponding sub-transmission kernel matrix, the system recalculates the marginal residuals only for the order rows and guest room columns involved in the local kernel refresh set. For affected order rows, the transmission volume and value of the order row are recalculated based on the written-back sub-transmission kernel matrix, the current order scaling factor, and the guest room scaling factor, and compared with the corresponding sub-order demand margin to obtain the order row marginal residual. For affected guest room columns, the transmission volume and value of the guest room column are recalculated, and compared with the corresponding sub-guest room availability margin to obtain the guest room column marginal residual. For example, after the kernel elements of order O5 and guest room R12 are updated, only the marginal residuals of the row containing O5, the column containing R12, and the related guest room columns of the same room type are recalculated. When the current object to be scaled is an order row, update the order scaling factor according to the ratio of the corresponding sub-order demand margin to the current row's transmission volume and value; when the current object to be scaled is a guest room column, update the guest room scaling factor according to the ratio of the corresponding sub-guest room's available margin to the current column's transmission volume and value. Specifically, when the current object to be scaled is an order row, the system calculates the current row transmission volume and value of that order row, divides the corresponding sub-order demand margin by the current row transmission volume and value to obtain the order scaling ratio, and then updates the order scaling factor using this ratio. When the current object to be scaled is a guest room column, the system calculates the current column transmission volume and value of that guest room column, divides the corresponding sub-guest room availability margin by the current column transmission volume and value to obtain the guest room scaling ratio, and then updates the guest room scaling factor using this ratio. For example, if the demand margin of an order row is 0.3 and the current row transmission volume and value is 0.2, then the order scaling factor is updated by 1.5 times. The sub-order-guest room transmission matrix is ​​regenerated based on the updated order scaling vector, sub-transmission kernel matrix, and guest room scaling vector, while keeping the transmission volume corresponding to the masked matching set at zero; Repeat the local kernel refresh, marginal residual calculation, current object to be scaled selection and scaling factor update until the marginal residual of the order row and the marginal residual of the guest room column of each independent scaling unit meet the preset convergence threshold. Specifically, after each independent scaling unit enters an iteration, the system sequentially performs local kernel refresh, marginal residual calculation, selection of the current object to be scaled, and scaling factor update. After each iteration, the system calculates the marginal residuals of all order rows and all guest room columns within that independent scaling unit and compares them with a preset convergence threshold. When both the marginal residuals of all order rows and all guest room columns are less than or equal to the preset convergence threshold, the iteration of that independent scaling unit stops. For example, if the preset convergence threshold is 0.001, and the maximum marginal residual of an order row within an independent scaling unit is 0.0008 and the maximum marginal residual of a guest room column is 0.0009, then the independent scaling unit is determined to meet the convergence condition. The sub-order-guest room transfer matrix output by each independent scaling unit is backfilled into the global transfer matrix according to the original order index and the original guest room index to obtain the order-guest room transfer matrix; In Example 1, after each independent scaling unit is generated, the system establishes a local index according to the order node order and guest room node order within the independent scaling unit, and records the mapping relationship between the local index and the original order index and the original guest room index. The initial values ​​of the order scaling vector and the guest room scaling vector can both be set to 1, or set to an initial ratio value that matches the corresponding sub-order demand margin and sub-guest room availability margin. During the iteration process, the transmission kernel element corresponding to the masked matching set is always kept at 0, and the corresponding transmission volume does not participate in row and column summation, margin residual calculation, and scaling factor update. When the independent scaling unit meets the convergence condition, the system writes each transmission volume in the sub-order-guest room transmission matrix back to the corresponding position in the global transmission matrix according to the mapping relationship between the local index and the original index. The matrix positions that do not belong to the independent scaling unit are not written by the independent scaling unit, and the corresponding positions of the masked matching set remain at 0. For example, if an independent scaling unit contains orders O2 and O5 and guest rooms R3, R7, and R9, then its sub-transmission matrix is ​​2 rows and 3 columns. After convergence, it is filled back into the intersection of the corresponding rows of O2 and O5 and the corresponding columns of R3, R7, and R9 in the global transmission matrix.

[0028] In this embodiment, the method for generating and updating the guest room allocation results includes: Read orders—guest room transmission matrix, candidate matching set, masked matching set, order features, guest room features, customer preference tags, room type tags, feedback type tags, and dynamic cost matrix; Based on the transmission volume corresponding to the same order line in the order-guest room transmission matrix, the candidate matching set associated with the order line is sorted to generate a candidate guest room sequence, and the order-guest room matching relationship corresponding to the masked matching set is excluded from the candidate guest room sequence; Specifically, when generating a candidate room sequence, the system treats the order line in the order-room transmission matrix as the processing object, reads the transmission volume corresponding to each candidate matching set in the order line, and arranges the corresponding rooms in descending order of transmission volume to form the candidate room sequence for the order to be allocated; the order-room matching relationship corresponding to the masked matching set is not included in the candidate room sequence. For example, if the transmission volumes of rooms R3, R5, and R8 corresponding to order O1 are 0.42, 0.31, and 0.18 respectively, and R6 belongs to the masked matching set, then the candidate room sequence is R3, R5, and R8, and R6 is not included in the sorting; Read the corresponding room characteristics sequentially according to the candidate room sequence, and verify the order occupancy period, real-time room status, cleaning status, maintenance status, room availability margin and room type label in combination with the order characteristics to generate a pending order-room binding record; Specifically, the system sequentially reads the characteristics of guest rooms according to the candidate guest room sequence and matches and verifies these characteristics with the order characteristics. The matching and verification includes checking whether the order's occupied period overlaps with the guest room's available period, whether the real-time room status is available for sale, whether cleaning is complete, whether the maintenance status is not maintenance-related, whether there is still remaining room availability, and whether the room type label meets the order requirements. When a candidate guest room passes all verifications, the system generates a pending order-guest room binding record; if it fails verification, it continues to read the next guest room in the candidate guest room sequence. When the same guest room corresponds to multiple pending order-guest room binding records, the valid order-guest room binding record is determined based on the corresponding transmission volume, matrix elements in the dynamic cost matrix, and sorting position in the candidate guest room sequence. The pending orders that are not determined to be valid order-guest room binding records are returned to the corresponding candidate guest room sequence for further selection. Specifically, when the same guest room corresponds to multiple pending order-guest room binding records, the system reads the transmission volume, matrix elements in the dynamic cost matrix, and sorting position in the candidate guest room sequence for each pending order-guest room binding record. It then determines the valid order-guest room binding record in the order of transmission volume priority, matrix element priority, and sorting position priority. For pending orders not determined as valid order-guest room binding records, the system retains its order identifier and candidate guest room sequence, and continues matching from the next candidate guest room in that sequence that has not yet been bound. For example, if guest room R10 is selected by both orders O2 and O4, and the transmission volume corresponding to O2 is 0.36 and that of O4 is 0.29, then the binding record between O2 and R10 is retained, and O4 continues matching its next candidate guest room. Based on valid order-room binding records, a room allocation result is generated, which includes order identifier, room identifier, order occupancy period, room type tag, customer preference tag, matching status, and allocation time. After the room allocation results are executed, the order cancellation status, customer absence status, room change status, extended stay status, and check-in feedback status are obtained based on the order identifier and room identifier, and converted into new feedback type labels and feedback reward values; Specifically, after the room allocation is executed, the system collects corresponding execution feedback based on the order identifier and room identifier, and converts the execution feedback into new feedback type labels and feedback reward values. Among them, the order cancellation status is converted into an order cancellation feedback label, the customer not arriving status is converted into a customer not arriving feedback label, the room change status is converted into a room change feedback label, the extended stay status is converted into an extended stay feedback label, and the stay evaluation status is converted into an evaluation feedback label. When the execution feedback is an extended stay, a positive review, or a completed stay without a room change, the feedback reward value is recorded as a positive reward. When the execution feedback is an order cancellation, a customer not arriving, a room change, or a negative review, the feedback reward value is recorded as a negative reward. Based on the new feedback type label and the customer preference label and room type label in the room allocation results, a feedback posterior index key is generated, and the corresponding Thompson sampling posterior unit is located according to the feedback posterior index key. Update the success, failure, and sample count parameters in the corresponding Thompson sampling posterior unit based on the feedback return value, and generate a Thompson sampling posterior unit update tag containing the order identifier, room identifier, and room type label; Specifically, the system generates a feedback posterior index key based on the new feedback type label, customer preference label, and room type label in the room allocation results, and uses the feedback posterior index key to locate the corresponding Thompson sampling posterior unit. If the feedback return value is positive, the system updates the revenue success parameter and sample count parameter in the corresponding Thompson sampling posterior unit; if the feedback return value is negative, the system updates the revenue failure parameter and sample count parameter. After the update is complete, the system generates a Thompson sampling posterior unit update flag containing the order identifier, room identifier, room type label, and feedback posterior index key. Based on the updated labels of the Thompson sampling posterior unit, the affected order-room matching context is determined. The updated Thompson sampling posterior unit is applied to the affected order-room matching context to regenerate the matching revenue sample and posterior confidence parameter. The dynamic cost matrix is ​​then locally reconstructed based on the regenerated matching revenue sample and posterior confidence parameter. Specifically, the system determines the affected order-room matching context based on the updated markers of the Thompson sampling posterior unit. The affected order-room matching context includes the order row corresponding to the order identifier in the updated marker, the room column corresponding to the room identifier, and the candidate matching relationship corresponding to the associated room column with the same room type label. The system applies the updated Thompson sampling posterior unit to the affected order-room matching context, regenerates the matching benefit sample and posterior confidence parameter, and reconstructs only the dynamic cost matrix elements corresponding to the affected order row, room column, and associated room column with the same room type.

[0029] In this embodiment, a guest room allocation system, which implements a guest room allocation method according to any one of claims 1-8, includes the following modules: The data generation module acquires data on orders to be allocated, available guest rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical occupancy feedback, and operational revenue, and generates order characteristics, guest room characteristics, customer preference tags, room type tags, feedback type tags, order demand margin, guest room availability margin, and unallocatable tags. The matching processing module generates an order-room matching context based on order features and room features, and divides the candidate matching set and the masked matching set according to the unassignable tags; The posterior sampling module calls the Thompson sampling posterior unit based on customer preference labels, room type labels, and feedback type labels to generate matching benefit samples and posterior confidence parameters for the candidate matching set; The cost construction module forms a dynamic cost matrix based on matching revenue samples, posterior confidence parameters, order features, room features, real-time room status, cleaning status, and maintenance status. The transmission solution module constructs an entropy-regularized optimal transmission model based on the dynamic cost matrix, order demand margin, room availability margin, candidate matching set, and masked matching set, and uses the Greenkhorn algorithm to generate the order-room transmission matrix. The allocation and update module generates room allocation results based on the order-room transmission matrix, and updates the Thompson sampling posterior unit and dynamic cost matrix based on order cancellation, customer absence, room change, extended stay, and check-in feedback.

[0030] In this embodiment, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements a room allocation method as described in any one of claims 1 to 8. In Example 1, the computer-readable storage medium is used to store a computer program that implements the room allocation method. The computer program includes program instructions for performing order feature generation, room feature generation, candidate matching set partitioning, masked matching set partitioning, Thompson sampling posterior unit invocation, dynamic cost matrix construction, entropy regularized optimal transmission model construction, Greenkhorn algorithm solution, room allocation result generation, and closed-loop update. When the computer program is read and executed by the processor, the processor sequentially obtains the order to be allocated, the available rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical occupancy feedback, and operational revenue data according to the program instructions, generates an order-room transmission matrix, and outputs the room allocation result based on the order-room transmission matrix. After the room allocation result is executed, the processor continues to perform feedback collection, feedback type label generation, feedback reward value generation, Thompson sampling posterior unit update, and dynamic cost matrix local reconstruction operations. The computer-readable storage medium includes read-only memory, random access memory, flash memory, hard disk, solid-state drive, optical disk, server storage medium, or other non-transitory storage medium capable of storing computer programs.

[0031] Example 2: To verify the feasibility of this invention in practice, we will use a room allocation scenario in a mid-to-high-end hotel as an example. This hotel has 268 available rooms, including 92 standard king rooms, 76 standard twin rooms, 38 family rooms, 42 executive king rooms, and 20 suites. During periods of high occupancy, the hotel needs to process advance bookings, same-day check-in orders, extended stay orders, room change orders, and last-minute cancellations simultaneously. Traditional allocation methods primarily involve front desk staff manually assigning rooms based on room type, vacancy status, and customer notes. When cleaning status is not updated promptly, rooms occupied by maintenance are not synchronized, there are many customer preferences, or orders for the same room type arrive in concentrated periods, problems such as duplicate room allocation, assignment to uncleaned rooms, unmet customer preferences, and high room change rates are likely to occur. In one test batch, the hotel needed to process 146 pending allocation orders within the same check-in window, involving 213 rooms. Of these, 35 were sold, 18 were locked, 11 were under maintenance, and 27 were incomplete cleaning, leaving 122 rooms available for effective allocation. In this batch of orders, 78 orders included customer preferences such as floor, orientation, quietness, or adjacent rooms; 49 orders were for two nights or more consecutive stays; 16 orders had member feedback on their previous stays; 9 orders were for potential extensions; and 7 orders had front desk notes requesting avoidance of rooms near elevators or linen rooms. These findings demonstrate that room allocation is not simply about selecting vacant rooms, but requires simultaneously managing the relationships between room status, cleaning status, maintenance, customer preferences, order occupancy periods, and historical feedback.

[0032] The system first retrieves data on pending orders, available rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical check-in feedback, and operational revenue from the hotel's order system, room status system, room cleaning system, maintenance management system, and customer profile system. The system then writes the order check-in date, room type requirement, check-in duration, and customer preferences into order features, and the room floor, room orientation, cleaning status, maintenance status, room status, and room type into room features. It also generates customer preference tags, room type tags, feedback type tags, order requirement margin, room availability margin, and unassignable tags. For example, if a customer's order requires a standard twin room for two nights, a preference for a high floor, and a quiet environment, the system will generate order features including twin room requirement, two-night stay, high floor preference, and quiet preference. If a room is located on the 18th floor, faces south, has been cleaned, is in normal maintenance status, is available for sale, and is a standard twin room, the system will generate corresponding room features for that room. For order-room matching relationships with mismatched room types, incomplete cleaning, maintenance occupancy, locked rooms, outages, or conflicting order periods, the system adds them to the masked matching set. For order-room matching relationships that meet the conditions of time, room type, and status, the system adds them to the candidate matching set. In the above combination of 146 orders and 213 rooms, there are a total of 31,098 original order-room matching relationships. After filtering for time conflicts, mismatched room types, incomplete cleaning, maintenance occupancy, and locked rooms, there are 6,846 candidate matching relationships and 24,252 masked matching relationships.

[0033] The system calls Thompson sampling posterior units corresponding to customer preference tags, room type tags, and feedback type tags for each candidate match set, generating a matching benefit sample and posterior confidence parameter for each candidate order-room match relationship. For example, in the posterior units corresponding to high-floor preference, standard twin room, and positive feedback, there are 64 historical positive feedbacks and 11 negative feedbacks, and the system generates a benefit sample and confidence parameter for this type of match relationship accordingly. In the posterior units corresponding to low-floor preference, family room, and room change feedback, there are 18 historical positive feedbacks and 9 negative feedbacks, so their benefit samples and confidence parameters are different. For order-room match relationships in the masked match set, the system does not call the posterior unit but sets its matching benefit to an invalid value. The system generates a basic cost based on the matching benefit sample of the candidate match relationship, then corrects the basic cost by combining it with the posterior confidence parameter, and superimposes the operational cost determined by real-time room status, cleaning status, maintenance status, order characteristics, and room characteristics to form a dynamic cost matrix. In this batch, the dynamic cost matrix is ​​146 rows and 213 columns, with 6846 matrix positions being candidate matrix elements and 24252 matrix positions being non-transferable costs. For a two-night consecutive stay booking, if the room is available for sale and has been cleaned during the consecutive stay, and the room type matches the guest's preferences, its dynamic cost is low; if the room is available for sale but does not match the guest's quiet preference, or needs to be cleaned and converted before check-in, the corresponding operating cost increases.

[0034] After the dynamic cost matrix is ​​formed, the system constructs an entropy-regularized optimal transmission model using the order demand margin, room availability margin, and shielded matching set, and generates a transmission kernel matrix. The system constructs an order-room feasible bipartite graph based on the candidate matching set, deletes edges corresponding to the shielded matching set, and fixes the corresponding transmission kernel elements to 0. Since different room types, different stay periods, and different state constraints naturally form several feasible sub-regions, the system performs connected partitioning on the order-room feasible bipartite graph, obtaining multiple feasible allocation sub-graphs. For example, consecutive stay orders for standard twin rooms are mainly connected to twin rooms available for sale during the same stay period; family room orders are mainly connected to family rooms and alternative suites; rooms occupied for maintenance and rooms not yet cleaned do not form feasible matching edges. After partitioning, this batch forms 17 independent scaling units, with the largest independent scaling unit containing 42 orders and 61 rooms, and the smallest independent scaling unit containing 2 orders and 3 rooms. The system performs margin registration on the sub-order demand margin and sub-room availability margin within each independent scaling unit, and calculates the order-room transmission matrix using the Greenkhorn algorithm within each independent scaling unit. Since the transmission kernel element of the masked matching set is always fixed at 0, rooms occupied for maintenance, locked rooms, out of service, rooms with incomplete cleaning, and rooms with time conflicts will not receive effective transmission volume in the transmission matrix.

[0035] After the order-room transmission matrix is ​​generated, the system generates a candidate room sequence based on the transmission volume of each order line from high to low, and excludes rooms corresponding to the masked matching set. The system sequentially reads the room characteristics in the candidate room sequence, and verifies the order occupancy period, real-time room status, cleaning status, maintenance status, room availability margin, and room type label in conjunction with the order characteristics. After verification, a pending order-room binding record is generated. When the same room is selected by multiple orders simultaneously, the system reads the transmission volume corresponding to each binding record, the matrix elements in the dynamic cost matrix, and the sorting position in the candidate room sequence to determine the valid order-room binding record, and returns the unreserved orders to their candidate room sequences for further matching. For example, if room R168 is selected by two twin room orders simultaneously, where order A has a transmission volume of 0.41, a dynamic cost of 0.22, and a sorting position of 1, and order B has a transmission volume of 0.33, a dynamic cost of 0.31, and a sorting position of 2, the system retains the binding record between order A and R168, and allows order B to continue selecting the next available room in its candidate room sequence. The system ultimately generates room allocation results, which include order identifier, room identifier, order occupancy period, room type tag, customer preference tag, matching status, and allocation time.

[0036] To verify the effectiveness of this embodiment, the method was compared with traditional manual room allocation and fixed-rule automatic room allocation. The comparison sample covered 20 consecutive allocation batches, involving 2860 orders to be allocated and 4210 available rooms. Under the traditional manual room allocation method, an average of 143 orders were processed per batch, with an average allocation time of 52.6 minutes. An average of 4 front desk staff were required to verify the allocation. The average number of manual adjustment records due to cleaning status, maintenance status, room type mismatch, or unmet customer preferences was 18.4. The room change rate after check-in was 6.8%, the customer preference satisfaction rate was 72.3%, and the average number of duplicate allocation or temporary conflict records was 5.7. Under the fixed-rule automatic room allocation method, the average allocation time per batch was 18.9 minutes, the average number of manual adjustment records was 11.6, the room change rate after check-in was 5.2%, the customer preference satisfaction rate was 78.5%, and the average number of duplicate allocation or temporary conflict records was 3.2. After adopting the method of this embodiment, the average time for room allocation per batch was 6.4 minutes, the average number of manual adjustment records was 3.1, the room change rate after check-in was 2.1%, the customer preference satisfaction rate was 91.6%, and the average number of duplicate room allocation or temporary conflict records was 0.8. In batches with high occupancy rates, the traditional manual room allocation method took 61.3 minutes to process 165 orders, the fixed rule automatic room allocation method took 21.7 minutes, and the method of this embodiment took 7.2 minutes, with no records of rooms occupied by maintenance being allocated.

[0037] Regarding changes in room status, the method in this embodiment also demonstrates partial update capabilities. In the control test, after the allocation results were generated, a certain batch saw 6 order cancellations, 4 customer absences, 5 room change requests, 9 extended stay feedbacks, and 37 check-in reviews. The traditional manual method requires re-verifying the affected room types and adjacent orders, with an average processing time of 24.8 minutes; the fixed-rule automatic room allocation method requires re-executing the entire batch sorting, with an average processing time of 9.6 minutes; the method in this embodiment generates new feedback type labels and feedback reward values ​​based on order cancellations, customer absences, room changes, extended stays, and check-in feedback, updates the corresponding Thompson sampling posterior units, and determines the affected order rows, room columns, and related room columns of the same room type based on the updated labels. It only performs partial reconstruction on the relevant matching benefit samples, posterior confidence parameters, and dynamic cost matrix elements, with an average processing time of 2.3 minutes. Taking a batch containing 152 orders and 224 rooms as an example, the full dynamic cost matrix has a total of 34,048 matrix positions. After feedback, 1,264 matrix positions are affected, accounting for about 3.7%. The system only regenerates the cost for these matrix positions and continues to transmit and update them.

[0038] Regarding customer feedback, before adopting the method in this embodiment, there were 47 dissatisfaction records per 1000 orders due to room location, noise, room type mismatch, and cleaning delays; after adopting the method in this embodiment, these dissatisfaction records decreased to 19 per 1000 orders. Specifically, the preference satisfaction rate for customers preferring higher floors increased from 76.4% to 93.2%, the preference satisfaction rate for customers preferring quiet rooms increased from 69.7% to 89.5%, and the adjustment records due to mid-stay changes among consecutive-stay customers decreased from 8.6 per 100 orders to 2.4 per 100 orders. For customers with sufficient historical feedback, the system can call corresponding posterior units based on their historical preference tags and feedback type tags, prioritizing the generation of candidate room sequences consistent with historical feedback when there are many available rooms of the same room type, thus reducing the room change rate for this type of customer from 4.9% to 1.6%. For new customers with limited historical feedback, the system can still generate matching benefit samples based on room type tags, current preference tags, and similar feedback data, ensuring that the allocation results do not entirely rely on manual notes.

[0039] Regarding operational data, this embodiment's method simultaneously writes room status, cleaning, maintenance, and order requirements into the dynamic cost matrix, thus reducing inconsistencies between allocation results and actual conditions. In the comparison sample, the traditional manual method resulted in 132 cleaning wait records within 20 batches, the fixed-rule automatic room allocation method resulted in 84 cleaning wait records, and this embodiment's method resulted in 29 cleaning wait records. The traditional manual method resulted in 11 records of maintenance rooms mistakenly entering candidate room allocations, the fixed-rule automatic room allocation method resulted in 5 such records, and this embodiment's method did not produce any such records. The traditional manual method resulted in 17 room occupancy conflict records in consecutive stay orders, the fixed-rule automatic room allocation method resulted in 8 such records, and this embodiment's method resulted in 1 such record, which was caused by external room status synchronization delays. The system regenerated the allocation results by partially reconstructing the dynamic cost matrix after the room status update.

[0040] As can be seen from the above embodiments, in actual room allocation scenarios, this invention unifies the data on orders to be allocated, available rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical check-in feedback, and operational revenue into a computable order-room matching relationship. It then generates an order-room transmission matrix using a candidate matching set, a masked matching set, a dynamic cost matrix, an entropy-regularized optimal transmission model, and an improved Greenkhorn algorithm, and uses this matrix to form the room allocation result. After the room allocation result is executed, the system continues to collect feedback on order cancellations, customer absences, room changes, extended stays, and check-in. This feedback is converted into new feedback type labels and feedback reward values, the corresponding Thompson sampling posterior units are updated, and the dynamic cost matrix is ​​partially reconstructed, enabling subsequent allocations to inherit the results and feedback data from previous executions. This embodiment demonstrates that this invention can solve the problems of low efficiency in manual room allocation under multiple orders, multiple rooms, and multiple state constraints; insufficient adaptability of fixed-rule room allocation; difficulty in closed-loop utilization of historical feedback; and the need for full recalculation after room status changes.

[0041] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for allocating guest rooms, characterized in that, include: Acquire data on pending orders, available rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical occupancy feedback, and operational revenue; generate order characteristics, room characteristics, customer preference tags, room type tags, feedback type tags, order demand margin, room availability margin, and unallocatable tags. Order features and room features are combined into an order-room matching context, and candidate matching sets and masked matching sets are divided based on unassignable labels; The Thompson sampling posterior unit, which is jointly indexed by customer preference label, room type label and feedback type label, is called on the candidate matching set to obtain the matching benefit sample and posterior confidence parameter, and the matching benefit of the masked matching set is set to invalid value; The basic cost is generated based on the matched revenue sample, the basic cost is corrected using the posterior confidence parameter, and the operating cost determined by real-time room status, cleaning status, maintenance status, order characteristics and guest room characteristics is superimposed to form a dynamic cost matrix; An entropy-regularized optimal transmission model is constructed using the dynamic cost matrix, order demand margin, room availability margin, and shielded matching set. The Greenkhorn algorithm is used to select a single order row and a room column for scaling and updating based on the marginal residual and posterior confidence parameters of the entropy regularized optimal transmission model, so as to obtain the order-room transmission matrix. Based on the order-room transfer matrix, room allocation results are generated, and feedback such as order cancellation, customer absence, room change, extended stay, and check-in is converted into new feedback type labels and feedback reward values. The corresponding Thompson sampling posterior units are updated, and the dynamic cost matrix is ​​locally reconstructed based on the updated Thompson sampling posterior units.

2. The method for allocating guest rooms according to claim 1, characterized in that, The generation of order features, room features, customer preference tags, room type tags, feedback type tags, order demand margin, room availability margin, and unassignable tags includes: Based on the check-in date, room type requirements, check-in duration, and customer preferences in the orders to be allocated, the orders are coded according to the preset order field order to generate order features; Based on the room floor, room orientation, cleaning status, maintenance status, room status and room type of the allocable rooms, the room features are generated by encoding them in the order of the preset room fields. Generate customer preference tags based on customer preferences for floor level, orientation, quietness, and room attributes. Based on the correspondence between room type requirements and guest room types, room type tags are generated; Based on historical check-in feedback, such as order cancellation status, customer no-show status, room change status, stay extension status, and review status, generate feedback type tags; Based on the check-in date, room type requirements, and check-in duration of each order to be allocated within the same allocation batch, order demand weights are generated, and the order demand weights are normalized to generate order demand margins. Based on the cleaning status, maintenance status, and room status of each allocable guest room during the period corresponding to the order check-in date, a guest room availability weight is generated, and the guest room availability weight is normalized to generate a guest room availability margin. When any of the following conditions are met: room type demand does not match room type, cleaning status is incomplete, maintenance status is under maintenance and occupied, or room status is unavailable for sale, the unassignable tag of the corresponding order-room matching relationship will be set to valid.

3. The method for allocating guest rooms according to claim 1, characterized in that, The division of the candidate matching set and the masked matching set includes: The order occupancy period is generated based on the order check-in date and check-in duration in the order characteristics. The unavailable period of a guest room is generated based on the room status in the guest room characteristics. The unavailable period of a guest room includes the period during which the guest room is occupied, the period during which the room is locked, and the period during which the room is not in use. The time overlap between the period when an order is occupied and the period when a room is unavailable is compared to generate a time matching result. The room type requirements in the order characteristics are compared with the room types in the room characteristics to generate room type matching results; The cleaning status, maintenance status and room status of the guest room features are compared with the preset assignable statuses to generate guest room status matching results. A matching determination result is generated based on the time matching result, room type matching result, and guest room status matching result; When the matching result indicates any of the following situations: the order occupancy period overlaps with the room unavailability period, the room type requirement does not match the room type, the cleaning status is not completed, the maintenance status is maintenance occupancy, or the room status is locked or disabled, the corresponding order-room matching context will be assigned to the masked matching set. When the matching result indicates that there is no overlap between the order occupancy period and the room unavailability period, the room type demand matches the room type, the cleaning status is completed, the maintenance status is not maintenance occupancy and the room status is available for sale, the corresponding order-room matching context will be assigned to the candidate matching set.

4. The method for allocating guest rooms according to claim 1, characterized in that, The generation of the matched profit sample and the posterior confidence parameter includes: A posterior index key is generated based on customer preference tags, room type tags, and feedback type tags, and a Thompson sampling posterior unit table is constructed according to the posterior index key; For each Thompson sampling posterior unit in the Thompson sampling posterior unit table, configure the success parameter, failure parameter, sample count parameter, and benchmark value of the revenue corresponding to the posterior index key; Based on the evaluation status, extended stay status, room change status, order cancellation status, and customer absence status corresponding to the posterior index key in the historical check-in feedback, a historical feedback reward value is generated, and the revenue success parameter, revenue failure parameter, and sample count parameter in the corresponding Thompson sampling posterior unit are updated according to the historical feedback reward value. For the order-room matching context in the candidate matching set, read the customer preference tag, room type tag and feedback type tag corresponding to the order-room matching context, and generate the current posterior index key; Based on the current posterior index key, retrieve the corresponding Thompson sampling posterior unit in the Thompson sampling posterior unit table. If the retrieval is successful, call the corresponding Thompson sampling posterior unit. If the retrieval fails, generate an initial Thompson sampling posterior unit corresponding to the current posterior index key and write the initial Thompson sampling posterior unit into the Thompson sampling posterior unit table. The revenue sample value is generated based on the revenue success parameter and revenue failure parameter in the called Thompson sampling posterior unit, and a matching revenue sample is generated based on the revenue sample value and the revenue benchmark value. Based on the success parameters, failure parameters, and sample count parameters in the invoked Thompson sampling posterior unit, a posterior confidence parameter is generated, and the matching benefit sample and posterior confidence parameter are written into the corresponding order-room matching context.

5. The method for allocating guest rooms according to claim 1, characterized in that, The formation of the dynamic cost matrix includes: Read the matching revenue sample, posterior confidence parameter, order features, room features, real-time room status, cleaning status, maintenance status, candidate matching set, and masked matching set from the order-room matching context; Based on the candidate matching set, identify the order-room matching context that participates in the cost calculation, and based on the masked matching set, identify the order-room matching context that does not participate in the cost calculation; For the order-room matching context involved in cost calculation, the cost of the matching revenue sample is reverse-mapped to generate the base cost; The confidence correction magnitude is generated based on the posterior confidence parameter, and the base cost is corrected according to the confidence correction magnitude to generate the corrected base cost; Vacancy loss cost is generated based on real-time room status; cleaning conversion cost is generated based on cleaning status; maintenance occupancy cost is generated based on maintenance status; room type deviation cost is generated based on room type demand in order characteristics and room type in guest room characteristics; and consecutive stay switching cost is generated based on stay duration in order characteristics and room status in guest room characteristics. The operating cost is generated by combining the costs of vacancy loss, cleaning and conversion, maintenance and occupancy, room type deviation, and consecutive stay switching. The base cost and operational cost are combined to generate candidate matrix elements corresponding to the order-room matching context that participate in the cost calculation; For order-room matching contexts that do not participate in cost calculation, set the corresponding matrix element as a non-transferable cost; By using the order index as the row and the room index as the column, candidate matrix elements and non-transferable costs are written into the corresponding matrix positions to form a dynamic cost matrix.

6. The method for allocating guest rooms according to claim 1, characterized in that, The construction of the entropy-regularized optimal transmission model includes: Read the dynamic cost matrix, order demand margin, room availability margin, candidate matching set, and masked matching set; Establish order-to-room transfer variables according to the order row and room column of the dynamic cost matrix, and associate each order-to-room transfer variable with the matrix element at the corresponding position in the dynamic cost matrix to generate a cost transfer item; Based on the order demand margin, the order-room transfer variables in the same order line are summed and constrained to generate row margin constraints; Based on the available room margin, the order-room transfer variables in the same room column are summed and constrained to generate column margin constraints; Based on the candidate matching set, the corresponding order-room transmission variable is limited to non-negative variables, and based on the masked matching set, the corresponding order-room transmission variable is fixed to zero, thus generating a transmission feasible domain. By combining the cost transmission term, entropy regularization term, row marginal constraints, column marginal constraints, and transmission feasible region, an entropy regularized optimal transmission model is constructed. The transmission kernel matrix is ​​generated based on the dynamic cost matrix and entropy regularization coefficient in the entropy regularization optimal transmission model, and the elements of the transmission kernel matrix corresponding to the masked matching set are set to zero according to the transmission feasible region.

7. A method for allocating guest rooms according to claim 6, characterized in that, The Greenkhorn algorithm includes: Read the transmission kernel matrix, order demand margin, room availability margin, candidate matching set, masked matching set, dynamic cost matrix, and Thompson sampling posterior unit update flag; Construct a feasible bipartite graph of order-guest room based on the candidate matching set, delete the corresponding edges in the feasible bipartite graph of order-guest room based on the masked matching set, and fix the elements of the transmission kernel matrix corresponding to the masked matching set to zero; Connectivity partitioning is performed on the order-room feasible bipartite graph to generate a feasible allocation subgraph. Sub-transmission kernel matrix, sub-order demand margin, and sub-room availability margin are extracted from the transmission kernel matrix, order demand margin, and room availability margin according to the feasible allocation subgraph. For sub-order demand margins and sub-room availability margins within the same feasible allocation sub-graph, perform margin registration to generate independent scaling units; The order scaling vector and the guest room scaling vector are initialized based on independent scaling units, and a sub-order-guest room transmission matrix is ​​generated based on the order scaling vector, the sub-transmission kernel matrix, and the guest room scaling vector. The marginal residuals of order rows and guest room columns are calculated based on the sub-order-guest room transfer matrix. A local kernel refresh set is generated based on the Thompson sampling posterior unit update marker. The local kernel refresh set includes the order rows, guest room columns and related guest room columns of the same room type that have undergone posterior changes. Based on the local kernel refresh set, the corresponding matrix elements are read from the updated dynamic cost matrix, the corresponding local transmission kernel elements are regenerated, and the local transmission kernel elements are written back to the corresponding sub-transmission kernel matrix. Based on the subtransmission kernel matrix after the write-back, the affected order row marginal residuals and guest room column marginal residuals are recalculated, and one of the single order row and single guest room column with the largest marginal residual is selected from each independent scaling unit as the current object to be scaled; When the current object to be scaled is an order row, update the order scaling factor according to the ratio of the corresponding sub-order demand margin to the current row's transmission volume and value; when the current object to be scaled is a guest room column, update the guest room scaling factor according to the ratio of the corresponding sub-guest room's available margin to the current column's transmission volume and value. The sub-order-guest room transmission matrix is ​​regenerated based on the updated order scaling vector, sub-transmission kernel matrix, and guest room scaling vector, while keeping the transmission volume corresponding to the masked matching set at zero; Repeat the local kernel refresh, marginal residual calculation, current object to be scaled selection and scaling factor update until the marginal residual of the order row and the marginal residual of the guest room column of each independent scaling unit meet the preset convergence threshold. The sub-order-guest room transfer matrix output by each independent scaling unit is backfilled into the global transfer matrix according to the original order index and the original guest room index to obtain the order-guest room transfer matrix.

8. The method for allocating guest rooms according to claim 1, characterized in that, The methods for generating and updating the guest room allocation results include: Read orders—guest room transmission matrix, candidate matching set, masked matching set, order features, guest room features, customer preference tags, room type tags, feedback type tags, and dynamic cost matrix; Based on the transmission volume corresponding to the same order line in the order-guest room transmission matrix, the candidate matching set associated with the order line is sorted to generate a candidate guest room sequence, and the order-guest room matching relationship corresponding to the masked matching set is excluded from the candidate guest room sequence; Read the corresponding room characteristics sequentially according to the candidate room sequence, and verify the order occupancy period, real-time room status, cleaning status, maintenance status, room availability margin and room type label in combination with the order characteristics to generate a pending order-room binding record; When the same guest room corresponds to multiple pending order-guest room binding records, the valid order-guest room binding record is determined based on the corresponding transmission volume, matrix elements in the dynamic cost matrix, and sorting position in the candidate guest room sequence. The pending orders that are not determined to be valid order-guest room binding records are returned to the corresponding candidate guest room sequence for further selection. Based on valid order-room binding records, a room allocation result is generated, which includes order identifier, room identifier, order occupancy period, room type tag, customer preference tag, matching status, and allocation time. After the room allocation results are executed, the order cancellation status, customer absence status, room change status, extended stay status, and check-in feedback status are obtained based on the order identifier and room identifier, and converted into new feedback type labels and feedback reward values; Based on the new feedback type label and the customer preference label and room type label in the room allocation results, a feedback posterior index key is generated, and the corresponding Thompson sampling posterior unit is located according to the feedback posterior index key. Update the success, failure, and sample count parameters in the corresponding Thompson sampling posterior unit based on the feedback return value, and generate a Thompson sampling posterior unit update tag containing the order identifier, room identifier, and room type label; Based on the updated labels of the Thompson sampling posterior unit, the affected order-room matching context is determined. The updated Thompson sampling posterior unit is applied to the affected order-room matching context to regenerate the matching revenue sample and posterior confidence parameter. The dynamic cost matrix is ​​then locally reconstructed based on the regenerated matching revenue sample and posterior confidence parameter.

9. A guest room allocation system, implementing the guest room allocation method according to any one of claims 1-8, characterized in that, Includes the following modules: The data generation module acquires data on orders to be allocated, available guest rooms, real-time room status, cleaning status, maintenance status, customer preferences, historical occupancy feedback, and operational revenue, and generates order characteristics, guest room characteristics, customer preference tags, room type tags, feedback type tags, order demand margin, guest room availability margin, and unallocatable tags. The matching processing module generates an order-room matching context based on order features and room features, and divides the candidate matching set and the masked matching set according to the unassignable tags; The posterior sampling module calls the Thompson sampling posterior unit based on customer preference labels, room type labels, and feedback type labels to generate matching benefit samples and posterior confidence parameters for the candidate matching set; The cost construction module forms a dynamic cost matrix based on matching revenue samples, posterior confidence parameters, order features, room features, real-time room status, cleaning status, and maintenance status. The transmission solution module constructs an entropy-regularized optimal transmission model based on the dynamic cost matrix, order demand margin, room availability margin, candidate matching set, and masked matching set, and uses the Greenkhorn algorithm to generate the order-room transmission matrix. The allocation and update module generates room allocation results based on the order-room transmission matrix, and updates the Thompson sampling posterior unit and dynamic cost matrix based on order cancellation, customer absence, room change, extended stay, and check-in feedback.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements a room allocation method as described in any one of claims 1 to 8.