A method and apparatus for predicting a user's affiliation

By analyzing the changes in geographical location and attribute characteristics of users' historical business data, a time series of event information is generated. A predictive model is then used to predict users' place of origin, which solves the problem of low accuracy based on Spring Festival location data in existing technologies and improves the accuracy of prediction.

CN113672823BActive Publication Date: 2026-07-24BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SANKUAI ONLINE TECH CO LTD
Filing Date
2021-08-09
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in predicting the origin of unverified users based on location data during the Spring Festival, resulting in inaccurate predictions.

Method used

By acquiring users' historical business data, analyzing the geographical location changes and attribute characteristics of each historical event, generating event information time series, and using predictive models to predict users' place of origin.

Benefits of technology

It improves the accuracy of predicting users' place of origin by combining changes in users' historical location information and attributes, thereby reducing prediction bias caused by location data errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113672823B_ABST
    Figure CN113672823B_ABST
Patent Text Reader

Abstract

The specification discloses a prediction method and device for user's native place, and specifically discloses obtaining historical service data of a user, and determining corresponding historical events of the user in history according to the service data. Then, event information time series of the user in history is generated according to historical event information corresponding to each historical event, wherein for each historical event, the historical event information corresponding to the historical event includes time information corresponding to the historical event and geographical position information corresponding to the historical event. Next, the change characteristics of the geographical position corresponding to each historical event in time and the attribute characteristics of the geographical position corresponding to each historical event are determined according to the event information time series, and the native place of the user is predicted according to the change characteristics and the attribute characteristics. In this way, the accuracy of the predicted native place of the user is effectively improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of Internet technology, and in particular to a method and apparatus for predicting a user's place of origin. Background Technology

[0002] With the rapid development of information technology, the cost for individuals to obtain information is increasing. Therefore, business platforms often predict user preferences based on users' basic personal information and behavioral habits, and then push targeted information based on these preferences to improve user experience.

[0003] In some business scenarios, a user's place of origin often influences their food preferences. For example, in the catering industry, people from Sichuan might prefer spicy hot pot and skewers, while people from Shaanxi might prefer paomo (pita bread soaked in mutton soup) and roujiamo (meat sandwich). Therefore, a user's place of origin is an extremely important reference when predicting their dietary preferences.

[0004] Currently, the business platform primarily determines a user's place of origin from their authentication information. However, for users who have not yet been authenticated, the platform needs to predict their place of origin based on user location data collected during the Spring Festival, assuming that most users will return to their hometowns for the holiday.

[0005] However, with social development, spending the Spring Festival in one's place of work is becoming more and more accepted, leading to a more common situation of spending the Spring Festival in different places. At this time, if business platforms still rely on users' location data during the Spring Festival to predict users' place of origin, there will be a problem of low accuracy. Summary of the Invention

[0006] This specification provides a method and apparatus for predicting a user's place of origin, in order to partially solve the aforementioned problems existing in the prior art.

[0007] The following technical solution is adopted in this specification:

[0008] This manual provides a method for predicting a user's place of origin, including:

[0009] Obtain user's historical business data;

[0010] Based on the business data, determine the historical events corresponding to the user in history;

[0011] Based on the historical event information corresponding to each historical event, a time sequence of the user's historical event information is generated. For each historical event, the historical event information corresponding to the historical event includes the time information corresponding to the historical event and the geographical location information corresponding to the historical event.

[0012] Based on the time series of the event information, the temporal change characteristics of the geographical locations corresponding to each historical event are determined, as well as the attribute characteristics of the geographical locations corresponding to each historical event. Based on the change characteristics and the attribute characteristics, the user's place of origin is predicted.

[0013] Optionally, the geographical location information corresponding to the historical event includes the geographical area involved in the historical event and the descriptive information of the geographical area corresponding to the historical event;

[0014] Based on the time series of the event information, determine the temporal variation characteristics of the geographical locations corresponding to each historical event, as well as the attribute characteristics of the geographical locations corresponding to each historical event themselves, specifically including:

[0015] Based on the time series of the event information and the geographical areas involved in each historical event, determine the temporal variation characteristics of the geographical locations corresponding to each historical event, and

[0016] For each historical event, the attribute characteristics of the geographical location corresponding to that historical event are determined based on the description information of the geographical region corresponding to that historical event.

[0017] Optionally, the historical events include at least one of historical shopping events and historical travel events.

[0018] Optionally, before generating the time series of the user's historical event information based on the historical event information corresponding to each historical event, the method further includes:

[0019] Acquire location data collected for the user at various historical time points, and use it as historical location event information corresponding to the historical location events for the user;

[0020] According to the collection time of each historical location event, each historical location event is inserted into the corresponding historical events of the user in history, so as to generate the time sequence of the user's historical event information based on the chronological order of the historical event information corresponding to each historical event and the historical location event information corresponding to each historical location event.

[0021] Optionally, predicting the user's place of origin based on the change characteristics and the attribute characteristics specifically includes:

[0022] Based on the time sequence of the event information, determine the candidate places of origin for the user;

[0023] Based on the change characteristics and the attribute characteristics, determine the confidence level corresponding to each candidate place of origin;

[0024] The user's place of origin is predicted based on the confidence level corresponding to each candidate place of origin.

[0025] Optionally, based on the time series of the event information, the temporal change characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations corresponding to each historical event are determined, and the user's place of origin is predicted based on the change characteristics and the attribute characteristics, specifically including:

[0026] The event information time series is input into a pre-trained prediction model so that the prediction model can determine the temporal change characteristics of the geographical locations corresponding to each historical event, as well as the attribute characteristics of the geographical locations corresponding to each historical event, based on the event information time series, and predict the user's place of origin based on the change characteristics and the attribute characteristics.

[0027] Optionally, training the prediction model specifically includes:

[0028] Obtain training samples, which contain historical business data of sample users whose actual place of origin has been determined;

[0029] Based on the historical business data of the sample users, determine the historical events corresponding to the sample users in history;

[0030] Based on the historical event information of the sample users in history, a time series of event information of the sample users in history is generated.

[0031] The time series of historical event information of the sample users is input into the prediction model to obtain the predicted place of origin for the sample users.

[0032] The prediction model is trained with the optimization objective of minimizing the deviation between the predicted place of origin and the actual place of origin.

[0033] This specification provides a device for predicting a user's place of origin, comprising:

[0034] The acquisition module is used to acquire users' historical business data;

[0035] The event determination module is used to determine the historical events corresponding to the user in history based on the business data.

[0036] The event sequence generation module is used to generate a time sequence of the user's historical event information based on the historical event information corresponding to each historical event. For each historical event, the historical event information corresponding to the historical event includes the time information corresponding to the historical event and the geographical location information corresponding to the historical event.

[0037] The place of origin prediction module is used to determine the temporal change characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations corresponding to each historical event based on the time series of event information, and to predict the place of origin of the user based on the change characteristics and the attribute characteristics.

[0038] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for predicting the place of origin of users.

[0039] This specification provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned method for predicting the user's place of origin.

[0040] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0041] The method for predicting a user's place of origin provided in this specification involves acquiring the user's historical business data and determining the corresponding historical events based on this data. Then, based on the historical event information corresponding to each historical event, a time series of the user's historical event information is generated. For each historical event, the corresponding historical event information includes the time information and the geographical location information. Next, based on the event information time series, the temporal variation characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations themselves are determined. Finally, based on these variation characteristics and attribute characteristics, the user's place of origin is predicted.

[0042] As can be seen from the above method, when predicting a user's place of origin, this method determines the time sequence of historical events performed by the user, based on the time and location information of those events. Then, based on this time sequence, it determines the temporal changes in the geographical location corresponding to each historical event, as well as the inherent attributes of each geographical location. Since these historical events are all performed by the user, the changes in the location information of these events over time, especially before and after holidays, will significantly reflect the user's location or destination during their free time. Furthermore, by comprehensively considering factors such as whether the user's current or destination location is residential or a rural town or village without tourist attractions, the method effectively improves the accuracy of the predicted place of origin and enhances the user experience. Attached Figure Description

[0043] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0044] Figure 1 This is a flowchart illustrating one method for predicting a user's place of origin as described in this specification.

[0045] Figure 2 This is a flowchart illustrating the training process of the prediction model used in this manual to predict a user's place of origin.

[0046] Figure 3 A schematic diagram of a user's place of origin prediction device provided in this specification;

[0047] Figure 4 The corresponding information provided in this specification Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0049] In daily life, the geographical locations involved in certain transactions are stored. By obtaining these geographical locations based on the time of these transactions and constructing a time series of these locations, the user's location can be clearly reflected as it changes over time. If the attributes of these geographical locations (e.g., residential, commercial, tourist areas) are further determined, it becomes possible to make reasonable predictions based on these changes in geographical location and thus determine the user's place of origin. This effectively avoids the low accuracy of predictions based solely on location data during the Spring Festival, thus improving the accuracy of predicted user origins.

[0050] The user origin prediction scheme provided in this specification will be described in detail below with reference to the embodiments.

[0051] Figure 1 This is a flowchart illustrating one method for predicting a user's place of origin as described in this specification, specifically including the following steps:

[0052] Step S100: Obtain the user's historical business data.

[0053] The user origin prediction method provided in this manual can be implemented by a platform, a server, or a terminal device such as a desktop computer. For ease of description, the following explanation will only use a platform as the implementation subject.

[0054] In practice, the business data acquired by the platform can be business data from all the transactions a user has historically executed, or business data from a specified time period (such as the last three years). The transactions corresponding to this data can be those involving location data, such as online shopping (ordering takeout on a food delivery platform, buying fresh produce on a fresh produce platform, buying daily necessities on a comprehensive online shopping platform), and online ticketing (buying train or plane tickets). Each time these transactions are executed, the location information involved is recorded. For example, each time a user orders takeout, at least the order address and delivery address are recorded. Similarly, each time a user buys a train ticket, the boarding station, alighting station, and destination city are recorded.

[0055] When the platform retrieves historical business data from users, if the business is online shopping, the data retrieved is the business data from the orders generated each time the user makes an online purchase. Similarly, if the business is online ticketing, the data retrieved is the business data from the ticket orders generated each time the user purchases a ticket.

[0056] Step S102: Based on the business data, determine the historical events corresponding to the user in history.

[0057] In practice, for each type of service, the platform identifies every historical transaction a user has performed from the corresponding service data, treating each transaction as a historical event. Then, the platform combines these historical events for each service to obtain the user's historical events. Different historical events are identified for different services; for example, historical events identified in online shopping are historical shopping events, and historical events identified in ticketing are historical travel events.

[0058] For example, in online shopping, each online purchase by a user can be considered a historical event (i.e., each order of takeout on a food delivery platform counts as a historical purchase event, each purchase of fresh produce on a fresh produce platform counts as a historical purchase event, and each purchase of household goods on a comprehensive online shopping platform also counts as a historical purchase event). In ticketing, each purchase and use of a train ticket or plane ticket counts as a historical travel event. Then, all the historical purchase and travel events identified by the platform are combined to form the user's corresponding historical events.

[0059] Step S104: Generate a time sequence of the user's historical event information based on the historical event information corresponding to each historical event. For each historical event, the historical event information corresponding to the historical event includes the time information corresponding to the historical event and the geographical location information corresponding to the historical event.

[0060] In practice, for each historical event, the platform retrieves the corresponding historical event information from the business data of the relevant business. Then, it sorts the historical events according to their chronological order of occurrence, obtaining a sorting result. Finally, based on the sorting result and the corresponding historical event information, it generates a time series of historical event information for the user. For each historical event, the corresponding time information can include the execution time of the event, and the corresponding geographical location information includes the geographical area involved in the event, as well as a description of that geographical area.

[0061] For example, a user's historical events include historical event A, historical event B, and historical event C. Event A occurred earlier than historical event B but later than historical event C. The platform generates the user's historical event time series by acquiring the historical event information corresponding to historical events A, B, and C respectively. Then, based on the historical event information corresponding to each historical event, it generates the user's historical event time series: {historical event information corresponding to historical event C, historical event information corresponding to historical event A, and historical event information corresponding to historical event B}.

[0062] In addition, the historical event information corresponding to the identified historical events in different business operations is not exactly the same and needs to be determined according to actual needs. Examples will be given below.

[0063] For example, in online shopping, the time information corresponding to a historical event can be the time when the business order was generated, the geographical location information corresponding to the historical event can be the user's location when the business order was generated (which could be the user's city, district (county), street (township), etc., i.e., the geographical area involved in the historical event), and the delivery address of the business order (which can be the descriptive information of the geographical area corresponding to the historical event), etc.

[0064] In online ticketing, the time information corresponding to a historical event can be the departure time of the corresponding public transportation used by the user with a ticket (such as a bus ticket, train ticket, or plane ticket). The geographical location information corresponding to the historical event can include the city where the user's destination is located (which can be the geographical area involved in the historical event) and the type of transportation used to get to the destination (which can be the descriptive information of the geographical area corresponding to the historical event).

[0065] The size of the geographical area can be set according to actual needs, and this manual does not impose specific limitations on it.

[0066] In addition, in real-world applications, the number of a user's historical events is relatively limited. In this case, the platform can also obtain the user's location data at preset times to enrich the data used to predict the user's place of origin, thereby assisting the platform in predicting the user's place of origin based on historical events and improving the accuracy of the predicted place of origin.

[0067] Specifically, before generating a time series of historical event information for a user, the platform can also acquire location data collected from the user at various set times in history (such as user location data collected at 3:00 AM every day) as historical location event information corresponding to the user's historical location events. According to the collection time of each historical location event, each historical location event is inserted into the corresponding historical events of the user in history. Finally, based on the chronological order of the historical event information corresponding to each historical event and the historical location event information corresponding to each historical location event, the platform generates a time series of historical event information for the user.

[0068] Specifically, for each historical location event, the time of data collection corresponding to that historical location event can be used as the time information for that historical location event. Simultaneously, the data related to the user's geographical location within that location data can be used as the location information for that historical location event. In practice, the location information for that historical location event may include the latitude and longitude of the user's geographical location, the city of the user's geographical location, and the name of the Point of Interest (POI) associated with the user's geographical location (e.g., XXX Shopping Mall, XXX Building, XXX Business Center, XXX Residential Area, etc.).

[0069] Here, the geographical region corresponding to the historical location event can also be set according to business needs. In practice, the setting of the geographical region corresponding to the historical location event can be consistent with the setting of the geographical region corresponding to the historical event.

[0070] Step S106: Based on the event information time series, determine the temporal change characteristics of the geographical locations corresponding to each historical event, as well as the attribute characteristics of the geographical locations corresponding to each historical event, and predict the user's place of origin based on the change characteristics and the attribute characteristics.

[0071] In practice, when determining the aforementioned change characteristics and attribute characteristics, the platform, for each historical event, determines the attribute characteristics of the geographical location corresponding to that historical event based on the descriptive information of the geographical region. Simultaneously, based on the time series of event information and the geographical regions involved in each historical event, it determines the temporal change characteristics of the geographical locations corresponding to each historical event. Then, based on the event information time series, it determines candidate places of origin for each user. Next, based on the determined change characteristics and attribute characteristics, it determines the confidence level corresponding to each candidate place of origin. Finally, based on the confidence level corresponding to each candidate place of origin, it predicts the user's place of origin.

[0072] If the event information time series contains historical event information corresponding to historical events and historical location event information corresponding to historical location events, the platform will determine the attribute characteristics of the geographical location corresponding to each event (including historical events and historical location events). At the same time, based on the event information time series and the geographical areas involved in each event (including historical events and historical location events), the platform will determine the temporal change characteristics of the geographical location corresponding to each event.

[0073] The following example illustrates how the platform can predict a user's place of origin based on historical events.

[0074] For example, a user's historical events include historical shopping events. For each historical shopping event, the platform determines the product category to which the user's purchased goods belong; it then determines whether the product category belongs to a pre-defined specific category; if it does, the platform determines the user's geographical location when the business order corresponding to the historical shopping event was generated, as well as the business address of the business order corresponding to the historical shopping event; if the user's geographical location and the business address are inconsistent, the platform increases the confidence that the business address is the user's place of origin and decreases the confidence that the user's geographical location is the user's place of origin.

[0075] This specific category of goods can include large household appliances, decoration materials, and other similar items. Users who work away from home are unlikely to purchase large household appliances or decoration materials from their rented accommodations before they own their own housing in their workplace.

[0076] For example, a user's historical events include historical travel events. For each historical travel event, the platform determines the destination and travel time corresponding to that event. If the travel time falls within a set time period, the platform increases the confidence that the destination is the user's place of origin, while decreasing the confidence that other alternative addresses are the user's place of origin. This set time period includes statutory holidays. This set time period can be statutory holidays, or a period consisting of statutory holidays and the set times before and after statutory holidays. In practical applications, it can be adjusted according to business needs; no specific limitation is made here.

[0077] For example, a user in city A placed one food delivery order every day between April 26th and 30th, with the delivery address being Room 504, Building XXX, XXX Building. The user also purchased and used a plane ticket from city A to city B on April 30th and another plane ticket from city B to city A on May 5th. On May 3rd, the user placed another food delivery order in city B, with the delivery address being Room 301, Building 3, XXX Community, XXX District, XXX City, XXX Province. After May 6th, the user resumed placing one food delivery order per day, and the delivery address remained unchanged. City B is a small to medium-sized city (not a tourist city).

[0078] In this way, when predicting a user's place of origin, the platform identifies city A and city B as candidate places of origin, and sets initial confidence levels for city A and city B. Since May 1st to 5th are public holidays, the user is mostly located in city A during non-holiday periods, and the delivery address for the ordered takeout is a commercial building. During the public holidays, the user travels to city B. Therefore, the platform increases the confidence level of city B as the user's place of origin and decreases the confidence level of city A. Simultaneously, city B is not a tourist city, and the delivery address for the ordered takeout is a residential building. The platform further increases the confidence level of city B as the user's place of origin and decreases the confidence level of city A. Thus, city B has a higher confidence level than city A, and the platform is more inclined to believe that city B is the user's place of origin.

[0079] Of course, the platform can also use pre-trained prediction models to predict a user's place of origin.

[0080] Specifically, the platform inputs the time series of event information into a pre-trained prediction model. This model then determines the temporal variation characteristics of the geographical locations corresponding to each historical event, as well as the attribute characteristics of those locations. Next, based on the event time series, the platform identifies candidate places of origin for the user. Then, based on the identified variation and attribute characteristics, it determines the confidence level for each candidate place of origin. Finally, based on the confidence level of each candidate place of origin, the platform predicts the user's place of origin.

[0081] The prediction model can be trained using a Recurrent Neural Network (RNN) with a loss function of multi-class cross-entropy and an optimizer (adam) for training. Furthermore, to improve accuracy, this specification suggests using two stacked RNN layers. The output of the first RNN layer is used as the input to the second, increasing the model's depth and enhancing its ability to capture detailed features.

[0082] In addition, regarding the prediction models mentioned above for predicting users' place of origin, such as... Figure 2 As shown, this manual also provides corresponding training methods, the specific steps of which are as follows:

[0083] Step 200: Obtain training samples, which contain historical business data of sample users whose actual place of origin has been determined.

[0084] In practice, the sample users whose actual place of origin has been determined can be users who have completed real-name authentication in the services supported by the platform. The actual place of origin of these users can be the place of origin information actively filled in by the users during the real-name authentication process, or the place of origin information determined based on the ID card number filled in by these users.

[0085] Step 202: Determine the historical events corresponding to the sample users in history. This is based on the historical business data of the sample users.

[0086] Step 204: Generate a time series of historical event information for the sample user based on the historical event information of each historical event corresponding to the sample user in history.

[0087] Step 206: Input the historical event information time series of the sample user into the prediction model to obtain the predicted place of origin for the sample user.

[0088] Step 208: Train the prediction model with the optimization objective of minimizing the deviation between the predicted place of origin and the actual place of origin.

[0089] The process of predicting the place of origin of sample users during the training process described above is consistent with the actual prediction process described above, and will not be illustrated in detail here.

[0090] The following section will explain in detail the execution process of the user origin prediction method in this manual, using examples to illustrate the process. Historical food delivery events will be used as examples of historical shopping events, historical location events, and historical travel events.

[0091] First, the platform obtains order data (i.e., business data) of completed food delivery orders (i.e., historical food delivery events) from the user's historical food delivery data, ticket booking data (i.e., historical travel events) of used tickets (i.e., business data) from the user's historical ticket purchase data, and randomly selects one mobile phone location data from the user's daily mobile phone location data as the location data (i.e., business data) of the historical location event of that day.

[0092] Then, for each historical food delivery event, the platform determines the historical food delivery event information (including order time, order city, and delivery address) from the corresponding order data. Simultaneously, for each historical travel event, the platform determines the historical travel event information (including travel time, destination city, and transportation type, such as train / airplane) from the corresponding ticketing data. Furthermore, for each historical location event, the platform determines the historical location event information (including location time, location city, and POI address) from the corresponding mobile phone location data.

[0093] Next, the platform standardized the data formats for the time information of each historical event, the geographical regions involved in each historical event, and the descriptive information of the corresponding geographical regions. For example, the time information of each historical event is now accurate to the day and identified in the format of year-month-day. The cities in the geographical regions involved in each historical event are now accurate to the city level and represented in the form of a global city code.

[0094] Subsequently, the platform arranges the events in chronological order of their occurrence to obtain the sorting results. Then, based on the unified data format of each historical food delivery event, each historical location event, and each historical travel event, it generates a time series of event information for each user.

[0095] In this process, the platform can perform one-hot encoding on the date as a time feature for each historical event, perform one-hot encoding on the city code of the geographical area involved in the historical event as a location feature, and convert the words in the description information of the geographical area corresponding to the historical event into word vectors and perform one-hot encoding as a description feature. Then, the time feature, location feature and description feature corresponding to the historical event are combined to obtain the combined feature corresponding to the historical event (i.e. the attribute feature of the geographical location itself corresponding to the historical event).

[0096] Finally, the platform concatenates the combined features corresponding to each event in chronological order (to obtain the temporal change features of the geographical location corresponding to each historical event, as well as the attribute features of the geographical location corresponding to each historical event), and inputs them into a pre-trained prediction model to obtain the user's place of origin.

[0097] Furthermore, this specification also allows for the determination of the confidence level corresponding to the predicted user's place of origin. Thus, when executing business operations using the predicted user's place of origin, users can be filtered based on the confidence level corresponding to the predicted place of origin and business requirements, and business information can be pushed to users who meet the filtering criteria.

[0098] For example, when predicting user preferences to push products that users like, users make predictions based on multiple aspects of their information, not just their place of origin. Therefore, the confidence level of the predicted user's place of origin can be set relatively low. For instance, user places of origin with a confidence level higher than 0.8 are considered reliable data and can be used to predict user preferences. As another example, when conducting a business activity themed around hometown A, the target group is very clear (i.e., users whose place of origin is A). In this case, the service needs to be pushed to users whose predicted place of origin has a relatively high confidence level, such as users whose predicted place of origin has a confidence level higher than 0.95.

[0099] Through the above steps, when predicting a user's place of origin, the platform determines the time sequence of historical events performed by the user, based on the time and location information of those events. Then, based on this time sequence, it identifies the temporal changes in the geographical location corresponding to each historical event, as well as the inherent attributes of that location. Since these historical events are all performed by the user, the changes in location information over time, especially before and after holidays, will significantly reflect the user's location or destination during their free time. By combining this with factors such as whether the user's current or destination location is residential or a rural town or village without tourist attractions, the platform can effectively improve the accuracy of the predicted place of origin.

[0100] The above describes one or more embodiments of a user's place of origin prediction method provided in this specification. Based on the same idea, this specification also provides a corresponding user place of origin prediction device, such as... Figure 3 As shown.

[0101] Figure 3 This specification provides a schematic diagram of a user's place of origin prediction device, which specifically includes:

[0102] Module 300 is used to acquire users' historical business data.

[0103] The event determination module 301 is used to determine the historical events corresponding to the user in history based on the business data.

[0104] The time series generation module 302 is used to generate a time series of the user's historical event information based on the historical event information corresponding to each historical event. For each historical event, the historical event information corresponding to the historical event includes the time information corresponding to the historical event and the geographical location information corresponding to the historical event.

[0105] The place of origin prediction module 303 is used to determine the temporal change characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations corresponding to each historical event based on the time series of event information, and to predict the place of origin of the user based on the change characteristics and the attribute characteristics.

[0106] Optionally, the geographical location information corresponding to the historical event includes the geographical area involved in the historical event and the descriptive information of the geographical area corresponding to the historical event;

[0107] The place of origin prediction module 303 is specifically used to determine the temporal change characteristics of the geographical locations corresponding to each historical event based on the time series of the event information and the geographical areas involved in each historical event, and to determine the attribute characteristics of the geographical location corresponding to each historical event based on the description information of the geographical area corresponding to the historical event.

[0108] Optionally, the historical events include at least one of historical shopping events and historical travel events.

[0109] Optionally, the event determination module 301 is further configured to, before generating the time sequence of the user's historical event information based on the historical event information corresponding to each historical event, acquire location data collected for the user at each set time in history, as historical location event information corresponding to the user's historical location events; and insert each historical location event into the corresponding historical events of the user in history according to the collection time of each historical location event, so as to generate the time sequence of the user's historical event information based on the chronological order of the historical event information corresponding to each historical event and the historical location event information corresponding to each historical location event.

[0110] Optionally, the place of origin prediction module 303 is specifically used to determine each candidate place of origin for the user based on the event information time series; determine the confidence level corresponding to each candidate place of origin based on the change characteristics and the attribute characteristics; and predict the user's place of origin based on the confidence level corresponding to each candidate place of origin.

[0111] Optionally, the place of origin prediction module 303 is specifically used to input the event information time series into a pre-trained prediction model, so that the prediction model determines the time-varying characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations corresponding to each historical event based on the event information time series, and predicts the place of origin of the user based on the changing characteristics and the attribute characteristics.

[0112] Optionally, the device further includes:

[0113] The training module 304 is used to acquire training samples, which include historical business data of sample users whose actual place of origin has been determined; determine the historical events corresponding to the sample users in history based on the historical business data of the sample users; generate a time series of event information of the sample users in history based on the historical event information of the historical events corresponding to the sample users in history; input the time series of event information of the sample users in history into the prediction model to obtain the predicted place of origin for the sample users; and train the prediction model with the optimization objective of minimizing the deviation between the predicted place of origin and the actual place of origin.

[0114] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The method provided for predicting the user's place of origin.

[0115] This instruction manual also provides Figure 4 The diagram shows a schematic structural representation of the electronic device. Figure 4 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The method for predicting user origin is described above. Of course, besides software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0116] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0117] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0118] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0119] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0120] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can 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, etc.) containing computer-usable program code.

[0121] This 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 block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0122] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0123] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0124] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0125] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0126] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0127] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0128] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification 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, etc.) containing computer-usable program code.

[0129] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0130] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0131] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for predicting a user's place of origin, characterized in that, include: Obtain users' historical business data, including shopping order data containing delivery addresses and / or travel order data containing destination cities and transportation types; Based on the business data, determine the historical events corresponding to the user in history; Based on the historical event information corresponding to each historical event, a time sequence of the user's historical event information is generated. For each historical event, the historical event information corresponding to the historical event includes the time information corresponding to the historical event and the geographical location information corresponding to the historical event. The geographical location information corresponding to each historical event includes the geographical area involved in the historical event and the descriptive information of the geographical area corresponding to the historical event; Based on the time series of the event information and the geographical areas involved in each historical event, the temporal change characteristics of the geographical locations corresponding to each historical event are determined, and for each historical event, the attribute characteristics of the geographical location corresponding to the historical event are determined based on the description information of the geographical area corresponding to the historical event. The determination of the attribute characteristics of the geographical location corresponding to the historical event includes: For the time information of the historical event, one-hot encoding is performed according to the date as the time feature, one-hot encoding is performed according to the city code of the geographical area involved in the historical event as the location feature, and words in the description information of the geographical area corresponding to the historical event are converted into word vectors and one-hot encoded as the description feature. The time feature, location feature and description feature corresponding to the historical event are combined to obtain the combined feature corresponding to the historical event as the attribute feature of the geographical location of the historical event itself. Based on the temporal changes in the geographical locations corresponding to each historical event and the inherent attribute characteristics of the geographical locations corresponding to each historical event, the user's place of origin is predicted.

2. The method as described in claim 1, characterized in that, The historical events include at least one of historical shopping events and historical travel events.

3. The method as described in claim 1, characterized in that, Before generating the user's historical event information time series based on the historical event information corresponding to each historical event, the method further includes: Acquire location data collected for the user at various set times in history, and use it as historical location event information corresponding to the historical location events for the user; According to the collection time of each historical location event, each historical location event is inserted into the corresponding historical events of the user in history, so as to generate the time sequence of the user's historical event information based on the chronological order of the historical event information corresponding to each historical event and the historical location event information corresponding to each historical location event.

4. The method as described in claim 1, characterized in that, Based on the aforementioned change characteristics and attribute characteristics, predicting the user's place of origin specifically includes: Based on the time sequence of the event information, determine the candidate places of origin for the user; Based on the temporal variation characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations corresponding to each historical event themselves, the confidence level of each candidate place of origin is determined. The user's place of origin is predicted based on the confidence level corresponding to each candidate place of origin.

5. The method as described in claim 1, characterized in that, Based on the time series of the event information, determine the temporal variation characteristics of the geographical locations corresponding to each historical event, as well as the attribute characteristics of the geographical locations corresponding to each historical event themselves. Then, based on the temporal variation characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations corresponding to each historical event themselves, predict the user's place of origin, specifically including: The event information time series is input into a pre-trained prediction model so that the prediction model can determine the temporal change characteristics of the geographical locations corresponding to each historical event, as well as the attribute characteristics of the geographical locations corresponding to each historical event, based on the event information time series. Based on the temporal change characteristics of the geographical locations corresponding to each historical event and the attribute characteristics of the geographical locations corresponding to each historical event, the prediction model can predict the user's place of origin.

6. The method as described in claim 5, characterized in that, Training the prediction model specifically includes: Obtain training samples, which contain historical business data of sample users whose actual place of origin has been determined; Based on the historical business data of the sample users, determine the historical events corresponding to the sample users in history; Based on the historical event information of the sample users in history, a time series of event information of the sample users in history is generated. The time series of historical event information of the sample users is input into the prediction model to obtain the predicted place of origin for the sample users. The prediction model is trained with the optimization objective of minimizing the deviation between the predicted place of origin and the actual place of origin.

7. A device for predicting a user's place of origin, characterized in that, include: The acquisition module is used to acquire the user's historical business data, which includes shopping order data containing delivery addresses and / or travel order data containing destination cities and transportation types; The event determination module is used to determine the historical events corresponding to the user in history based on the business data. The event sequence generation module is used to generate a time sequence of the user's historical event information based on the historical event information corresponding to each historical event. For each historical event, the historical event information corresponding to the historical event includes the time information corresponding to the historical event and the geographical location information corresponding to the historical event. The geographical location information includes the geographical area involved in the historical event and the descriptive information of the geographical area corresponding to the historical event. The place of origin prediction module is used to determine the temporal change characteristics of the geographical locations corresponding to each historical event based on the time series of event information and the geographical areas involved in each historical event, and to determine the attribute characteristics of the geographical location corresponding to each historical event based on the descriptive information of the geographical area corresponding to the historical event. The determination of the attribute characteristics of the geographical location corresponding to the historical event includes: performing one-hot encoding on the date of the historical event as a time feature; performing one-hot encoding on the citycode of the geographical area involved in the historical event as a location feature; converting the words in the descriptive information of the geographical area corresponding to the historical event into word vectors and performing one-hot encoding as descriptive features; combining the time feature, location feature, and descriptive feature of the historical event to obtain the combined feature of the historical event as the attribute characteristics of the geographical location corresponding to the historical event; and predicting the place of origin of the user based on the change characteristics and the attribute characteristics.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 6.