Hotel data processing method and device, and electronic equipment

CN120780928BActive Publication Date: 2026-08-28TRAVELSKY TECHNOLOGY LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510882550.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2026-08-28
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

但是会导致多酒店页面和单酒店页面有价格不一致,用户点击某酒店查到的价格和多酒店页面不一致,造成不好的体验

Benefits of technology

[0025]In this invention, data change information output by a target prediction model associated with a target hotel is obtained. The target prediction model predicts the time period during which the target data of the target hotel will change. The target data includes hotel data that may be inconsistent between multiple hotel pages and single hotel pages. A single hotel page displays data for one hotel, while multiple hotel pages display data for multiple hotels. Based on the data change information, a target time is determined, and the target data of the target hotel is retrieved at that time. The target hotel data is then updated to a target cache, which provides the data displayed on the multiple hotel pages. This solves the technical problem in related technologies where prices on multiple hotel pages often differ from those on single hotel pages. In this invention, by predicting the time period during which the target data will change using a target prediction model and determining the time for retrieving the target data, and then retrieving and storing the target data in the target cache based on that time, inconsistencies between the target data retrieved from multiple hotel pages and the target data retrieved from a single hotel page can be avoided, thus ensuring the consistency of the target data between multiple hotel pages and single hotel pages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780928B_ABST
    Figure CN120780928B_ABST
Patent Text Reader

Abstract

The application discloses a hotel data processing method and device and electronic equipment. It is related to the field of data processing, and the method comprises the following steps: obtaining data change information output by a target prediction model associated with a target hotel, wherein the target prediction model is used to predict a time period in which target data of the target hotel changes, the target data comprises hotel data that may exist in inconsistent conditions in a multi-hotel page and a single-hotel page, the single-hotel page is used to display data of one hotel, and the multi-hotel page is used to display data of multiple hotels; based on the data change information, a target time is determined, and target data of the target hotel is captured at the target time to obtain target hotel data; and the target hotel data is updated to a target cache, wherein the target cache is used to provide data displayed on the multi-hotel page. The application solves the technical problem that the price of the multi-hotel page and the price of the single-hotel page are often inconsistent in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and more specifically, to a method, apparatus, and electronic device for processing hotel data. Background Technology

[0002] The hotel platform connects with multiple suppliers, each connecting with thousands of hotels. Hotel prices change in real time. When a user searches for hotels in a specific area on the hotel's front end, the system displays a list of hotels with their names, addresses, and prices—this is the multi-hotel page. Selecting a hotel and viewing its details page can be called a single-hotel page.

[0003] For single-hotel pages, prices are retrieved in real-time from the API, ensuring accuracy. However, for multi-hotel pages, which involve numerous hotels, retrieving prices from single-hotel pages would incur waiting time. Therefore, a caching mechanism is used to retrieve prices. When displaying prices for multiple hotels, the cached prices are retrieved directly, resulting in faster speeds. However, this can lead to price discrepancies between the multi-hotel and single-hotel pages. Users clicking on a specific hotel may see a different price than on the multi-hotel page, resulting in a poor user experience.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides a method, apparatus, and electronic device for processing hotel data, to at least solve the technical problem in the related art that the prices on multiple hotel pages are often inconsistent with the prices on a single hotel page.

[0006] According to one aspect of the present invention, a method for processing hotel data is provided, comprising: obtaining data change information output by a target prediction model associated with a target hotel, wherein the target prediction model is used to predict the time period during which target data of the target hotel changes, the target data including: hotel data that may be inconsistent between multiple hotel pages and a single hotel page, wherein the single hotel page is used to display data of one hotel, and the multiple hotel pages are used to display data of multiple hotels; determining a target time based on the data change information, and capturing the target data of the target hotel at the target time to obtain target hotel data; and updating the target hotel data to a target cache, wherein the target cache is used to provide data displayed on the multiple hotel pages.

[0007] Furthermore, the target prediction model is obtained in the following manner: before the current time, multiple historical hotel data are acquired, wherein the historical hotel data includes: target data of the target hotel captured before the current time and change labels used to identify whether the target data has changed; based on the multiple historical hotel data, the target machine learning model is trained until the target machine learning model meets the preset convergence condition, and the target machine learning model is determined as the target prediction model, wherein the model type of the target machine learning model includes: logistic regression model.

[0008] Further, prior to the current time, acquiring multiple historical hotel data includes: prior to the current time, retrieving hotel data from multiple hotels in chronological order to obtain multiple initial hotel data, wherein the target hotel is one of the multiple hotels, and each initial hotel data includes at least one of the following fields: hotel identifier, data retrieval time, target data of the hotel, and hotel check-in time; sorting the multiple initial hotel data based on the hotel identifier and the data retrieval time to obtain sorted initial hotel data; and determining multiple historical hotel data based on the sorted initial hotel data.

[0009] Further, based on the sorted initial hotel data, determining multiple historical hotel data includes: determining a target time interval corresponding to each initial hotel data based on the time difference between the data capture time and the hotel check-in time of each initial hotel data, wherein the target time interval includes: the time interval between the data capture time and the check-in time of the initial hotel data; determining a change label for each initial hotel data based on whether the target data between two adjacent initial hotel data has changed in the sorted initial hotel data; extracting the initial hotel data of the target hotel from the sorted initial hotel data based on the hotel identifier of the target hotel; and determining multiple historical hotel data based on the initial hotel data of the target hotel, the target time interval of the initial hotel data of the target hotel, and the change label of each initial hotel data.

[0010] Further, based on the initial hotel data of the target hotel, the target time interval of the initial hotel data of the target hotel, and the change tag of each initial hotel data, multiple historical hotel data are determined, including: calculating the average number of changes of the target data of the target hotel in each target time interval based on the change tag of the initial hotel data of the target hotel and the target time interval of the initial hotel data of the target hotel; and determining multiple historical hotel data based on the initial hotel data of the target hotel and the average number of changes of the target data of the target hotel in each target time interval.

[0011] Further, based on the initial hotel data of the target hotel and the average number of changes in the target data of the target hotel within each target time interval, a plurality of historical hotel data are determined, including: determining the change label of the target hotel within each target time interval based on the average number of changes in the target data within each target time interval; and determining the plurality of historical hotel data based on the initial hotel data of the target hotel and the change label of the target hotel within each target time interval.

[0012] Further, the data change information includes: change tags of the target hotel in at least one target time period, the target time period being after the current time. Determining the target time based on the data change information includes: determining whether the change tag of the target hotel in each target time period is a preset tag based on the data change information, wherein the preset tag is used to indicate that the target data will change; and determining the target time based on the time period associated with the change tag being a preset tag in the data change information.

[0013] Furthermore, the target data includes: hotel prices.

[0014] According to another aspect of the present invention, a hotel data processing apparatus is also provided, comprising: a first acquisition unit, configured to acquire data change information output by a target prediction model associated with a target hotel, wherein the target prediction model is used to predict the time period during which target data of the target hotel changes, the target data including: hotel data that may be inconsistent between multiple hotel pages and a single hotel page, wherein the single hotel page is used to display data of one hotel, and the multiple hotel pages are used to display data of multiple hotels; a processing unit, configured to determine a target time based on the data change information, and capture the target data of the target hotel at the target time to obtain target hotel data; and an update unit, configured to update the target hotel data to a target cache, wherein the target cache is used to provide data displayed on multiple hotel pages.

[0015] Further, the target prediction model is obtained through the following units: a second acquisition unit, used to acquire multiple historical hotel data before the current time, wherein the historical hotel data includes: target data of the target hotel captured before the current time and change labels used to identify whether the target data has changed; a training unit, used to train the target machine learning model based on the multiple historical hotel data until the target machine learning model meets a preset convergence condition, and determine the target machine learning model as the target prediction model, wherein the model type of the target machine learning model includes: a logistic regression model.

[0016] Further, the second acquisition unit includes: a crawling subunit, configured to crawl hotel data of multiple hotels in chronological order before the current time to obtain multiple initial hotel data, wherein the target hotel is one of the multiple hotels, and each initial hotel data includes at least one of the following fields: hotel identifier, data crawling time, target data of the hotel, and hotel check-in time; a sorting subunit, configured to sort the multiple initial hotel data based on the hotel identifier and the data crawling time to obtain sorted multiple initial hotel data; and a first determining subunit, configured to determine multiple historical hotel data based on the sorted multiple initial hotel data.

[0017] Further, the first determining subunit includes: a first determining module, configured to determine a target time interval corresponding to each initial hotel data based on the time difference between the data capture time and the hotel check-in time of each initial hotel data, wherein the target time interval includes: the time interval between the data capture time and the check-in time in the initial hotel data; and a second determining module, configured to determine a change label for each initial hotel data based on whether the target data between two adjacent initial hotel data has changed in the sorted plurality of initial hotel data.

[0018] An extraction module is used to extract the initial hotel data of the target hotel from a sorted set of initial hotel data based on the hotel identifier of the target hotel; a third determination module is used to determine a set of historical hotel data based on the initial hotel data of the target hotel, the target time interval of the initial hotel data of the target hotel, and the change label of each initial hotel data.

[0019] Furthermore, the third determining module includes: a calculation submodule, used to calculate the average number of changes in the target data of the target hotel within each target time interval based on the change label of the initial hotel data of the target hotel and the target time interval of the initial hotel data of the target hotel; and a determining submodule, used to determine multiple sets of historical hotel data based on the initial hotel data of the target hotel and the average number of changes in the target data of the target hotel within each target time interval.

[0020] Further, the determination sub-module includes: determination sub-module one, which determines the change label of the target hotel in each target time interval based on the average number of changes of the target data in each target time interval; and determination sub-module two, which determines multiple historical hotel data based on the initial hotel data of the target hotel and the change label of the target hotel in each target time interval.

[0021] Further, the data change information includes: change tags of the target hotel in at least one target time period, the target time period being after the current time. The processing unit includes: a second determining subunit, used to determine, based on the data change information, whether the change tag of the target hotel in each target time period is a preset tag, wherein the preset tag is used to indicate that the target data will change; and a third determining subunit, used to determine the target time based on the time period associated with the change tag being a preset tag in the data change information.

[0022] Furthermore, the target data includes: hotel prices.

[0023] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform a hotel data processing method of any one of the above-described embodiments by executing the executable instructions.

[0024] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program controls the device where the computer-readable storage medium is located to perform the hotel data processing method described above when the computer program is running.

[0025] In this invention, data change information output by a target prediction model associated with a target hotel is obtained. The target prediction model predicts the time period during which the target data of the target hotel will change. The target data includes hotel data that may be inconsistent between multiple hotel pages and single hotel pages. A single hotel page displays data for one hotel, while multiple hotel pages display data for multiple hotels. Based on the data change information, a target time is determined, and the target data of the target hotel is retrieved at that time. The target hotel data is then updated to a target cache, which provides the data displayed on the multiple hotel pages. This solves the technical problem in related technologies where prices on multiple hotel pages often differ from those on single hotel pages. In this invention, by predicting the time period during which the target data will change using a target prediction model and determining the time for retrieving the target data, and then retrieving and storing the target data in the target cache based on that time, inconsistencies between the target data retrieved from multiple hotel pages and the target data retrieved from a single hotel page can be avoided, thus ensuring the consistency of the target data between multiple hotel pages and single hotel pages. Attached Figure Description

[0026] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0027] Figure 1 This is a flowchart of an optional hotel data processing method according to an embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram of an optional data processing and feature engineering method according to an embodiment of the present invention;

[0029] Figure 3 This is an optional flowchart for applying a variable price label according to an embodiment of the present invention;

[0030] Figure 4 This is a flowchart of an optional model training process and model parameter tuning according to an embodiment of the present invention;

[0031] Figure 5 This is a flowchart of an optional hotel data modeling method according to an embodiment of the present invention;

[0032] Figure 6 This is a flowchart of an optional model application according to an embodiment of the present invention;

[0033] Figure 7 This is a schematic diagram of an optional hotel data processing apparatus according to an embodiment of the present invention;

[0034] Figure 8This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0035] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0037] For ease of description, some terms or nouns involved in the various embodiments of the present invention will be explained below.

[0038] Hotel suppliers: Hotel resource providers who can offer hotel search and booking services.

[0039] Channels: Agents or travel agencies that distribute hotel resources to end travelers.

[0040] Hotel price change: This refers to a price change event where the prices of two consecutive data entries change, and the data from the same supplier, the same channel, the same hotel, and the same check-in date are sorted by the time of data capture.

[0041] It should be noted that the user information (including but not limited to user device information, user personal information, etc.), the collected information and data (including but not limited to data used for analysis, data stored, data displayed, hotel data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.

[0042] Example 1

[0043] According to an embodiment of the present invention, an optional method embodiment for processing hotel data is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0044] Figure 1 This is a flowchart of an optional hotel data processing method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0045] Step S101: Obtain the data change information output by the target prediction model associated with the target hotel. The target prediction model is used to predict the time period during which the target data of the target hotel changes. The target data includes: hotel data that may have inconsistencies in multiple hotel pages and single hotel pages. A single hotel page is used to display the data of one hotel, and multiple hotel pages are used to display the data of multiple hotels.

[0046] The aforementioned target prediction model can be a logistic regression model. The aforementioned data change information can include: the time periods during which the target hotel's target data changes. For example, the aforementioned data change information can include: change information of the target data in multiple time periods leading up to the check-in date of the target hotel (e.g., 10 PM on that day), such as whether the target data will change within 1-2 hours or 2-3 hours leading up to the check-in date.

[0047] The target prediction model outputs a vector, which can be saved as a CSV (Comma-Separated Values) file. For example, if the output vector is [1, 1, 0, 1, 0, 0, 0], the first 1 indicates that the hotel's target data will change within 0-1 hour of the check-in date (10 PM); the second 1 indicates that the hotel's target data will change within 1-2 hours of the check-in date; and the third 0 indicates that the hotel's target data will not change within 2-3 hours.

[0048] The target data mentioned above can be the hotel price. The data change information can be whether the hotel price has changed within multiple time intervals from the hotel's check-in date (e.g., 1-2 hours from the check-in date, 0-1 hour from the check-in date). It should be noted that the target data can also be other data besides the hotel price, which may be inconsistent between single hotel pages and multi-hotel pages.

[0049] It should be noted that for each hotel supplier, there can be a corresponding prediction model to predict the change information of the target data of that hotel in that hotel supplier. The above-mentioned target prediction model can be the prediction model for the target hotel of a hotel supplier.

[0050] Step S102: Based on the data change information, determine the target time and capture the target data of the target hotel at the target time to obtain the target hotel data.

[0051] The target time mentioned above can be the last moment of the time period in the data change information indicating that the target data will change, or it can be a moment after the time period in which the target data will change. You can also capture the target data multiple times during the time period in which the target data will change, so as to capture the target data of the target hotel after the target data changes, and avoid capturing the data that has not changed.

[0052] For example, if the data change information indicates that the target data (e.g., hotel price) will change within 1-2 hours of the hotel check-in date (e.g., 22:00 on the same day), that is, the data will change between 20:00 and 21:00 on the same day, then the target data can be captured at 21:00. It can also be captured multiple times between 20:00 and 21:00 at a preset frequency, or it can be captured at some time after 21:00 to ensure that the changed target data is captured.

[0053] Step S103: Update the target hotel data to the target cache, whereby the target cache is used to provide data for displaying multiple hotel pages.

[0054] In this embodiment, the target hotel data is updated to the target cache. The multi-hotel pages can retrieve the target data of the target hotel from the target cache and display it, avoiding the situation where the data in the target cache is not updated in time, resulting in inconsistency between the target data directly retrieved on a single hotel page and the target data retrieved from the target cache by the multi-hotel pages.

[0055] Through the above steps, in this embodiment, the target prediction model predicts the time period during which the target data will change, determines the time when the target data is crawled, and crawls the target data according to the crawling time and stores it in the target cache. This avoids the situation where the target data crawled from multiple hotel pages is inconsistent with the target data of a single page, thus achieving the technical effect of ensuring the consistency of the target data between multiple hotel pages and the target data of a single hotel page. Furthermore, it solves the technical problem in related technologies where the prices on multiple hotel pages are often inconsistent with the prices on a single hotel page.

[0056] Optionally, the target prediction model is obtained by: acquiring multiple historical hotel data before the current time, wherein the historical hotel data includes: target data of the target hotel captured before the current time and change labels used to identify whether the target data has changed; training the target machine learning model based on the multiple historical hotel data until the target machine learning model meets the preset convergence condition, and determining the target machine learning model as the target prediction model, wherein the model type of the target machine learning model includes: logistic regression model.

[0057] It's important to note that a model can be built for each hotel and each supplier. For example, if the first supplier involved in the model application has over 3000 hotels, then 3000 predictive models can be obtained. A function can be written to model and predict hotel data. The implementation method could be: using Python, groups hotels, suppliers, and channels, with each group representing a data block containing data from the same hotel. The modeling function is then called on this data block to train the model. After training, it can provide predictions for target data changes (e.g., price changes) over the next 30 days (720 hours). Then, the data blocks from all hotels can be iterated through to obtain 3000 target data change prediction models for hotels.

[0058] In one optional example, three models can be used for modeling: SVM, decision tree, and logistic regression. After parameter tuning, the accuracy is calculated. Logistic regression has been verified to have a higher accuracy and a shorter training time than SVM for large-scale training. Therefore, in this embodiment, logistic regression can be preferred as the model type for the final target prediction model.

[0059] Logistic regression can be used to solve classification problems. Logistic regression is a machine learning method used to estimate the probability of something in a binary classification problem. In this example, the goal is to determine whether the target data for the hotel (e.g., hotel price) has changed, which is a binary classification problem, hence the choice of logistic regression. The sigmoid function, also known as the logistic function, is introduced below. Its value is between [0,1]. Far from 0, the function's value quickly approaches 0 or 1, a characteristic that is crucial for solving binary classification problems.

[0060] The expression for the logical function (g(z)) is as follows.

[0061]

[0062] Where z represents any real number,

[0063] The n features of the training samples can be linearly combined and used as input, as shown in the following expression:

[0064] g(x) = w0 + w1x1 + ... + w n x n =w T x

[0065] Where, ω n Represents the model parameters, x n Indicates input features,

[0066] The model training process is as follows: First, establish the model's loss function, which guides the calculation of the model's parameters w and b. In logistic regression, error is not suitable. The logistic regression model aims to maximize the probability of correct prediction. To maximize the probability, a likelihood function is constructed, expressed as:

[0067]

[0068] Where, x i Let y represent the feature vector of the i-th training sample. i Let p(x) represent the label of the i-th training sample, N represent the number of samples, ω represent the model parameters, and p(x) represent the model parameters. i ) represents the probability that the i-th sample belongs to a certain label category.

[0069] Therefore, we can obtain a loss function that is easy to differentiate. This means that the closer the calculated value of a sample is to its label value, 0 or 1, the smaller the loss function value, and the better the model-data match.

[0070] To obtain the model parameters, this embodiment employs gradient descent, iteratively differentiating the derivatives to arrive at the optimal solution. The differentiation results are as follows:

[0071]

[0072] Other relevant parameters of the model are shown in Table 1:

[0073] penalty: Penalty item, str (string) type, optional parameters are l1 and l2, default is l2. Used to specify the standard used in the penalty item.

[0074] c: The reciprocal of the regularization coefficient λ, of type float (floating point), defaults to 1.0.

[0075] `class_weight`: Used to identify the weights of various types in the classification model. It can be a dictionary or the string 'balanced'. The default is to leave it blank, meaning that weights are not considered.

[0076] Table 1

[0077] L2 1 balanced L2 0.5 balanced L2 0.5 None L1 0.5 None

[0078] The best-performing parameters are identified through model training and testing and can be selected as the final parameters for the target model.

[0079] Optionally, prior to the current moment, multiple historical hotel data are acquired, including: prior to the current moment, hotel data of multiple hotels are captured in chronological order to obtain multiple initial hotel data, wherein the target hotel is one of the multiple hotels, and each initial hotel data includes at least one of the following fields: hotel identifier, data capture time, target data of the hotel, and hotel check-in time; based on the hotel identifier and data capture time, the multiple initial hotel data are sorted to obtain multiple sorted initial hotel data; based on the multiple sorted initial hotel data, multiple historical hotel data are determined.

[0080] In this embodiment, to provide good training data, multiple hotel data points can be obtained from the business database. These data may include the hotel's lowest price, highest price, check-in date, price retrieval time, hotel code, supplier, and channel. Information such as hotel name and address may also be included. The following example uses hotel prices as the target data for illustration.

[0081] For example, features related to hotel price changes can be selected for modeling. Ultimately, features such as hotel code (corresponding to hotel representation), supplier, channel, check-in date, price capture time (corresponding to data capture time), and hotel price can be selected for modeling. Because the price of a hotel may differ across different suppliers and channels, these three fields can be unified for analysis. Since the training labels in this embodiment need to be determined based on whether the price changes on a specific check-in date, check-in date, price capture time, and hotel price can also be mandatory options for the initial hotel data.

[0082] Data examples are shown in Table 2.

[0083] Table 2

[0084]

[0085] Due to server limitations (the servers used to record hotel data), hotel data is typically uploaded to the server one record per hour, while modeling requires at least a week's worth of data. Therefore, hundreds of data sets can be pieced together using programming languages. Furthermore, a single supplier may manage thousands of hotels, and the price fluctuation patterns of these hotels need to be analyzed. To facilitate comparison of price changes, data can be sorted in ascending order by hotel code, supplier, channel, check-in date, and price retrieval time. Since the price of the same hotel can vary across different suppliers and channels, the sorted data will show the same hotel, supplier, channel, and check-in date (e.g., October 1st) with price retrieval times from morning to night. Therefore, a price change can only be confirmed if there is a price change between two adjacent data points. This process can be implemented using Python programming. Based on whether there is a price change between adjacent data points, multiple historical hotel data sets can be identified.

[0086] Optionally, based on the sorted initial hotel data, multiple historical hotel data are determined, including: determining the target time interval corresponding to each initial hotel data based on the time difference between the data capture time and the hotel check-in time of each initial hotel data, wherein the target time interval includes: the time interval between the data capture time and the check-in time of the initial hotel data; determining the change label of each initial hotel data based on whether the target data between two adjacent initial hotel data has changed in the sorted initial hotel data; extracting the initial hotel data of the target hotel from the sorted initial hotel data based on the hotel identifier of the target hotel; and determining multiple historical hotel data based on the initial hotel data of the target hotel, the target time interval of the initial hotel data of the target hotel, and the change label of each initial hotel data.

[0087] In this embodiment, feature engineering can also be performed on the initial hotel data. Based on observations of the hotel data and business knowledge, it can be known that the time remaining until the check-in date affects hotel price changes; the closer the time is to the check-in date, the more frequently the hotel price changes. Generally, if there are more than 7 days left until the check-in date, the hotel price hardly changes. However, if there are less than 3 days left until the check-in date, the probability of hotel price changes is very high. Therefore, a new feature (corresponding to the target time interval) can be created:

[0088] Target time interval = check-in date (which can be recorded as 22:00 on the same day, at which point the basic hotel price does not change) - capture time, and the result unit can be hours.

[0089] Next, you can add change labels (e.g., price change labels) to the processed initial hotel data. The following example illustrates this using hotel prices as the target data and price change labels as the change labels:

[0090] The purpose of training the model is to predict changes in hotel prices, but the original hotel data only contains price data without price change labels. The labeling method is as follows:

[0091] The system can sort hotel data by hotel code, check-in date, and price retrieval time using a sorting algorithm. Then, it compares each pair of adjacent data (the first and second data entries, and the second and third data entries). The comparison logic is as follows: if two data entries have the same hotel code, supplier name, channel name, and check-in date, but different hotel prices, then the second data entry will be marked with a first preset flag (e.g., 1), indicating a price change. Data entries that do not meet this condition will be marked with a second preset flag (e.g., 0), indicating no price change.

[0092] Among the sorted initial hotel data, the initial hotel data of the target hotel on a certain hotel supplier can be extracted based on the target hotel's identifier to obtain the target hotel's initial hotel data. Then, based on the target hotel's initial hotel data, the target time interval of the target hotel's initial hotel data, and the change label of each initial hotel data, the aforementioned multiple historical hotel data can be determined.

[0093] Optionally, based on the initial hotel data of the target hotel, the target time interval of the initial hotel data of the target hotel, and the change label of each initial hotel data, multiple historical hotel data are determined, including: calculating the average number of changes of the target data of the target hotel in each target time interval based on the change label of the initial hotel data of the target hotel and the target time interval of the initial hotel data of the target hotel; and determining multiple historical hotel data based on the initial hotel data of the target hotel and the average number of changes of the target data of the target hotel in each target time interval.

[0094] Using the change label as the price change label, where a price change label of 1 indicates a price change and a price change label of 0 indicates no price change, we will illustrate this with an example.

[0095] Because there will be different check-in date data for the same hotel (corresponding to the target hotel), the calculation can also yield many time intervals (i.e., the target time interval). This results in many identical time intervals; for example, there are many data points with two hours remaining before the check-in date. Some check-in dates are labeled 1, while others with no price change are labeled 0. This is not conducive to the model learning the hotel's price change patterns. Furthermore, the focus of this embodiment may not be learning the price change pattern for a specific check-in date, so it is necessary to integrate the price change labels. The integration method is as follows: group by hotel code, supplier, channel, and time interval, and calculate the average of the price change labels corresponding to many identical time intervals. This allows us to obtain the average number of price changes for a hotel within a certain time interval.

[0096] Based on the initial hotel data of the target hotel and the average number of changes in the target data of the target hotel within each target time interval, multiple historical hotel data can be identified.

[0097] Optionally, based on the initial hotel data of the target hotel and the average number of changes in the target data of the target hotel within each target time interval, multiple historical hotel data are determined, including: determining the change label of the target hotel within each target time interval based on the average number of changes in the target data within each target time interval; and determining multiple historical hotel data based on the initial hotel data of the target hotel and the change label of the target hotel within each target time interval.

[0098] Using the change label as the price change label, where a price change label of 1 indicates a price change and a price change label of 0 indicates no price change, we will illustrate this with an example.

[0099] For example, the median of all price changes can be calculated. Price changes greater than the median can be labeled as 1 (indicating a price change occurred), and those less than the median can be labeled as 0 (indicating no price change occurred). The reason for this is that the task to be achieved in this embodiment is to classify whether a price has changed. Therefore, the price change labels cannot be decimals, as this would hinder the model's learning. Thus, decimal labels need to be converted into 1 and 0 labels.

[0100] For example, as shown in Table 3, the average number of price changes for the hotel sohot005 is 0.33 when there is a 2-hour time interval (two hours before check-in). When there are 3 hours before check-in, the average number of price changes is 0.67. The average number of price changes can then be discretized into 0 and 1 as the final price change labels.

[0101] Table 3

[0102]

[0103]

[0104] Based on the initial hotel data of the target hotel and the change tags of the target hotel in each target time interval, the above-mentioned multiple historical hotel data can be composed.

[0105] Optionally, the data change information includes: change labels of the target hotel in at least one target time period, the target time period being after the current time. Determining the target time based on the data change information includes: determining whether the change labels of the target hotel in each target time period are preset labels based on the data change information, wherein the preset labels are used to indicate that the target data will change; and determining the target time based on the time period associated with the preset labels in the data change information.

[0106] In this embodiment, the prediction result (i.e., data change information) output by the target prediction model can be a vector. After outputting the vector, it can also be saved to a CSV file. For example, if the output vector of data change information is [1,1,0,1,0,0,0], then the first 1 indicates that the hotel's target data will change during the first time period (e.g., within 0-1 hours) from the check-in date (22:00 on the same day); the second 1 indicates that the hotel's target data will change during the second time period (e.g., within 1-2 hours) from the check-in date; and the third 0 indicates that the hotel's target data will not change during the third time period (e.g., within 2-3 hours).

[0107] The target data mentioned above can be hotel prices, and the data change information can be whether the hotel prices have changed within multiple time intervals between the check-in date and the check-in date (e.g., 1-2 hours before check-in date, 0-1 hour before check-in date).

[0108] For example, if the target data is hotel prices, the vector is [1,1,0,1,0,0,0], where the first 1 indicates that the hotel price will change within 0-1 hours of the check-in date (10 PM that day); the second 1 indicates that the hotel price will change within 1-2 hours of the check-in date; and the third 0 indicates that the hotel price will not change within 2-3 hours.

[0109] In one optional example, the vector output by the target prediction model can first be converted into a database table. For instance, marking a position with 1 for a time period 1 to 2 hours before the check-in date in the vector indicates that the hotel's price will change during that time period. The database then stores a corresponding record with fields such as the hour and hotel code. A price-fetching program is written in the backend to retrieve a price at 21:00 (one hour before the check-in date, i.e., 22:00). This program reads the strategy table in the database and retrieves prices according to the strategy. Finally, the most recently changed price is cached, and the old price data is deleted. This ensures consistent pricing for a single hotel and multiple hotels! Currently, accuracy is statistically analyzed monthly, fluctuating between 85% and 95%.

[0110] Optionally, the target data may include hotel prices.

[0111] The target data can be hotel prices. It should be noted that the target data can also be other data that may be inconsistent between a single hotel page and multiple hotel pages, in order to ensure that the data on a single hotel page is consistent with the data on multiple hotel pages.

[0112] It should be noted that with the development of hotel platforms, the number of hotels and order volume are increasing, as are customer inquiries. Therefore, price discrepancies between single-hotel pages and multi-hotel pages can lead to a poor user experience and even complaints. In related technologies, there is no data processing method for hotel data feature engineering and price change tagging as described in this embodiment. This embodiment utilizes machine learning algorithms to simultaneously learn the price change patterns of a large number of hotels, thereby providing price change predictions for the next 30 days. Current usage shows a high consistency rate, effectively avoiding price inconsistencies between multi-hotel pages and single-hotel pages, thus improving the user experience.

[0113] Example 2

[0114] Embodiment 2 of this invention provides another optional method for processing hotel data. This method analyzes hotel data, extracts key features using business knowledge, and then utilizes machine learning algorithms to model the hotel data. This solves the problem of inconsistent prices between single and multiple hotels, thus improving the user experience. The implementation steps are described in detail below.

[0115] 1. Hotel data analysis, including feature engineering of the data:

[0116] Figure 2 This is a schematic diagram of an optional data processing and feature engineering method according to an embodiment of the present invention, which is described below in conjunction with... Figure 2 For example:

[0117] A. Selecting Features for Modeling: Hotel data comes from the business database and includes the hotel's lowest price, highest price, check-in date, price retrieval time, hotel code, supplier, and channel. It also includes information such as hotel name and address. In this embodiment, features related to hotel price changes can be selected for modeling. Ultimately, the hotel code, supplier, channel, check-in date, retrieval time, and alternative hotel prices are used for modeling.

[0118] B. Data stitching: Currently, data is uploaded to the server one at a time, but the modeling requires at least a week's worth of data. Therefore, Python programming is needed to stitch together hundreds of data sets.

[0119] C. Sort the data for easier comparison: Sort the hotel data in ascending order by hotel code, supplier, channel, check-in date, and price retrieval time. This is because the price of the same hotel can vary depending on the supplier and channel. Sort the data so that for the same hotel, supplier, channel, and check-in date (e.g., October 1st), the price retrieval time is from morning to night. This ensures that price changes between adjacent data points are considered true price fluctuations.

[0120] 2. Add price adjustment tags to the processed hotel data:

[0121] Figure 3 This is an optional flowchart for applying a price change label according to an embodiment of the present invention, which is described below in conjunction with... Figure 3 For example:

[0122] A. Add a price change label:

[0123] Based on the previous sorting algorithm, the hotel data is sorted by hotel code, check-in date, and price retrieval time. Each pair of data is compared: the first and second data are compared, and the second and third data are compared. The comparison logic is: if the hotel codes, supplier names, channel names, and check-in dates are the same, but the hotel prices are different, the data matching this condition is marked as 1, meaning the price has changed. Data not matching this condition is marked as 0, indicating no change in price.

[0124] B. Integrate price tags:

[0125] Grouping by hotel code, supplier, channel, and time interval, and then averaging the price change labels, yields the average number of price changes for a hotel within a given time interval. Next, the median of all price change labels is calculated; labels greater than the median are labeled 1, and those less than the median are labeled 0. Since this is a classification task, price change labels cannot be decimals, as this hinders model learning; therefore, decimal labels need to be converted to 1 and 0 labels.

[0126] 3. Build a model and let it learn the patterns of price changes:

[0127] This method involves building a model for each hotel and each supplier. For example, the first supplier used in this model application has over 3000 hotels, resulting in 3000 models. Therefore, a function needs to be written to model and predict hotel data. The implementation method is as follows: using Python, hotels, suppliers, and channels are grouped into data blocks, each group representing data from the same hotel. The modeling function is then called on this data block to train the model. After training, the model provides price change predictions for the next 30 days (720 hours). Then, the data blocks from all hotels are iterated through, resulting in 3000 hotel price change models.

[0128] Figure 4 This is a flowchart of an optional model training process and model parameter tuning according to an embodiment of the present invention, such as... Figure 4 As shown, the system can iterate through the hotel data set to read features and labels, establish a loss function using a logistic regression model, establish a maximum likelihood function, then use the gradient descent algorithm to solve for the optimal coefficients of the model, and call the sklearn library (a machine learning library) to adjust the parameters in the model by controlling variables, thereby obtaining the optimal model.

[0129] Figure 5 This is a flowchart of an optional hotel data modeling method according to an embodiment of the present invention, such as... Figure 5 As shown, it includes: data grouping, each hotel code, each supplier, and each channel constitutes a group, that is, hotel data with the same hotel code, the same hotel supplier, and the same channel constitute a group. A modeling function is written to iterate through thousands of hotel data groups, train the model and predict price changes, select the optimal model from multiple models, predict the price changes for each group of data, and output the hotel price change pattern.

[0130] 4. Output the hotel's price change patterns and apply the model to solve problems:

[0131] Figure 6 This is a flowchart of an optional model application according to an embodiment of the present invention, which is described below in conjunction with... Figure 6 Let's illustrate with examples.

[0132] After the model is trained, the output prediction results can be in vector format. These vectors can be saved in a CSV file. The hotel codes and suppliers are saved and mapped to the prediction results for each hotel to preserve the price fluctuation patterns. Application scenario: The model's output vectors are converted into database tables. For example, marking positions in the vector between one and two hours before the check-in date with a "1" indicates that the hotel's price will change during this time period. The database stores a corresponding record with fields such as the hour and hotel code. A price-fetching program can be deployed in the backend to fetch a price before 21:00 (10 PM) before the check-in date. This program reads the strategy table in the database and fetches prices according to the strategy. If the strategy is accurate, the program can fetch prices and cache the latest changed prices. This ensures price consistency between a single hotel and multiple hotels.

[0133] It should be noted that with the development of hotel platforms, the number of hotels and order volume are increasing, as are customer inquiries. Therefore, price discrepancies between single-hotel pages and multi-hotel pages can lead to a poor user experience and even complaints. In related technologies, there is no data processing method for hotel data feature engineering and price change tagging as described in this embodiment. This embodiment utilizes machine learning algorithms to simultaneously learn the price change patterns of a large number of hotels, thereby providing price change predictions for the next 30 days. Current usage shows a high consistency rate, effectively avoiding price inconsistencies between multi-hotel pages and single-hotel pages, thus improving the user experience.

[0134] Example 3

[0135] Embodiment 3 of the present invention provides an optional hotel data processing device, wherein each implementation unit in the processing device corresponds to each implementation step in Embodiment 1.

[0136] Figure 7 This is a schematic diagram of an optional hotel data processing apparatus according to an embodiment of the present invention, such as... Figure 7 The hotel data processing device includes: a first acquisition unit 71, a processing unit 72, and an update unit 73.

[0137] The first acquisition unit 71 is used to acquire the data change information output by the target prediction model associated with the target hotel. The target prediction model is used to predict the time period during which the target data of the target hotel changes. The target data includes: hotel data that may be inconsistent in multiple hotel pages and single hotel pages. A single hotel page is used to display the data of one hotel, and multiple hotel pages are used to display the data of multiple hotels.

[0138] Processing unit 72 is used to determine the target time based on data change information, and capture the target data of the target hotel at the target time to obtain the target hotel data;

[0139] Update unit 73 is used to update the target hotel data to the target cache, where the target cache is used to provide data for the display of multiple hotel pages.

[0140] In the hotel data processing apparatus provided in Embodiment 3 of this application, the first acquisition unit 71 can acquire the data change information output by the target prediction model associated with the target hotel. The target prediction model is used to predict the time period during which the target data of the target hotel will change. The target data includes hotel data that may be inconsistent between multi-hotel pages and single-hotel pages. A single-hotel page displays data for one hotel, while a multi-hotel page displays data for multiple hotels. The processing unit 72 determines the target time based on the data change information and captures the target data of the target hotel at that time. The update unit 73 updates the target hotel data to the target cache, which is used to provide data displayed on the multi-hotel pages. This solves the technical problem in related technologies where the prices on multi-hotel pages and single-hotel pages are often inconsistent. In this embodiment, by predicting the time period during which the target data will change using the target prediction model and determining the time for capturing the target data, and then capturing the target data and storing it in the target cache according to the capture time, inconsistencies between the target data captured from multi-hotel pages and the target data from single-hotel pages can be avoided, thus achieving the technical effect of ensuring the consistency between the target data of multi-hotel pages and the target data of single-hotel pages.

[0141] Optionally, in the hotel data processing apparatus provided in Embodiment 3 of this application, the target prediction model is obtained through the following units: a second acquisition unit, used to acquire multiple historical hotel data before the current time, wherein the historical hotel data includes: target data of the target hotel captured before the current time and change labels used to identify whether the target data has changed; a training unit, used to train the target machine learning model based on the multiple historical hotel data until the target machine learning model meets the preset convergence condition, and determine the target machine learning model as the target prediction model, wherein the model type of the target machine learning model includes: logistic regression model.

[0142] Optionally, in the hotel data processing apparatus provided in Embodiment 3 of this application, the second acquisition unit includes: a capture subunit, used to capture hotel data of multiple hotels in chronological order before the current time to obtain multiple initial hotel data, wherein the target hotel is one of the multiple hotels, and each initial hotel data includes at least one of the following fields: hotel identifier, data capture time, target data of the hotel, and check-in time of the hotel; a sorting subunit, used to sort the multiple initial hotel data based on the hotel identifier and the data capture time to obtain sorted multiple initial hotel data; and a first determination subunit, used to determine multiple historical hotel data based on the sorted multiple initial hotel data.

[0143] Optionally, in the hotel data processing apparatus provided in Embodiment 3 of this application, the first determining subunit includes: a first determining module, used to determine a target time interval corresponding to each initial hotel data based on the time difference between the data capture time and the hotel check-in time of each initial hotel data, wherein the target time interval includes: the time interval between the data capture time and the check-in time in the initial hotel data; a second determining module, used to determine a change label for each initial hotel data in the sorted plurality of initial hotel data based on whether the target data between two adjacent initial hotel data has changed; an extraction module, used to extract the initial hotel data of the target hotel in the sorted plurality of initial hotel data based on the hotel identifier of the target hotel; and a third determining module, used to determine a plurality of historical hotel data based on the initial hotel data of the target hotel, the target time interval of the initial hotel data of the target hotel, and the change label of each initial hotel data.

[0144] Optionally, in the hotel data processing apparatus provided in Embodiment 3 of this application, the third determining module includes: a calculation submodule, used to calculate the average number of changes in the target data of the target hotel in each target time interval based on the change label of the initial hotel data of the target hotel and the target time interval of the initial hotel data of the target hotel; and a determining submodule, used to determine multiple historical hotel data based on the initial hotel data of the target hotel and the average number of changes in the target data of the target hotel in each target time interval.

[0145] Optionally, in the hotel data processing apparatus provided in Embodiment 3 of this application, the determining submodule includes: determining submodule 1, which determines the change label of the target hotel in each target time interval based on the average number of changes of the target data in each target time interval; and determining submodule 2, which determines multiple historical hotel data based on the initial hotel data of the target hotel and the change label of the target hotel in each target time interval.

[0146] Optionally, in the hotel data processing apparatus provided in Embodiment 3 of this application, the data change information includes: a change tag of the target hotel in at least one target time period, the target time period being after the current time, and the processing unit includes: a second determining subunit, used to determine whether the change tag of the target hotel in each target time period is a preset tag based on the data change information, wherein the preset tag is used to indicate that the target data will change; and a third determining subunit, used to determine the target time based on the time period associated with the change tag being a preset tag in the data change information.

[0147] Optionally, in the hotel data processing apparatus provided in Embodiment 3 of this application, the target data includes: hotel prices.

[0148] The aforementioned hotel data processing device may further include a processor and a memory. The first acquisition unit 71, processing unit 72, and update unit 73 are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0149] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, the target prediction model predicts the time period during which target data changes and determines the time for fetching target data. Target data is fetched based on this time and stored in the target cache. This avoids inconsistencies between target data fetched from multiple hotel pages and target data from a single page, thus ensuring consistency between target data from multiple hotel pages and target data from a single hotel page.

[0150] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0151] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform a hotel data processing method of any one of the above-described embodiments by executing the executable instructions.

[0152] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program controls the device where the computer-readable storage medium is located to perform the hotel data processing method described above when the computer program is running.

[0153] Figure 8 This is a schematic diagram of an electronic device according to an embodiment of the present invention, such as... Figure 8As shown, an embodiment of the present invention provides an electronic device 80, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the hotel data processing method described above.

[0154] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0155] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

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

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

[0158] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0159] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0160] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for processing hotel data, characterized in that, include: Obtain the data change information output by the target prediction model associated with the target hotel, wherein the target prediction model is used to predict the time period during which the target data of the target hotel changes, and the target data includes: hotel data that may have inconsistencies in multiple hotel pages and single hotel pages, wherein a single hotel page is used to display the data of one hotel, and multiple hotel pages are used to display the data of multiple hotels; Based on the data change information, a target time is determined, and target data of the target hotel is captured at the target time to obtain target hotel data. The target hotel data is updated to the target cache, wherein the target cache is used to provide data for displaying multiple hotel pages; The target prediction model is obtained as follows: Prior to the current time, multiple historical hotel data sets are acquired, including target data of the target hotel captured prior to the current time and change labels used to identify whether the target data has changed; based on the multiple historical hotel data sets, a target machine learning model is trained until the target machine learning model meets a preset convergence condition, and the target machine learning model is determined as the target prediction model, wherein the model type of the target machine learning model includes: a logistic regression model; The data change information includes: change tags of the target hotel in at least one target time period, the target time period being after the current time. Determining the target time based on the data change information includes: determining whether the change tag of the target hotel in each target time period is a preset tag based on the data change information, wherein the preset tag is used to indicate that the target data will change; and determining the target time based on the time period associated with the change tag being a preset tag in the data change information.

2. The processing method according to claim 1, characterized in that, Prior to the current moment, retrieve multiple historical hotel data points, including: Before the current time, hotel data of multiple hotels are captured in chronological order to obtain multiple initial hotel data, wherein the target hotel is one of the multiple hotels, and each initial hotel data includes at least one of the following fields: hotel identifier, data capture time, target data of the hotel, and hotel check-in time; Based on the hotel identifier and the data capture time, the initial hotel data are sorted to obtain the sorted initial hotel data. Based on the sorted initial hotel data, a number of historical hotel data are determined.

3. The processing method according to claim 2, characterized in that, Based on the sorted initial hotel data, a plurality of historical hotel data are determined, including: Based on the time difference between the data capture time and the hotel check-in time of each initial hotel data, a target time interval is determined for each initial hotel data, wherein the target time interval includes: the time interval between the data capture time and the check-in time of the initial hotel data; In the sorted initial hotel data, a change label is determined for each initial hotel data based on whether the target data between two adjacent initial hotel data has changed; Based on the hotel identifier of the target hotel, the initial hotel data of the target hotel is extracted from the sorted initial hotel data; Based on the initial hotel data of the target hotel, the target time interval of the initial hotel data of the target hotel, and the change label of each initial hotel data, multiple historical hotel data are determined.

4. The processing method according to claim 3, characterized in that, Based on the initial hotel data of the target hotel, the target time interval of the initial hotel data, and the change tags of each initial hotel data point, multiple sets of historical hotel data are determined, including: Based on the change tags of the initial hotel data of the target hotel and the target time interval of the initial hotel data of the target hotel, calculate the average number of changes of the target data of the target hotel in each target time interval; Based on the initial hotel data of the target hotel and the average number of changes in the target data of the target hotel within each target time interval, multiple sets of historical hotel data are determined.

5. The processing method according to claim 4, characterized in that, Based on the initial hotel data of the target hotel and the average number of changes in the target data of the target hotel within each target time interval, multiple sets of historical hotel data are determined, including: Based on the average number of changes in the target data within each target time interval, determine the change label of the target hotel within each target time interval; Based on the initial hotel data of the target hotel and the change labels of the target hotel in each target time interval, multiple historical hotel data are determined.

6. The processing method according to any one of claims 1 to 5, characterized in that, The target data includes: hotel prices.

7. A hotel data processing device, characterized in that, include: The first acquisition unit is used to acquire data change information output by the target prediction model associated with the target hotel. The target prediction model is used to predict the time period during which the target data of the target hotel changes. The target data includes hotel data that may be inconsistent between multi-hotel pages and single-hotel pages. The single-hotel page is used to display the data of one hotel, and the multi-hotel page is used to display the data of multiple hotels. The processing unit is used to determine the target time based on the data change information, and to capture the target data of the target hotel at the target time to obtain the target hotel data; An update unit is used to update the target hotel data to the target cache, wherein the target cache is used to provide data for displaying multiple hotel pages; The target prediction model is obtained through the following units: a second acquisition unit, used to acquire multiple historical hotel data before the current time, wherein the historical hotel data includes: target data of the target hotel captured before the current time and change labels used to identify whether the target data has changed; and a training unit, used to train the target machine learning model based on the multiple historical hotel data until the target machine learning model meets a preset convergence condition, and to determine the target machine learning model as the target prediction model, wherein the model type of the target machine learning model includes: a logistic regression model. The data change information includes: change tags of the target hotel in at least one target time period, the target time period being after the current time. The processing unit includes: a second determining subunit, used to determine, based on the data change information, whether the change tag of the target hotel in each target time period is a preset tag, wherein the preset tag is used to indicate that the target data will change; and a third determining subunit, used to determine the target time based on the time period associated with the change tag being a preset tag in the data change information.

8. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the hotel data processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Air ticket price caching method, system and device and storage medium

    CN113377554A

  • Hotel query method and device based on memory calculation, and electronic equipment

    CN119357238A