Hotel room type matching model updating method based on active learning feedback closed loop
Patent Information
- Application Number
- CN202611142314.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]然而,现有房型匹配模型通常主要依据名称、属性或语义相似程度确定待审核记录,模型输出的不确定程度与错误匹配对后续报价处理造成的实际影响缺少直接关联
[0015]本发明基于主动学习反馈闭环的酒店房型匹配模型更新方法的技术效果和优点:本发明在首位置信度处于人工审核区间时保留排序前两位标准房型,并在售卖条件一致的情况下分别处理同一批在售报价,使候选房型之间的匹配差异能够传递至房型归并、入住过滤和推荐准入等后续处理环节,据此识别对报价处理结果产生实际影响的供应商房型记录,提高主动学习样本选择的针对性,减少仅依据置信度进行人工审核造成的无效标注。通过确定最先出现差异的处理环节,并从同一酒店中选取前序处理结果一致、在该处理环节产生不同结果的标准房型,形成与错误匹配原因相对应的匹配训练样本和不匹配训练样本,使模型更新围绕实际处理差异展开,降低随机负样本对训练方向的干扰。通过在模型回写前验证主动学习样本是否得到纠正,并检查原有稳定供应商房型记录的房型归并结果、入住过滤结果和推荐准入结果是否发生变化,可避免将引起稳定处理结果变化的待验证模型回写房型匹配服务,从而提高房型匹配准确性、相近房型区分能力及模型更新稳定性。
Smart Images

Figure CN122986152A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hotel room type data processing technology, and more specifically, to a method for updating a hotel room type matching model based on an active learning feedback loop. Background Technology
[0002] Existing hotel room type data processing systems typically need to map room names and attributes from different suppliers to standardized room types maintained uniformly within the hotel to achieve room type display, price merging, check-in condition filtering, and recommendation output. Due to differences in language, abbreviations, naming order, and attribute field settings among different suppliers, existing technologies generally first standardize or semantically encode the room names, then combine them with structured attributes such as bed type, number of beds, area, view, floor, and occupancy to calculate the matching degree, and generate a ranking of candidate standard room types accordingly. For room type records with a high matching degree, the system usually directly adopts the top-ranked standard room type; for records with insufficient matching degree or similar candidate results, the mapping relationship is manually reviewed and confirmed, and the manual confirmation results are used to revise the room type dictionary or train the matching model.
[0003] However, existing room type matching models typically determine records to be reviewed based primarily on name, attribute, or semantic similarity. The uncertainty of the model output lacks a direct correlation with the actual impact of incorrect matches on subsequent pricing processing. When multiple candidate standard room types have similar matching levels, relying solely on confidence levels makes it difficult to determine whether differences in candidate room types will alter pricing classification, occupancy condition screening, or recommended candidate status. This results in records with minor impact on business outcomes occupying manual annotation resources, while records with significant impact are not prioritized for identification. Furthermore, existing incremental training often directly uses manually confirmed room types as matching samples and randomly or uniformly selects other room types as non-matching samples. The selected non-matching room types may not be those that the model easily confuses and that will cause differences in actual processing, thus resulting in insufficient training targeting. After model updates, there is a lack of validation of the processing results for existing stable room types, which may change the matching relationships and subsequent processing status of existing room types while correcting current incorrect mappings. Summary of the Invention
[0004] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a hotel room type matching model update method based on active learning feedback loop, in order to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: The hotel room type matching model update method based on active learning feedback loop includes the following steps: Obtain the standard room type ranking output by the room type matching model based on the supplier's room type records; When the reliability of the first position falls within the range of manual review, the first-ranked standard room type and the second-ranked standard room type are retained. Keeping the sales conditions unchanged, the top two standard room types in the ranking are used as the matching results of the supplier's room type records. The same batch of selling quotations are processed, and the room type merging results, check-in filtering results and recommendation admission results are recorded in sequence. Compare the results of the two groups according to the processing order, determine the processing step where the difference first appears, count the number of selling prices with different subsequent results, and determine the active learning sample. Obtain manually confirmed standard room types, and select standard room types from the same hotel that have consistent processing results with manually confirmed standard room types before the first processing step where differences occur, and produce different processing results in the first processing step where differences occur. The supplier's room type records are compared with the manually confirmed standard room type and the selected standard room type to form matching training samples and non-matching training samples, respectively. The room type matching model is updated using the matching training samples and non-matching training samples to obtain the room type matching model to be verified.
[0006] In a preferred embodiment, keeping the sales conditions unchanged, the top two standard room types in the ranking are used as the matching results of the supplier's room type records, and the same batch of sales quotations are processed, including: copying the same batch of sales quotations to form two sets of sales quotation records; Write the first-ranked standard room type in one set of available price quotes, and write the second-ranked standard room type in another set of available price quotes; Before performing room type merging, occupancy filtering, and recommendation admission, in addition to the standard room type matching results, keep the other input data values for room type merging, occupancy filtering, and recommendation admission the same in both sets of on-sale price records.
[0007] In a preferred embodiment, the room type merging result, check-in filtering result, and recommendation admission result are recorded sequentially, including: reading the hotel identifier, room type class, view category, and area range of the standard room type corresponding to each group of on-sale price records; generating a standard room type group identifier according to the hotel identifier, room type class, view category, and area range; merging the on-sale prices into the standard room type group indicated by the standard room type group identifier; and recording the standard room type group identifier to obtain the room type merging result; comparing at least one of the bed type, number of beds, and occupancy of the standard room type with the check-in filtering conditions; recording the retention status or removal status of the on-sale prices to obtain the check-in filtering result; and recording the status of the on-sale prices entering or not entering the recommendation candidate based on the check-in filtering result and the sales conditions to obtain the recommendation admission result.
[0008] In a preferred embodiment, the two sets of results are compared in the processing order to determine the processing step where the difference first appears, and the number of subsequent different selling prices is counted. This includes: using the selling price identifier as an index, and following the processing order of room type merging, occupancy filtering, and recommendation admission, comparing the standard room type group identifier, retention status, removal status, and entry into the recommendation candidate or not entry into the recommendation candidate status of the same selling price in the two sets of selling price records in turn; determining the processing step where the first different processing result appears as the processing step where the difference first appears; from the processing step where the difference first appears until the end of the recommendation admission, the selling price with at least one different processing result is counted once according to the selling price identifier to obtain the number of subsequent different selling prices.
[0009] In a preferred embodiment, the active learning sample is determined based on the number of available sales quotations with different subsequent results, including: when the number of available sales quotations with different subsequent results is greater than 0, the corresponding supplier's room type record is determined as the active learning sample. When multiple supplier room type records have the same supplier identifier, the same supplier room type name, the same top two standard room types in the sorting, and the same processing step where the difference first appears, retain the supplier room type record with the largest number of available prices that differ from the subsequent results and proceed to manual annotation.
[0010] In a preferred embodiment, selecting standard room types from the same hotel includes: using manually confirmed standard room types as matching results of supplier room type records, processing the same batch of on-sale quotations associated with actively learned samples, and recording the room type merging results, check-in filtering results, and recommendation admission results corresponding to manually confirmed standard room types. Each standard room type in the same hotel, excluding manually confirmed standard room types, is used as the matching result of the supplier's room type record. When the other input data values used for room type merging, check-in filtering, and recommendation admission are the same, the same batch of on-sale quotations are processed. The standard room type was selected where all processing results before the first discrepancy occurred were the same as the processing results corresponding to the manually confirmed standard room type, and where different processing results were generated at the first discrepancy stage.
[0011] In a preferred embodiment, the supplier room type records are respectively matched with manually confirmed standard room types and selected standard room types to form matching training samples and non-matching training samples, including: forming matching training samples by combining supplier room type records, manually confirmed standard room types and matching relationship tags; The supplier's room type records, the selected standard room types, and the mismatch relationship labels are used to form a mismatch training sample; Matching and non-matching training samples are added to the same incremental training batch to update the room type matching model.
[0012] In a preferred embodiment, updating the room type matching model using matched training samples and unmatched training samples includes: obtaining the name similarity, attribute similarity, and semantic similarity between the supplier's room type records and the manually confirmed standard room type, and between the supplier's room type records and the selected standard room type; for each similarity, multiplying the difference between the similarity corresponding to the selected standard room type and the similarity corresponding to the manually confirmed standard room type by the model parameters of the corresponding input item in the logistic regression classifier to obtain the confidence difference contribution value of the corresponding similarity; determining the processing part corresponding to the similarity with a confidence difference contribution value greater than zero as the similarity processing part to be adjusted, and updating the similarity processing part to be adjusted using matched training samples and unmatched training samples; When there is no similarity with a confidence difference contribution value greater than zero, the similarity processing part is not updated; the confidence input vector is regenerated based on the updated or unchanged name similarity, attribute similarity, semantic similarity and each missing label, and the logistic regression classifier is updated using the matching training samples and the non-matching training samples to obtain the room type matching model to be validated.
[0013] In a preferred embodiment, updating the similarity processing part to be adjusted includes: when the name processing part is the similarity processing part to be adjusted, extracting name fragments that are not recognized by the Chinese-English room type name dictionary from the supplier's room type name, and establishing a candidate correspondence between the name fragments and the unified room type terminology based on the manually confirmed standard room type; When the number of confirmations for the same candidate correspondence reaches the abbreviation confirmation count parameter, the candidate correspondence will be written into the Chinese-English room type name dictionary; When the attribute processing part is the similarity processing part to be adjusted, according to the field reading order of the processing step that first appears the difference in the processing rule configuration table, the room type attributes in the selected standard room type that are different from the manually confirmed standard room type are replaced with the corresponding room type attributes of the manually confirmed standard room type in turn, the existing attribute replacement results are retained, and the processing step that first appears the difference is re-executed after each replacement. When the processing result is the same as the processing result corresponding to the standard room type confirmed by manual verification for the first time, the room type attributes that have been replaced are identified as the set of room type attributes to be corrected, and the room type attribute dictionary or attribute extraction rules corresponding to each room type attribute to be corrected are updated respectively. When the semantic processing part is the similarity processing part to be adjusted, the semantic similarity model is updated by backpropagation using matching training samples and non-matching training samples.
[0014] In a preferred embodiment, before writing the room type matching model to be verified back to the room type matching service, the method further includes: using the room type matching model to be verified to redetermine the standard room type ranking corresponding to each active learning sample, and determining the active learning sample whose first ranked standard room type is the same as the manually confirmed standard room type as the corrected sample. The active learning samples are grouped according to the hotel identification and the processing step where the first difference occurs. From the hotels in each group, stable supplier room type records that have obtained manual confirmation of standard room type and have maintained the same matching result in a continuous preset number of published model versions are obtained. The standard room type corresponding to the stable supplier room type record is re-determined using the room type matching model to be verified, and the associated room type quotes are reprocessed based on the sales quotes, hotel search requests and processing rules saved before the model update; the processing results before and after the model update are compared starting from the processing step where the difference first appears in each group, and the number of stable supplier room type records that have changed in subsequent processing results is counted. When all active learning samples have been corrected and the number is zero, the room type matching model to be verified will be written back to the room type matching service. Otherwise, the room type matching model to be verified will not be written back. When the number is greater than zero, the room type matching model before the model update will continue to be used. When the number is zero and there are uncorrected samples, the matching training samples and non-matching training samples corresponding to the uncorrected samples will be retained to the next incremental training cycle.
[0015] The technical effects and advantages of this invention's hotel room type matching model update method based on active learning feedback loop are as follows: When the initial confidence level is within the manual review range, this invention retains the top two standard room types in the ranking. Under consistent sales conditions, it processes the same batch of available quotes separately, allowing matching differences between candidate room types to be propagated to subsequent processing stages such as room type merging, check-in filtering, and recommendation admission. This identifies supplier room type records that actually affect the quote processing results, improving the targeting of active learning sample selection and reducing invalid annotations caused by relying solely on confidence levels for manual review. By determining the processing stage where the difference first appears, and selecting standard room types from the same hotel that have consistent previous processing results but produce different results at this processing stage, matching training samples and non-matching training samples corresponding to the reasons for mismatches are formed. This ensures that model updates revolve around actual processing differences, reducing the interference of random negative samples on the training direction. By verifying whether the active learning samples have been corrected before model write-back, and checking whether the room type merging results, occupancy filtering results, and recommendation admission results of the original stable supplier room type records have changed, it is possible to avoid writing back the model to be verified that would cause changes in stable processing results to the room type matching service, thereby improving the accuracy of room type matching, the ability to distinguish similar room types, and the stability of model updates. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the hotel room type matching model update method based on active learning feedback closed loop of the present invention. Figure 2 This is a schematic diagram of the data interaction structure of the hotel room type matching model update system of the present invention; Figure 3 This is a schematic diagram illustrating the dual-pricing process for the top two standard room types in this invention. Figure 4 This is a schematic diagram illustrating the processing steps where differences first appear in this invention and the determination of active learning samples. Figure 5 This is a schematic diagram illustrating the manual confirmation of standard room types and the formation of training samples in this invention; Figure 6 This is a schematic diagram illustrating the verification and write-back of the room type matching model of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example
[0019] Please see Figure 1 This embodiment provides a hotel room type matching model update method based on active learning feedback loop, with the execution entity being a hotel room type data processing server; such as Figure 2 As shown, the hotel room type data processing server connects to the supplier room type database, the standard room type database, the on-sale price database, the manual annotation terminal, and the room type matching service.
[0020] The supplier room type database is used to store room type data provided by suppliers; a supplier room type record refers to a data record formed by a supplier for a hotel room type, which includes at least the supplier identifier, hotel identifier, supplier room type identifier, supplier room type name, and the room type attributes provided by the supplier; The standard room type database is used to store hotel room types that have been uniformly named and attributed. The standard room type includes at least the hotel logo, standard room type logo, standard room type name, room type class, bed type, number of beds, area, view, floor, number of occupants, and room type usage information.
[0021] The on-sale price database stores room rates that can be retrieved at the current query time; the on-sale price includes at least the on-sale price identifier, supplier room rate identifier, check-in date, check-out date, number of guests, price, currency, inventory, breakfast, cancellation policy, payment method, and sales channel.
[0022] The room type matching service receives room type records from suppliers, calculates the confidence level between the supplier's room type records and each standard room type in the same hotel, and outputs the standard room types in descending order of confidence level. The manual annotation terminal is used to display supplier room type records, standard room type sorting, and on-sale quotation processing results, and to receive manual confirmation of standard room types submitted by annotation personnel.
[0023] This embodiment executes steps S101 to S107 sequentially. Step S101 generates a standard room type ranking; step S102 determines whether to retain the top two standard room types based on the first position reliability; step S103 processes the same batch of available quotations using the top two standard room types respectively; step S104 identifies the processing step where the first discrepancy occurs and determines the active learning sample; step S105 obtains manually confirmed standard room types and selects standard room types from the same hotel; step S106 forms matching training samples and non-matching training samples and updates the room type matching model; step S107 verifies the room type matching model to be verified and determines whether to write back the room type matching service based on the verification result.
[0024] When executing step S101, the hotel room type data processing server records the current room type matching model version and the standard room type database version; when executing step S103, the server fixes the on-sale price, hotel search request, and processing rule version; subsequent steps S105 and S107 use the same fixed data for playback and verification. Changes in price, inventory, or standard room type that occur during manual annotation do not change the already saved data, thus ensuring that the data used in each step has a consistent formation time and version; specifically: Step S101: Obtain the standard room type ranking output by the room type matching model for the supplier's room type records; In step S101, the hotel room type data processing server reads the supplier room type records to be matched from the supplier room type database, reads all standard room types of the same hotel from the standard room type database according to the hotel identifier, and calculates the name similarity, attribute similarity and semantic similarity between the supplier room type records and each standard room type.
[0025] In one optional implementation, the supplier's room type attributes are determined based on the structured fields provided by the supplier and the standardized supplier room type names; the server prioritizes the use of valid structured fields; if any field is missing, the bed type, number of beds, area, view, floor, occupancy, room type class or room type usage information is extracted from the supplier's room type name according to the room type attribute dictionary and converted into the corresponding unified attribute category; When the structured field value is inconsistent with the name extraction value, the structured field value shall be used; when multiple candidate values are identified in the same name, the value closest to the corresponding attribute keyword or unit character shall be used, and if the distance is the same, the value that appears first shall be used; the floor in numerical form can be converted into low floor, middle floor or high floor according to the total number of floors in the hotel; when the total number of floors in the hotel is not obtained, the floor category in the standard room type database shall be used.
[0026] For example, if the supplier's room type name is DeluxeTwinRoom,2Beds,SeaView,35sqm, the room type can be described as deluxe, the bed type is twin beds, the number of beds is 2, the view is sea view, and the area is 35 square meters.
[0027] In one optional implementation, name similarity is determined by normalized edit distance similarity and Jaro-Winkler similarity between uniform room type terminology sequences; the server first converts English characters to lowercase, deletes punctuation marks that do not affect the meaning of room type, merges consecutive spaces, and converts room type expressions in different languages into uniform room type terminology based on a Chinese-English room type name dictionary; The Chinese-English room type name dictionary records the correspondence between the original name expression and the unified room type terminology according to the room type level, bed type, view, purpose and additional description; for example, deluxe and luxury are converted to the level terminology LEVEL_DELUXE, twin and double bed are converted to the bed type terminology BED_TWIN, and seaview and sea view are converted to the view terminology VIEW_SEA. The server generates a unified room type word sequence according to the order in which each word appears in the original room type name; name fragments not recognized by the dictionary are retained as original words and participate in subsequent comparisons.
[0028] The Chinese-English room type name dictionary is updated based on manual confirmation records. When a name fragment used by the same supplier corresponds to the same unified room type term in no fewer than the number of manual confirmation records corresponding to the abbreviation confirmation number parameter, the correspondence between the name fragment and the unified room type term is written into the dictionary. Before three identical manual confirmations are formed, the corresponding name fragment remains the original term.
[0029] In one optional implementation, the abbreviation confirmation count parameter is used to determine whether an unrecognized name fragment can be written into the Chinese-English room type name dictionary. The server obtains name fragments that have already received manual confirmation results from the initial training data of the model, and uses the number of times name fragments pointing to the same unified room type term from the same supplier appear as the confirmation count, and counts the number of incorrect dictionary correspondences formed when the confirmation count is 1, 2, 3, 4, and 5 respectively. The server selects the minimum value from the candidate confirmation counts with 0 incorrect correspondences as the abbreviation confirmation count parameter. When the minimum value obtained in the initial training data according to the above method is 3, the initial value of the abbreviation confirmation count parameter is set to 3. After the model runs, after each incremental training cycle, the same statistics are re-executed using newly added manual confirmation records. If a candidate value with 0 incorrect correspondences cannot be obtained, the abbreviation confirmation count parameter of the previous model version is continued to be used.
[0030] The server calculates the minimum edit distance between two identical room type word sequences, divides the minimum edit distance by the larger of the lengths of the two word sequences to obtain the edit distance ratio, and subtracts the edit distance ratio from 1 to obtain the normalized edit distance similarity. The server simultaneously calculates the similarity of common words, word order, and common prefixes in the two word sequences using the Jaro-Winkler algorithm to obtain the Jaro-Winkler similarity. The server determines the name similarity by the arithmetic mean of the normalized edit distance similarity and the Jaro-Winkler similarity. The name similarity ranges from 0 to 1. For example, DeluxeTwinRoomwithSeaView is converted to: LEVEL_DELUXE, BED_TWIN, VIEW_SEA; Deluxe Ocean View Twin Room is converted to: LEVEL_DELUXE, VIEW_SEA, BED_TWIN.
[0031] The server compares two unified room type term sequences instead of directly calculating the edit distance between English and Chinese characters; when the supplier room type name or standard room type name is empty, the name similarity is recorded as 0, and a name missing marker is recorded in the confidence input vector.
[0032] In one alternative implementation, attribute similarity is determined by the cosine similarity between the supplier's room type attribute vector and the standard room type attribute vector; the server treats each standard room type in the current standard room type database version as an attribute document and generates attribute tokens in the order of room type class, bed type, number of beds, area, view, floor, occupancy, and room type usage information. Among them, bed type, view, room type level and usage information are generated into words according to a unified category; number of beds and occupancy are generated into words according to corresponding integers; floors are generated into words according to basement, low floor, middle floor and high floor; area is converted into area range words according to area interval parameters; for an attribute word, the word frequency value indicates whether the word appears in the current room type attribute document, and is 1 when it appears and 0 when it does not appear. In one optional implementation, the area interval parameter is used to convert continuous areas into area interval terms. For each hotel in the initial training data, the server arranges the areas of different standard room types within that hotel in ascending order, calculates the difference between adjacent and unequal areas, and obtains the median of all hotel area differences; the median is rounded to the nearest square meter and used as a candidate area interval; when the candidate area interval is less than 2 square meters, it is set to 2 square meters, and when it is greater than 10 square meters, it is set to 10 square meters; when the median of the area differences corresponding to the initial training data is 5 square meters after rounding, the initial value of the area interval parameter is set to 5 square meters; when the standard room type database version changes during model operation, the area interval parameter is re-determined based on the updated standard room type area.
[0033] Suppose the total number of standard room types in the current standard room type database version is M, and the number of standard room types containing an attribute term is D. The server can determine the inverse document frequency of that attribute term as follows: The server multiplies the term frequency of each attribute term with its inverse document frequency to generate supplier room type attribute vectors and standard room type attribute vectors, respectively. It then calculates the ratio between the inner product of the two attribute vectors and the product of their magnitudes to obtain the attribute similarity.
[0034] When any room type attribute is missing, no corresponding attribute term is generated, and the missing attribute marker is set to 1 in the confidence input vector; when any attribute vector is a zero vector, the attribute similarity is recorded as 0.
[0035] In one alternative implementation, semantic similarity is determined using the Sentence-BERT model; The Sentence-BERT model consists of two BERT-base encoding branches that share model parameters. Each encoding branch includes, in sequence, a word segmentation layer, a word embedding layer, a 12-layer Transformer encoding layer, and an average pooling layer; the hidden vector dimension of the Transformer encoding layer is 768.
[0036] The server inputs the standardized supplier room type name and the standard room type name into two encoding branches respectively; the word segmentation layer converts the room type name into a sequence of words, the word embedding layer converts the words into word vectors, the 12 Transformer encoding layers extract the contextual relationships between words in turn, and the average pooling layer averages the word vectors output by the last layer to obtain 768-dimensional supplier room type semantic vectors and standard room type semantic vectors respectively; the server calculates the cosine similarity between the two semantic vectors, adds 1 to the cosine similarity and divides it by 2 to obtain the semantic similarity between 0 and 1.
[0037] The Sentence-BERT model completes its initial training according to the following timeline: First, the server reads the supplier's room type records and the manually confirmed standard room types from the room type mapping table that has been manually confirmed, combines the two into a matching sample, and sets the matching relationship to 1; Secondly, the server excludes manually confirmed standard room types from the same hotel and sorts the remaining standard room types in descending order according to the sum of name similarity, attribute similarity, and unadjusted semantic similarity. The standard room type ranked first is determined as the initial mismatched standard room type, and the supplier room type record, the initial mismatched standard room type, and the matching relationship with a value of 0 are marked to form a mismatch sample. Next, the server performs name standardization and word segmentation on the supplier's room type name and the standard room type name, and pads or truncates the number of word units to the number corresponding to the upper limit of the sequence length; In one optional implementation, the upper limit of sequence length is used to limit the maximum number of tokens received by each encoding branch of the Sentence-BERT model. The server counts the number of tokens in the room type names after word segmentation in the initial training data, and determines the number of tokens corresponding to the 99th percentile as the data length requirement. At the same time, on the server where the Sentence-BERT model is deployed, test lengths of 32, 64, 96, and 128 are used sequentially to record the memory usage and processing time required to complete one training batch. When the memory usage does not exceed 80% of the available memory of the model training device and can cover no less than 99% of the room type names, the test length with the smallest value is selected as the upper limit of sequence length parameter. When the initial training data and the model training device are selected as 64, the initial value of the upper limit of sequence length is set to 64. When the model structure or training device is changed subsequently, the same calibration is performed again. Subsequently, the two BERT-base encoding branches output 768-dimensional semantic vectors and calculate semantic similarity. The server uses semantic similarity as the prediction value and matching relationship label as the training target, and uses binary cross-entropy loss to calculate the loss value of the current training batch. The model parameters of the Transformer encoding layer and average pooling layer are updated through backpropagation.
[0038] When the number of matched samples and the number of unmatched samples are not the same, the server determines the single sample loss coefficient based on the reciprocal of the number of samples of the two classes. When the number of matched samples is Np, the loss of each matched sample is multiplied by 1 / Np. When the number of unmatched samples is Nn, the loss of each unmatched sample is multiplied by 1 / Nn. Then, the losses of the two classes are summed separately to avoid the model continuously outputting low semantic similarity due to a large number of unmatched samples.
[0039] After each training round, the server uses the validation samples that did not participate in the training to count the proportion of manually confirmed standard room types that enter the top of the ranking; if the proportion does not increase after a consecutive training round, training stops and the model parameters of the previous round are retained; otherwise, training continues until the maximum number of training rounds is reached. When there is no manually confirmed room type mapping table for the first deployment, the labeling personnel confirm the standard room type corresponding to the supplier's room type in the same hotel's standard room type to form an initial matching sample. Then, the mismatch sample and the initial room type matching model are formed according to the above method. Only after the initial training is completed will the subsequent active learning feedback process be activated.
[0040] The confidence score is a value between 0 and 1, which is the output of the room type matching model for a supplier's room type record and a standard room type. It is used to indicate the degree to which the two are likely to form a matching relationship. In one optional implementation, the confidence level is determined jointly by name similarity, attribute similarity, semantic similarity, and the status of missing room type attributes. The server generates a confidence level input vector in a fixed order of name similarity, attribute similarity, semantic similarity, name missing marker, bed type missing marker, number of beds missing marker, area missing marker, view missing marker, floor missing marker, occupancy missing marker, room type level missing marker, and usage information missing marker. In another optional implementation, each missing marker is generated based on the results of name standardization and room type attribute extraction from the supplier's room type records. The name missing marker is set to 0 when the supplier's room type name is not empty and can form at least one unified room type term; the name missing marker is set to 1 when the supplier's room type name is empty or cannot form a unified room type term. For information on bed type, number of beds, area, view, floor, occupancy, room type class, and usage, when the corresponding structured field has a valid value, or can be extracted from the supplier's room type name and converted into a unified attribute value, the corresponding attribute missing flag is set to 0; when the corresponding structured field is empty and a unified attribute value cannot be extracted from the supplier's room type name, the corresponding attribute missing flag is set to 1. The server inputs the confidence vector into the logistic regression classifier, and the confidence can be calculated as follows: Where C represents the confidence level between the supplier's room type record and the current standard room type; x represents the confidence level input vector; w represents the model parameters corresponding to each item in the confidence level input vector; and b represents the bias parameter. The logistic regression classifier can complete its initial training according to the following time sequence: The server will create a matching sample by combining the supplier's room type records with the manually confirmed standard room types and mark the matching relationship as 1; it will also create a non-matching sample by combining the supplier's room type records with the non-matching standard room types selected from the same hotel and mark the matching relationship as 0. The server calculates the name similarity, attribute similarity, semantic similarity, and missing label for each sample, forming a confidence input vector. This confidence input vector is then fed into a logistic regression classifier, which calculates the binary cross-entropy loss based on the classifier's output confidence and matching relationship labels. In one optional implementation, the logistic regression classifier uses the L-BFGS algorithm to update the model parameters and bias parameters. The loss is determined to stop decreasing when the absolute difference between the binary cross-entropy losses obtained from two adjacent iterations is no greater than the convergence difference parameter; parameter updates stop when the maximum number of iterations is reached; the initial value of the convergence difference parameter is... The maximum number of iterations parameter is initially set to 100. The server uses... , and As candidate convergence differences, 50, 100, and 200 were selected as candidate maximum iterations. The classification results and training time were compared on the initial validation data, and the parameter combination with the shortest training time when the classification result no longer improved was chosen. The initial selection results were as follows: When the result is 100, use both as the initial values for the corresponding parameters; In one optional implementation, training data and validation data are divided according to the time of manual annotation. The server arranges the supplier room type records that have obtained manual confirmation results from earliest to latest according to the time of manual annotation. The top 80% of the records are determined as training data, and the remaining records are determined as validation data. If the result of multiplying the total number of records by 80% has a decimal, it is rounded down to determine the number of training data. When the manual annotation time is the same, the records are arranged in ascending order according to the supplier room type identifier. Validation data does not participate in the parameter update of the Sentence-BERT model or logistic regression classifier. It is only used for manual review interval calibration, training parameter selection, and model release validation. When the validation data cannot cover the hotels corresponding to the active learning samples in this round, the manually confirmed records continue to be accumulated, and the updated room type matching model is not released for the time being. After training, the server calculates the confidence level between the supplier's room type records and each standard room type of the same hotel, and generates a standard room type sort according to the confidence level from largest to smallest; when the confidence levels are the same, they are sorted in ascending order according to the standard room type identifier to ensure that the same input forms a unique sort.
[0041] Step S101 outputs supplier room type records, standard room type sorting, name similarity, attribute similarity, semantic similarity, confidence score, room type matching model version, and standard room type database version for each standard room type.
[0042] Step S102: When the reliability of the first position falls within the range of manual review, retain the top two standard room types in the ranking; In step S102, the server reads the first standard room type in the standard room type sort and determines the confidence level corresponding to the first standard room type as the first position confidence level; the manual review interval refers to the confidence level range for comparing the processing results of two standard room types, and is represented by a closed interval consisting of the lower review limit and the upper review limit.
[0043] When the reliability of the first position is not lower than the lower limit of the review and not higher than the upper limit of the review, the reliability of the first position is determined to fall within the manual review range; when the reliability of the first position is higher than the upper limit of the review, the first standard room type in the ranking is used as the automatic matching result; when the reliability of the first position is lower than the lower limit of the review, the supplier's room type record is transferred to the standard room type supplementary entry process.
[0044] In one optional implementation, the upper limit of the review is determined based on the automatic matching accuracy, and the lower limit of the review is determined based on the coverage of the top two criteria. The automatic matching accuracy represents the minimum verification accuracy required to allow the automatic adoption of the first-ranked standard room type. Based on the manual confirmation results in the initial training data, the server calculates the proportion of records where incorrect automatic matching causes changes in the room type merging results, check-in filtering results, or recommended admission results, and sets the upper limit of the automatic processing error proportion allowed by the system at 2%. Subtracting this error proportion upper limit from 1 yields the initial value of the automatic matching accuracy, 0.98. The top two coverage rates represent the lowest proportion of verified samples that are manually confirmed to be among the top two standard room types in the standard room type ranking among the samples entering the manual review interval. Based on the number of samples that the manual annotation terminal can process in one annotation cycle, the server uses 0.85, 0.90, and 0.95 as candidate coverage rates in sequence, determines the lower limit of review according to each candidate coverage rate, and counts the number of samples entering the manual review interval accordingly. The maximum candidate coverage rate is selected when the number of manually reviewed samples does not exceed the processing capacity of the annotation cycle. When the initial calibration result is 0.90, the initial value of the top two coverage rates is set to 0.90.
[0045] The server deduplicates the confidence scores of the first position appearing in the verification data and arranges them in ascending order to form a candidate confidence score set.
[0046] For each candidate value in the candidate confidence set, the server counts the number of validation samples whose first position confidence is not lower than the candidate value, and the number of samples whose first-ranked standard room type is consistent with the manually confirmed standard room type. The ratio of the two is determined as the first-position matching accuracy corresponding to the current candidate value. The server selects the minimum candidate value from the candidate values whose first-order matching accuracy is not lower than the automatic matching accuracy, and uses this as the upper limit for review.
[0047] Among the candidate values not exceeding the review limit, the server calculates the proportion of manually confirmed standard room types in the top two of the verification samples whose first position reliability is between the current candidate value and the review limit, and selects the smallest candidate value from the candidate values whose proportion is not lower than the coverage of the top two as the review limit.
[0048] If no candidate values meet the conditions in the verification data, the lower and upper limits of the review continue to be used according to the previous model version. In an optional implementation, before the initial deployment, the server uses the verification data in the initial training data that did not participate in the model parameter update to calibrate the lower and upper limits of the review. According to the candidate confidence statistics, the minimum candidate confidence of the first matching accuracy rate reaching the automatic matching accuracy parameter is 0.92, and among the candidate confidences not higher than 0.92, when the minimum candidate confidence of the first two coverage rates of the manually confirmed standard room types reaches the first two coverage rate parameters is 0.75, the initial value of the upper limit of the review is set to 0.92, and the initial value of the lower limit of the review is set to 0.75. When the verification data is insufficient to complete the calibration, automatic matching and diversion are not enabled. Instead, the supplier room type records are sent for manual confirmation until verification data sufficient to complete the threshold calibration is obtained.
[0049] The lower and upper limits for approval are saved with each version of the room type matching model and remain unchanged during the operation of a model version.
[0050] When the confidence score of the first position falls within the range of manual review, the server first sorts the standard room types according to the standard room type identifier to remove duplicates, then retains the top two standard room types in the sort, and records the standard room type identifier, standard room type name, room type attributes, three types of similarity and confidence score of the two standard room types; If only one standard room type exists in the same hotel after deduplication, the comparison of the processing results of the subsequent two standard room types will not be performed, and the supplier room type record will be transferred to the standard room type maintenance process.
[0051] For example, with a lower limit of 0.75 and an upper limit of 0.92, when the reliability of the first position corresponding to the supplier's room type record is 0.88, the server retains the top two standard room types in the ranking; when the reliability of the first position is 0.95, the first standard room type in the ranking is adopted; when the reliability of the first position is 0.70, the standard room type supplementary entry process is initiated.
[0052] Step S102 outputs the supplier's room type record, the top two standard room types in the sorted order, the room type matching model version, and the standard room type database version.
[0053] Step S103: Keeping the selling conditions unchanged, use the top two standard room types in the ranking as the matching results of the supplier's room type records, and process the same batch of selling quotations. In step S103, when the server receives a hotel search request, it generates a request identifier and writes the request identifier into each available price record obtained in this query.
[0054] The request identifier is used to associate a hotel search request with the corresponding available price. A hotel search request must include at least the hotel identifier, check-in date, check-out date, number of adults, number of children, bed type filter, view filter, room category filter, and sales channel.
[0055] The server will identify the same request identifier, the same supplier room type identifier, and the same database read transaction as the same batch of available sales quotes.
[0056] Selling conditions refer to the data involved in room type merging, check-in filtering, or recommendation admission, in addition to the standard room type matching results and room type attributes read from the standard room type. These data must include at least the check-in date, check-out date, number of guests, price, currency, inventory, breakfast, cancellation rules, payment method, and sales channel.
[0057] After the server reads the same batch of available prices and corresponding hotel search requests, it generates a price snapshot identifier and saves the request identifier, the value of the available price field, the value of the hotel search request field, the reading time, the room type matching model version, the standard room type database version, and the processing rule version.
[0058] In one alternative implementation, the processing of the asking prices for the two standard room types is performed in an isolated playback environment; An isolated replay environment refers to a data processing environment that uses the same version of the online room type processing program for room type merging, occupancy filtering, and recommendation admission rules, but does not modify the online room type mapping, inventory, price, order, or recommendation output.
[0059] like Figure 3 As shown, the server copies the same quote snapshot to two memory data areas; in one memory data area, the first-ranked standard room type is used as the matching result for the supplier's room type record; in the other memory data area, the second-ranked standard room type is used as the matching result for the supplier's room type record.
[0060] Apart from the standard room type identifier, standard room type name, and room type attributes read from the standard room type database, the other input data in the two memory data areas have the same values; The processing results of the two memory data areas are written to a temporary result table associated with the quotation snapshot identifier. During the processing, the actual inventory is not deducted, no orders are generated, and the online room type mapping is not updated.
[0061] The result of room type merging refers to the standard room type group into which a listed price is assigned. In one optional implementation, the server reads attribute values in a fixed order of hotel identifier, room type, view category, and area range, and concatenates the attribute values to form a standard room type group string; for example, HIL_001|DELUXE|SEA_VIEW|35_40 indicates that the hotel identifier is HIL_001, the room type is deluxe, the view category is sea view, and the area is between 35 and 40 square meters. If the room type class, view category, or area is missing, a missing marker will be written in the corresponding position of the standard room type group string, and no other attribute value will be used to replace it; The server identifies the standard room type group string as the standard room type group identifier. When the standard room type group strings are exactly the same, the corresponding selling prices are assigned to the same standard room type group; if any part is different, the corresponding selling prices are assigned to different standard room type groups.
[0062] The room type classification does not directly use the standard room type unique identifier, nor does it use bed type and occupancy. This allows Deluxe Ocean View King Room and Deluxe Ocean View Twin Room to be classified into the same sales room type group when the hotel, class, view and size range are the same. The difference in bed type between the two is then filtered by check-in. The server records the standard room type group identifiers as part of the room type merging results.
[0063] Check-in filtering results refer to the status of available hotel prices being retained or removed relative to the hotel search request; The server determines the number of guests by the sum of the number of adults and children, and compares the number of guests with the occupancy limit of the standard room type. If the number of guests is not greater than the occupancy limit, the guest number condition is met; otherwise, the guest number condition is not met.
[0064] When setting bed type filtering criteria in a hotel search request, the server compares the filtered bed type with the standard room type; if they are the same, the bed type criterion is met; if they are different, the bed type criterion is not met. When the bed type selection criterion is twin beds, the server also checks whether the number of beds in the standard room type is no less than 2; if the number of beds is less than 2, the bed type criterion is not met. If both the occupancy and bed type requirements are met, the listed price will be reserved; if either requirement is not met, the price will be removed. If no bed type filter is set in the hotel search request, only the occupancy requirement will be considered. The server will record the retention or rejection status as the check-in filtering results.
[0065] The recommendation admission result refers to whether a sale price that has passed the check-in filter is included in the recommendation candidate. Based on the sales channel configuration, the server sequentially checks the inventory, price, currency, check-in date, check-out date, and sales channel of sale prices that are in a reserved state after the check-in filter. When the hotel search request sets filter conditions such as view, room type, or room type usage, the corresponding filter conditions are also compared with standard room type attributes or room type usage information. If all check results meet the corresponding admission conditions, the sale price is recorded as included in the recommendation candidate; if any check result does not meet the corresponding admission conditions, or if the corresponding field is empty, incorrectly formatted, or cannot be parsed, the sale price is recorded as not included in the recommendation candidate. The server determines the status of being included in the recommendation candidate or not as the recommendation admission result.
[0066] For example, the same hotel search request requires two adults to stay in a twin room with an ocean view; the first ranked standard room type is a deluxe ocean view twin room, and the second ranked standard room type is a deluxe ocean view king room; the quoted price, inventory, breakfast, and cancellation rules for the two standard room types are all taken from the same quote snapshot; the two standard room types can get the same room type merged results, but in the check-in filtering process, they are respectively kept and removed.
[0067] Step S103 outputs the standard room type group identifier, check-in filtering results, and recommended admission results corresponding to each selling price in the two memory data areas.
[0068] Step S104: Compare the two sets of results in the order of processing, determine the processing step where the difference first appears, count the number of selling prices with different results in the subsequent steps, and determine the active learning samples; like Figure 4 As shown, in step S104, the server uses the selling price identifier as an index to align the same selling price in the two memory data areas, and compares the processing results according to the actual execution order of room type merging, occupancy filtering and recommendation admission. The earliest processing step where a difference occurs refers to the earliest processing step in the above processing sequence where at least one of the selling price processing steps has a different result; The server first compares the standard room type group identifiers corresponding to the two sets of selling prices. If there is at least one difference in the standard room type group identifier, the room type will be merged and identified as the first processing step where the difference occurs.
[0069] When all standard room type group identifiers are the same, the server compares the check-in filtering results; if there is a single selling price that is either in a reserved state or a rejected state, the check-in filtering is determined as the first processing step where a difference occurs; if the room type merging result and the check-in filtering result are the same, the server compares the recommendation admission results; if there is a single selling price that is either included in the recommendation candidate or not included in the recommendation candidate, the recommendation admission is determined as the first processing step where a difference occurs.
[0070] After the server determines the processing stage where the first discrepancy occurs, it continues to compare the subsequent processing results of each offer for sale from that processing stage. For the same offer for sale, as long as there is at least one different processing result from that processing stage to the end of the recommendation admission process, it is counted once according to the offer for sale identifier. The same offer for sale is not counted repeatedly when there are discrepancies in multiple processing stages. After deduplication of the listed prices, the number of listed prices with different results is obtained.
[0071] Active learning samples refer to supplier room type records that need to be sent to the manual annotation terminal and used for subsequent room type matching model updates; If the number of subsequent different selling quotations is greater than 0, the corresponding supplier's room type record will be identified as an active learning sample; if the number of subsequent different selling quotations is 0, the corresponding supplier's room type record will not be added to this round of manual annotation. Before sending the actively learned samples to the manually labeled terminal, the server performs duplicate processing on supplier room type records that may be generated from the same supplier naming template.
[0072] When multiple supplier room type records have the same supplier identifier, the same supplier room type name, the same top two standard room types in the sorting, and the same processing step where the difference first appears, the server will group the multiple supplier room type records into the same candidate labeling range.
[0073] In one optional implementation, the server further subdivides the candidate artificial labeling range based on hotel identification, standardized room type names, and supplier room type attribute sequences; wherein, the server generates supplier room type attribute sequences in the order of bed type, number of beds, area range, view, floor category, occupancy, room type level, and usage information.
[0074] For each candidate manually labeled range, or each manually labeled range formed by further subdivision, the server selects the supplier room type record with the largest number of available prices that differ from the subsequent results for manual labeling; if the numbers are the same, the supplier room type record with the smaller supplier room type identifier is selected; the remaining supplier room type records retain the association with the selected supplier room type record and are not repeatedly included in this round of manual labeling.
[0075] For example, if two sets of data include 18 available sales quotes and the room types in both sets are identical, and 12 of these quotes are either retained or removed during the check-in filtering process, then the first processing step where the difference occurs is the check-in filtering. The number of available sales quotes with different results is 12, and the corresponding supplier's room type record is identified as an active learning sample.
[0076] Step S104 outputs the active learning samples, the top two standard room types, the processing stage where the difference first appears, the selling price indicators with different subsequent results, the number of selling prices with different subsequent results, and the two sets of processing results.
[0077] Step S105: Obtain manually confirmed standard room types and select standard room types from the same hotel; In step S105, the manual labeling terminal displays the supplier's room type name, supplier's room type attributes, the top two standard room types in the sorted list, standard room type attributes, two sets of processing results, and associated on-sale prices; The labeling personnel confirmed the actual standard room type corresponding to the supplier's room type record based on the hotel's official room type information, the supplier's room type description, and the standard room type database. Manually confirmed standard room type refers to the standard room type that is manually marked and returned by the terminal and confirmed to match the supplier's room type record; the manual marking result shall include at least the supplier's room type identifier, the manually confirmed standard room type identifier, the marking personnel identifier, the marking time, and the basis for manual confirmation.
[0078] The server checks whether the hotel label in the supplier's room type record is the same as the hotel label in the standard room type confirmed manually; if the hotel label is the same, the manual labeling result is accepted; if the hotel label is different, the server returns to the manual labeling terminal for reconfirmation.
[0079] Subsequently, the server calls the price snapshot and hotel search request saved in step S103, uses the manually confirmed standard room type as the matching result of the supplier's room type record, and re-executes room type merging, check-in filtering and recommendation admission to form the processing result corresponding to the manually confirmed standard room type.
[0080] like Figure 5 As shown, the server reads other standard room types from the same hotel besides those manually confirmed, and uses each other standard room type as a matching result for the supplier's room type record in sequence. Under the same price snapshot, the same hotel search request, and the same processing rule version, three processing steps are executed: The selected standard room type must meet the following conditions simultaneously: Before the processing step where the first difference occurs, as determined in step S104, all processing results are the same as the processing results formed by manually confirming the standard room type; In the initial stage of processing discrepancies, at least one of the selling prices was processed differently from the result of manual confirmation of the standard room type. When there are multiple standard room types that meet the criteria, the server selects the standard room type with the highest confidence level from the standard room type ranking generated in step S101; when the confidence levels are the same, the standard room type with the smaller standard room type identifier is selected.
[0081] For example, if the standard room type is manually confirmed as a Deluxe Ocean View Twin Room, the first processing step where differences arise is the check-in filtering. Deluxe Ocean View King Rooms can be grouped into the same room type grouping results, but they are removed during the check-in filtering process due to the different bed types, and are therefore selected. Economy Single Rooms, however, have already generated different results during the room type grouping process and do not meet the condition of identical results in the previous processing steps, so they are not selected.
[0082] If no standard room type that meets the above conditions exists in the same hotel, the server saves the manually confirmed standard room type and updates the current supplier room type mapping, but does not perform this round of model update based on the current supplier room type record, and the current supplier room type record does not enter the incremental training batch in step S106; after the standard room type database adds the standard room type that meets the conditions, mismatch training samples are constructed based on the already saved manual confirmation results.
[0083] Step S105 outputs the standard room type for manual confirmation; when a standard room type that meets the same previous processing results and produces different processing results in the processing step where the difference first appears is obtained from the same hotel, the selected standard room type is also output, and the corresponding active learning sample is sent to step S106.
[0084] Step S106: Form matching training samples and non-matching training samples, and update the room type matching model; In step S106, the server generates incremental training samples based on the active learning samples of the selected standard room type obtained in step S105. The server combines supplier room type records, manually confirmed standard room types, and matching relationship markers with a value of 1 into matching training samples, and combines the same supplier room type records, the selected standard room type, and non-matching relationship markers with a value of 0 into non-matching training samples. Each training sample includes at least the supplier identifier, hotel identifier, supplier room type name, supplier room type attribute, standard room type identifier, standard room type name, standard room type attribute, and matching relationship marker.
[0085] The processing steps where the differences first appear and the two sets of processing results are saved as training control information to limit the business differences corresponding to mismatched training samples, but are not used as model prediction labels. In one optional implementation, the server determines the model parts that need to be updated based on the model parameters corresponding to each confidence input item in the logistic regression classifier; the server obtains the name similarity, attribute similarity, and semantic similarity between the supplier's room type records and the manually confirmed standard room type, and obtains the three types of similarity between the supplier's room type records and the selected standard room type. For each of the name similarity, attribute similarity, and semantic similarity, the server calculates the difference between the input value corresponding to the selected standard room type and the input value corresponding to the manually confirmed standard room type, and multiplies this difference by the model parameters of the corresponding input item in the logistic regression classifier to obtain the confidence difference contribution value of the corresponding similarity: ;in, This represents the difference in contribution of the k-th confidence input to the incorrect ranking; This represents the model parameter corresponding to the k-th input in the logistic regression classifier; This represents the k-th input value corresponding to the selected standard room type; This represents the k-th input value corresponding to the standard room type, which is manually confirmed. When the confidence difference contribution value corresponding to name similarity is greater than 0, the server determines the name processing part as the similarity processing part to be adjusted; when the confidence difference contribution value corresponding to attribute similarity is greater than 0, the attribute processing part is determined as the similarity processing part to be adjusted; when the confidence difference contribution value corresponding to semantic similarity is greater than 0, the semantic processing part is determined as the similarity processing part to be adjusted; when there are multiple confidence difference contribution values greater than 0, the corresponding processing parts are determined as the similarity processing parts to be adjusted respectively; when there are no confidence difference contribution values greater than 0, the similarity processing part is not updated. The first processing step where a difference appears is used to limit the actual processing difference corresponding to mismatched training samples, and the confidence difference contribution value is used to determine the similarity processing part to be adjusted. The two are not interchangeable.
[0086] The name processing section, attribute processing section, semantic processing section, and confidence output section use different update methods; For the name processing part, the server does not change the normalized edit distance and Jaro-Winkler algorithm, but updates the Chinese and English room type name dictionary based on the results of manual confirmation; The server extracts name fragments from the supplier's room type names that are not recognized by the dictionary, and establishes candidate correspondences between the name fragments and the unified room type terms in the standard room type confirmed by the human reviewer. After the candidate correspondences for the same supplier reach the abbreviation confirmation number parameter, the correspondences are written into the Chinese and English room type name dictionary. For the attribute processing part, the server does not change the calculation method of TF-IDF vector and cosine similarity, but updates the room type attribute dictionary and attribute extraction rules according to the human review results.
[0087] The server reads the room type attributes actually used in the processing step where the first discrepancy occurs from the processing rule configuration table, and compares the selected standard room type with the room type attribute values corresponding to the manually confirmed standard room type.
[0088] When multiple different room type attributes exist, the server reads the fields corresponding to the processing step that first shows a difference in the processing rule configuration table in the order they appear, and replaces the room type attribute values in the selected standard room type that are different from the manually confirmed standard room type with the room type attribute values corresponding to the manually confirmed standard room type. After completing the replacement of each room type attribute, the server retains the previously completed attribute replacement results and re-executes the processing step that first shows a difference.
[0089] When the processing result becomes the same as the processing result corresponding to the standard room type confirmed by the human verification for the first time, the server determines the room type attributes that have been replaced up to this replacement as the set of room type attributes to be corrected, and updates the room type attribute dictionary or attribute extraction rules corresponding to each room type attribute in the set of room type attributes to be corrected according to the human verification result.
[0090] For example, the check-in filter uses bed type, number of beds, and occupancy in sequence. The server first replaces the bed type of the selected standard room type from a king-size bed to the twin bed corresponding to the manually confirmed standard room type, and then re-executes the check-in filter. If the processing result is not the same as the processing result corresponding to the manually confirmed standard room type, the bed type replacement result is retained, and then the number of beds is replaced with the number of beds corresponding to the manually confirmed standard room type, and the check-in filter is re-executed. If the processing result is still not the same, the replacement results of bed type and number of beds are retained, and the occupancy is replaced with the occupancy of the occupancy corresponding to the manually confirmed standard room type. If the processing result becomes the same for the first time after this replacement, then the bed type, number of beds, and occupancy are determined as the set of room type attributes to be corrected.
[0091] For the semantic processing part, the server uses matching training samples and non-matching training samples to update the parameters of the Sentence-BERT model through backpropagation. It should be noted that in this embodiment, the Sentence-BERT model uses the AdamW optimizer, and the candidate learning rate is [value missing]. , and The candidate values for the number of training rounds are 1, 2 and 3, and the candidate values for the number of batch samples are 16, 32 and 64.
[0092] For the confidence output, the server uses updated name similarity, attribute similarity, semantic similarity, and missing labels to reconstruct the confidence input vector, and then uses the L-BFGS algorithm to update the model parameters and bias parameters of the logistic regression classifier.
[0093] The execution order is as follows: first, update the Chinese and English room type name dictionary and room type attribute dictionary; then, recalculate the name similarity and attribute similarity of the training samples; subsequently, update the Sentence-BERT model and recalculate the semantic similarity; finally, use the updated three-class similarity to train the logistic regression classifier.
[0094] In one alternative implementation, before training each candidate parameter combination, the server determines the verification record from the historical manual confirmation records belonging to the same hotel as the active learning sample according to the verification criteria in step S107, and saves the standard room type sorting, room type merging results, check-in filtering results and recommended admission results corresponding to each verification record before the model update.
[0095] The server combines the candidate values for learning rate, number of training epochs, and batch size into multiple training parameter combinations, and trains corresponding Sentence-BERT model replicas for each combination. Each model replica is then validated using the same validation records, the same price snapshots, and the same processing rule versions. The server selects the parameter combination that maximizes the proportion of manually confirmed standard room types ranking first; if the proportions are the same, it selects the parameter combination with the fewest changes in validation record processing results; if both are still the same, it selects the parameter combination with fewer training epochs, a smaller learning rate, and a smaller batch size, in that order. The selection result corresponding to the initial training data is the learning rate. When the number of training rounds is 3 and the batch sample size is 32, these three values are used as the initial values of the corresponding training parameters.
[0096] In an incremental training cycle, training samples are arranged according to the time of manual annotation, and matching and non-matching training samples corresponding to the same active learning sample are arranged adjacently; when the number of training samples is less than the batch number, all training samples are combined into a training batch. After each training round, the server recalculates the confidence scores of the manually confirmed standard room types corresponding to the matching training samples and the selected standard room types corresponding to the non-matching training samples. It then associates the two types of training samples corresponding to the same supplier's room type record with the supplier's room type identifier. When the confidence scores of the manually confirmed standard room types corresponding to all supplier room type records are higher than the confidence scores of the selected standard room types, the training stops and proceeds to step S107. If the maximum number of training rounds is not reached, the current training results are saved, but the room type matching service is not written back.
[0097] Step S106 outputs the room type matching model to be verified, the version of the model before the update, the training sample identifier, the adjusted model part, and the training parameters.
[0098] Step S107: Verify the room type matching model to be verified, and determine whether to write back the room type matching service based on the verification results; like Figure 6 As shown, in step S107, the server groups the active learning samples of this round according to the hotel identifier and the processing step where the difference first appears; the active learning samples in each group have the same hotel identifier and the same processing step where the difference first appears.
[0099] The server performs active learning sample correction verification and original room type processing result stability verification for each group. The server reprocesses each active learning sample using the room type matching model to be verified, generates a new standard room type ranking, and compares the first-ranked standard room type with the standard room type identifier of the manually confirmed standard room type. If the first-ranked standard room type and the manually confirmed standard room type identifier are the same, the corresponding active learning sample is determined to have been corrected; if they are different, it is determined to have not been corrected. The server counts the number of corrected active learning samples and the total number of active learning samples in each group.
[0100] Existing stable supplier room type records refer to supplier room type records that have obtained manual confirmation of standard room types and have maintained the same standard room type matching results in multiple consecutive released model versions. The number of consecutive model versions is determined by the number of stable model versions. In one optional implementation, the number of stable model versions is used to determine whether the supplier room type records form a historical matching relationship that can be used to verify the stability of model updates; the server counts the supplier room type records that match the same standard room type for 1, 2, 3 and 4 consecutive released model versions, respectively, and calculates the proportion of each group of records that changes the standard room type matching result in the next released model version; The upper limit of the stable change ratio is used to limit the allowable change ratio of the next version of a record that is considered stable. The server calculates the normal matching change ratio when there is no change in supplier data or standard room type data based on historical manual review records, and uses the 95th percentile of this ratio as the upper limit of the stable change ratio. When the initial statistical result is 1%, the initial value of the upper limit of the stable change ratio is set to 1%.
[0101] The server selects the minimum value from the number of consecutive versions whose next version change ratio is no higher than the upper limit of the stable change ratio as the number of stable model versions; when the initial calibration result is 2, the initial value of the number of stable model versions is set to 2; when the system has not accumulated enough released model versions, stability verification is performed using historical manually confirmed records that have not participated in training, and stable records are not directly identified based on the initial value of 2. For each active learning sample group, the server selects the original stable supplier room type records from the same hotel, and compares the processing results before and after the update according to the processing step where the difference first appears in the group.
[0102] When the number of released model versions has not yet reached the number of stable model versions, the server selects verification records from the historical manual confirmation records that have never participated in this round of incremental training; the verification records have the same hotel identifier as the current active learning sample group, and have manually confirmed standard room types and associated sales prices.
[0103] Before performing the model parameter update in step S106, the server saves the price snapshot, hotel search request, processing rule version, and corresponding room type merging results, check-in filtering results, and recommendation admission results for each active learning sample group corresponding to the stable supplier room type records or verification records, as a comparison benchmark after the model update.
[0104] After the model is updated, the server uses the same quote snapshot, the same hotel search request, and the same version of processing rules to redetermine the standard room type and execute three processing steps. For each group, the server compares the processing results before and after the update, starting from the processing stage where the difference first appears. When a supplier's room type record changes the processing result in the corresponding processing stage, and there is at least one result change from the corresponding processing stage to the end of the recommendation admission process, the corresponding supplier's room type record is counted once. If only the confidence level changes, but the first-ranked standard room type, the room type merging results, the check-in filtering results, and the recommended admission results remain unchanged, the number of changes in processing results will not be counted. When all active learning samples have been corrected and the number of stable supplier room type records whose processing results have changed is zero, the server will determine the room type matching model to be verified as the room type matching model to be released; when there are stable supplier room type records whose processing results have changed, the room type matching model to be verified will not be released, and the room type matching model before the model update will continue to be used; when there are no changes in processing results but there are still active learning samples that have not been corrected, the matching training samples and non-matching training samples corresponding to the uncorrected active learning samples will be retained to the next incremental training cycle.
[0105] The server generates a model version identifier for the room type matching model to be released, saves the model parameters, standard room type database version, manual review interval, training sample identifier, and validation results, and loads the room type matching model to be released into a backup model instance. The server verifies the model version, confidence input vector dimension, number of model parameters, and semantic vector dimension, and inputs the preset model release test record into the backup model instance. When the model configuration is consistent, and the output fields corresponding to the model release test record are complete, and the first-ranked standard room type is consistent with the result of the model release validation phase, the new room type matching request is switched to the backup model instance; otherwise, the model switching is stopped, and the room type matching model before the model update continues to be used.
[0106] After model switching is completed, the room type matching service saves the model instance before the model update for a model retention period of no less than one complete on-sale price update cycle. If a model loading error, missing output field, or room type matching service call failure occurs within the model retention period, the room type matching request is switched back to the model instance before the model update. When the model retention period expires and no of the above-mentioned abnormalities occur, the model instance before the model update is released. The server reads the latest on-sale price, writes the new standard room type matching results into the online room type mapping table, and regenerates the online room type merging results, occupancy filtering results, and recommendation admission results. The price snapshot saved in step S103 is only used for offline playback, training sample construction, and model validation, and does not cover the current online sales conditions.
[0107] For example, this round includes 12 actively learned samples, which are divided into two groups according to the hotel identifier and the processing stage where the difference first appears. The room type matching model to be verified matches all 12 actively learned samples to the standard room type confirmed by humans. If the processing results of 50 stable supplier room type records in both groups do not change, the server will determine the room type matching model to be verified as the room type matching model to be released, and write back to the room type matching service after the backup model instance passes the verification. If two stable supplier room type records in one of the groups change from the retained state to the removed state in the check-in filtering stage, the room type matching model to be verified will not be released, and the model before the update will continue to be used.
[0108] In this embodiment, name similarity, attribute similarity, semantic similarity, and confidence are all represented by dimensionless numerical values; parameters involving review intervals, number of abbreviation confirmations, area intervals, training parameters, and the number of stable model versions are determined according to the aforementioned corresponding calibration methods.
[0109] The method described in this embodiment can be executed by a hotel room type data processing server, and the relevant processing modules can be implemented through software programs or a combination of software and hardware.
[0110] Those skilled in the art will recognize that the modules and algorithm modules of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and inventive constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0111] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0112] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hotel room type matching model update method based on active learning feedback closed loop, characterized in that, Includes the following steps: Obtain the standard room type ranking output by the room type matching model based on the supplier's room type records; When the reliability of the first position falls within the range of manual review, the first-ranked standard room type and the second-ranked standard room type are retained. Keeping the sales conditions unchanged, the top two standard room types in the ranking are used as the matching results of the supplier's room type records. The same batch of selling quotations are processed, and the room type merging results, check-in filtering results and recommendation admission results are recorded in sequence. Compare the results of the two groups according to the processing order, determine the processing step where the difference first appears, count the number of selling prices with different subsequent results, and determine the active learning sample. Obtain manually confirmed standard room types, and select standard room types from the same hotel that have consistent processing results with manually confirmed standard room types before the first processing step where differences occur, and produce different processing results in the first processing step where differences occur. The supplier's room type records are compared with the manually confirmed standard room type and the selected standard room type to form matching training samples and non-matching training samples, respectively. The room type matching model is updated using the matching training samples and non-matching training samples to obtain the room type matching model to be verified.
2. The hotel room type matching model update method based on active learning feedback closed loop according to claim 1, characterized in that, Keeping the sales conditions unchanged, the top two standard room types in the ranking are used as the matching results of the supplier's room type records. The same batch of sales quotations are processed, including: copying the same batch of sales quotations to form two sets of sales quotation records. Write the first-ranked standard room type in one set of available price quotes, and write the second-ranked standard room type in another set of available price quotes; Before performing room type merging, occupancy filtering, and recommendation admission, in addition to the standard room type matching results, keep the other input data values used for room type merging, occupancy filtering, and recommendation admission the same in both sets of on-sale price records.
3. The hotel room type matching model update method based on active learning feedback closed loop according to claim 2, characterized in that, The process sequentially records the room type merging results, check-in filtering results, and recommendation admission results, including: reading the hotel identifier, room type class, view category, and area range of the standard room type corresponding to each group of on-sale price records; generating a standard room type group identifier according to the hotel identifier, room type class, view category, and area range; merging the on-sale prices into the standard room type group indicated by the standard room type group identifier; recording the standard room type group identifier to obtain the room type merging results; comparing at least one of the bed type, number of beds, and occupancy of the standard room type with the check-in filtering criteria; recording the retention or removal status of the on-sale prices to obtain the check-in filtering results; and recording the status of the on-sale prices entering or not entering the recommendation candidate based on the check-in filtering results and the sales criteria to obtain the recommendation admission results.
4. The hotel room type matching model update method based on active learning feedback closed loop according to claim 3, characterized in that, Compare the two sets of results according to the processing order, determine the processing step where the first difference occurs, and count the number of selling prices with different results in the subsequent steps. This includes: using the selling price identifier as an index, and following the processing order of room type merging, occupancy filtering, and recommendation admission, comparing the standard room type group identifier, retention status, removal status, and status of entering the recommendation candidate or not entering the recommendation candidate for the same selling price in the two sets of selling price records. The processing step where a different result is first observed is identified as the processing step where the difference first appears; From the initial processing stage where a difference first appears until the end of the recommendation admission process, each on-sale price with at least one different processing result is counted once according to its on-sale price identifier, thus obtaining the number of on-sale prices with different subsequent results.
5. The hotel room type matching model update method based on active learning feedback closed loop according to claim 4, characterized in that, Active learning samples are determined based on the number of available prices with different subsequent results, including: when the number of available prices with different subsequent results is greater than 0, the corresponding supplier's room type record is determined as an active learning sample. When multiple supplier room type records have the same supplier identifier, the same supplier room type name, the same top two standard room types in the sorting, and the same processing step where the difference first appears, retain the supplier room type record with the largest number of available prices that differ from the subsequent results and proceed to manual annotation.
6. The hotel room type matching model update method based on active learning feedback closed loop according to any one of claims 1 to 5, characterized in that, Selecting standard room types from the same hotel includes: using manually confirmed standard room types as the matching results of supplier room type records, processing the same batch of on-sale quotations associated with actively learned samples, and recording the room type merging results, check-in filtering results, and recommendation admission results corresponding to manually confirmed standard room types; Each standard room type in the same hotel, excluding manually confirmed standard room types, is used as the matching result of the supplier's room type record. When the values of other input data used for room type merging, check-in filtering, and recommendation admission are the same, the same batch of on-sale quotations are processed. The standard room type was selected where all processing results before the first discrepancy occurred were the same as the processing results corresponding to the manually confirmed standard room type, and where different processing results were generated at the first discrepancy stage.
7. The hotel room type matching model update method based on active learning feedback closed loop according to claim 6, characterized in that, The supplier's room type records are compared with the manually confirmed standard room type and the selected standard room type to form matching training samples and non-matching training samples, including: forming matching training samples by combining the supplier's room type records, the manually confirmed standard room type and the matching relationship label; The supplier's room type records, the selected standard room types, and the mismatch relationship labels are used to form a mismatch training sample; Matching and non-matching training samples are added to the same incremental training batch to update the room type matching model.
8. The hotel room type matching model update method based on active learning feedback closed loop according to claim 7, characterized in that, The room type matching model is updated using matched and unmatched training samples, including: obtaining the name similarity, attribute similarity, and semantic similarity between the supplier's room type records and the manually confirmed standard room type, and between the supplier's room type records and the selected standard room type; for each similarity, the difference between the similarity corresponding to the selected standard room type and the similarity corresponding to the manually confirmed standard room type is multiplied by the model parameters of the corresponding input item in the logistic regression classifier to obtain the confidence difference contribution value of the corresponding similarity; the processing part corresponding to the similarity with a confidence difference contribution value greater than zero is determined as the similarity processing part to be adjusted, and the similarity processing part to be adjusted is updated using matched and unmatched training samples; When there is no similarity with a confidence difference contribution value greater than zero, the similarity processing part is not updated; the confidence input vector is regenerated based on the updated or unchanged name similarity, attribute similarity, semantic similarity and each missing label, and the logistic regression classifier is updated using the matching training samples and the non-matching training samples to obtain the room type matching model to be validated.
9. The hotel room type matching model update method based on active learning feedback closed loop according to claim 8, characterized in that, The update of the similarity processing part to be adjusted includes: when the name processing part is the similarity processing part to be adjusted, extracting name fragments that are not recognized by the Chinese-English room type name dictionary from the supplier's room type name, and establishing a candidate correspondence between the name fragments and the unified room type word units based on the standard room type confirmed by manual confirmation; When the number of confirmations for the same candidate correspondence reaches the abbreviation confirmation count parameter, the candidate correspondence will be written into the Chinese-English room type name dictionary; When the attribute processing part is the similarity processing part to be adjusted, according to the field reading order of the processing step that first appears the difference in the processing rule configuration table, the room type attributes in the selected standard room type that are different from the manually confirmed standard room type are replaced with the corresponding room type attributes of the manually confirmed standard room type in turn, the existing attribute replacement results are retained, and the processing step that first appears the difference is re-executed after each replacement. When the processing result is the same as the processing result corresponding to the standard room type confirmed by manual verification for the first time, the room type attributes that have been replaced are identified as the set of room type attributes to be corrected, and the room type attribute dictionary or attribute extraction rules corresponding to each room type attribute to be corrected are updated respectively. When the semantic processing part is the similarity processing part to be adjusted, the semantic similarity model is updated by backpropagation using matching training samples and non-matching training samples.
10. The hotel room type matching model update method based on active learning feedback closed loop according to claim 9, characterized in that, Before writing the room type matching model to be verified back to the room type matching service, the process also includes: using the room type matching model to be verified to redetermine the standard room type ranking corresponding to each active learning sample, and determining the active learning sample whose first-ranked standard room type is the same as the manually confirmed standard room type as the corrected sample. The active learning samples are grouped according to the hotel identification and the processing step where the first difference occurs. From the hotels in each group, stable supplier room type records that have obtained manual confirmation of standard room type and have maintained the same matching result in a continuous preset number of published model versions are obtained. The standard room type corresponding to the stable supplier room type record is re-determined using the room type matching model to be verified, and the associated room type quotes are reprocessed based on the sales quotes, hotel search requests and processing rules saved before the model update; the processing results before and after the model update are compared starting from the processing step where the difference first appears in each group, and the number of stable supplier room type records that have changed in subsequent processing results is counted. When all active learning samples have been corrected and the number is zero, the room type matching model to be verified will be written back to the room type matching service. Otherwise, the room type matching model to be verified will not be written back. When the number is greater than zero, the room type matching model before the model update will continue to be used. When the number is zero and there are uncorrected samples, the matching training samples and non-matching training samples corresponding to the uncorrected samples will be retained to the next incremental training cycle.