Matrix generation method and related apparatus
By generating a starting price matrix based on historical hotel data, the problem of inconsistencies between hotel listing prices and details pages was solved, resulting in accurate pricing and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING YIBO SOFTWARE TECH CO LTD
- Filing Date
- 2022-07-26
- Publication Date
- 2026-07-10
AI Technical Summary
On hotel booking platforms, the lowest price listed on the hotel listing page differs from the lowest price on the details page, resulting in a poor user experience.
Based on the hotel's historical data, a first matrix is determined, and a dimension of the starting price matrix suitable for different hotels is generated through a predefined loss value calculation formula to ensure that the prices on the hotel listing page are consistent with those on the details page.
It improved the accuracy of quotes provided by hotel booking platforms, saved users time in booking hotels, and enhanced the user experience.
Smart Images

Figure CN115375345B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to matrix generation methods and related apparatus. Background Technology
[0002] With the development of hotel booking services, more and more users are booking hotels through hotel booking platforms. Currently, users can see the prices of various hotels cached in advance on the hotel list page of the booking platform. When users click to enter the hotel details page, they can see the prices for different room types. Typically, the price displayed on the hotel list page is the lowest price shown on the hotel details page.
[0003] However, due to various factors, the hotel prices seen by users on the hotel listing page often differ from the lowest price on the hotel details page. As a result, the hotel listing page of the hotel booking platform cannot provide users with accurate prices, leading to a poor user experience. Summary of the Invention
[0004] This application provides a matrix generation method and related apparatus to provide users with accurate quotes on hotel listing pages.
[0005] Firstly, this application provides a matrix generation method that can be applied to a hotel reservation platform. Exemplarily, the functionality of the hotel reservation platform can be provided by a server, and the method can be executed by the server, or by a component configured in the server (such as a chip, chip system, etc.), or by a logic module or software capable of implementing all or part of the server's functions; this application does not limit this.
[0006] For example, the method includes: determining a first matrix based on historical hotel data, the historical data including the time a hotel was clicked, the input check-in time and check-out time on a hotel list page provided by the platform, the hotel list page being used to provide the lowest price of multiple selectable hotels; the first matrix is an M×N dimensional matrix, the M rows of the first matrix corresponding to the M values in a first parameter group, the N columns of the first matrix corresponding to the N values in a second parameter group, one parameter group including multiple values for the number of days the hotel is booked in advance, and the other parameter group including multiple values for the number of consecutive days the hotel stays, each element in the first matrix corresponding to the number of times the hotel is clicked under different parameter combinations, wherein element a m,nThe number of clicks corresponds to the combination of the m-th value in the first parameter group and the n-th value in the second parameter group; 1≤m≤M, 1≤n≤N, where m and n are positive integers, and M and N are integers greater than 1; based on a predefined loss value calculation formula, multiple loss values are determined that correspond one-to-one with multiple sub-matrices, which include elements from a... 1,1 The process begins by extracting submatrices of multiple dimensions from different rows and columns of the first matrix. Based on multiple loss values, the dimension P×Q of the starting price matrix is determined, where P and Q are both positive integers. Based on the dimension P×Q of the starting price matrix, a starting price matrix for the hotel is generated, which includes the lowest price for the hotel under each of the P×Q parameter combinations.
[0007] Based on the above technical content, the hotel booking platform first determines the first matrix corresponding to each hotel based on historical data, and then, for each hotel's first matrix, it starts from element a of the first matrix. 1,1 Initially, different rows and columns are truncated from the first matrix to obtain sub-matrices with multiple dimensions. Based on a predefined loss value calculation formula, multiple loss values corresponding to these sub-matrices are determined. Then, based on these multiple loss values, the dimension P×Q of the starting price matrix is determined, thus generating the starting price matrix for each hotel. Since the dimensions of the starting price matrix are determined based on historical hotel data, the dimensions of the starting price matrix suitable for different hotels can meet the accommodation needs of each hotel's user group. This ensures that the accommodation needs of most users fall within the starting price matrix, thereby guaranteeing that the price displayed on the hotel listing page is consistent with the lowest price on the hotel details page. This allows the hotel booking platform to provide accurate quotes to users through the hotel listing page, saving users time in booking hotels and improving user experience.
[0008] In conjunction with the first aspect, in some possible implementations of the first aspect, each element in the first matrix represents the percentage of the number of times the hotel is clicked under different parameter combinations in the total number of clicks. The total number of clicks is the sum of the number of times the hotel is clicked on the hotel list page displayed on the platform under M×N combinations obtained by iterating through M values in the first parameter group and N values in the second parameter group.
[0009] By setting the elements in the first matrix to represent the percentage of clicks on the hotel under different parameter combinations in the total number of clicks, the calculation of the loss value no longer requires temporarily calculating the percentage of clicks under different parameter combinations in the total number of clicks, thus making the calculation of the loss value more efficient.
[0010] In conjunction with the first aspect, in some possible implementations of the first aspect, the loss value of the first submatrix among the multiple submatrixes is related to the degree of dispersion of the total number of clicks in the first submatrix. The total number of clicks is the sum of the number of times the hotel is clicked on the hotel list page displayed on the platform under M×N combinations obtained by traversing M values in the first parameter group and N values in the second parameter group respectively. Here, the dimension of the first submatrix is I×J, 1≤I≤M, 1≤J≤N, and I and J are positive integers.
[0011] In conjunction with the first aspect, in some possible implementations of the first aspect, the total number of clicks is discrete in the first submatrix D. l satisfy:
[0012]
[0013] in, This represents the sum of the variances of one or more submatrices obtained by partitioning the first matrix using the row and column containing the first submatrix as boundaries. This represents the mean of the elements falling within the first submatrix. It represents the mean of the elements in one or more submatrices that are adjacent to the first submatrix.
[0014] in, It can be used to characterize the degree of dispersion of data within each of one or more submatrices obtained by dividing the first matrix by the row and column of the first submatrix. The smaller the value, the less dispersed the data is in each of the multiple submatrices, meaning the data is more concentrated.
[0015] It can be used to characterize the degree of dispersion of data among one or more submatrices obtained by dividing a first matrix by the row and column of the first submatrix. The larger the value, the greater the dispersion of data among the various submatrices.
[0016] D l The smaller the value, the more concentrated the accommodation needs of more users fall within the first submatrix, meaning that the dimensions of the first submatrix can cover more of the accommodation needs of the user group.
[0017] In conjunction with the first aspect, in some possible implementations of the first aspect, the loss value of the first submatrix among the plurality of submatrices is also related to the sum of all elements of the first submatrix.
[0018] That is, the loss value of the first submatrix is affected by the following constraints:
[0019]
[0020] Where λ1 and C1 are predefined values, P(a i,j ) represents element a i,j The percentage.
[0021] This constraint is used to constrain the dimension of the first submatrix to prevent the dimension of the first submatrix from being too small to cover the accommodation needs of more users, and also to prevent the dimension of the first submatrix from being too large to occupy storage resources.
[0022] The smaller the difference between C1 and C2, the more the first submatrix in that dimension satisfies the constraint.
[0023] In conjunction with the first aspect, in some possible implementations of the first aspect, the loss value of the first submatrix among the plurality of submatrices is also related to the dimension of the first submatrix.
[0024] That is, the loss value of the first submatrix is affected by the following constraints:
[0025] λ2(I×J-C2);
[0026] λ2 and C2 are predefined values, and I and J are the number of rows and columns of the first submatrix, respectively.
[0027] This constraint is used to constrain the dimension of the first matrix to prevent the dimension of the first matrix from being too large, which would result in a large dimension of the determined starting price matrix and consume storage resources.
[0028] The smaller the difference between I×J and C2, the more the first matrix in that dimension satisfies the constraint condition.
[0029] Therefore, in some possible implementations of the first aspect, the loss value L of the first submatrix among the plurality of submatrixes l satisfy:
[0030]
[0031] In conjunction with the first aspect, in some possible implementations of the first aspect, determining the dimension of the starting price matrix based on multiple loss values includes: determining the dimension of the submatrix corresponding to the minimum value among the multiple loss values as the dimension of the starting price matrix.
[0032] The smaller the loss value, the more users' accommodation needs the first submatrix corresponding to that loss value can cover. This means that more users' accommodation needs fall within the first submatrix, further reducing the probability that the price displayed on the hotel listing page is inconsistent with the lowest price on the hotel details page. As a result, the hotel listing page provides users with more accurate hotel prices.
[0033] In conjunction with the first aspect, in some possible implementations of the first aspect, before determining the first matrix based on the hotel's historical data, the method further includes: obtaining the number of times the hotel is exposed and clicked on the hotel listing page displayed on the platform within a preset time period, and the number of times the hotel's price changes within the preset time period, wherein the number of times the hotel's price changes within the preset time period is the number of times the starting price on the hotel listing page and the starting price on the hotel details page are inconsistent within the preset time period, the hotel details page is used to display the prices of different room types in the hotel, and the starting price on the hotel details page is the lowest price among all room types in the hotel; calculating the hotel's popularity coefficient based on the probability of the hotel being clicked within the preset time period and the probability of the hotel changing its price when clicked, the probability of the hotel being clicked within the preset time period is: the ratio of the number of times the hotel is clicked to the number of exposures on the hotel listing page displayed on the platform within the preset time period, and the probability of the hotel changing its price when clicked is: the ratio of the number of times the hotel changes its price to the number of clicks within the preset time period; and determining that the hotel's popularity coefficient is greater than or equal to a preset threshold.
[0034] By determining the popularity coefficient of each hotel, hotels with a popularity coefficient greater than or equal to a preset threshold are selected as popular hotels. A corresponding starting price matrix is generated for each of these popular hotels, allowing the hotel booking platform to store only the starting price matrix of popular hotels, reducing storage resource consumption. Popular hotels meet two conditions: firstly, the hotel has a high probability of being clicked by users when displayed on the hotel list page; secondly, the hotel's price has a high probability of changing when a user clicks on the hotel details page from the hotel list.
[0035] In conjunction with the first aspect, in some possible implementations of the first aspect, the method also includes: acquiring historical data.
[0036] In conjunction with the first aspect, in some possible implementations of the first aspect, the method further includes: responding to a user's query operation on the hotel listing page, searching from the starting price matrix for starting prices that meet the query criteria, including the number of days the hotel is booked in advance and the number of consecutive days the hotel stays; and displaying the lowest price of the hotel on the hotel listing page based on the data found from the starting price matrix.
[0037] Secondly, this application provides a matrix generation apparatus, including modules or units for implementing the methods of the first aspect and any possible implementation thereof. It should be understood that each module or unit can implement its corresponding function by executing a computer program.
[0038] Thirdly, this application provides a matrix generation apparatus, including a processor for performing the methods described in the first aspect and any possible implementation thereof.
[0039] The device may also include a memory for storing instructions and data. The memory is coupled to the processor, which, when executing the instructions stored in the memory, can implement the methods described in the foregoing aspects. The device may also include a communication interface for communicating with other devices; exemplaryly, the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface.
[0040] For example, the matrix generation device can be a server, or it can be executed by a component (such as a chip, chip system, etc.) configured in the server, or it can be a logic module or software capable of implementing all or part of the server functions.
[0041] Fourthly, this application provides a computer-readable storage medium including a computer program that, when run on a computer, causes the computer to implement the methods of the first aspect and any possible implementation of the first aspect.
[0042] Fifthly, this application provides a computer program product comprising: a computer program (also referred to as code or instructions) that, when run, causes a computer to perform the methods of the first aspect and any possible implementation thereof.
[0043] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the hotel reservation process provided in the embodiments of this application;
[0045] Figure 2 This is a schematic diagram of an interface of a hotel list page provided in an embodiment of this application;
[0046] Figure 3a and Figure 3b This is a schematic diagram of the hotel details page provided in an embodiment of this application;
[0047] Figure 4 This is a schematic flowchart of the matrix generation method provided in the embodiments of this application;
[0048] Figure 5 This is a schematic diagram of a set of historical data provided in an embodiment of this application;
[0049] Figure 6 This is a schematic diagram of a first matrix provided in an embodiment of this application;
[0050] Figure 7This is another schematic diagram of the first matrix provided in the embodiments of this application;
[0051] Figures 8a to 8d This is a schematic diagram of the partitioning of the first matrix provided in an embodiment of this application;
[0052] Figure 9 This is a schematic diagram of a starting price matrix provided in an embodiment of this application;
[0053] Figure 10 This is a schematic flowchart illustrating the determination of popular hotels provided in an embodiment of this application;
[0054] Figure 11 This is a schematic diagram of a popularity coefficient list provided in an embodiment of this application;
[0055] Figure 12 This is a schematic block diagram of the matrix generation apparatus provided in the embodiments of this application;
[0056] Figure 13 This is another schematic block diagram of the matrix generation apparatus provided in the embodiments of this application. Detailed Implementation
[0057] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0058] The technical solution provided in this application can be applied to a hotel booking platform, which can integrate the quotation resources of multiple suppliers. These quotation resources can include real-time quotations from multiple suppliers for different room types in multiple hotels.
[0059] To facilitate understanding, we will first provide a brief explanation of several terms used in the following text.
[0060] 1. Hotel Listing Page: In hotel booking platforms, this page provides users with a selection of hotels with starting prices.
[0061] 2. Hotel Details Page: On a hotel booking platform, this page displays the prices for different room types at a particular hotel. This page can show prices for multiple room types from multiple suppliers.
[0062] 3. Starting Price: In hotel booking scenarios, this refers to the starting price displayed on the hotel listing page. This price is the lowest price among the products (e.g., room types) offered by the hotel, and can also be called the lowest price. In other words, the starting price displayed on the hotel listing page is the lowest price among multiple suppliers offering multiple room types on the corresponding hotel details page.
[0063] 4. Price Change: In the context of hotel booking, a price change occurs when the starting price displayed on the hotel listing page differs from the lowest price among multiple offers shown on the hotel details page.
[0064] 5. Starting Price Matrix: Starting price information pre-cached by the hotel booking platform, presented in the form of a two-dimensional matrix. One row and one column of this matrix represent the number of consecutive nights a user stays at the hotel, and the other represents the number of nights the user has booked in advance. Different combinations of advance booking days and consecutive nights correspond to different starting prices; that is, each element in the matrix corresponds to a minimum price. Each hotel has its own starting price matrix. In hotel booking scenarios, when displaying starting prices for multiple hotels on the hotel listing page, the starting price can be determined based on the user's search criteria and the pre-cached starting price matrix.
[0065] Figure 1 This is a schematic diagram of a hotel booking process provided in an embodiment of this application. The starting price cache database is used to cache the starting price matrix for each hotel, and the supplier quotation system is used to provide quotations from multiple suppliers for different room types at multiple hotels. Figure 1 As shown, when a user needs to book a hotel, they can click on the hotel booking platform to enter its main page. On the main page, users can enter search keywords to specify their accommodation needs, such as check-in and check-out dates. After entering keywords, clicking triggers the platform to search for multiple hotels that meet the user's needs. It then queries a price cache database to obtain quotes for each hotel that matches the user's requirements, displaying the relevant information and prices for each hotel on the hotel list page. If a user is interested in a particular hotel on the list, they can click to access its details page. The details page displays multiple quotes from various suppliers for different room types. The hotel booking platform retrieves these quotes from the supplier quote system. If a user is not interested in any of the hotel's room types, they can go back and return to the hotel list page to select other hotels. If a user is interested in a particular room type, they can click to enter the order form page, enter the guest's name, ID number, and other relevant information, and then click to complete the room reservation.
[0066] It should be understood that search keywords can also be entered on the hotel listing page, and this application does not limit the specific location for entering search keywords.
[0067] The following is combined with Figure 2 Figure 3 illustrates the hotel booking process as an example.
[0068] Figure 2 This is a schematic diagram of an interface applicable to the hotel list page provided in the embodiments of this application. For example... Figure 2 As shown, the hotel list page 200 may include a search bar 210 and a hotel display bar 220. The search bar 210 can be used to search for hotels based on user-inputted query criteria. The search bar 210 may include a region input field, a check-in date input field, a check-out date input field, and a "Search" control. The region input field receives the user's input region information, the check-in date input field receives the user's input check-in date, and the check-out date input field receives the user's input check-out date. The "Search" control is used to search for hotels that meet the query criteria when a trigger action, such as a click, is received. The hotel display bar 220 can be used to display hotels that meet the user's query criteria based on the search results. When displaying each hotel, the hotel display bar 220 can specifically display information such as the hotel's star rating, rating, and starting price.
[0069] As previously mentioned, the starting price for each hotel can be determined based on the corresponding starting price matrix. Currently, the starting price matrix for each hotel that is pre-cached on the hotel booking platform has the same dimensions. For example, all the stored starting price matrices are 5×7 dimensional, meaning that all hotel starting price matrices can only cover accommodation needs that require advance booking within 5 days and a consecutive stay of 7 days or less.
[0070] If users need to book a hotel, they can log in to the hotel booking platform and enter... Figure 2 On the hotel list page 200 shown, enter your search criteria in the various input fields of the search bar 210 on the hotel list page 200.
[0071] Example 1: Suppose a user enters "Fuzhou" in the region input field, "2022 / 5 / 25" in the check-in date input field, and "2022 / 5 / 26" in the check-out date input field. After entering the search criteria, the user clicks the "Search" button to trigger the hotel booking platform to search for hotels that meet the user's needs.
[0072] If the hotel booking platform finds four hotels (Hotel A, Hotel B, Hotel C, and Hotel D) that match the user's search criteria, then the platform needs to display the starting prices for these four hotels on the hotel listing page. The platform retrieves the corresponding 5x7 dimensional starting price matrix for each of these four hotels from multiple locally cached starting price matrices. If a hotel booking platform determines the current date to be May 25, 2021, it can further determine, based on the search criteria, that the number of days booked in advance is 0 and the consecutive stay is 1. By querying the four starting price matrices, it can be found that: Hotel A's starting price matrix shows a minimum price of 350 yuan for 0 days booked in advance and 1 consecutive stay; Hotel B's matrix shows a minimum price of 324 yuan for 0 days booked in advance and 1 consecutive stay; Hotel C's matrix shows a minimum price of 500 yuan for 0 days booked in advance and 1 consecutive stay; and Hotel D's matrix shows a minimum price of 400 yuan for 0 days booked in advance and 1 consecutive stay. These starting prices for the four hotels will then be displayed on the hotel listing page 200.
[0073] Users who wish to view the pricing for different room types at Hotel A can click the "View Details" button to open the window. Figure 3a The details page for Hotel A shown.
[0074] Figure 3a This is a schematic diagram of a hotel details page provided in an embodiment of this application. For example... Figure 3a As shown in the image, hotel details page 300a displays five room types for Hotel A, categorized as Room Type 1, Room Type 2, Room Type 3, Room Type 4, and Room Type 5. Room Type 1 features a double bed, a window, and a room size of 45 square meters. 2 The lowest quoted price is 350 yuan. Room type 2 has a double bed, a window, and a room size of 53 square meters. 2 The lowest quoted price is 360 yuan. Room type 3 has twin beds, a window, and a room size of 60 square meters. 2 The lowest price is 380 yuan. Room type 4 has multiple beds, a window, and a room size of 103 square meters. 2 The lowest quoted price is 450 yuan. Room type 5 has a single bed, a window, and a room size of 80 square meters. 2 And the lowest price is 355 yuan.
[0075] It can be observed that the lowest price on Hotel A's details page 300a is consistent with the starting price of Hotel A on Hotel Listing Page 200.
[0076] If a user wants to see more pricing information for Room Type 1, they can click the "More Pricing" button. This will display pricing information for Room Type 1 from multiple suppliers on the hotel details page (300a). For example, Supplier A offers Room Type 1 for 350 yuan (breakfast not included), Supplier B offers it for 380 yuan (breakfast not included but free parking), and Supplier C offers it for 360 yuan (breakfast included but free). Users can then book their preferred room type based on their needs.
[0077] Example 2: Suppose a user enters "Fuzhou" in the region input field, "2022 / 5 / 25" in the check-in date input field, and "2022 / 6 / 10" in the check-out date input field. After entering the search criteria, the user clicks the "Search" button to trigger the hotel booking platform to search for hotels that meet the user's search requirements.
[0078] If the hotel booking platform finds four hotels (Hotel A, Hotel B, Hotel C, and Hotel D) that match the user's search criteria, then the platform needs to display the starting prices of these four hotels on hotel listing page 200. The platform retrieves the corresponding 5x7 dimensional starting price matrix for each of these four hotels from multiple locally cached starting price matrices. If the platform determines the current date is 2021 / 5 / 25, it can further determine, based on the search criteria, that the number of days booked in advance is 0, and the consecutive stay is 14 days. By checking these four starting price matrices, it finds that none of them cover the user's accommodation needs. Therefore, the platform might arbitrarily select the lowest price from the current starting price matrix to display. For example, it might still display Hotel A's starting price as 350 yuan, Hotel B's as 324 yuan, Hotel C's as 500 yuan, and Hotel D's as 400 yuan on hotel listing page 200.
[0079] Similarly, if a user wants to learn more about the pricing for different room types at Hotel A, they can click the "View Details" button to open... Figure 3b The details page for Hotel A shown.
[0080] Figure 3b This is another schematic diagram of the hotel details page provided in this application embodiment. For example... Figure 3b As shown in the image, hotel details page 300b also displays five room types for Hotel A, categorized as Room Type 1, Room Type 2, Room Type 3, Room Type 4, and Room Type 5. The lowest price for Room Type 1 is 370 yuan, for Room Type 2 it's 360 yuan, for Room Type 3 it's 380 yuan, for Room Type 4 it's 450 yuan, and for Room Type 5 it's 355 yuan.
[0081] It can be observed that the lowest price for Hotel A's hotel details page 300b is 355 yuan, which is inconsistent with the starting price of 350 yuan for Hotel A in the hotel listing page 200.
[0082] If a user wants to see more prices for Room Type 1, they can click the "More Prices" button. This will display further prices for Room Type 1 from multiple suppliers on the hotel details page (300b). For example, Supplier A might offer 370 yuan, Supplier B 380 yuan, and Supplier C 360 yuan. Because the lowest price on the hotel details page (300b) differs from the starting price on the hotel listing page (200), the user might abandon their reservation for that hotel.
[0083] As mentioned earlier, currently, hotel booking platforms cache the starting price matrix for each hotel using the same dimensions (e.g., all cached hotels have a 5x7 dimension starting price matrix). However, different hotels may have different user groups with varying accommodation needs. For example, some hotels' user groups primarily require stays of 10 consecutive nights with advance bookings of 7 days or less, while others require stays of 5 consecutive nights with advance bookings of 14 days or less. If all hotels use the same caching strategy for their starting price matrix, the price displayed on the hotel listing page may differ from the lowest price available on the hotel details page. This would prevent the hotel listing page from providing accurate pricing information to users, negatively impacting the user experience.
[0084] In view of this, this application provides a matrix generation method. The hotel booking platform determines a first matrix corresponding to each hotel based on historical data. Then, for each hotel's first matrix, based on a predefined loss value calculation formula, it determines the dimensions of the starting price matrix for each hotel. Finally, based on these dimensions, a starting price matrix corresponding to each hotel is generated. Because the dimensions of the starting price matrix are determined based on the hotel's historical data, suitable dimensions for different hotels can meet the accommodation needs of each hotel's user group. This ensures that the accommodation needs of most users fall within the starting price matrix, thereby guaranteeing that the price displayed on the hotel listing page is consistent with the lowest price on the hotel details page. This allows the hotel booking platform to provide accurate prices to users through the hotel listing page, saving users time in booking hotels and improving user experience.
[0085] Before introducing the embodiments of this application, the following points should be noted:
[0086] First, in the embodiments shown below, the terms "first," "second," and various numerical designations are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. For example, distinguishing different sub-matrices, etc.
[0087] Second, "at least one" refers to one or more, while "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0088] Third, in the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner for ease of understanding.
[0089] The matrix generation method provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0090] Figure 4 This is a schematic flowchart illustrating the matrix generation method provided in the embodiments of this application. This method can be applied to a hotel booking platform. It should be understood that this hotel booking platform is a third-party platform that can aggregate quotes from various suppliers, store them in a database, and, in response to user actions, display hotels that meet the user's needs and their lowest prices on a hotel list page; it can also, in response to user actions, navigate to a hotel details page to provide the user with more detailed hotel quotes.
[0091] For example, the functionality of the hotel booking platform can be provided by a server. Figure 4 The method shown can be executed by a server, or by a component configured in the server (such as a chip, chip system, etc.), or by a logic module or software capable of implementing all or part of the server's functions; this application does not limit this. For ease of explanation and understanding, the following description uses a server as an example to illustrate the method provided in the embodiments of this application.
[0092] Figure 4 The method 400 shown may include steps 401 to 404. The steps in method 400 are described in detail below.
[0093] Step 401: Determine the first matrix based on the hotel's historical data.
[0094] The first matrix is an M×N dimensional matrix, where M represents the number of rows and N represents the number of columns. Both M and N are integers greater than 1. The M rows in the first matrix correspond to the M values in the first parameter set, and the N columns in the first matrix correspond to the N values in the second parameter set. Both the M and N values are taken consecutively.
[0095] In one possible design, the first parameter set includes multiple values for the number of hotel nights booked in advance. For example, the first parameter set is {d0, d1, d2, ..., d...} M-1 The second parameter set includes multiple values for the number of consecutive nights spent staying at the hotel. For example, the second parameter set is {t1, t2, t3, ..., t...}. N}
[0096] In another possible design, the first parameter set includes multiple values for the number of consecutive nights spent at the hotel; for example, the first parameter set is {t1, t2, t3, ..., t...}. M The second parameter set includes multiple values for the number of hotel nights booked in advance. For example, the second parameter set is {d0, d1, d2, ..., d...}. N-1}
[0097] In the following description, this application will use examples where the first parameter group includes multiple values for the number of days of advance hotel booking, and the second parameter group includes multiple values for the number of consecutive days of hotel stay. Furthermore, for ease of explanation, the number of consecutive days of hotel stay will be referred to as consecutive stay days, and the number of days of advance hotel booking will be referred to as advance booking days.
[0098] The elements in the first matrix can be represented by a. m,n This means that 1 ≤ m ≤ M, 1 ≤ n ≤ N, where m and n are positive integers.
[0099] In one possible design, element a m,n The number of clicks corresponds to the number of times the hotel is clicked when combined with the m-th value in the first parameter group and the n-th value in the second parameter group. In other words, each element in the first matrix corresponds to the number of times the hotel is clicked under different parameter combinations.
[0100] The number of clicks can be understood as the number of times a hotel is selected and clicked by a user when it is displayed on the hotel list page of a hotel booking platform, under the combination of the m-th value in the first parameter group and the n-th value in the second parameter group.
[0101] In another possible design, element a m,nWhen combined with the m-th value in the first parameter group and the n-th value in the second parameter group, the ratio of the number of times the hotel is clicked to the total number of clicks corresponds to this ratio. In other words, each element in the first matrix represents the percentage of the number of times the hotel is clicked in the total number of clicks under different parameter combinations.
[0102] The total number of clicks can be understood as the sum of the number of clicks made when the hotel is displayed on the hotel booking platform's hotel list page, under the M × N combinations obtained by iterating through the M values in the first parameter group and the N values in the second parameter group. In other words, the total number of clicks is the sum of the number of times the hotel is selected and clicked by users when it is displayed on the hotel booking platform's hotel list page, when each pair of one value from the M values in the first parameter group and one value from the N values in the second parameter group is combined.
[0103] The process of determining the first matrix will be described below.
[0104] First, the server retrieves historical data.
[0105] Each hotel has a set of historical data. The server can retrieve a set of historical data for each hotel within a preset time period. The server can obtain details of each hotel from the systems of various hotel suppliers and extract the required historical data from them.
[0106] Each set of historical data can include the hotel list provided by the hotel booking platform, the time the hotel was clicked, and the check-in and check-out times entered by the user. For ease of explanation, the time being clicked will be referred to as the click time in the following description.
[0107] Optionally, each set of historical data may also include at least one of the following: user identifier, city identifier, click identifier, hotel identifier, search time, number of days booked in advance, and number of consecutive nights.
[0108] The preset time period can be set by those skilled in the art according to actual needs, such as the past month, and this application does not limit it.
[0109] For example, Figure 5 This is a schematic diagram of a set of historical data provided in an embodiment of this application. For example... Figure 5 As can be seen, this set of historical data records multiple orders from Hotel10009 in April. Each order details the click identifier, click time, check-in time, check-out time, number of days booked in advance, and number of consecutive stays.
[0110] It should be noted that if a set of historical data does not include the number of days booked in advance and the number of consecutive days, the server can determine the corresponding number of days booked in advance based on the time difference between check-in time and click time, and determine the corresponding number of consecutive days based on the time difference between check-out time and check-in time.
[0111] Secondly, the server determines the first matrix based on historical data.
[0112] The server can determine the first matrix corresponding to each hotel based on a set of historical data.
[0113] The server can first determine the dimensions of the first matrix, i.e., the values of M and N, based on the maximum number of consecutive stays and the maximum number of advance bookings recorded in a set of historical data.
[0114] For example, if the maximum number of consecutive days of stay recorded in a certain set of historical data is 20 days, then N = 20, and the second parameter group corresponding to the 20 columns in the first matrix can be {1, 2, 3, ..., 20}; if the maximum number of days of advance booking recorded in the historical data is 12, then M = 12, and the first parameter group corresponding to the 12 rows in the first matrix can be {0, 1, 2, ..., 11}.
[0115] The server then iterates through each order in the historical data set to determine the value of each element in the first matrix.
[0116] In one possible design, the server can determine the number of clicks for each element in the first matrix by iterating through each order in the historical data set; this number of clicks can also be referred to as the click count. Based on the determined dimensions of the first matrix and the click count of each element in the first matrix, the server can then obtain the first matrix.
[0117] For example, Figure 6 This is a schematic diagram of a first matrix provided in an embodiment of this application. The server determines, based on a set of historical data, that the maximum number of advance booking days is 12 and the maximum number of consecutive stay days is 20. Therefore, the rows of the first matrix represent the number of advance booking days, with 12 rows and the columns represent the number of consecutive stay days, with 20 columns. Then, by iterating through each order in the set of historical data, the click count corresponding to each element in the first matrix is determined. For example, by iterating through the set of historical data, it is determined that the number of orders with 0 advance booking days and 1 consecutive stay day is 45. Therefore, the element in the first row and first column of the first matrix can be set to 45. Thus, after determining the value of each element, the following can be obtained: Figure 6 The first matrix shown.
[0118] In another possible design, the server can iterate through each order in the historical data set to determine the click count of each element in the first matrix. Then, based on the ratio of each element's click count to the total click count, the server can obtain the proportion of each element. The server can then obtain the first matrix based on the determined first-dimensional matrix and the proportion of each element within it.
[0119] For example, Figure 7 This is another schematic diagram of the first matrix provided in the embodiments of this application. The server obtains the matrix through the foregoing method. Figure 6 Following the matrix shown, the proportion of each element can be further calculated. For example, to calculate... Figure 6 The percentage of the element corresponding to the first row and first column shown is calculated by dividing the click count of that element (45) by the total click count of the matrix (856), resulting in a percentage of 0.069 for that element. Thus, after determining the percentage of each element, we can obtain... Figure 7 The first matrix shown.
[0120] After determining the first matrix corresponding to each hotel, the server can generate the starting price matrix corresponding to each hotel through the following steps 402 to 404.
[0121] Step 402: Based on the predefined loss value calculation formula, determine multiple loss values that correspond one-to-one with multiple submatrices.
[0122] Among them, the multiple submatrices include elements a 1,1 This begins with submatrices of multiple dimensions obtained by cutting different rows and columns from the first matrix. In other words, these multiple submatrices are submatrices of multiple dimensions obtained by traversing from 1×1 to M×N dimensions, and each submatrix includes the element 'a'. 1,1 .
[0123] After determining the first matrix, the server can traverse the first matrix sequentially from 1×1 dimension to M×N dimension to obtain multiple sub-matrices and calculate the loss value corresponding to each sub-matrix. In this application, any one of the multiple sub-matrices is denoted as the first sub-matrix, and the dimension of the first sub-matrix is I×J, 1≤I≤M, 1≤J≤N, where I and J are positive integers.
[0124] The following section uses any one of the multiple submatrices, namely the first submatric, as an example to explain in detail the process of determining the loss value corresponding to the first submatric.
[0125] The loss value of the first submatrix is related to the degree of dispersion of the total number of clicks in the first submatrix.
[0126] In this application, the total number of clicks is discrete in the first submatrix, D. lThe following relationship must be satisfied:
[0127]
[0128] in, This represents the sum of the variances of one or more submatrices obtained by dividing the first matrix using the row and column containing the first submatrix as boundaries.
[0129] In this application, It can be used to characterize the degree of dispersion of data within each of one or more submatrices obtained by dividing the first matrix by the row and column of the first submatrix. The smaller the value, the less dispersed the data is in each of the multiple submatrices, meaning the data is more concentrated.
[0130] This represents the mean of the elements falling within the first submatrix. It represents the mean of the elements in one or more submatrices that are adjacent to the first submatrix.
[0131] In this application, It can be used to characterize the degree of dispersion of data among one or more submatrices obtained by dividing the first matrix by the row and column of the first submatrix, that is, the degree of difference between the data of two adjacent submatrices. The larger the value, the greater the dispersion of data among the various submatrices.
[0132] It's understandable, D l The smaller the value, the more concentrated the accommodation needs of users fall within the first submatrix, meaning that the dimensions of the first submatrix can cover more of the accommodation needs of the user group.
[0133] As mentioned earlier, the dimension of the first submatrix is I×J, and the values of I and J affect the number of submatrices obtained by dividing the first matrix using the row and column containing the first submatrix as boundaries.
[0134] In the first possible case, when 1≤I<M and 1≤J<N, the first matrix can be divided into four submatrices by using the row and column of the first submatrix as the boundary.
[0135] For example, such as Figure 8a As shown, assuming the first matrix has a dimension of 5×14, it can be divided into a first submatrix, a second submatrix, a third submatrix, and a fourth submatrix, using 5×14 as the boundary. It can be seen that the first submatrix is located in the upper left part of this boundary, the second submatrix in the upper right part, the third submatrix in the lower right part, and the fourth submatrix in the lower left part.
[0136] Therefore, the mean and variance of the first submatrix can satisfy the following relationship:
[0137]
[0138] in, This represents the average percentage of elements in the first submatrix. P(a) represents the sample variance of the proportion of elements in the first submatrix, N1 represents the number of elements in the first submatrix, and P(a) represents the proportion of elements in the first submatrix. ij ) represents the element a in the submatrix i,j The percentage.
[0139] The mean and variance of the second submatrix can satisfy the following relationship:
[0140]
[0141] in, This represents the average percentage of elements in the second submatrix. P(a) represents the sample variance of the proportion of elements in the second submatrix, N2 represents the number of elements in the second submatrix, and P(a) represents the proportion of elements in the second submatrix. ij ) represents the element a in the submatrix i,j The percentage.
[0142] The mean and variance of the third submatrix can satisfy the following relationship:
[0143]
[0144] in, This represents the average percentage of elements in the third submatrix. P(a) represents the sample variance of the proportion of elements in the third submatrix, N3 represents the number of elements in the third submatrix, and P(a) represents the proportion of elements in the third submatrix. ij ) represents element a in the submatrix i,j The percentage.
[0145] The mean and variance of the fourth submatrix can satisfy the following relationship:
[0146]
[0147] in, This represents the average percentage of elements in the fourth submatrix. P(a) represents the sample variance of the proportion of elements in the fourth submatrix, N4 represents the number of elements in the fourth submatrix, and P(a) represents the proportion of elements in the fourth submatrix. ij ) represents the element a in the submatrix i,j The percentage.
[0148] It should be understood that the submatrices adjacent to the first submatrix at this point are the second and fourth submatrices.
[0149] It should be noted that if the elements in the first matrix represent click counts, the server can temporarily calculate P(a) when calculating the mean and variance of the first, second, third, and fourth sub-matrices. ij This means temporarily calculating the proportion of elements in the first matrix; if the elements in the first matrix represent proportions, the server can directly substitute the proportion of each element into the calculation formulas for the mean and variance.
[0150] In the second possible case, when I = M and 1 ≤ J < N, or when 1 ≤ I < M and J = N, the first matrix can be divided into two submatrices by using the row and column of the first submatrix as the boundary.
[0151] For example, such as Figure 8b As shown, assuming the first matrix has a dimension of 12×14, it can be divided into a first submatrix and a second submatrix using 12×14 as the boundary. Figure 8c As shown, assuming the dimension of the first matrix is 5×20, the first matrix can be divided into a first submatrix and a fourth submatrix using 5×20 as the boundary.
[0152] It should be understood that when dividing the first matrix into two submatrices, compared to the two non-existent submatrices in the first possible case, the variance and mean of these two non-existent submatrices are considered to be 0.
[0153] In the third possible case, when I=M and J=N, a submatrix can be obtained by dividing the first matrix by the row and column containing the first submatrix.
[0154] For example, such as Figure 8d As shown, assuming the dimension of the first matrix is 12×20, the first matrix can be divided into the first submatrix using 12×20 as the boundary. In other words, the first submatrix is the first matrix.
[0155] It should be understood that when the first matrix is divided into only one submatrix, compared to the three non-existent submatrixes in the first possible case, the variance and mean of the three non-existent submatrixes are considered to be 0.
[0156] Optionally, the loss value of the first submatrix is also related to the sum of all elements in the first submatrix.
[0157] In this application, the loss value of the first submatrix is also affected by the following constraints:
[0158]
[0159] Wherein, λ1 is the first Lagrange multiplier, and the value of λ1 can satisfy λ1≥0. In one possible implementation, λ1 can be 20000; C1 is the first constant, and its value is a predefined value, and the value of C1 satisfies 0<C1<1. This represents the sum of the percentages of the elements in the first submatrix.
[0160] This constraint is used to constrain the dimension of the first submatrix, which can be specifically constrained by C1.
[0161] When choosing a value for C1, it should not be too small or too large. If the value is too small, it means the dimension of the first submatrix of the constraint is smaller, making it impossible to guarantee that the accommodation needs of most users fall within the first submatrix. If the value is too large, it means the dimension of the first submatrix of the constraint is larger. Although it can guarantee that the accommodation needs of most users fall within the first submatrix, it requires more storage resources, failing to achieve resource conservation. Therefore, in one feasible approach, C1 can be set to 0.8.
[0162] In this application, The smaller the difference between C1 and C2, the more the first submatrix in that dimension satisfies the constraint.
[0163] Optionally, the loss value of the first submatrix is also related to the dimension of the first submatrix.
[0164] In this application, the loss value of the first submatrix may also be affected by the following constraint:
[0165] λ2(I×J-C2);
[0166] Where λ2 is the second Lagrange multiplier, which takes a predefined value and can be 1; C2 is the second constant, which also takes a predefined value; I and J are the row and column numbers of the first submatrix, respectively.
[0167] This constraint is used to constrain the dimension of the first matrix, specifically C2 can constrain the dimension of the first matrix.
[0168] The value of C2 can be set by those skilled in the art according to actual needs, but it should not be too small or too large. If the value is too small, the dimension of the first constraint matrix will be smaller, and correspondingly, the dimension of the starting price matrix generated in steps 403 and 404 may also be smaller, potentially making it impossible to guarantee that the accommodation needs of most users fall within the starting price matrix. If the value is too large, the dimension of the first constraint matrix will be larger, and correspondingly, the dimension of the starting price matrix generated in steps 403 and 404 may also be larger, requiring more storage resources to cache the starting price matrix, thus failing to achieve resource conservation. Therefore, in one feasible implementation, C2 can be 240.
[0169] In this application, the smaller the difference between I×J and C2, the more the first matrix in that dimension satisfies the constraint condition.
[0170] Therefore, in one feasible manner, the loss value L of the first submatrix l It can be determined using the following formula:
[0171]
[0172] The server can use this loss value L l The calculation formula can calculate multiple loss values corresponding to multiple first submatrices from 1×1 dimension to M×N dimension, with each first submatrix corresponding to one loss value.
[0173] It is understandable that the loss value L l The smaller the value, the more it indicates that the dimension of the first submatrix corresponding to the loss value can cover more of the accommodation needs of the hotel's user group. For example, it can ensure that 80% of the users' accommodation needs fall within the first submatrix, and it can also ensure that less storage resources are used when caching the starting price matrix corresponding to this dimension.
[0174] Step 403: Determine the dimensions of the starting price matrix based on multiple loss values.
[0175] After the server obtains multiple loss values corresponding to multiple first submatrices through step 402, it can determine the dimension of the first submatric corresponding to the minimum value among the multiple loss values of the multiple first submatrices as the dimension of the hotel's starting price matrix.
[0176] Understandably, the server can determine the dimensions of the starting price matrix for each hotel. The dimensions of the starting price matrix can be the same or different for different hotels.
[0177] In some possible implementations, when the server iterates through the first matrix from 1×1 to M×N dimensions, it can calculate the loss value for each first submatrix and compare it with the loss value for the previous first submatrix. If the loss value for the current submatrix is less than the previous one, the server updates the recorded loss value and dimension, using the current loss value and dimension as the latest. In other words, the server synchronously records the dimension of the first submatrix with the smallest loss value while iterating through the first matrix from 1×1 to M×N dimensions. If the loss value for the current submatrix is greater than or equal to the previous one, the server does not update the recorded loss value and dimension. Thus, at the end of the iteration through the first matrix from 1×1 to M×N dimensions, the server can determine the dimension of the first submatrix corresponding to the smallest loss value, accelerating the determination of the starting matrix dimension.
[0178] In this application, for this possible implementation, the initial loss value can be set to infinity and the initial dimension to 1×1.
[0179] Step 404: Generate the hotel's starting price matrix based on the dimensions of the starting price matrix.
[0180] Assuming the starting price matrix has dimensions P×Q, where P and Q are both positive integers, the starting price matrix includes the lowest price offered by the hotel under each of the P×Q parameter combinations.
[0181] As mentioned earlier, hotel booking platforms can integrate quotes from multiple suppliers for different room types at multiple hotels. This means that for a single hotel, the quotes for its various room types can come from different suppliers. Different accommodation needs, such as different combinations of consecutive stays and advance bookings, will result in varying quotes for the hotel's different room types. Since the functionality of the hotel booking platform can be provided by a server, after determining the dimension P×Q of the starting price matrix for the hotel, the server can obtain the lowest quotes from suppliers for different parameter combinations based on P×Q parameter combinations, thus obtaining the starting price matrix for that hotel. It should be understood that the lowest quotes from suppliers for different parameter combinations can be obtained from, for example... Figure 1 The supplier quotes shown are obtained from the system.
[0182] For example, Figure 9 This is a schematic diagram of a starting price matrix provided in an embodiment of this application. For example... Figure 9Suppose the server determines that the starting price matrix for a certain hotel has a dimension of 5×14. The server can then determine the lowest price for different dimensions sequentially, from 1×1 to P×Q. For example, to determine the lowest price for the 1×1 dimension (i.e., when the advance booking is 0 days and the consecutive stay is 1 day), the server can obtain the prices offered by each supplier for each room type of the hotel from the supplier pricing system when the advance booking is 0 days and the consecutive stay is 1 day. Suppose supplier A offers 380 for room type 1 and 400 for room type 2; supplier B offers 391 for room type 1 and 371 for room type 3; and supplier C offers 389 for room type 1, 401 for room type 2, and 410 for room type 3. Then, the server can determine the lowest price corresponding to the 1×1 dimension of the starting price matrix as 371. Repeating this process, the server can determine the most recent price corresponding to all dimensions included in the starting price matrix, thus obtaining... Figure 9 The starting price matrix is shown.
[0183] After the server generates the starting price matrix for each hotel, it can cache it locally, for example... Figure 1 The starting price is cached in the database for later use when displaying the starting price of hotels on the hotel listing page.
[0184] Because the accommodation needs of a hotel's user base may change over time, for example, in the previous month, a user group's demand for Hotel 1 might have been concentrated on a consecutive stay of 14 days or less, with advance bookings of 5 days or less. In the following month, this same user group's demand for Hotel 1 might have shifted to a consecutive stay of 10 days or less, with advance bookings of 3 days or less. Therefore, the server can periodically (e.g., monthly) re-determine the starting price matrix for each hotel to ensure that the determined starting price matrix can always meet the accommodation needs of the corresponding user group for each hotel.
[0185] Furthermore, since the server needs to cache multiple starting price matrices for multiple hotels, in order to reduce the amount of cached starting price matrix data and achieve less storage resource consumption, the server can generate starting price matrices only for popular hotels when performing the aforementioned steps 401 to 404. In this application, a popular hotel can be understood as a hotel that is highly likely to be clicked by a user when displayed on the hotel list page, and also highly likely to have its price change when a user clicks on the hotel in the hotel list to enter the hotel's details page.
[0186] The following is combined with Figure 10 This section introduces the methods for identifying popular hotels.
[0187] Figure 10This is a schematic flowchart applicable to the embodiments of this application for determining popular hotels. The method 100 may include steps 101 to 103. The steps in method 100 are described in detail below.
[0188] Step 101: Obtain the number of times the hotel is exposed and clicked on the hotel list page displayed on the platform within the preset time period, as well as the number of times the hotel changes its price within the preset time period.
[0189] In one feasible approach, the historical data for each hotel may also include the number of times each hotel is exposed on the hotel listing page of the hotel booking platform, the number of times it is clicked by users, and the number of times the price changes when entering the hotel details page.
[0190] In another possible implementation, each hotel has a set of hotel click and price change details. This data records the number of times each hotel is exposed on the hotel listing page of the hotel booking platform, the number of times it is clicked by users, and the number of times the price changes when users enter the hotel details page. Optionally, for this possible implementation, the details data may also record information such as hotel identifiers and city identifiers.
[0191] The number of times the hotel changes prices within a preset time period refers to the number of times the starting price displayed on the hotel listing page differs from the starting price on the hotel details page within that preset time period. The starting price on the hotel details page is the lowest price among all room types offered by the hotel.
[0192] The preset time period can be set by those skilled in the art according to actual needs, such as the past month, and this application does not impose any restrictions on it.
[0193] Regardless of which of the above possible implementation methods is adopted, the server can obtain the number of times each hotel is exposed on the hotel list page, the number of times it is clicked by users, and the number of times its price changes within a preset time period.
[0194] Step 102: Calculate the hotel's popularity coefficient based on the probability of the hotel being clicked within a preset time period and the probability of the hotel changing its price when it is clicked.
[0195] First, based on the number of times each hotel is exposed on the hotel list page, the number of times it is clicked by users, and the number of times its price changes within a preset time period, the server determines the probability of each hotel being clicked (clickthrough rate, CTR) and the probability of its price changing when it is clicked (price change rate, PCR).
[0196] The probability of a hotel being clicked within a preset time period is calculated as the ratio of the number of times the hotel is clicked on the platform's hotel listing page within that preset time period to the number of times it is exposed. The probability of a hotel changing its price when clicked is calculated as the ratio of the number of times the hotel changes its price within the preset time period to the number of times it is clicked.
[0197] For ease of explanation, the probability of this application being clicked is called the click-through rate, and the probability of a price change occurring when the application is clicked is called the price change rate.
[0198] Secondly, the server determines the popularity coefficient for each hotel based on a predefined formula.
[0199] In this application, the hotel's popularity score k It can be determined by the following formula:
[0200]
[0201] Among them, Score k Score represents the popularity coefficient of hotel k. k ∈[0,1];x k This represents the click event of hotel k, y k P(x) represents the price change event of hotel k; k P(y) represents the prior probability, indicating the click-through rate (CTR); k / x k P(y) represents the conditional probability, indicating the rate of change of price given a click event. k / x k ) represents PCR; α is the balancing factor, used to balance the weights, i.e., control the proportion of CTR and PCR in the popularity coefficient, α∈[0,1]; Z is the normalization factor, used to scale the popularity coefficient between [0,1].
[0202] In one feasible approach, α can be 0.8 and Z can be defined as ln2.
[0203] To better understand the formula for calculating the popularity coefficient, the derivation process of the formula is briefly introduced below.
[0204] Assume X = x k For the click event of hotel k, Y = y k This refers to the price change event at Hotel K.
[0205] Then, P(X=x) k Y = y k )=P(x k )·P(y k / x k ), where P(X=x k Y = yk ) is a joint distribution, representing the probability that the click event and the price change event of hotel k occur simultaneously.
[0206] For P(x) k )·P(y k / x k Taking the natural logarithm ln, we get lnP(x) k )·P(y k / x k Then convert it into addition to obtain lnP(x) k )+lnP(y k / x k ).
[0207] Next, we will study lnP(x) k )+lnP(y k / x k A balance factor α is introduced to control the weights of CTR and PCR in the popularity coefficient. Furthermore, 1 is added to both CTR and PCR to prevent ln0 from becoming negative infinity when CTR or PCR is 0. That is, α[lnP(x] = ... k )+1]+(1-α)[lnP(y k / x k )+1).
[0208] Furthermore, for α[lnP(x k )+1]+(1-α)[lnP(y k / x k By introducing a normalization factor Z, the calculated popularity coefficient is controlled to be within the range of [0,1]. That is, the above formula can be obtained:
[0209]
[0210] Finally, the server sorts the multiple popularity coefficients of various hotels to obtain a list of popularity coefficients.
[0211] After calculating the popularity coefficient for each hotel, the server can sort them in descending order of popularity coefficient to obtain a list of popular hotels. This list of popular hotels includes hotel identifiers, click-through rates, price change rates, and popularity coefficients.
[0212] For example, Figure 11 This is a schematic diagram of a popularity coefficient list provided in an embodiment of this application. For example... Figure 11 As can be seen, the list of popularity coefficients includes the click-through rate, price change rate, and popularity coefficient of hotels 10000 to 10014. Hotel 10009 has the highest popularity coefficient of 0.76% and is ranked first, while Hotel 10013 has the lowest popularity coefficient of 0.04% and is ranked last.
[0213] Step 103: Determine if the hotel's popularity coefficient is greater than or equal to the preset threshold.
[0214] Based on a list of popularity coefficients and a preset threshold, the server can determine popular hotels, where the popularity coefficient of a popular hotel is greater than or equal to the preset threshold. The specific value of the preset threshold can be set by those skilled in the art, and this application does not limit it.
[0215] For example, assuming a preset threshold of 0.4%, the server determines... Figure 11 After viewing the list of popular hotels, you can combine it with the preset thresholds to determine that there are three popular hotels: Hotel 10009, Hotel 10003, and Hotel 10007.
[0216] In other words, the server can execute steps 101 to 103 before executing steps 401 to 404. After identifying popular hotels from multiple hotels through steps 101 to 103, steps 401 to 404 are then used to generate the starting price matrix corresponding to each of these popular hotels.
[0217] Optionally, the method 400 may further include:
[0218] In response to a user's query on the hotel listing page, the system searches the starting price matrix for the lowest price that meets the query criteria, including the number of days the hotel needs to be booked in advance and the number of consecutive nights the guest needs to stay at the hotel. Based on the data retrieved from the starting price matrix, the system displays the lowest price offered by the hotel on the hotel listing page.
[0219] Optionally, the search criteria may also include: city, rating, price range, star rating, etc.
[0220] When the server receives a user's query, it can initially filter out at least one hotel that meets the user's needs based on the user's query conditions. It can then determine the starting price matrix corresponding to each hotel from multiple pre-cached starting price matrices. If the number of days the user entered for advance booking and the number of consecutive nights of stay fall into P×Q combinations in the starting price matrix, the server will find the lowest price for the corresponding combination from the starting price matrix and display the lowest price on the hotel list page for the user to view.
[0221] Based on the above scheme, the server can determine the first matrix corresponding to each popular hotel based on historical data. Then, for each popular hotel's first matrix, starting from the first row and first column element, it extracts sub-matrices of multiple dimensions by cutting different rows and columns within the first matrix. Based on a predefined loss value calculation formula, it determines multiple loss values corresponding to these sub-matrices of multiple dimensions. Then, based on these multiple loss values, it determines the dimensions of the starting price matrix, thereby generating the starting price matrix corresponding to each popular hotel. Since the dimensions of the determined starting price matrix are determined by traversing the first matrix sequentially from 1×1 to M×N dimensions using the loss value calculation formula, compared to conventional greedy algorithms, the dimensions of the starting price matrix determined in this application represent a globally optimal solution, rather than a locally optimal solution. Furthermore, because the starting price matrix is determined based on historical data of popular hotels, the dimensions of the starting price matrix for each popular hotel can meet the accommodation needs of its respective user group. This ensures that the accommodation needs of most users fall within the starting price matrix, thereby guaranteeing that the prices displayed on the hotel listing page are consistent with the lowest prices on the hotel details page. This allows the hotel booking platform to provide accurate prices to users through the hotel listing page, saving users time in booking hotels, saving storage resources, and improving the user experience.
[0222] The above, combined with Figures 4 to 11 The methods provided in the embodiments of this application are described in detail below. Hereinafter, in conjunction with... Figures 12 to 13 The apparatus provided in the embodiments of this application will be described in detail.
[0223] Figure 12 This is a schematic block diagram of a matrix generation device provided in an embodiment of this application. The matrix generation device 1200 can be implemented as a server capable of providing a hotel reservation platform, or as a component configured in the server (such as a chip, chip system, etc.), or as a logic module or software capable of implementing all or part of the server's functions. This application embodiment does not limit this.
[0224] like Figure 12 As shown, the matrix generation device 1200 may include a determining module 1210 and a generating module 1220. Each module in the device 1200 can be used to implement... Figure 4 The corresponding process executed by the server in method 400 is shown. For example, the determination module 1210 can be used to execute steps 401 to 403 in method 400, and the generation module 1220 can be used to execute step 404 in method 400.
[0225] Specifically, the determining module 1210 can be used to determine a first matrix based on the hotel's historical data. This historical data includes the time the hotel was clicked, the entered check-in time, and the check-out time on the hotel list page provided by the platform. This hotel list page provides the lowest price for multiple selectable hotels. The first matrix is an M×N dimensional matrix. The M rows of the first matrix correspond to the M values in the first parameter group, and the N columns of the first matrix correspond to the N values in the second parameter group. One parameter group in the first and second parameter groups includes multiple values for the number of days the hotel is booked in advance, and the other parameter group includes multiple values for the number of consecutive nights the hotel stays. Each element in the first matrix corresponds to the number of times the hotel was clicked under different parameter combinations. Element a... m,n The number of clicks corresponds to the combination of the m-th value in the first parameter group and the n-th value in the second parameter group; 1≤m≤M, 1≤n≤N, where m and n are positive integers, and M and N are integers greater than 1; based on a predefined loss value calculation formula, multiple loss values are determined that correspond one-to-one with multiple sub-matrices, which include elements from a... 1,1 The process begins by extracting multiple dimensional submatrices from the first matrix by different rows and columns. Based on multiple loss values, the dimension P×Q of the starting price matrix is determined, where P and Q are both positive integers. This generation module 1220 can be used to generate a hotel starting price matrix based on the dimension P×Q of the starting price matrix. This starting price matrix includes the lowest price corresponding to the hotel under each of the P×Q parameter combinations.
[0226] Optionally, each element in the first matrix represents the percentage of the total number of clicks for the hotel under different parameter combinations. The total number of clicks is the sum of the number of times the hotel was clicked on the hotel list page displayed on the platform under M×N combinations obtained by iterating through M values in the first parameter group and N values in the second parameter group.
[0227] Optionally, the loss value of the first submatrix among the multiple submatrixes is related to the dispersion of the total number of clicks in the first submatrix. The total number of clicks is the sum of the number of times the hotel is clicked on the hotel list page displayed on the platform under M×N combinations obtained by traversing M values in the first parameter group and N values in the second parameter group respectively. The dimension of the first submatrix is I×J, 1≤I≤M, 1≤J≤N, and I and J are positive integers.
[0228] Optionally, the total number of clicks is discrete in the first submatrix, D. l satisfy:
[0229]
[0230] in, This represents the sum of the variances of one or more submatrices obtained by partitioning the first matrix using the row and column containing the first submatrix as boundaries. This represents the mean of the elements falling within the first submatrix. It represents the mean of the elements in one or more submatrices that are adjacent to the first submatrix.
[0231] Optionally, the loss value of the first submatrix in the plurality of submatrixes is also related to the sum of all elements of the first submatrix.
[0232] Optionally, the loss value of the first submatrix among the plurality of submatrixes is also related to the dimension of the first submatrix.
[0233] Optionally, the loss value L of the first submatrix among the plurality of submatrixes l satisfy:
[0234]
[0235] Where λ1, λ2, C1, and C2 are predefined values, P(a i,j ) represents element a i,j The percentage.
[0236] Optionally, the determining module 1210 may be specifically used to determine the dimension of the submatrix corresponding to the minimum value among multiple loss values as the dimension of the starting price matrix.
[0237] Optionally, the determining module 1210 can also be used to obtain the number of times the hotel is exposed and clicked on the hotel list page displayed on the platform within a preset time period, as well as the number of times the hotel changes prices within the preset time period. The number of times the hotel changes prices within the preset time period is the number of times the starting price on the hotel list page and the starting price on the hotel details page are inconsistent within the preset time period. The hotel details page displays the prices of different room types in the hotel, and the starting price on the hotel details page is the lowest price among all room types in the hotel. Based on the probability of the hotel being clicked within the preset time period and the probability of the price changing when the hotel is clicked, the popularity coefficient of the hotel is calculated. The probability of the hotel being clicked within the preset time period is the ratio of the number of times the hotel is clicked to the number of exposures on the hotel list page displayed on the platform within the preset time period. The probability of the hotel changing prices when clicked is the ratio of the number of times the price changes to the number of clicks within the preset time period. The popularity coefficient of the hotel is determined to be greater than or equal to a preset threshold.
[0238] Optionally, the device 1200 may further include an acquisition module for acquiring historical data.
[0239] Optionally, the device 1200 may further include: a query module and a display module, the query module being used to respond to a user's query operation on the hotel listing page by searching for starting prices from a starting price matrix that meet the query criteria, including the number of days the hotel is booked in advance and the number of consecutive days the hotel stays; the display module being used to display the lowest price of the hotel on the hotel listing page based on the data found from the starting price matrix.
[0240] It should be understood that the module division in the embodiments of this application is illustrative and only represents a logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0241] Figure 13 This is another schematic block diagram of the matrix generation apparatus provided in this application embodiment. The matrix generation apparatus 1300 can be a chip system. In this application embodiment, the chip system can be composed of chips, or it can include chips and other discrete devices.
[0242] like Figure 13 As shown, the device 1300 may include at least one processor 1310 for implementing the server functions in the method 300 provided in the embodiments of this application.
[0243] For example, when the device 1300 is used to implement the server function in the method provided in the embodiments of this application, the processor 1310 can be used to determine a first matrix based on historical data. This historical data includes the time a hotel is clicked, the input check-in time, and the check-out time on a hotel list page provided by the platform. This hotel list page provides the lowest price for multiple selectable hotels. The first matrix is an M×N dimensional matrix. The M rows in the first matrix correspond to the M values in a first parameter group, and the N columns in the first matrix correspond to the N values in a second parameter group. One parameter group in the first and second parameter groups includes multiple values for the number of days a hotel is booked in advance, and the other parameter group includes multiple values for the number of consecutive days a hotel stays. Each element in the first matrix corresponds to the number of times a hotel is clicked under different parameter combinations. Element a... m,n The number of clicks corresponds to the combination of the m-th value in the first parameter group and the n-th value in the second parameter group; 1≤m≤M, 1≤n≤N, where m and n are positive integers, and M and N are both integers greater than 1; based on a predefined loss value calculation formula, multiple loss values are determined that correspond one-to-one with multiple sub-matrices, where the multiple sub-matrices include elements from a... 1,1The process begins by extracting multiple dimensional submatrices from the first matrix by different rows and columns. Based on multiple loss values, the dimension P×Q of the starting price matrix is determined, where P and Q are both positive integers. Based on the dimension P×Q of the starting price matrix, a starting price matrix for the hotels is generated, which includes the lowest price for each of the P×Q parameter combinations. See the detailed description in the method example for further details; it will not be repeated here.
[0244] The device 1300 may further include at least one memory 1320 for storing program instructions and / or data. The memory 1320 is coupled to the processor 1310. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, and may be electrical, mechanical, or other forms, for information exchange between devices, units, or modules. The processor 1310 may operate in conjunction with the memory 1320. The processor 1310 may execute program instructions stored in the memory 1320. At least one of the at least one memory may be included in the processor.
[0245] The device 1300 may further include a communication interface 1330 for communicating with other devices via a transmission medium, thereby enabling the device 1300 to communicate with other devices. For example, when the device 1300 is used to implement the functions of the hotel reservation platform in the method provided in this application embodiment, the other device may be a supplier's service equipment. The communication interface 1330 may be, for example, a transceiver, interface, bus, circuit, or a device capable of transmitting and receiving functions. The processor 1310 may utilize the communication interface 1330 to transmit and receive data and / or information, and to implement... Figures 4 to 11 The method executed by the server in the corresponding embodiment.
[0246] This application embodiment does not limit the specific connection medium between the processor 1310, memory 1320, and communication interface 1330. This application embodiment... Figure 13 The processor 1310, memory 1320, and communication interface 1330 are connected via bus 1340. Bus 1340 is... Figure 13 The connections between other components are shown in thick lines only and are not intended to be limiting. This bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 13 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0247] It should be understood that the processor in this application can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0248] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0249] This application also provides a computer program product comprising: a computer program (also referred to as code or instructions), which, when executed, causes a computer to perform... Figure 4 or Figure 10 The method executed by the server in the illustrated embodiment.
[0250] This application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions). When the computer program is executed, it causes the computer to perform... Figure 4 or Figure 10 The method executed by the server in the illustrated embodiment.
[0251] The terms “unit”, “module”, etc., used in this specification may be used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution.
[0252] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. In the several embodiments provided in this application, it should be understood that the disclosed apparatus, devices, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0253] The unit described as a separate component may or may not be physically separate. The component shown as a unit may or may not be a physical unit; that is, it may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0254] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0255] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. This computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function described in the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0256] If this function 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 this application, in essence, or the part that contributes to the prior art, or a portion 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 of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0257] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A matrix generation method, characterized in that, Applied to hotel booking platforms, the method includes: Based on historical hotel data, a first matrix is determined. The historical data includes the time the hotel was clicked, the entered check-in time, and the check-out time on the hotel list page provided by the platform. The hotel list page is used to provide the lowest price for multiple selectable hotels. The first matrix is an M×N dimensional matrix. The M rows of the first matrix correspond to the M values in the first parameter group, and the N columns of the first matrix correspond to the N values in the second parameter group. One parameter group includes multiple values for the number of nights the hotel is booked in advance, and the other parameter group includes multiple values for the number of consecutive nights the hotel is staying at. Each element in the first matrix corresponds to the number of times the hotel was clicked under different parameter combinations. The number of times a value is clicked when it is combined with the m-th value in the first parameter group and the n-th value in the second parameter group; 1≤m≤M, 1≤n≤N, where m and n are positive integers, and M and N are integers greater than 1; Based on a predefined loss value calculation formula, multiple loss values are determined, each corresponding to a specific submatrix. These submatrixes include elements from a... 1,1 Begin by extracting multiple dimensional submatrices from different rows and columns of the first matrix; Based on the multiple loss values, the dimension P×Q of the starting price matrix is determined, where P and Q are both positive integers; Based on the dimension P×Q of the starting price matrix, a starting price matrix for the hotel is generated, which includes the lowest price for the hotel under each of the P×Q parameter combinations.
2. The method as described in claim 1, characterized in that, Each element in the first matrix represents the percentage of the total number of clicks for the hotel under different parameter combinations. The total number of clicks is the sum of the number of clicks for the hotel on the hotel list page displayed on the platform under M×N combinations obtained by iterating through M values in the first parameter group and N values in the second parameter group.
3. The method as described in claim 2, characterized in that, The loss value of the first submatrix among the plurality of submatrixes is related to the dispersion of the total number of clicks in the first submatrix. The total number of clicks is the sum of the number of times the hotel is clicked on the hotel list page displayed on the platform under M×N combinations obtained by traversing M values in the first parameter group and N values in the second parameter group respectively. The first submatrix has a dimension of I×J, 1≤I≤M, 1≤J≤N, and I and J are positive integers.
4. The method as described in claim 3, characterized in that, The degree of dispersion of the total number of clicks in the first sub-matrix satisfy: ; in, This represents the sum of the variances of one or more submatrices obtained by dividing the first matrix using the row and column containing the first submatrix as boundaries. This represents the mean of the elements falling within the first submatrix. This represents the mean of the elements in the submatrices adjacent to the first submatric in the one or more submatrices.
5. The method as described in claim 3 or 4, characterized in that, The loss value of the first submatrix among the plurality of submatrices is also related to the sum of all elements of the first submatrix.
6. The method as described in claim 5, characterized in that, The loss value of the first submatrix among the plurality of submatrixes is also related to the dimension of the first submatrix.
7. The method as described in claim 6, characterized in that, The loss value of the first submatrix among the plurality of submatrixes satisfy: ; in, , C1 and C2 are predefined values. Represents element The percentage.
8. The method as described in claim 7, characterized in that, Determining the dimension of the starting price matrix based on the multiple loss values includes: The dimension of the submatrix corresponding to the minimum value among multiple loss values is determined as the dimension of the starting price matrix.
9. The method according to any one of claims 1 to 4, 6 to 8, characterized in that, Before determining the first matrix based on the hotel's historical data, the method further includes: The system obtains the number of times the hotel is exposed and clicked on the hotel list page displayed on the platform within a preset time period, as well as the number of times the hotel changes its price within the preset time period. The number of times the hotel changes its price within the preset time period is the number of times the starting price on the hotel list page and the starting price on the hotel details page are inconsistent within the preset time period. The hotel details page is used to display the prices of different room types in the hotel, and the starting price on the hotel details page is the lowest price among all room types in the hotel. Based on the probability of the hotel being clicked within the preset time period and the probability of the hotel changing its price when clicked, the popularity coefficient of the hotel is calculated. The probability of the hotel being clicked within the preset time period is the ratio of the number of times the hotel is clicked to the number of times it is exposed on the hotel list page displayed on the platform within the preset time period. The probability of the hotel changing its price when clicked is the ratio of the number of times the hotel changes its price to the number of times it is clicked within the preset time period. The popularity coefficient of the hotel is determined to be greater than or equal to a preset threshold.
10. The method according to any one of claims 1 to 4, 6 to 8, characterized in that, The method further includes: Obtain the historical data.
11. The method according to any one of claims 1 to 4, 6 to 8, characterized in that, The method further includes: In response to a user's query on the hotel list page, the system searches the starting price matrix for starting prices that meet the query criteria, which include the number of days the hotel is booked in advance and the number of consecutive days the hotel is stayed at. Based on the data retrieved from the starting price matrix, the lowest price for the hotel is displayed on the hotel listing page.
12. A matrix generating device, characterized in that, Includes a module for performing the method as described in any one of claims 1 to 11.
13. A matrix generating device, characterized in that, It includes a memory and a processor, wherein the memory is used to store computer programs; The processor is used to invoke and execute the computer program to cause the device to perform the method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, Used to store a computer program that, when run on a computer, causes an electronic device to perform the method as described in any one of claims 1 to 11.
15. A computer program product, characterized in that, The computer program product includes computer program code that, when run on a computer, causes an electronic device to perform the method as described in any one of claims 1 to 11.