Method and device for recommending competitive hotel, electronic equipment and readable storage medium
1. A recommendation method for a competitive hotel is characterized by comprising the following steps:
acquiring historical browsed information of a target hotel to be selected browsed by a user;
determining a plurality of candidate hotels having flow direction relations with the target hotel to be selected based on the historical browsed information;
determining a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel;
calculating to obtain a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors;
calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the first relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors;
determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable;
and determining a competing hotel from the plurality of candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix.
2. The recommendation method of claim 1, wherein the flow direction parameter vector comprises at least one of an outflow night vector, an inflow night vector, an outflow room mean value vector, and an inflow room mean value vector; the attribute parameter vector comprises at least one of a predetermined night vector, a predetermined room mean price vector, a comment scoring vector, a hotel star level vector, a hotel distance vector and a room quantity vector.
3. The recommendation method according to claim 2, wherein the calculating a target parameter matrix for determining competing hotels corresponding to the target hotel to be selected based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors comprises:
determining a target hotel star level, a target room number, a target room average price, an outflow room average price and an inflow room average price of the target hotel to be selected based on the target parameter information of the target hotel to be selected;
respectively calculating the difference values between the outgoing room average price vector and the outgoing room average price, the incoming room average price vector and the incoming room average price, the hotel star level vector and the target hotel star level, the reserved room average price vector and the target room average price and the room quantity vector and the target room quantity to obtain the calculated outgoing room average price vector, incoming room average price vector, hotel star level vector, reserved room average price vector and room quantity vector;
respectively carrying out feature normalization processing on the outflow night vector, the inflow night vector, the predetermined night vector, the comment scoring vector, the hotel distance vector, the calculated outflow room average price vector, inflow room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector to obtain normalized outflow night vector, inflow night vector, reserved room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector;
and splicing to obtain a target parameter matrix of the target hotel to be selected based on the normalized outflow night vector, inflow night vector, reservation night vector, comment scoring vector, hotel distance vector, outflow room average price vector, inflow room average price vector, hotel star-level vector and reservation room average price vector.
4. The recommendation method according to claim 1, wherein the determining a plurality of candidate hotels having a flow relationship with the target hotel to be selected based on the historical browsed information comprises:
based on the historical browsed information, determining hotels having customer inflow relations and/or customer outflow relations with the target hotels to be selected as hotels to be screened;
determining the number of the clients flowing out of the target hotels to be selected to each hotel to be screened and the number of the clients flowing in from each hotel to be screened to the target hotels to be selected;
and determining the hotels to be screened with the outflow quantity larger than a preset outflow threshold value and/or the inflow quantity larger than a preset inflow threshold value as candidate hotels.
5. The recommendation method according to claim 1, wherein the calculating a column vector mean of each column of feature vectors in the target parameter matrix and determining a first relative weight of a flow dimension or an attribute dimension corresponding to each column of feature vectors based on the column vector mean of the feature vectors comprises:
calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and for each column of feature vectors, comparing the column vector mean value of the column of feature vectors with the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the comparison result between the column of feature vectors and each column of feature vectors;
and calculating to obtain a first relative weight of the flow direction dimension or the attribute dimension corresponding to the characteristic vector of the column based on each determined comparison result.
6. The recommendation method according to claim 1, wherein the determining a competing hotel from the plurality of candidate hotels based on the target parameter matrix, and a first relative weight and a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix comprises:
for each column of feature vectors in the target parameter matrix, calculating to obtain a combined weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors based on a first relative weight and a second relative weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors;
for each candidate hotel, calculating to obtain an evaluation score of the candidate hotel based on a row feature vector corresponding to the candidate hotel in the target parameter matrix and a combined weight of a flow dimension or an attribute dimension corresponding to each feature element in the row feature vector;
and determining the competing hotels of the target hotel to be selected from the candidate hotels based on the calculated evaluation scores of the candidate hotels.
7. The recommendation method according to claim 6, wherein after determining the competing hotel of the target hotel to be selected from the plurality of candidate hotels based on the calculated evaluation scores of the plurality of candidate hotels, the recommendation method further comprises:
and determining a display hierarchy of each bidding hotel based on the evaluation score of each bidding hotel, and displaying each bidding hotel to the user according to the display hierarchy.
8. A recommendation device for competing for a hotel, the recommendation device comprising:
the information acquisition module is used for acquiring historical browsed information of the target hotel to be selected browsed by the user;
a candidate hotel determining module, configured to determine, based on the historical browsed information, a plurality of candidate hotels having a flow direction relationship with the target hotel to be selected;
a first vector determination module, configured to determine, based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel, a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions;
a second vector determining module, configured to calculate, based on the multiple flow direction parameter vectors and the multiple attribute parameter vectors, a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected;
the first weight determination module is used for calculating the column vector mean value of each column of feature vectors in the target parameter matrix and determining the first relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors;
the second weight determination module is used for determining a second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable;
and the competitive hotel determining module is used for determining competitive hotels from the candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the method of recommending a hotel for a contest according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, performs the steps of the method for recommending hotels by bidding according to any one of claims 1 to 7.
Background
With the gradual improvement of the technological level, people can book the hotel required to stay in the process of going out through the network, and due to the increasingly strengthened competitive relationship among the hotel industries, hotel managers often need to analyze the hotel in competition with the hotel and make coping strategies.
At present, an expert judgment method is adopted, namely, an expert evaluates the competitive relationship among hotels from a single angle through experience knowledge or a scoring mechanism according to basic attribute data of the geographic positions, star levels, room numbers and the like of the hotels, the evaluation result obtained by the evaluation method is subjective, and when the number of the hotels is large, a large amount of time is consumed for checking the information of each hotel, obviously, a large amount of unnecessary time of a manager is consumed.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, an electronic device and a readable storage medium for recommending a hotel contest, which can accurately recommend a relevant hotel contest to a user according to the correlation characteristics of a target hotel to be selected and each candidate hotel in different flow dimensions, and are helpful to improve the accuracy of a recommendation result, and can reduce the browsing time of the user in a network.
The embodiment of the application provides a hotel competition recommendation method, which comprises the following steps:
acquiring historical browsed information of a target hotel to be selected browsed by a user;
determining a plurality of candidate hotels having flow direction relations with the target hotel to be selected based on the historical browsed information;
determining a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel;
calculating to obtain a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors;
calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the first relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors;
determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable;
and determining a competing hotel from the plurality of candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix.
Further, the flow direction parameter vector comprises at least one of an outflow night vector, an inflow night vector, an outflow room mean price vector and an inflow room mean price vector; the attribute parameter vector comprises at least one of a predetermined night vector, a predetermined room mean price vector, a comment scoring vector, a hotel star level vector, a hotel distance vector and a room quantity vector.
Further, the calculating, based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors, a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected includes:
determining a target hotel star level, a target room number, a target room average price, an outflow room average price and an inflow room average price of the target hotel to be selected based on the target parameter information of the target hotel to be selected;
respectively calculating the difference values between the outgoing room average price vector and the outgoing room average price, the incoming room average price vector and the incoming room average price, the hotel star level vector and the target hotel star level, the reserved room average price vector and the target room average price and the room quantity vector and the target room quantity to obtain the calculated outgoing room average price vector, incoming room average price vector, hotel star level vector, reserved room average price vector and room quantity vector;
respectively carrying out feature normalization processing on the outflow night vector, the inflow night vector, the predetermined night vector, the comment scoring vector, the hotel distance vector, the calculated outflow room average price vector, inflow room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector to obtain normalized outflow night vector, inflow night vector, reserved room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector;
and splicing to obtain a target parameter matrix of the target hotel to be selected based on the normalized outflow night vector, inflow night vector, reservation night vector, comment scoring vector, hotel distance vector, outflow room average price vector, inflow room average price vector, hotel star-level vector and reservation room average price vector.
Further, the determining, based on the historical browsed information, a plurality of candidate hotels having a flow relationship with the target hotel to be selected includes:
based on the historical browsed information, determining hotels having customer inflow relations and/or customer outflow relations with the target hotels to be selected as hotels to be screened;
determining the number of the clients flowing out of the target hotels to be selected to each hotel to be screened and the number of the clients flowing in from each hotel to be screened to the target hotels to be selected;
and determining the hotels to be screened with the outflow quantity larger than a preset outflow threshold value and/or the inflow quantity larger than a preset inflow threshold value as candidate hotels.
Further, the calculating a column vector mean value of each column of feature vectors in the target parameter matrix, and determining a first relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors includes:
calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and for each column of feature vectors, comparing the column vector mean value of the column of feature vectors with the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the comparison result between the column of feature vectors and each column of feature vectors;
and calculating to obtain a first relative weight of the flow direction dimension or the attribute dimension corresponding to the characteristic vector of the column based on each determined comparison result.
Further, the determining, based on the target parameter matrix and a preset orthogonal variable, a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix includes:
and for each column of feature vectors in the target parameter matrix, determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to the column of feature vectors based on the column of feature vectors and a preset orthogonal variable.
Further, the determining a competing hotel from the plurality of candidate hotels based on the target parameter matrix, and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix includes:
for each column of feature vectors in the target parameter matrix, calculating to obtain a combined weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors based on a first relative weight and a second relative weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors;
for each candidate hotel, calculating to obtain an evaluation score of the candidate hotel based on a row feature vector corresponding to the candidate hotel in the target parameter matrix and a combined weight of a flow dimension or an attribute dimension corresponding to each feature element in the row feature vector;
and determining the competing hotels of the target hotel to be selected from the candidate hotels based on the calculated evaluation scores of the candidate hotels.
Further, after the determining a competing hotel from the plurality of candidate hotels based on the hotel score vector, the recommendation method further comprises:
and determining a display hierarchy of each bidding hotel based on the evaluation score of each bidding hotel, and displaying each bidding hotel to the user according to the display hierarchy.
Further, the display hierarchy of each competing hotel is determined by:
determining an evaluation difference value between every two bidding hotels based on the evaluation score of each bidding hotel;
determining a maximum evaluation difference value from the determined plurality of evaluation difference values and a maximum secondary evaluation difference value from the plurality of evaluation difference values, excluding the maximum evaluation difference value;
determining a score range for each display level based on the maximum evaluation difference and the secondary evaluation difference;
and determining the display hierarchy of each competitive hotel based on the evaluation score of each competitive hotel.
The embodiment of the application further provides a hotel competition recommendation device, which comprises:
the information acquisition module is used for acquiring historical browsed information of the target hotel to be selected browsed by the user;
a candidate hotel determining module, configured to determine, based on the historical browsed information, a plurality of candidate hotels having a flow direction relationship with the target hotel to be selected;
a first vector determination module, configured to determine, based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel, a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions;
a second vector determining module, configured to calculate, based on the multiple flow direction parameter vectors and the multiple attribute parameter vectors, a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected;
the first weight determination module is used for calculating the column vector mean value of each column of feature vectors in the target parameter matrix and determining the first relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors;
the second weight determination module is used for determining a second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable;
and the competitive hotel determining module is used for determining competitive hotels from the candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix.
Further, the flow direction parameter vector comprises at least one of an outflow night vector, an inflow night vector, an outflow room mean price vector and an inflow room mean price vector; the attribute parameter vector comprises at least one of a predetermined night vector, a predetermined room mean price vector, a comment scoring vector, a hotel star level vector, a hotel distance vector and a room quantity vector.
Further, when the second vector determination module is configured to calculate, based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors, a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected, the second vector determination module is configured to:
determining a target hotel star level, a target room number, a target room average price, an outflow room average price and an inflow room average price of the target hotel to be selected based on the target parameter information of the target hotel to be selected;
respectively calculating the difference values between the outgoing room average price vector and the outgoing room average price, the incoming room average price vector and the incoming room average price, the hotel star level vector and the target hotel star level, the reserved room average price vector and the target room average price and the room quantity vector and the target room quantity to obtain the calculated outgoing room average price vector, incoming room average price vector, hotel star level vector, reserved room average price vector and room quantity vector;
respectively carrying out feature normalization processing on the outflow night vector, the inflow night vector, the predetermined night vector, the comment scoring vector, the hotel distance vector, the calculated outflow room average price vector, inflow room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector to obtain normalized outflow night vector, inflow night vector, reserved room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector;
and splicing to obtain a target parameter matrix of the target hotel to be selected based on the normalized outflow night vector, inflow night vector, reservation night vector, comment scoring vector, hotel distance vector, outflow room average price vector, inflow room average price vector, hotel star-level vector and reservation room average price vector.
Further, when the candidate hotel determination module is configured to determine, based on the historical viewed information, a plurality of candidate hotels having a flow relationship with the target hotel to be selected, the candidate hotel determination module is configured to:
based on the historical browsed information, determining hotels having customer inflow relations and/or customer outflow relations with the target hotels to be selected as hotels to be screened;
determining the number of the clients flowing out of the target hotels to be selected to each hotel to be screened and the number of the clients flowing in from each hotel to be screened to the target hotels to be selected;
and determining the hotels to be screened with the outflow quantity larger than a preset outflow threshold value and/or the inflow quantity larger than a preset inflow threshold value as candidate hotels.
Further, when the first weight determining module is configured to calculate a column vector mean of each column of feature vectors in the target parameter matrix, and determine a first relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors based on the column vector mean of each column of feature vectors, the first weight determining module is configured to:
calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and for each column of feature vectors, comparing the column vector mean value of the column of feature vectors with the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the comparison result between the column of feature vectors and each column of feature vectors;
and calculating to obtain a first relative weight of the flow direction dimension or the attribute dimension corresponding to the characteristic vector of the column based on each determined comparison result. Further, when the second weight determining module is configured to determine a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable, the second weight determining module is configured to:
and for each column of feature vectors in the target parameter matrix, determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to the column of feature vectors based on the column of feature vectors and a preset orthogonal variable.
Further, when the competitive hotel determination module is configured to determine a competitive hotel from the multiple candidate hotels based on the target parameter matrix, and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix, the competitive hotel determination module is configured to:
for each column of feature vectors in the target parameter matrix, calculating to obtain a combined weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors based on a first relative weight and a second relative weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors;
for each candidate hotel, calculating to obtain an evaluation score of the candidate hotel based on a row feature vector corresponding to the candidate hotel in the target parameter matrix and a combined weight of a flow dimension or an attribute dimension corresponding to each feature element in the row feature vector;
and determining the competing hotels of the target hotel to be selected from the candidate hotels based on the calculated evaluation scores of the candidate hotels.
Further, the recommendation device further comprises a hierarchy display module, and the hierarchy display module is configured to:
and determining a display hierarchy of each bidding hotel based on the evaluation score of each bidding hotel, and displaying each bidding hotel to the user according to the display hierarchy.
Further, the hierarchy display module is used for determining the display hierarchy of each competitive hotel by the following steps:
determining an evaluation difference value between every two bidding hotels based on the evaluation score of each bidding hotel;
determining a maximum evaluation difference value from the determined plurality of evaluation difference values and a maximum secondary evaluation difference value from the plurality of evaluation difference values, excluding the maximum evaluation difference value;
determining a score range for each display level based on the maximum evaluation difference and the secondary evaluation difference;
and determining the display hierarchy of each competitive hotel based on the evaluation score of each competitive hotel.
An embodiment of the present application further provides an electronic device, including: the system comprises a processor, a memory and a bus, wherein the memory stores machine readable instructions executable by the processor, the processor and the memory are communicated through the bus when the electronic device runs, and the machine readable instructions are executed by the processor to execute the steps of the recommendation method for the hotel competition.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for recommending a hotel by a contest as described above are performed.
According to the hotel competition recommendation method, the hotel competition recommendation device, the electronic equipment and the readable storage medium, historical browsed information of a target hotel to be selected browsed by a user is acquired; determining a plurality of candidate hotels having flow direction relations with the target hotel to be selected based on the historical browsed information; determining a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel; calculating to obtain a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors; calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the first relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors; determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable; and determining a competing hotel from the plurality of candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix. Therefore, the relevant competitive hotels can be accurately recommended to the user according to the associated characteristics of the target hotel to be selected and each candidate hotel in different flow dimensions, the accuracy of the recommendation result is improved, and the browsing time of the user in the network can be reduced.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart of a recommendation method for a bidding hotel provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a recommendation device for a competing hotel provided in an embodiment of the present application;
fig. 3 is a second schematic structural diagram of a recommendation device for a competing hotel provided in the embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
According to research, at present, an expert judgment method is adopted, namely, an expert evaluates the competitive relationship among hotels from a single angle through experience knowledge or a scoring mechanism according to basic attribute data of the geographic positions, star levels, the number of rooms and the like of the hotels, the evaluation result obtained by the evaluation method is subjective, and when the number of the hotels is large, a large amount of time is consumed for checking the information of each hotel, and obviously, a large amount of unnecessary time of a manager is consumed.
Based on the above, the embodiment of the application provides a hotel competition recommendation method, which can accurately determine recommended hotel competition from a plurality of candidate hotels.
Referring to fig. 1, fig. 1 is a flowchart of a recommendation method for a bidding hotel according to an embodiment of the present application. As shown in fig. 1, a method for recommending a hotel by competition provided by the embodiment of the application includes:
s101, obtaining historical browsed information of the target hotel to be selected browsed by the user.
S102, determining a plurality of candidate hotels having flow direction relations with the target hotel to be selected based on the historical browsed information.
S103, determining a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel under different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels under different attribute dimensions based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel.
And S104, calculating a target parameter matrix for determining the competing hotel corresponding to the target hotel to be selected based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors.
S105, calculating a column vector mean value of each column of feature vectors in the target parameter matrix, and determining a first relative weight of a flow dimension or an attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors.
S106, determining a second relative weight of the flow dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable.
S107, determining competing hotels from the candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix.
Here, the user may refer to a hotel operator, and when the hotel operator wants to determine a competing hotel of the hotel in which the user works from a plurality of hotels, the hotel operator generally needs to traverse and browse all the hotels in the network, so as to select other hotels with competitive power.
The user can also refer to a passenger who reserves a hotel, and when the passenger wants to reserve the hotel in the journey process, the passenger usually needs to browse a large number of pages to determine the hotel which wants to reserve.
In step S101, historical browsed information of the target hotel to be selected browsed by the user is acquired.
In this step, historical browsed information of the target hotel to be selected currently browsed by the user is obtained, where the historical browsed information includes browsing information of other users who have browsed the target hotel to be selected, and the browsing information of the other users includes browsing or booked other hotels by the other users before browsing the target hotel to be selected, browsing or booked other hotels after browsing the target hotel to be selected, and the like.
The flow direction relation comprises a client flow-in relation and a client flow-out relation, wherein the client flow-out relation refers to that after a user browses a target hotel to be selected, a candidate hotel is reserved, and a client flow-out relation exists between the target hotel to be selected and the candidate hotel; the customer inflow relationship means that after the candidate hotel is browsed and the target hotel to be selected is reserved, the customer inflow relationship exists between the target hotel to be selected and the candidate hotel.
In one embodiment, step S102 includes: based on the historical browsed information, determining hotels having customer inflow relations and/or customer outflow relations with the target hotels to be selected as hotels to be screened; determining the number of the clients flowing out of the target hotels to be selected to each hotel to be screened and the number of the clients flowing in from each hotel to be screened to the target hotels to be selected; and determining the hotels to be screened with the outflow quantity larger than a preset outflow threshold value and/or the inflow quantity larger than a preset inflow threshold value as candidate hotels.
In the above step, according to the information browsed by the history of the target hotel to be selected, when it is determined that other hotels are reserved by other users after browsing the target hotel to be selected, the other hotels may be determined as the hotels to be screened, which have a client outflow relationship with the target hotel to be selected; correspondingly, when it is determined that the other user reserves the to-be-selected target hotel after browsing the other hotels, the other hotel may be determined as the to-be-selected hotel having the customer inflow relationship with the to-be-selected target hotel, so as to determine a plurality of to-be-selected hotels having the customer inflow relationship and/or the customer outflow relationship with the to-be-selected target hotel.
Specifically, firstly, for each hotel to be screened, for which a client outflow relationship exists between the hotel and the target hotel to be selected, determining the outflow number of clients flowing out from the target hotel to be selected to the hotel to be screened, that is, the number of clients reserving the hotel to be screened after browsing the target hotel to be selected, and when the outflow number is greater than a preset outflow threshold value, determining the hotel to be screened as a candidate hotel.
Secondly, for each hotel to be screened, which has a client inflow relationship with the target hotel to be selected, determining the inflow number of clients flowing into the hotel from the hotel to be screened, namely the number of clients reserving the target hotel to be selected after browsing the hotel to be screened, and determining the hotel to be screened as a candidate hotel when the inflow number is greater than a preset inflow threshold value.
In step S103, based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel, a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions are determined.
The target parameter information may include a target room average price of all rooms of the target hotel to be selected, a target room number of the target hotel to be selected, an online predetermined night number of the target hotel to be selected, a target hotel star rating of the target hotel to be selected, a location coordinate of the target hotel to be selected, and a point score of the target hotel to be selected in a network platform browsed by the user.
The candidate parameter information may include a candidate room average price for all rooms of the candidate hotel, a number of candidate rooms of the candidate hotel, an online predetermined night number of the candidate hotel, a candidate hotel star rating of the candidate hotel, location coordinates of the candidate hotel, a point score of the candidate hotel in a network platform viewed by the user.
Specifically, the flow direction parameter vector determined according to the target parameter information and the candidate parameter information includes: at least one of an outflow night vector, an inflow night vector, an outflow room mean price vector, and an inflow room mean price vector; the attribute parameter vector comprises at least one of a predetermined night vector, a predetermined room mean price vector, a comment scoring vector, a hotel star level vector, a hotel distance vector and a room quantity vector.
Vector of outflow nightThe vector is formed by night amounts flowing out of the target hotel to be selected to each candidate hotel, namely, the vector is formed by night amounts which are issued in each candidate hotel after the user browses the target hotel to be selected;
the hotel night amount is also called as the number of night, is a calculation unit of room renting rate of the hotel in a certain time period, and the calculation formula of the hotel night amount is the number of the night amount which is the number of rooms to stay and the number of days to stay.
Inflow night vectorThe vector is formed by night amounts flowing into the target hotel to be selected from each candidate hotel, namely, the vector is formed by night amounts which are issued in the target hotel to be selected by a user after the user browses each candidate hotel;
average price vector of outflowing houseThe average price of the orders flowing out of the target hotel to be selected into each candidate hotel is the vector formed by the average price of the orders flowing out of the target hotel to be selected into each candidate hotel, namely, the average price of the orders placed in each candidate hotel after the user browses the target hotel to be selectedA vector of prices;
mean value vector of inflow roomThe vector is a vector formed by average prices of orders flowing into the target hotel to be selected from each candidate hotel, namely, a vector formed by average prices of orders placed in the target hotel to be selected after the user browses each candidate hotel;
predetermined night vectorIs a vector consisting of the online predetermined night amount of each candidate hotel;
mean price vector of booking roomIs a vector consisting of the average room prices of all the candidate hotels;
commenting scoring vectorThe system is a vector consisting of the point scores of all candidate hotels in the network platform browsed by the user;
hotel star-level vectorIs a vector consisting of the star levels of each candidate hotel;
hotel distance vectorIs a vector consisting of the distances between each candidate hotel and the target hotel to be selected;
number of rooms vectorIs a vector consisting of the total number of rooms in each candidate hotel.
In step S104, a target parameter matrix for determining the competing hotel corresponding to the target hotel to be selected is calculated and obtained based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors.
In one embodiment, step S104 further comprises: and determining the target hotel star level, the target room number, the target room average price, the outflow room average price and the inflow room average price of the target hotel to be selected based on the target parameter information of the target hotel to be selected.
The step of flowing out the average price of the rooms refers to that after a client browses the rooms of the target hotel to be selected, the average price of the rooms of the same type is reserved in the candidate hotel; the average price of the rooms flowing into the hotel refers to the average price of the rooms of the same type reserved in the target hotel to be selected after the client browses the rooms of the candidate hotel.
Respectively calculating the difference values between the outflow room average price vector and the outflow room average price, the inflow room average price vector and the inflow room average price, the hotel star level vector and the target hotel star level, the reservation room average price vector and the target room average price and the room quantity vector and the target room quantity to obtain the calculated outflow room average price vectorMean value vector of inflow roomHotel star-level vectorMean price vector of booking roomAnd a room number vector
Respectively to the outflow midnight vectorThe inflow midnight vectorThe predetermined midnight vectorThe comment scoring vectorThe hotel distance vectorAnd the calculated outflow room mean value vectorMean value vector of inflow roomHotel star-level vectorMean price vector of booking roomAnd a room number vectorAnd performing characteristic normalization processing to obtain normalized outflow night vector, inflow night vector, reservation night vector, comment scoring vector, hotel distance vector, outflow room average price vector, inflow room average price vector, hotel star-level vector, reservation room average price vector and room quantity vector.
Here, the purpose of normalizing the vector is to normalize the normalized outflow midnight vectorInflow night vectorCommenting scoring vectorAnd a room number vectorInversely proportional to the original value and the other vectors after normalization are proportional to the original value.
And splicing to obtain a target parameter matrix of the target hotel to be selected based on the normalized outflow night vector, inflow night vector, reservation night vector, comment scoring vector, hotel distance vector, outflow room average price vector, inflow room average price vector, hotel star-level vector and reservation room average price vector.
Here, the column eigenvectors in the spliced target parameter matrix are eigenvalues corresponding to each candidate hotel in a certain flow direction dimension or attribute dimension, and the row eigenvectors are eigenvalues corresponding to a certain candidate hotel in all flow direction dimensions or attribute dimensions.
In one embodiment, step S105 includes: calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and for each column of feature vectors, comparing the column vector mean value of the column of feature vectors with the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the comparison result between the column of feature vectors and each column of feature vectors; and calculating to obtain a first relative weight of the flow direction dimension or the attribute dimension corresponding to the characteristic vector of the column based on each determined comparison result.
After a target parameter matrix of the target hotel to be selected is obtained, calculating the column vector mean value avg _ f of each column of characteristic vectors in the target parameter matrixii∈[1,l]L is the number of columns of the target parameter matrix, the mean value of the column vectors of each two columns of eigenvectors is respectively compared, the comparison result between each column of eigenvectors and each column of eigenvectors in the target parameter matrix is determined, wherein each column of eigenvectors in the target parameter matrix comprises the column of eigenvectors, and the comparison result is obtained by comparing the column of eigenvectors and the eigenvectorsWhen the column characteristic vector is compared with the column characteristic vector, the mean value of the column vectors between the column characteristic vector and the column characteristic vector is considered to be equal, and thus a comparison result vector of l x l can be determinedWherein, the elements on the diagonal line in the comparison result vector are the comparison result of each row of the characteristic vector and the element; specifically, when the column vector mean of the column eigenvectors is larger than the column vector mean of the column eigenvectors in the target parameter matrix, the determined comparison result is 1; conversely, when the column vector mean of the column feature vectors is smaller than the vector mean of each target parameter vector in the target parameter matrix, the determined comparison result is 0; when the column vector mean of the column feature vectors is equal to the vector mean of each target parameter vector in the target parameter matrix, the determined comparison result is 0.5.
Therefore, a comparison result matrix obtained by comparing the vector meansComprises the following steps:
wherein the content of the first and second substances,avg _ f being the element in the ith row and jth column of the comparison result matrixiIs the column vector mean of the ith column feature vector, avg _ fjThe column vector mean value of the jth column of the feature vector is compared with the column vector mean value of the ith column of the feature vector, and l is the number of columns of the target parameter matrix.
Furthermore, a first relative weight of the flow dimension or the attribute dimension corresponding to each column of feature vectors is calculated by the following formula:
wherein q isiA first relative weight of the flow direction dimension or attribute dimension corresponding to the ith column of feature vectors,is the element in ith row and jth column of the comparison result matrix.
In one embodiment, step S106 includes: and for each column of feature vectors in the target parameter matrix, determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to the column of feature vectors based on the column of feature vectors and a preset orthogonal variable.
Obtaining a preset orthogonal variable ZkEstablishing each target parameter vector and orthogonal variable ZkThe association relationship between:
fi=αi1*Z1+αi2*Z2+…+αik*Zk;
wherein f isiFor the ith column eigenvector in the target parameter matrix, passing through an orthogonal variable ZkFitting the ith column of feature vectors, αi1Is fiWith respect to the orthogonal variable Z1Fitting coefficient of (a)i2Is fiWith respect to the orthogonal variable Z2Fitting coefficient of (a)ikIs fiWith respect to the orthogonal variable ZkThe fitting coefficient of (1).
Further, the characteristic vector f of the ith column is determinediAfter the fitting coefficient of each orthogonal variable Z is obtained, based on each fitting coefficient, a second relative weight of the flow dimension or the attribute dimension corresponding to the feature vector of the column is calculated by the following formula:
wherein epsiloniA second relative weight, alpha, for the flow or attribute dimension corresponding to the ith column of feature vectorsinRelating to orthogonal variable Z for ith column of eigenvectornFitting of (2)The coefficient, k, is the number of orthogonal variables.
Therefore, the method and the device avoid the weight analysis from being biased by combining the weights, ensure the neutrality of subjective and objective analysis and improve the scientific reliability of the evaluation result.
In one embodiment, step S107 includes: for each column of feature vectors in the target parameter matrix, calculating to obtain a combined weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors based on a first relative weight and a second relative weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors; for each candidate hotel, calculating to obtain an evaluation score of the candidate hotel based on a row feature vector corresponding to the candidate hotel in the target parameter matrix and a combined weight of a flow dimension or an attribute dimension corresponding to each feature element in the row feature vector; and determining the competing hotels of the target hotel to be selected from the candidate hotels based on the calculated evaluation scores of the candidate hotels.
In this step, when each target parameter vector f is determinediFirst relative weight q ofiAnd a second relative weight εiThen, the target parameter vector f is calculated by the following formulaiThe combining weight of (c):
wherein, ω isiIs the ith column feature vector fiCorresponding combined weight of flow dimension or attribute dimension, qiIs the ith column feature vector fiFirst relative weight, ε, of corresponding flow dimension or attribute dimensioniIs the ith column feature vector fiA second relative weight of the corresponding flow direction dimension or attribute dimension.
As an example, the features represented by the flow direction dimension or the attribute dimension corresponding to the column feature vector may be sorted according to the combined weight, as shown in table 1, table 1 is a feature importance indication table:
TABLE 1 characteristic importance schematic Table
Further, the evaluation score of each candidate hotel is calculated by the following formula:
Sn=gn*Wi;
wherein S isnAn evaluation score, g, for the nth candidate hotelnIs a target parameter matrix fiLine feature vector, W, corresponding to the nth candidate hoteliIs gnThe combination weight omega corresponding to each element in theiA collection of (a).
Finally, determining competing hotels of the target hotel to be selected from the candidate hotels based on the calculated evaluation value of each candidate hotel; specifically, the candidate hotel with the evaluation score larger than the preset evaluation threshold value can be determined as a competing hotel for the target hotel to be selected; or arranging a plurality of candidate hotels in a descending order according to the evaluation scores of the candidate hotels, and determining the candidate hotels with the preset digits as the competitive hotels to be selected from the target hotels.
In one embodiment, after determining a competing hotel from the plurality of candidate hotels based on the hotel score vector, the recommendation method further comprises: and determining a display hierarchy of each bidding hotel based on the evaluation score of each bidding hotel, and displaying each bidding hotel to the user according to the display hierarchy.
When a display instruction issued by a user is received, determining the display level of each competitive hotel according to the evaluation score of each competitive hotel, and further displaying each competitive hotel to the user one by one according to the display level. Here, the evaluation score of the competitive hotel refers to an evaluation score of a candidate hotel corresponding to the competitive hotel, where the display hierarchy may be preset, specifically, a score range corresponding to each hierarchy may be set, and when the evaluation score of the competitive hotel falls within the score range corresponding to the hierarchy, the hierarchy is determined as the display hierarchy of the competitive hotel.
In one embodiment, the display hierarchy for each competing hotel is determined by: determining an evaluation difference value between every two bidding hotels based on the evaluation score of each bidding hotel; determining a maximum evaluation difference value from the determined plurality of evaluation difference values and a maximum secondary evaluation difference value from the plurality of evaluation difference values, excluding the maximum evaluation difference value; determining a score range for each display level based on the maximum evaluation difference and the secondary evaluation difference; and determining the display hierarchy of each competitive hotel based on the evaluation score of each competitive hotel.
Here, in determining the display hierarchy of each competing hotel, first, an evaluation difference between each two competing hotels is determined, respectively; secondly, determining a maximum evaluation difference value from the plurality of determined evaluation difference values, and determining a maximum secondary evaluation difference value except the maximum evaluation difference value from the plurality of evaluation difference values; then, determining a score range covered by each display level according to the maximum evaluation difference value and the secondary evaluation difference value; and finally, when the evaluation score of one competitive hotel is within the score range of the display hierarchy, the competitive hotel is displayed in the display hierarchy.
As an example, assume that C1,C2,...,CnFor n competing hotels ranked from high to low by score, there is a maximum evaluation difference absolute value of CSp(as the difference in hotel score at location p and hotel score at location p-1), and the absolute value of the secondary assessment difference is CSq(as the difference in hotel score for location qth and location q-1), where p, q ∈ [1, n ∈ ]]And grouping the hotels according to the sequence number, then:
the first layer of competing hotels is C1,C2,…Cmin(p,q)-1
Second floor competing for hotel is Cmin(p,q),…Cmax(p,q)-1
The third layer of competing hotels is Cmax(p,q),…Cn
It should be noted that, if only one competitive hotel, only 1 floor is displayed; if only two competing hotels are available, the first floor shows one hotel and the second floor shows one hotel.
According to the hotel competition recommendation method provided by the embodiment of the application, historical browsed information of a target hotel to be selected browsed by a user is acquired; determining a plurality of candidate hotels having flow direction relations with the target hotel to be selected based on the historical browsed information; determining a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel; calculating to obtain a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors; calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the first relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors; determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable; and determining a competing hotel from the plurality of candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix. Therefore, the relevant competitive hotels can be accurately recommended to the user according to the associated characteristics of the target hotel to be selected and each candidate hotel in different flow dimensions, the accuracy of the recommendation result is improved, and the browsing time of the user in the network can be reduced.
Referring to fig. 2 and fig. 3, fig. 2 is a schematic structural diagram of a recommendation device for competing for hotels according to an embodiment of the present application, and fig. 3 is a second schematic structural diagram of the recommendation device for competing for hotels according to the embodiment of the present application. As shown in fig. 2, the recommendation apparatus 200 includes:
the information obtaining module 210 is configured to obtain historical browsed information of a target hotel to be selected, which is browsed by a user;
a candidate hotel determining module 220, configured to determine, based on the historical browsed information, a plurality of candidate hotels having a flow direction relationship with the target hotel to be selected;
a first vector determining module 230, configured to determine, based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel, a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions;
a second vector determining module 240, configured to calculate, based on the multiple flow direction parameter vectors and the multiple attribute parameter vectors, a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected;
a first weight determining module 250, configured to calculate a column vector mean of each column of feature vectors in the target parameter matrix, and determine a first relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors based on the column vector mean of each column of feature vectors;
a second weight determining module 260, configured to determine, based on the target parameter matrix and a preset orthogonal variable, a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix;
a competing hotel determining module 270, configured to determine competing hotels from the multiple candidate hotels based on the target parameter matrix, and a first relative weight and a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix.
Further, as shown in fig. 3, the recommendation apparatus 200 further includes a hierarchy display module 280, where the hierarchy display module 280 is configured to:
and determining a display hierarchy of each bidding hotel based on the evaluation score of each bidding hotel, and displaying each bidding hotel to the user according to the display hierarchy.
Further, the flow direction parameter vector comprises at least one of an outflow night vector, an inflow night vector, an outflow room mean price vector and an inflow room mean price vector; the attribute parameter vector comprises at least one of a predetermined night vector, a predetermined room mean price vector, a comment scoring vector, a hotel star level vector, a hotel distance vector and a room quantity vector.
Further, when the second vector determining module 240 is configured to calculate, based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors, a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected, the second vector determining module 240 is configured to:
determining a target hotel star level, a target room number, a target room average price, an outflow room average price and an inflow room average price of the target hotel to be selected based on the target parameter information of the target hotel to be selected;
respectively calculating the difference values between the outgoing room average price vector and the outgoing room average price, the incoming room average price vector and the incoming room average price, the hotel star level vector and the target hotel star level, the reserved room average price vector and the target room average price and the room quantity vector and the target room quantity to obtain the calculated outgoing room average price vector, incoming room average price vector, hotel star level vector, reserved room average price vector and room quantity vector;
respectively carrying out feature normalization processing on the outflow night vector, the inflow night vector, the predetermined night vector, the comment scoring vector, the hotel distance vector, the calculated outflow room average price vector, inflow room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector to obtain normalized outflow night vector, inflow night vector, reserved room average price vector, hotel star-level vector, reserved room average price vector and room quantity vector;
and splicing to obtain a target parameter matrix of the target hotel to be selected based on the normalized outflow night vector, inflow night vector, reservation night vector, comment scoring vector, hotel distance vector, outflow room average price vector, inflow room average price vector, hotel star-level vector and reservation room average price vector.
Further, when the candidate hotel determination module 220 is configured to determine, based on the historical viewed information, a plurality of candidate hotels having a flow relationship with the target hotel to be selected, the candidate hotel determination module 220 is configured to:
based on the historical browsed information, determining hotels having customer inflow relations and/or customer outflow relations with the target hotels to be selected as hotels to be screened;
determining the number of the clients flowing out of the target hotels to be selected to each hotel to be screened and the number of the clients flowing in from each hotel to be screened to the target hotels to be selected;
and determining the hotels to be screened with the outflow quantity larger than a preset outflow threshold value and/or the inflow quantity larger than a preset inflow threshold value as candidate hotels.
Further, when the first weight determining module 250 is configured to calculate a column vector mean of each column of feature vectors in the target parameter matrix, and determine a first relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors based on the column vector mean of the each column of feature vectors, the first weight determining module 250 is configured to:
calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and for each column of feature vectors, comparing the column vector mean value of the column of feature vectors with the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the comparison result between the column of feature vectors and each column of feature vectors;
and calculating to obtain a first relative weight of the flow direction dimension or the attribute dimension corresponding to the characteristic vector of the column based on each determined comparison result.
Further, when the second weight determining module 260 is configured to determine a second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of the feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable, the second weight determining module 260 is configured to:
and for each column of feature vectors in the target parameter matrix, determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to the column of feature vectors based on the column of feature vectors and a preset orthogonal variable.
Further, when the competitive hotel determining module 270 is configured to determine a competitive hotel from the multiple candidate hotels based on the target parameter matrix, and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix, the competitive hotel determining module 270 is configured to:
for each column of feature vectors in the target parameter matrix, calculating to obtain a combined weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors based on a first relative weight and a second relative weight of the flow direction dimension or the attribute dimension corresponding to the column of feature vectors;
for each candidate hotel, calculating to obtain an evaluation score of the candidate hotel based on a row feature vector corresponding to the candidate hotel in the target parameter matrix and a combined weight of a flow dimension or an attribute dimension corresponding to each feature element in the row feature vector;
and determining the competing hotels of the target hotel to be selected from the candidate hotels based on the calculated evaluation scores of the candidate hotels.
Further, the level display module 280 is configured to determine the display level of each bidding hotel by:
determining an evaluation difference value between every two bidding hotels based on the evaluation score of each bidding hotel;
determining a maximum evaluation difference value from the determined plurality of evaluation difference values and a maximum secondary evaluation difference value from the plurality of evaluation difference values, excluding the maximum evaluation difference value;
determining a score range for each display level based on the maximum evaluation difference and the secondary evaluation difference;
and determining the display hierarchy of each competitive hotel based on the evaluation score of each competitive hotel.
The hotel competition recommendation device provided by the embodiment of the application acquires historical browsed information of a target hotel to be selected browsed by a user; determining a plurality of candidate hotels having flow direction relations with the target hotel to be selected based on the historical browsed information; determining a plurality of flow direction parameter vectors between the target hotel to be selected and each candidate hotel in different flow direction dimensions and a plurality of attribute parameter vectors of the candidate hotels in different attribute dimensions based on the target parameter information of the target hotel to be selected and the candidate parameter information of each candidate hotel; calculating to obtain a target parameter matrix for determining a competing hotel corresponding to the target hotel to be selected based on the plurality of flow direction parameter vectors and the plurality of attribute parameter vectors; calculating the column vector mean value of each column of feature vectors in the target parameter matrix, and determining the first relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors based on the column vector mean value of each column of feature vectors; determining a second relative weight of a flow direction dimension or an attribute dimension corresponding to each column of feature vectors in the target parameter matrix based on the target parameter matrix and a preset orthogonal variable; and determining a competing hotel from the plurality of candidate hotels based on the target parameter matrix and the first relative weight and the second relative weight of the flow direction dimension or the attribute dimension corresponding to each column of feature vectors in the target parameter matrix. Therefore, the relevant competitive hotels can be accurately recommended to the user according to the associated characteristics of the target hotel to be selected and each candidate hotel in different flow dimensions, the accuracy of the recommendation result is improved, and the browsing time of the user in the network can be reduced.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 4, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
The memory 420 stores machine-readable instructions executable by the processor 410, when the electronic device 400 runs, the processor 410 communicates with the memory 420 through the bus 430, and when the machine-readable instructions are executed by the processor 410, the steps of the method for recommending a hotel by competition pair in the method embodiment shown in fig. 1 may be executed.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for recommending a hotel by competition pair in the method embodiment shown in fig. 1 may be executed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.