Disclosure of Invention
The embodiment of the invention provides a method and a device for determining recommended merchants, which are used for solving the technical problem that the recommended merchants determined in the prior art cannot effectively meet the requirements of users.
The embodiment of the invention provides a method for determining recommended merchants, which comprises the following steps:
receiving a login request message sent by a user side; the login request message comprises the position information of the user side and the identification information of the user corresponding to the user side;
determining a target area to which the user side belongs and each commercial tenant corresponding to the target area according to the position information of the user side;
determining the credit rating value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user side; historical order information of the user corresponding to the user side is obtained according to the identification information of the user;
and sequencing the merchants according to the sequence of the grading values from large to small, and determining N merchants with the top ranking as recommended merchants to send to the user side.
Preferably, the determining the score value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user side includes:
acquiring historical order information of each merchant in a first set time range; the historical order information comprises grading information, and the grading information of a commercial tenant refers to the original grading value of one or more users to the commercial tenant;
determining a first credit value of each merchant according to the original credit values of one or more users to each merchant;
acquiring historical order information of a user corresponding to the user side within a second set time range and historical order information of each merchant within the second set time range; the historical order information comprises the consumption amount of the historical order;
determining a second credit rating value of each merchant according to the consumption amount of each historical order of the user in the second set time range and the consumption amount of each historical order of each merchant in the second set time range;
and determining the credit value of each merchant according to the first credit value and the second credit value of each merchant.
Preferably, the determining a first value of credit of each merchant according to the raw value of credit of each merchant by one or more users comprises:
determining a first credit value of the ith merchant according to the following formula, i being a positive integer:
wherein, PiA first value of credit for the ith merchant; p (i) is the initial value of credit for the ith merchant; p (min) is the minimum value of the initial score values of the merchants; p (max) is the maximum value of the initial credit values of the respective merchants;
determining an initial credit value for the ith merchant according to the following formula:
wherein U (j) is the normalized score of the j user to the i merchant; n is the number of users.
Determining a normalized score of the jth user for the ith merchant according to the following formula:
wherein u (j) is the original credit value of the jth user to the ith merchant; u (min) is the minimum value in the original scoring values of the jth user to the various merchants; u (max) is the maximum value of the original scoring values of the jth user for the various merchants.
Preferably, the determining the second credit value of each merchant according to the sum of the consumption of each historical order of the user in the second set time range and the sum of the consumption of each historical order of each merchant in the second set time range includes:
determining a second credit value for the ith merchant according to the formula:
wherein k (ic) is a second value of credit for the ith merchant; uk (c) is the average value of the consumption amount of the historical orders of the user corresponding to the user terminal in the second set time range; rk (i) is the average value of the consumption amount of the historical orders of the ith merchant in the second set time range.
Preferably, the determining the score value of each merchant according to the first score value and the second score value of each merchant includes:
determining the credit value of the ith merchant according to the following formula, wherein i is a positive integer:
UP(ic)=Pi*X-k(ic)*Y
wherein up (ic) represents the value of credit of the ith merchant; piA first value of credit for the ith merchant; k (ic) is a second value of credit for the ith merchant; x, Y is the weight value, and X + Y is 1.
The embodiment of the invention provides a device for determining recommended merchants, which comprises:
the receiving module is used for receiving a login request message sent by a user side; the login request message comprises the position information of the user side and the identification information of the user corresponding to the user side;
the processing module is used for determining a target area to which the user side belongs and each merchant corresponding to the target area according to the position information of the user side; determining the credit rating value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user side; historical order information of the user corresponding to the user side is obtained according to the identification information of the user;
and the sending module is used for sequencing the merchants according to the sequence of the grading values from large to small, and determining N merchants with the top ranking as recommended merchants to send to the user side.
Preferably, the processing module is specifically configured to:
acquiring historical order information of each merchant in a first set time range; the historical order information comprises grading information, and the grading information of a commercial tenant refers to the original grading value of one or more users to the commercial tenant;
determining a first credit value of each merchant according to the original credit values of one or more users to each merchant;
acquiring historical order information of a user corresponding to the user side within a second set time range and historical order information of each merchant within the second set time range; the historical order information comprises the consumption amount of the historical order;
determining a second credit rating value of each merchant according to the consumption amount of each historical order of the user in the second set time range and the consumption amount of each historical order of each merchant in the second set time range;
and determining the credit value of each merchant according to the first credit value and the second credit value of each merchant.
Preferably, the processing module is specifically configured to:
determining a first credit value of the ith merchant according to the following formula, i being a positive integer:
wherein, PiA first value of credit for the ith merchant; p (i) is the initial value of credit for the ith merchant; p (min) is the minimum value of the initial score values of the merchants(ii) a p (max) is the maximum value of the initial credit values of the respective merchants;
determining an initial credit value for the ith merchant according to the following formula:
wherein U (j) is the normalized score of the j user to the i merchant; n is the number of users.
Determining a normalized score of the jth user for the ith merchant according to the following formula:
wherein u (j) is the original credit value of the jth user to the ith merchant; u (min) is the minimum value in the original scoring values of the jth user to the various merchants; u (max) is the maximum value of the original scoring values of the jth user for the various merchants.
Preferably, the processing module is specifically configured to:
determining a second credit value for the ith merchant according to the formula:
wherein k (ic) is a second value of credit for the ith merchant; uk (c) is the average value of the consumption amount of the historical orders of the user corresponding to the user terminal in the second set time range; rk (i) is the average value of the consumption amount of the historical orders of the ith merchant in the second set time range.
Preferably, the processing module is specifically configured to:
determining the credit value of the ith merchant according to the following formula, wherein i is a positive integer:
UP(ic)=Pi*X-k(ic)*Y
wherein up (ic) represents the value of credit of the ith merchant;Pia first value of credit for the ith merchant; k (ic) is a second value of credit for the ith merchant; x, Y is the weight value, and X + Y is 1.
In the above embodiment of the present invention, a login request message sent by a user side is received; the login request message comprises the position information of the user side and the identification information of the user corresponding to the user side; determining a target area to which the user terminal belongs and each merchant corresponding to the target area according to the position information of the user terminal, and determining the score value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user terminal; and sequencing the merchants according to the grade values of the merchants from high to low, and determining N merchants with the top rank as recommended merchants. According to the embodiment of the invention, the target area and each merchant corresponding to the target area are determined according to the position information of the user terminal, so that the determined merchants are all effective merchants capable of providing services for the user, further, the credit rating value of the merchant is determined according to the historical order information of the merchant and the order information of the user, the condition of the merchant and the subjective condition of the user are fully considered, the determined recommended merchant is more in line with the requirements of the user, and the consumption of the user can be facilitated.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart corresponding to a method for determining a recommended merchant according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101, receiving a login request message sent by a user side; the login request message comprises the position information of the user side and the identification information of the user corresponding to the user side;
step 102, determining a target area to which the user terminal belongs and each merchant corresponding to the target area according to the position information of the user terminal;
103, determining the credit rating value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user side; historical order information of the user corresponding to the user side is obtained according to the identification information of the user;
and 104, sequencing the merchants according to the descending order of the grading values, and determining N merchants with the top ranking as recommended merchants to send to the user side.
According to the embodiment of the invention, the target area and each merchant corresponding to the target area are determined according to the position information of the user terminal, so that all the merchants are effective merchants capable of providing services for the user, furthermore, the credit rating value of the merchant is determined according to the historical order information of the merchant and the order information of the user, the conditions of the merchant and the subjective conditions of the user are fully considered, the determined recommended merchant is more in line with the requirements of the user, and the consumption of the user can be facilitated.
The user side in the embodiment of the invention can be a mobile phone or a computer and other equipment, the user corresponding to the user side refers to a user who logs in by using the user side, and the identification information of the user can be account information or other information for uniquely identifying the user. In the embodiment of the invention, all the merchants corresponding to the determined target area are the same type of merchants, such as restaurants, or other types of merchants.
In step 101, the location information of the user terminal included in the login request message may be obtained according to various manners, for example, by a GPS positioning method, etc.
In the embodiment of the invention, the areas can be divided according to modes of investigation, information collection and the like. The business corresponding to the area refers to a business capable of serving the users in the area. Specifically, if the merchant is a restaurant, the delivery range of the restaurant may be analyzed, if the delivery range of the restaurant covers the area, the restaurant is determined to be the restaurant corresponding to the area, and if the delivery range of the restaurant does not cover the area, the restaurant is not the restaurant corresponding to the area. Specifically, each area and the business corresponding to each area may be specifically defined by those skilled in the art according to actual conditions, or after division of the areas is completed, the business selects the area that can be served by the business according to its own actual conditions, and further determines the business corresponding to each area.
Further, the information of the divided areas, the merchants corresponding to the areas, and the like in the embodiment of the present invention may be stored in a variety of storage formats, such as a database format, which is not limited in the embodiment of the present invention.
Taking the example of storing the above information in the form of a database, the database stores the identification information of the area and the identification information of the merchant corresponding to the area, as shown in table 1.
Table 1: contents of data tables in a database
In table 1, the identification information of the area may be represented by the number of the area or other information capable of uniquely identifying the area; the identification information of the merchant may be the merchant name of the merchant or other information representation that uniquely identifies the merchant. Table 1 is merely an example, and in practical applications, additions and deletions may be performed on the basis of table 1 as needed.
In step 102, a target area to which the user terminal belongs is determined according to the location information of the user terminal and the location information of each area in table 1, and then each merchant corresponding to the target area is obtained.
In step 103, historical order information of each merchant in a first set time range is obtained, where the first set time range may be determined by a person skilled in the art according to specific situations, and may be set to be, for example, approximately 3 months or approximately 1 month, and the like. The historical order information comprises grading information, wherein the grading information of a commercial tenant refers to the original grading value of one or more users to the commercial tenant; and determining a first scoring value of each merchant according to the original scoring value of one or more users to each merchant.
Specifically, a first credit value of the ith merchant is determined according to the following formula, i being a positive integer:
wherein, PiA first value of credit for the ith merchant; p (i) is the initial value of credit for the ith merchant; p (min) is the minimum value of the initial score values of the merchants; p (max) is the maximum value of the initial credit values of the respective merchants;
determining an initial credit value for the ith merchant according to the following formula:
wherein U (j) is the normalized score of the j user to the i merchant; n is the number of users.
Determining a normalized score of the jth user for the ith merchant according to the following formula:
wherein u (j) is the original credit value of the jth user to the ith merchant; u (min) is the minimum value in the original scoring values of the jth user to the various merchants; u (max) is the maximum value of the original scoring values of the jth user for the various merchants.
Acquiring historical order information of a user corresponding to the user side within a second set time range and historical order information of each merchant within the second set time range; the second setting time range may be determined by a person skilled in the art according to specific situations, and may be set to be approximately 3 months, or approximately 1 month, for example. The second setting time range may be the same as the first setting time range or different from the first setting time range, and the second setting time range is preferably the same as or similar to the first setting time range in the embodiment of the present invention, so as to make the result more accurate. The historical order information comprises the identification information of the user, the identification information of the merchants and the consumption amount of the historical order, so the historical order information of the user corresponding to the user side can be obtained according to the identification information of the user, and the historical order information of each merchant can be obtained according to the identification information of each merchant.
Further, according to the consumption amount of each historical order of the user in a second set time range and the consumption amount of each historical order of each merchant in the second set time range, a second credit value of each merchant can be determined; specifically, the second credit value of the ith merchant may be determined according to the following formula:
wherein k (ic) is a second value of credit for the ith merchant; uk (c) is the average value of the consumption amount of the historical orders of the user corresponding to the user terminal in the second set time range; rk (i) is the average value of the consumption amount of the historical orders of the ith merchant in the second set time range.
In step 104, a credit value of each merchant is determined according to the first credit value and the second credit value of each merchant. Specifically, the credit value of the ith merchant may be determined according to the following formula, i being a positive integer:
UP(ic)=Pi*X-k(ic)*Y
wherein up (ic) represents the value of credit of the ith merchant; piA first value of credit for the ith merchant; k (ic) is a second value of credit for the ith merchant; x, Y is the weight value, and X + Y is 1.
In the embodiment of the present invention, the characteristics of the merchant preferred by the user may be analyzed according to the historical order information of the user in the second set time range, for example, when the merchant is a restaurant, the taste of the restaurant preferred by the user may be analyzed according to the historical order information, for example, when most of the orders of the user belong to the order of restaurants with light taste are obtained according to the historical order information analysis of the user, the taste of the restaurant preferred by the user is determined to be the light taste, so that the score of the restaurant with light taste may be appropriately increased on the basis of calculating the score, and the specifically increased criteria may be determined by those skilled in the art according to actual conditions.
After the credit rating values of all the merchants are determined in the above manner, the merchants are sorted in the descending order of the credit rating values, and N merchants with the top rank are determined as recommended merchants. After the recommended merchants are determined, the recommended merchants and the credit values of the recommended merchants can be sent to the user side, so that the user side displays the recommended merchants to the user according to the credit values of the recommended merchants from high to low, and the user can select the recommended merchants.
In the above embodiment of the present invention, a login request message sent by a user side is received; the login request message comprises the position information of the user side and the identification information of the user corresponding to the user side; determining a target area to which the user terminal belongs and each merchant corresponding to the target area according to the position information of the user terminal, and determining the score value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user terminal; and sequencing the merchants according to the grade values of the merchants from high to low, and determining N merchants with the top rank as recommended merchants. According to the embodiment of the invention, the target area and each merchant corresponding to the target area are determined according to the position information of the user terminal, so that the determined merchants are all effective merchants capable of providing services for the user, further, the credit rating value of the merchant is determined according to the historical order information of the merchant and the order information of the user, the condition of the merchant and the subjective condition of the user are fully considered, the determined recommended merchant is more in line with the requirements of the user, and the consumption of the user can be facilitated.
For the above method flow, an embodiment of the present invention further provides a device for determining recommended merchants, and specific contents of the device may be implemented by referring to the above method, which is not described herein again.
Fig. 2 is a schematic structural diagram of an apparatus for determining a recommended merchant according to an embodiment of the present invention, where the apparatus includes:
a receiving module 201, configured to receive a login request message sent by a user end; the login request message comprises the position information of the user side and the identification information of the user corresponding to the user side;
the processing module 202 is configured to determine, according to the location information of the user terminal, a target area to which the user terminal belongs and each merchant corresponding to the target area; determining the credit rating value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user side; historical order information of the user corresponding to the user side is obtained according to the identification information of the user;
the sending module 203 is configured to sort the merchants according to a descending order of the score values, and determine the top N merchants as recommended merchants to send to the user side.
Preferably, the processing module 202 is specifically configured to:
acquiring historical order information of each merchant in a first set time range; the historical order information comprises grading information, and the grading information of a commercial tenant refers to the original grading value of one or more users to the commercial tenant;
determining a first credit value of each merchant according to the original credit values of one or more users to each merchant;
acquiring historical order information of a user corresponding to the user side within a second set time range and historical order information of each merchant within the second set time range; the historical order information comprises the consumption amount of the historical order;
determining a second credit rating value of each merchant according to the consumption amount of each historical order of the user in the second set time range and the consumption amount of each historical order of each merchant in the second set time range;
and determining the credit value of each merchant according to the first credit value and the second credit value of each merchant.
Preferably, the processing module 202 is specifically configured to:
determining a first credit value of the ith merchant according to the following formula, i being a positive integer:
wherein, PiA first value of credit for the ith merchant; p (i) is the initial value of credit for the ith merchant; p (min) is the minimum value of the initial score values of the merchants; p (max) is the maximum value of the initial credit values of the respective merchants;
determining an initial credit value for the ith merchant according to the following formula:
wherein U (j) is the normalized score of the j user to the i merchant; n is the number of users.
Determining a normalized score of the jth user for the ith merchant according to the following formula:
wherein u (j) is the original credit value of the jth user to the ith merchant; u (min) is the minimum value in the original scoring values of the jth user to the various merchants; u (max) is the maximum value of the original scoring values of the jth user for the various merchants.
Preferably, the processing module 202 is specifically configured to:
determining a second credit value for the ith merchant according to the formula:
wherein k (ic) is a second value of credit for the ith merchant; uk (c) is the average value of the consumption amount of the historical orders of the user corresponding to the user terminal in the second set time range; rk (i) is the average value of the consumption amount of the historical orders of the ith merchant in the second set time range.
Preferably, the processing module 202 is specifically configured to:
determining the credit value of the ith merchant according to the following formula, wherein i is a positive integer:
UP(ic)=Pi*X-k(ic)*Y
wherein up (ic) represents the value of credit of the ith merchant; piA first value of credit for the ith merchant; k (ic) is a second value of credit for the ith merchant; x, Y is the weight value, and X + Y is 1.
From the above, it can be seen that: in the above embodiment of the present invention, a login request message sent by a user side is received; the login request message comprises the position information of the user side and the identification information of the user corresponding to the user side; determining a target area to which the user terminal belongs and each merchant corresponding to the target area according to the position information of the user terminal, and determining the score value of each merchant according to the historical order information of each merchant and the historical order information of the user corresponding to the user terminal; and sequencing the merchants according to the grade values of the merchants from high to low, and determining N merchants with the top rank as recommended merchants. According to the embodiment of the invention, the target area and each merchant corresponding to the target area are determined according to the position information of the user terminal, so that the determined merchants are all effective merchants capable of providing services for the user, further, the credit rating value of the merchant is determined according to the historical order information of the merchant and the order information of the user, the condition of the merchant and the subjective condition of the user are fully considered, the determined recommended merchant is more in line with the requirements of the user, and the consumption of the user can be facilitated.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.