Route generation method and device, storage medium and electronic device
Patent Information
- Application Number
- CN202510472470.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]本申请实施例提供了一种路线的生成方法和装置、存储介质及电子设备,以至少解决生成的路线准确性较低的技术问题
[0011]在本申请实施例中,响应于目标账号发起的路线生成请求,基于路线生成请求中携带的请求位置对的位置描述文本,获取与请求位置对中的请求起点位置描述文本匹配的起点集合以及与请求位置对中的请求终点位置描述文本匹配的终点集合。然后,基于起点集合和终点集合所构建的Z个位置对,获取Z个位置对中每个位置对各自与请求位置对之间的位置文本相似度,以及Z个位置对中每个位置对各自对应的位置对关系描述参数,其中,位置对关系描述参数包括以下至少之一:用于描述位置对中包含的起点位置与终点位置之间的位置距离关系的第一关系描述参数、用于描述位置对被同时访问的访问统计结果的第二关系描述参数、用于描述位置对和请求位置对之间的位置匹配关系的第三关系描述参数,Z是正整数。接着,根据每个位置对各自对应的位置文本相似度,以及位置对关系描述参数,从Z个位置对中确定出目标位置对。进而,基于目标位置对为路线生成请求生成目标结果路线。换言之,采用本申请实施例,通过综合位置文本相似度和位置对关系描述参数,系统能更准确地识别用户的真实意图,从而在众多可能的位置对中筛选出最符合用户需求的目标位置对,提高了路线规划的准确性和用户满意度。其中,位置文本相似度允许基于文本内容对位置进行更精细的匹配,即使用户输入的是简略或模糊描述,也能更准确地识别其意图;第一关系描述参数考虑了位置对中起点位置与终点位置之间的距离关系,使系统在选择位置对时同时考虑到地理位置的合理性,避免了选择位置距离过远或不合理的位置对,进一步提高了路线规划的实用性和准确性;通过引入用户同时访问两个位置的统计结果(第二关系描述参数),帮助系统理解哪些位置对是用户可能一起访问的,这在用户未明确指定的情况下尤为关键,增强了系统的智能性和对用户行为模式的理解;第三关系描述参数考虑了位置对与请求位置对之间的匹配关系,允许系统在面对复杂的搜索请求时,能够灵活评估和调整,确保最终选择的位置对是最符合用户意图的。综上采用本申请实施例,解决了生成的路线的准确性较低的技术问题,实现了提升所生成路线的准确性技术效果。
Smart Images

Figure CN122964371A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for generating routes, a storage medium, and an electronic device. Background Technology
[0002] In digital maps and navigation systems, users often need to input a starting point and destination to obtain accurate route planning. The common approach in related technologies is to rely on the results returned by a map search interface. The user's query keywords are input into the map's keyword suggestion function, which then calls the map interface to retrieve starting and ending points matching the user's query keywords. Finally, based on the string similarity to the user's keywords, the system selects the starting and ending points from these and pushes them to the user.
[0003] However, this route determination method, which solely relies on the string similarity between the user's query keywords and the location names stored in the map database to push start and end points to the user, may have a technical problem: the matching start and end points may not be the user's ideal start and end points due to the overly simplistic location matching method, resulting in low accuracy of the generated routes.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides a route generation method and apparatus, storage medium and electronic device to at least solve the technical problem of low accuracy of generated routes.
[0006] According to one aspect of the embodiments of this application, a route generation method is provided, comprising: responding to a route generation request initiated by a target account; obtaining a set of starting points matching the request starting point location description text in the request location pair carried in the route generation request and a set of ending points matching the request ending point location description text in the request location pair; obtaining, based on Z location pairs constructed from the set of starting points and the set of ending points, the location text similarity between each of the Z location pairs and the request location pair, and the location pair relationship description parameter corresponding to each of the Z location pairs, wherein the location pair relationship description parameter includes at least one of the following: a first relationship description parameter for describing the location distance relationship between the starting point and the ending point contained in the location pair, a second relationship description parameter for describing the access statistics result of the location pair being accessed simultaneously, and a third relationship description parameter for describing the location matching relationship between the location pair and the request location pair, wherein Z is a positive integer; determining a target location pair from the Z location pairs according to the location text similarity corresponding to each location pair and the location pair relationship description parameter; and generating a target result route for the route generation request based on the target location pair.
[0007] According to another aspect of the embodiments of this application, a route generation apparatus is also provided, comprising: a first acquisition unit, configured to, in response to a route generation request initiated by a target account, acquire a set of starting points matching the request starting point location description text in the request location pair carried in the route generation request, and a set of ending points matching the request ending point location description text in the request location pair; and a second acquisition unit, configured to, based on Z location pairs constructed from the starting point set and the ending point set, acquire the location text similarity between each of the Z location pairs and the request location pair, and the location corresponding to each of the Z location pairs. The relationship description parameters include at least one of the following: a first relationship description parameter describing the location distance relationship between the start and end locations contained in the location pair; a second relationship description parameter describing the access statistics of the location pair being accessed simultaneously; and a third relationship description parameter describing the location matching relationship between the location pair and the requested location pair, where Z is a positive integer; a determination unit is used to determine the target location pair from the Z location pairs based on the location text similarity corresponding to each location pair and the location pair relationship description parameters; and a generation unit is used to generate the target result route for the route generation request based on the target location pair.
[0008] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described route generation method at runtime.
[0009] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the generation method of the route described above.
[0010] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the route generation method described above through the computer program.
[0011] In this embodiment, in response to a route generation request initiated by a target account, based on the location description text of the requested location pairs carried in the route generation request, a set of starting points matching the request starting point location description text in the requested location pairs and a set of ending points matching the request ending point location description text in the requested location pairs are obtained. Then, based on the Z location pairs constructed from the starting point set and the ending point set, the location text similarity between each of the Z location pairs and the requested location pair, and the location pair relationship description parameter corresponding to each of the Z location pairs are obtained. The location pair relationship description parameter includes at least one of the following: a first relationship description parameter describing the location distance relationship between the starting and ending points contained in the location pair; a second relationship description parameter describing the access statistics of the location pair being accessed simultaneously; and a third relationship description parameter describing the location matching relationship between the location pair and the requested location pair, where Z is a positive integer. Next, based on the location text similarity corresponding to each location pair and the location pair relationship description parameter, a target location pair is determined from the Z location pairs. Furthermore, a target result route is generated for the route generation request based on the target location pair. In other words, by combining location text similarity and location pair relationship description parameters, the system can more accurately identify the user's true intent, thereby selecting the most suitable target location pair from numerous possible location pairs, improving the accuracy of route planning and user satisfaction. Specifically, location text similarity allows for more refined matching of locations based on text content, enabling more accurate identification of intent even when the user inputs a brief or vague description; the first relationship description parameter considers the distance relationship between the starting and ending locations in the location pair, allowing the system to consider the rationality of geographical location when selecting location pairs, avoiding the selection of location pairs that are too far apart or unreasonable, further improving the practicality and accuracy of route planning; by introducing statistical results of users simultaneously visiting two locations (the second relationship description parameter), the system helps understand which location pairs the user might visit together, which is particularly crucial when the user has not explicitly specified, enhancing the system's intelligence and understanding of user behavior patterns; the third relationship description parameter considers the matching relationship between the location pair and the requested location pair, allowing the system to flexibly evaluate and adjust when faced with complex search requests, ensuring that the final selected location pair best matches the user's intent. In summary, by adopting the embodiments of this application, the technical problem of low accuracy of the generated routes is solved, and the technical effect of improving the accuracy of the generated routes is achieved. Attached Figure Description
[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0013] Figure 1 This is a schematic diagram of an application environment for an optional route generation method according to an embodiment of this application;
[0014] Figure 2 This is a flowchart of an optional route generation method according to an embodiment of this application;
[0015] Figure 3 This is a schematic diagram of an optional route generation method according to an embodiment of this application;
[0016] Figure 4 This is a schematic diagram of another optional route generation method according to an embodiment of this application;
[0017] Figure 5 This is a schematic diagram of another optional route generation method according to an embodiment of this application;
[0018] Figure 6 This is a schematic diagram of another optional route generation method according to an embodiment of this application;
[0019] Figure 7 This is a schematic diagram of another optional route generation method according to an embodiment of this application;
[0020] Figure 8 This is a schematic diagram of another optional route generation method according to an embodiment of this application;
[0021] Figure 9 This is a schematic diagram of another optional route generation method according to an embodiment of this application;
[0022] Figure 10 This is a flowchart of another optional route generation method according to an embodiment of this application;
[0023] Figure 11 This is a schematic diagram of an optional route generation apparatus according to an embodiment of this application;
[0024] Figure 12 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] Optionally, the route generation method described above can be applied to navigation scenarios, but is not limited to this application. According to one aspect of the embodiments of this application, a route generation method is provided. Optionally, as an optional example, the route generation method described above can be applied to a navigation scenario, such as... Figure 1 In the environment shown. For example... Figure 1 As shown, terminal device 102 includes a memory 104 for storing various data generated during its operation, a processor 106 for processing and calculating the aforementioned data, and a display 108 for displaying the navigation interface. Terminal device 102 can interact with server 112 via network 110. Server 112 is connected to database 114, which stores various data. Terminal device 102 can run navigation applications.
[0028] Furthermore, the above method in Figure 1 The specific application process in the environment shown is as follows:
[0029] Step S102, terminal device 102 as follows Figure 1 As shown in (a), when the target account enters location description text 102 in the navigation interface of the navigation application and selects route request control 104, a route generation request is generated.
[0030] In step S104, terminal device 102 sends a route generation request to server 112 via network 110;
[0031] In step S106, server 112 responds to the route generation request initiated by the target account, and obtains the set of starting points that match the request starting point location description text in the request location pair and the set of ending points that match the request ending point location description text in the request location pair based on the location description text of the request location pair carried in the route generation request.
[0032] In step S108, server 112 constructs Z location pairs based on the starting point set and the ending point set, obtains the location text similarity between each of the Z location pairs and the requested location pair, and the location pair relationship description parameters corresponding to each of the Z location pairs. The location pair relationship description parameters include at least one of the following: a first relationship description parameter for describing the location distance relationship between the starting point and the ending point contained in the location pair, a second relationship description parameter for describing the access statistics results of the location pair being accessed simultaneously, and a third relationship description parameter for describing the location matching relationship between the location pair and the requested location pair. Z is a positive integer.
[0033] In step S110, server 112 determines the target location pair from Z location pairs based on the location text similarity corresponding to each location pair and the location pair relationship description parameters.
[0034] Step S112: Server 112 generates a target result route for the route generation request based on the target location pair;
[0035] In step S114, server 112 sends route information of the target result route to terminal device 102 via network 110;
[0036] Step S116, terminal device 102 as follows Figure 1 As shown in (b), the route information 106 of the target result route is displayed in the navigation interface.
[0037] In other words, by combining location text similarity and location pair relationship description parameters, the system can more accurately identify the user's true intent, thereby selecting the most suitable target location pair from numerous possible location pairs, improving the accuracy of route planning and user satisfaction. Specifically, location text similarity allows for more refined matching of locations based on text content, enabling more accurate identification of intent even when the user inputs a brief or vague description; the first relationship description parameter considers the distance relationship between the starting and ending locations in the location pair, allowing the system to consider the rationality of geographical location when selecting location pairs, avoiding the selection of location pairs that are too far apart or unreasonable, further improving the practicality and accuracy of route planning; by introducing statistical results of users simultaneously visiting two locations (the second relationship description parameter), the system helps understand which location pairs the user might visit together, which is particularly crucial when the user has not explicitly specified, enhancing the system's intelligence and understanding of user behavior patterns; the third relationship description parameter considers the matching relationship between the location pair and the requested location pair, allowing the system to flexibly evaluate and adjust when faced with complex search requests, ensuring that the final selected location pair best matches the user's intent. In summary, by adopting the embodiments of this application, the technical problem of low accuracy of the generated routes is solved, and the technical effect of improving the accuracy of the generated routes is achieved.
[0038] Optionally, in this embodiment, the terminal device can be a terminal device configured with a target client, which may include, but is not limited to, at least one of the following: mobile phone (such as Android phone, iOS phone, etc.), laptop computer, tablet computer, PDA, MID (Mobile Internet Devices), PAD, desktop computer, smart TV, etc. The target client may be a video client, instant messaging client, browser client, educational client, etc. The network may include, but is not limited to, wired network and wireless network, wherein the wired network includes: local area network, metropolitan area network and wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that enable wireless communication. The server may be a single server, a server cluster composed of multiple servers, or a cloud server. The above is only an example, and no limitation is made in this embodiment.
[0039] Alternatively, as an alternative solution, such as Figure 2 As shown, the method for generating the above route includes:
[0040] S202, in response to the route generation request initiated by the target account, based on the location description text of the requested location pair carried in the route generation request, obtain the set of starting points that match the request starting point location description text in the request location pair and the set of ending points that match the request ending point location description text in the request location pair.
[0041] Optionally, taking the above route generation method as an example in navigation scenarios, the method can be applied to at least the following two navigation scenarios: 1) Natural language navigation query scenarios, where users describe the starting and ending points using everyday language or colloquialisms, such as "How do I get from my home to my company?" or "What are some good restaurants nearby?" These queries often contain vague or simplified location descriptions, requiring parsing and understanding to determine the specific starting and ending points. 2) Structured navigation query scenarios, where users provide more explicit and structured starting and ending point information, typically including specific location names, addresses, or geographic coordinates. For example, directly entering "Starting point: Location A" and "Ending point: Location B" in a map application.
[0042] It should be noted that, in some embodiments, the aforementioned target account may be used, but is not limited to, to instruct users to register personal accounts in the route generation application, and to store user preference information, historical search and location data, etc., to ensure service continuity.
[0043] Optionally, in some embodiments, the route generation request described above may be, but is not limited to, a request submitted by a route generation application when a user wants to obtain route information from one location to another. The aforementioned request location pair is paired information consisting of a start-point location description text and an end-point location description text in the route generation request, representing the specific start and end points the user wants to query. The aforementioned location description text is text information used to describe a location, such as "University A" or "Building B". It can be an abbreviation, a full name, or other descriptive information containing the location; this is not limited in this embodiment.
[0044] Furthermore, the set of starting points matching the requested starting point location description text in the requested location pair can, but is not limited to, indicating how to obtain a series of possible locations as a candidate set of starting points by calling the map application's input prompt interface based on the starting point location description text. For example, inputting "A" into the map interface might return a set of starting points including "Building A", "Subway Station A", "Shopping Center A", etc. The set of ending points matching the requested ending point location description text in the requested location pair is similar, but refers to the ending point location description text. For example, inputting "Station B" into the map interface might return a set of ending points including "Subway Station B in City C", "Bus Station B in City C", etc. It should be noted that the above-mentioned set of starting points and set of ending points can, but is not limited to, be obtained after calling the map interface based on multiple recall conditions and then filtering according to predetermined conditions (e.g., semantic similarity between location description texts).
[0045] S204. Based on the Z location pairs constructed from the starting point set and the ending point set, obtain the location text similarity between each of the Z location pairs and the requested location pair, and the location pair relationship description parameter corresponding to each of the Z location pairs. The location pair relationship description parameter includes at least one of the following: a first relationship description parameter for describing the location distance relationship between the starting point and the ending point contained in the location pair; a second relationship description parameter for describing the access statistics result of the location pair being accessed simultaneously; and a third relationship description parameter for describing the location matching relationship between the location pair and the requested location pair. Z is a positive integer.
[0046] Optionally, in some embodiments, the aforementioned Z position pairs may be used, but are not limited to, to indicate all possible sets of position pairs that can be constructed from the start set and the end set, where Z represents the total number of sets. For example, assuming the start set contains 3 start positions and the end set contains 2 end positions, then the Z position pairs are the 6 position pairs obtained by combining them in pairs.
[0047] Furthermore, in some embodiments, the aforementioned location text similarity may be used, but is not limited to, to indicate the degree of similarity between the location description text and the location identification information (e.g., name) of each location in the location set, and may include, but is not limited to, semantic similarity and character similarity. This embodiment does not limit this aspect.
[0048] Optionally, in some embodiments, the location pair relationship description parameters described above may be, but are not limited to, one or a group of parameters used to describe the relationship between the start and end points in the location pair, specifically including at least one of the following: First relationship description parameter: used to characterize the physical distance between the start and end points, such as great circle distance or geodesic distance, used to determine whether the location pair matches the user's possible travel range. Second relationship description parameter: used to reflect the access statistics of the location pair, such as the number of simultaneous visits, popularity, etc. Third relationship description parameter: used to evaluate the degree of matching between the location pair and the requested location pair.
[0049] Specifically, in some embodiments, the first relation description parameter, the second relation description parameter, and the third relation description parameter may be generated in the following ways, but are not limited to:
[0050] Based on the target distance matrix used to characterize the distance between the start position and the end position in each of the Z position pairs, and the current distance information between the current start position and the current end position, the first relation description parameters are generated.
[0051] The second relation description parameter is generated by using the number of times the current starting position is visited and the number of times the current ending position is visited, as well as the number of times each position in the target position library for obtaining the above starting and ending set is visited.
[0052] Using the sorting order of the current starting position in each of the M starting position sets and the sorting order of the current ending position in each of the N ending position sets, a third relation description coefficient is generated. The positions included in each starting position set are sorted according to their matching degree with the starting position description text, and the positions included in each ending position set are also sorted according to their matching degree with the starting position description text. The M starting position sets are sets of M positions that satisfy the M starting position recall conditions, determined from the target position database based on the starting position description text, the ending position description text, and the location identifier information of each position in the target position database. The N ending position sets are sets of N positions that satisfy the N ending position recall conditions, determined from the target position database based on the starting position description text, the ending position description text, and the location identifier information of each position in the target position database.
[0053] S206, Based on the similarity of the location text corresponding to each location pair and the relationship description parameters of the location pairs, determine the target location pair from the Z location pairs.
[0054] Optionally, determining the target location from the Z location pairs based on the location text similarity for each location pair and the location pair relationship description parameters may include, but is not limited to, fusing the location text similarity for each location pair and the location pair relationship description parameters to obtain Z decision parameters corresponding to the Z location pairs. Then, the location pairs whose decision parameters satisfy the decision conditions among the Z location pairs are determined as the target location pairs.
[0055] S208, Generate the target result route for the route generation request based on the target location pair.
[0056] Optionally, in some embodiments, the above-mentioned generation of the target result route based on the target location pair for the route generation request may include, but is not limited to, calling the map interface to generate a specific navigation route and navigation information matching the navigation route based on the starting point and ending point in the target location pair, such as the estimated route time, the means of transportation to be taken, the transfer stations of the means of transportation, etc. This embodiment does not limit this.
[0057] For example, assuming the above route generation method is applied to the above natural language navigation query scenario, the method can be illustrated through examples, but is not limited to, the following:
[0058] The correspondence between relevant vocabulary and the descriptions in the above route generation methods is as follows:
[0059] Target account: In this scenario, the target account refers to the account that the user registers and logs into in the map application. Through this account, the route generation request submitted by the user can be identified and processed.
[0060] Route generation request: A navigation request initiated by the user using natural language description.
[0061] Location description text for the requested location pair: The starting point and destination description mentioned by the user in the route generation request, such as "my home" and "my company" or "nearby" and "good food".
[0062] Starting point set and ending point set: Through a multi-path recall strategy, multiple sets of locations matching the user's location description text are retrieved from the POI database. For example, "my home" may refer to multiple POIs near the user's home address, and "company" may include multiple office location POIs in the user's city.
[0063] Z position pairs: All possible combinations of positions constructed from the set of starting points and the set of ending points, where Z represents the total number of these position pairs.
[0064] Location text similarity: Calculate the text similarity score between the requested location description text and the name of each location pair in the location set.
[0065] The first relational description parameter evaluates the plausibility of a location pair by calculating the geographical distance between the start and end points in each pair.
[0066] The second relationship description parameter: Analyze user historical behavior data to determine the access status of each location pair being accessed simultaneously.
[0067] The third relation description parameter further narrows down the matching range by comparing the matching relationship between the requested location pair and the location pair, ensuring that the selected location pair is most relevant to the user request.
[0068] Target location pair: The starting and ending location pairs that best match the user's request, after comprehensively considering location text similarity and various location pair relationship description parameters.
[0069] Target route: A navigation route generated from the starting point to the destination based on the target location pair.
[0070] The specific steps are as follows:
[0071] Step S1, as follows Figure 3 The user account shown in (a) entered the route description information "How do I get from my home to the company?" in the navigation information input box 302 of the map application's navigation interface and clicked the navigation control 304. It should be noted that the route description information can also be entered by voice, but this is not limited in this example.
[0072] In step S2, the terminal device generates a route generation request based on the route description information "How do I get from my home to my company?" and sends the route generation request to the backend server.
[0073] In step S3, after receiving the request, the server parses the descriptive text "my home" and "company" of the starting point and destination based on semantic recognition. It then determines the location description information corresponding to the user's indicated starting point "my home" and destination "company" through the user's historical behavior records.
[0074] In step S4, the server uses a multi-path recall strategy to call the location filtering interface of the navigation application based on the starting point location description information (assuming it is location A) and the ending point location description information (assuming it is location B) indicated by the user. The server then retrieves the set of starting points that match the starting point location description information and the set of ending points that match the ending point location description information from the location database of the navigation application.
[0075] Step S5: The server constructs all possible position pairs of the start set and the end set, assuming that Z = 6 position pairs are constructed.
[0076] Step S6: For each location pair, the server calculates its location text similarity to the request description text (i.e., starting location description text: location A, ending location description text: location B). Simultaneously, it obtains the first relational description parameter (geographical distance), the second relational description parameter (access frequency based on historical data), and the third relational description parameter (matching relationship with the request description text) for each location pair.
[0077] In step S7, the server assigns a comprehensive score to each location pair by weighted summation, and the location pair with the highest score is determined as the target location pair, for example, from "Province a, City x, Location A" to "Province b, City y, Location B".
[0078] In step S8, the server generates a specific route plan based on the target location, including information such as route length, estimated arrival time, and route recommendations, and sends the specific route plan to the terminal device.
[0079] Step S9, terminal device such as Figure 3 As shown in (b), the target route 306 is displayed in the navigation interface for user account reference.
[0080] It should be noted that the above examples are optional examples provided to facilitate the explanation of the route generation method, and there are no limitations on the specific implementation of the route generation method.
[0081] To illustrate further, assuming the route generation method described above is applied to the natural language navigation query scenario, the method can be explained using, but is not limited to, the following examples:
[0082] The specific steps are as follows:
[0083] Step S1, as follows Figure 4 As shown in (a), when the user account clicks the navigation information input control 402 on the navigation interface of the map application, the terminal device begins to input the voice content entered by the user account.
[0084] Step S2: The terminal device itself or through the backend server parses the voice content entered by the user account to obtain the corresponding text information, and then displays the text information, such as, "How do I get from subway station A to park B?" Figure 4 (b) is displayed in the text information display box 404 of the navigation interface.
[0085] Step S2, when the user selects, such as Figure 4 In the case of route generation control 406 in the navigation interface shown in (b), a route generation request is generated and sent to the backend server.
[0086] Step S3: After receiving the request, the server parses the description text of the starting point and the ending point, "A Metro Station" and "B Park", based on semantic recognition.
[0087] In step S4, the server uses a multi-path recall strategy to call the location filtering interface of the navigation application based on the starting point location description information (A subway station) indicated by the user and the ending point location description information (B park) indicated by the user. The server then retrieves the set of starting points that match the starting point location description information and the set of ending points that match the ending point location description information from the location database of the navigation application.
[0088] Step S5: The server constructs all possible position pairs of the start set and the end set, assuming that Z = 6 position pairs are constructed.
[0089] Step S6: For each location pair, the server calculates its similarity to the request description text (i.e., starting location description text: A subway station, ending location description text: B park). Simultaneously, it obtains the first relational description parameter (geographical distance), the second relational description parameter (access frequency based on historical data), and the third relational description parameter (matching relationship with the request description text) for each location pair.
[0090] In step S7, the server assigns a comprehensive score to each location pair by weighted summation, and the location pair with the highest score is determined as the target location pair, for example, from "Province a, City x, Location A" to "Province b, City y, Location B".
[0091] In step S8, the server generates a specific route plan based on the target location, including information such as route length, estimated arrival time, and route recommendations, and sends the specific route plan to the terminal device.
[0092] Step S9, terminal device such as Figure 4 As shown in (c), the target route 408 is displayed in the navigation interface for user account reference.
[0093] It should be noted that the above examples are optional examples provided to facilitate the explanation of the route generation method, and there are no limitations on the specific implementation of the route generation method.
[0094] For example, assuming the above route generation method is applied to the structured navigation query scenario, the method can be illustrated through, but is not limited to, the following examples:
[0095] The correspondence between relevant vocabulary and the descriptions in the above route generation methods is as follows:
[0096] Target account: In this scenario, the target account can be any account that a user registers in a map or navigation service. This account stores the user's personal information and data such as historical navigation requests.
[0097] Route generation request: A navigation request initiated by the user in a structured manner, such as entering a specific starting point and destination through the search box of a map application, like "Starting point: Park A, Destination: Square B".
[0098] Location description text for the requested location pair: The names of the start and end points explicitly provided by the user in the route generation request, i.e., "Park A" is the location description text for the requested start point, and "Plaza B" is the location description text for the requested end point.
[0099] The specific steps are as follows:
[0100] Step S1, as follows Figure 5 The user account shown in (a) enters “Park A” in the starting point input box 502 and “Square B” in the destination input box 504 in the navigation interface provided by the map application, and selects the navigation control 506 displayed in the navigation interface.
[0101] Step S2: The terminal device generates a route generation request based on the location description text (i.e., the starting point location description text: Park A, the ending point location description text: Square B) and sends the route generation request to the server.
[0102] Step S3: Based on the location description text in the request, the server obtains the set of starting points and the set of ending points that match the location description text by calling the map API interface.
[0103] Step S4: By constructing all possible combinations of the starting point set and the ending point set, Z position pairs are formed.
[0104] Step S5: For each location pair, calculate its location text similarity to the requested location pair. Simultaneously, obtain the location pair relationship description parameters corresponding to each location pair.
[0105] Step S6: Perform a weighted calculation based on the location text similarity of each location pair and the relationship description parameters of the location pair to determine the target location pair that best matches the user's request.
[0106] In step S7, the server generates a specific route plan based on the target location, including information such as route length, estimated arrival time, and route recommendations, and sends the specific route plan to the terminal device.
[0107] Step S8, terminal device such as Figure 5 As shown in (b), the target route 508 is displayed in the navigation interface for user account reference.
[0108] Step S9, as follows Figure 5 As shown in (c), when the user selects the target result route confirmation navigation control, the navigation route 510 matching the target result route is displayed.
[0109] It should be noted that the above examples are optional examples provided to facilitate the explanation of the route generation method, and there are no limitations on the specific implementation of the route generation method.
[0110] In this embodiment, in response to a route generation request initiated by a target account, based on the location description text of the requested location pairs carried in the route generation request, a set of starting points matching the request starting point location description text in the requested location pairs and a set of ending points matching the request ending point location description text in the requested location pairs are obtained. Then, based on the Z location pairs constructed from the starting point set and the ending point set, the location text similarity between each of the Z location pairs and the requested location pair, and the location pair relationship description parameter corresponding to each of the Z location pairs are obtained. The location pair relationship description parameter includes at least one of the following: a first relationship description parameter describing the location distance relationship between the starting and ending points contained in the location pair; a second relationship description parameter describing the access statistics of the location pair being accessed simultaneously; and a third relationship description parameter describing the location matching relationship between the location pair and the requested location pair, where Z is a positive integer. Next, based on the location text similarity corresponding to each location pair and the location pair relationship description parameter, a target location pair is determined from the Z location pairs. Furthermore, a target result route is generated for the route generation request based on the target location pair. In other words, by combining location text similarity and location pair relationship description parameters, the system can more accurately identify the user's true intent, thereby selecting the most suitable target location pair from numerous possible location pairs, improving the accuracy of route planning and user satisfaction. Specifically, location text similarity allows for more refined matching of locations based on text content, enabling more accurate identification of intent even when the user inputs a brief or vague description; the first relationship description parameter considers the distance relationship between the starting and ending locations in the location pair, allowing the system to consider the rationality of geographical location when selecting location pairs, avoiding the selection of location pairs that are too far apart or unreasonable, further improving the practicality and accuracy of route planning; by introducing statistical results of users simultaneously visiting two locations (the second relationship description parameter), the system helps understand which location pairs the user might visit together, which is particularly crucial when the user has not explicitly specified, enhancing the system's intelligence and understanding of user behavior patterns; the third relationship description parameter considers the matching relationship between the location pair and the requested location pair, allowing the system to flexibly evaluate and adjust when faced with complex search requests, ensuring that the final selected location pair best matches the user's intent. In summary, by adopting the embodiments of this application, the technical problem of low accuracy of the generated routes is solved, and the technical effect of improving the accuracy of the generated routes is achieved.
[0111] Optionally, as an alternative approach, based on the location description text of the request location pairs carried in the route generation request, obtaining the set of starting points matching the request starting point location description text in the request location pairs and the set of ending points matching the request ending point location description text in the request location pairs includes:
[0112] S1. Obtain a set of candidate starting points that match the starting point location description text from the target location library of the route generation application logged in by the target account, and obtain a set of candidate ending points that match the ending point location description text.
[0113] It should be noted that the aforementioned target location database may be, but is not limited to, the location database maintained in the route generation application, containing detailed information on all locations that the application can identify and locate, such as name, address, coordinates, etc. This embodiment does not limit this.
[0114] Optionally, in some embodiments, the aforementioned candidate starting point location set may be, but is not limited to, a set of locations selected from the target location library that may have a matching relationship with the starting point location description text. Correspondingly, the aforementioned candidate ending point location set is similar to the candidate starting point location set, and is a set of locations that may have a matching relationship with the ending point location description text.
[0115] S2, add the starting positions that meet the starting position conditions from the candidate starting position set to the starting position set, and add the ending positions that meet the ending position conditions from the candidate ending position set to the ending position set.
[0116] Optionally, in some embodiments, the aforementioned starting point location condition can be, but is not limited to, a rule used to filter which locations in the candidate starting point location set should be added to the starting point set, and can be determined based on the location identification information of the location, the starting point location description text in the route generation request, and the semantic similarity of each location in the candidate starting point location set. Correspondingly, the aforementioned ending point location condition can be, but is not limited to, a rule used to filter which locations in the candidate ending point location set should be added to the ending point set, and can be determined based on the location identification information of the location, the ending point location description text in the route generation request, and the semantic similarity of each location in the candidate ending point location set.
[0117] In this embodiment, a set of candidate starting points that match the starting point description text is obtained from the target location library of the route generation application logged into by the target account, and a set of candidate ending points that match the ending point description text are also obtained. Then, starting points that meet the starting point conditions from the candidate starting point set are added to the starting point set, and ending points that meet the ending point conditions from the candidate ending point set are added to the ending point set. In other words, by obtaining a candidate set matching the description text from the location library of the application logged into by the target account, and then filtering out locations that meet specific location conditions to add to the final set, this method reduces interference from irrelevant locations and improves the accuracy and relevance of candidate locations compared to directly obtaining matching locations.
[0118] Optionally, as an alternative approach, from the target location library of the route generation application logged into by the target account, a set of candidate starting points that match the starting point location description text is obtained, and a set of candidate ending points that match the ending point location description text is obtained, including:
[0119] Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, determine M sets of starting points that satisfy M starting point recall conditions, and determine N sets of ending points that satisfy N ending point recall conditions. The candidate starting point location set includes M starting point sets, and the candidate ending point location set includes N ending point sets, where M is a positive integer and N is a positive integer.
[0120] Optionally, in some embodiments, the location identification information mentioned above may be, but is not limited to, a unique identifier used to indicate each location in the database. It may be the full name of the location from the maximum to the minimum range within its scope, such as a country-province-region-street-location. In this embodiment, this is not limited.
[0121] Furthermore, in some embodiments, the aforementioned start-point recall conditions and end-point recall conditions may be, but are not limited to, a set of rules or criteria for retrieving candidate start-point and end-point locations from a target location database. These conditions may be formulated based on location description text, geographic coordinates, etc., and a multi-path recall strategy ensures that as many relevant locations as possible are included in the candidate set, thereby improving the accuracy of location determination.
[0122] Optionally, in some embodiments, the aforementioned M starting point sets and N ending point sets may, but are not limited to, indicate multiple candidate location sets filtered from the target location database by the starting point recall condition and the ending point recall condition. M and N represent the number of sets and are positive integers, indicating that the system will return multiple candidate locations for subsequent selection and sorting. Specifically, the i-th starting point set among the M starting point sets is obtained from the target location database by the i-th starting point recall condition among the M starting point recall conditions; correspondingly, the j-th ending point set among the N ending point sets is obtained from the target location database by the j-th ending point recall condition among the N ending point recall conditions; where i is a positive integer less than or equal to M, and j is a positive integer less than or equal to N.
[0123] In this embodiment, based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points satisfying M starting point recall conditions and N sets of ending points satisfying N ending point recall conditions are determined. The candidate starting point location set includes M starting point sets, and the candidate ending point location set includes N ending point sets, where M and N are positive integers. In other words, by using this embodiment, on the one hand, by setting M starting point recall conditions and N ending point recall conditions, candidate sets of starting points and ending points can be screened and constructed from different angles and standards. Considering multiple dimensions comprehensively provides richer candidate locations, increasing the diversity and accuracy of recommended locations. On the other hand, constructing candidate sets based on multiple recall conditions helps reduce mismatches under a single condition, making the final determined target location pairs more reliable and reducing user confusion caused by inaccurate system-recommended locations. In summary, by using this embodiment, multi-dimensional recall of candidate sets not only improves the accuracy and personalization of location recommendations but also optimizes computational efficiency, providing users with high-quality route planning services.
[0124] Optionally, as an alternative approach, based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, a set of M starting points that satisfy M starting point recall conditions is determined, and a set of N ending points that satisfy N ending point recall conditions is determined, including:
[0125] S1, add the locations in the target location library that meet the first starting point matching condition by matching the location identifier information with the starting point location description text to the first starting point set, where the matching degree is obtained based on the character matching degree between the location identifier information and the starting point location description text.
[0126] It should be noted that, in some embodiments, the matching degree mentioned above may be determined based on at least one of the character similarity and access frequency between the location identification information and the starting location description text. For example, the matching degree may be obtained by weighted summation of the character similarity and access frequency between the location identification information and the starting location description text. Specifically, the character similarity may be obtained through edit distance, cosine similarity, longest common subsequence, or other similar methods, and this embodiment does not limit this.
[0127] Furthermore, the aforementioned first starting point matching condition can be used, but is not limited to, to indicate that the matching degree has reached the first starting point matching threshold. This condition can be used to filter out location identifier information with low similarity to the starting point location description text, thereby reducing the number of candidate locations in subsequent processing. For example, assuming the matching degree is the edit distance and the first starting point matching threshold is 'a', then if the edit distance between the location identifier information of location x in the target location library and the starting point location description text is greater than or equal to 'a', then location x will be added to the first starting point set.
[0128] It should be noted that the above example is an optional example provided to facilitate the explanation of the above steps, and there are no limitations on the method of generating the above route.
[0129] S2, determine the regions where each starting point is located in the first starting point set, obtain the first region set, and count the number of each region in the first region set.
[0130] Optionally, in some embodiments, the aforementioned determination of the region where each starting point in the first starting point set is located may be, but is not limited to, indicating the determination of the specific region, such as a city or district, based on the geographical location information of each starting point in the first starting point set. Further, the aforementioned first region set may be, but is not limited to, indicating the set composed of the regions where each starting point in the first starting point set is located. The counting of regions may be, but is not limited to, indicating the counting of each region in the first region set to understand the distribution of different regions and provide a basis for subsequent region selection.
[0131] S3. Based on the number of each region in the first starting point set, obtain the first reference region from the first region set, and add the location in the target location library that matches the location identifier information and the starting point location description text with the second starting point matching condition and is located in the first reference region to the second starting point set.
[0132] Optionally, in some embodiments, the above-mentioned method of obtaining the first reference region from the first region set based on the number of each region in the first starting point set may be used, but is not limited to, to indicate that the region in the first region set with a number greater than a first threshold is determined as the first reference region, or the region with the largest number in the first region set is determined as the first reference region. In this embodiment, no limitation is made in this regard.
[0133] Furthermore, the second starting point matching condition is similar to the first starting point matching condition, but it may be applied in a more precise recall stage. A higher second starting point matching threshold can be set, or it can be set to the same as or lower than the first starting point matching threshold corresponding to the first starting point matching condition. When the matching degree between the location identification information and the starting point location description text reaches the second starting point matching threshold and is located in the first reference area, the location identified by the location identification information is added to the second starting point set. The specific details can be determined according to actual needs, and are not limited in this embodiment.
[0134] S4. Add the location in the target location library that matches the location identifier information with the destination location description text to the first destination set if the match meets the first destination matching condition and is located in the first reference area.
[0135] Optionally, in some embodiments, the matching degree between the location identification information and the destination location description text may be determined based on, but is not limited to, at least one of the character similarity and access frequency between the location identification information and the starting point location description text. Accordingly, the first destination matching condition is similar to the first and second starting point matching conditions mentioned above, but it pertains to the matching degree of the destination location description text. In some embodiments, if the matching degree between the location identification information and the destination location description text reaches a first destination matching threshold, it can be determined that the location identified by the location identification information meets the first destination matching condition.
[0136] In this embodiment, locations in the target location library whose matching degree between the corresponding location identifier information and the starting location description text satisfies the first starting point matching condition are added to the first starting point set. The matching degree is obtained based on the character matching degree between the location identifier information and the starting location description text. Then, the regions where each starting point location in the first starting point set is located are determined, resulting in a first region set, and the number of each region in the first region set is counted. Next, based on the number of each region in the first starting point set, a first reference region is obtained from the first region set, and locations in the target location library whose matching degree between the corresponding location identifier information and the starting location description text satisfies the second starting point matching condition and are located in the first reference region are added to the second starting point set. Then, locations in the target location library whose matching degree between the corresponding location identifier information and the ending location description text satisfies the first ending point matching condition and are located in the first reference region are added to the first ending point set. In other words, using this embodiment, on the one hand, after initially filtering the first starting point set, by determining the first region set and counting the number of locations in each region, the first reference region can be quickly located, thus focusing only on the location of this region in subsequent filtering, reducing unnecessary global searches and improving computational efficiency. On the other hand, by using the first starting point matching condition, the second starting point matching condition, and the first ending point matching condition, location filtering can be performed based on different levels of matching degree. This not only increases the accuracy of filtering but also improves the system's flexibility, enabling it to handle various complex user inputs and location matching situations. In summary, by adopting the embodiments of this application, the route generation system can more accurately and efficiently recall and filter the starting point and ending point locations from user text descriptions, while increasing the personalization of recommended locations and user satisfaction, providing users with higher quality and more tailored route generation services.
[0137] Optionally, as an optional approach, based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, a set of M starting points that satisfy M starting point recall conditions is determined, and a set of N ending points that satisfy N ending point recall conditions is determined, further including:
[0138] S1. Add the location in the target location library that matches the location identifier information with the starting point location description text to the third starting point set, and is located in the target area where the target account is located.
[0139] It should be noted that adding locations in the target location database that match the location identifier information with the starting point location description text to the third starting point set, where the match degree satisfies the third starting point matching condition and is located within the target area of the target account, may include, but is not limited to, locations in the target location database that match the location identifier information with the starting point location description text with a match degree greater than or equal to the third starting point matching threshold and are located within the target area of the target account. Furthermore, in some embodiments, the target area of the target account may, but is not limited to, indicate the area where the target account is currently located, such as the city where the target account is located.
[0140] S2, determine the regions where each starting point in the third starting point set is located, obtain the second region set, and count the number of each region in the second region set.
[0141] Optionally, in some embodiments, the aforementioned determination of the region where each starting point in the third starting point set is located may be, but is not limited to, indicating the determination of the specific region, such as a city or district, based on the geographical location information of each starting point in the third starting point set. Further, the aforementioned second region set may be, but is not limited to, indicating the set composed of the regions where each starting point in the third starting point set is located. The counting of regions may be, but is not limited to, indicating the counting of each region in the second region set to understand the distribution of different regions and provide a basis for subsequent region selection.
[0142] S3. Based on the number of each region in the second region set, obtain the second reference region from the second region set, and add the location in the target location library that matches the location identifier information with the starting point location description text to the fourth starting point matching condition and is located in the second reference region to the fourth starting point set.
[0143] Optionally, in some embodiments, the above-mentioned method of obtaining the second reference region from the second region set based on the number of each region in the first starting point set may be used, but is not limited to, to indicate that the region in the second region set with a number greater than a second threshold is determined as the second reference region, or the region with the largest number in the second region set is determined as the second reference region. In this embodiment, no limitation is made in this regard.
[0144] Furthermore, the above-mentioned addition of the location identification information corresponding to the target location library and the starting point location description text to the fourth starting point set, which meets the fourth starting point matching condition and is located in the second reference area, can be used, but is not limited to, to indicate: the location identification information corresponding to the target location library and the starting point location description text, which has a matching degree greater than or equal to the fourth starting point matching threshold and is located in the second reference area, to the fourth starting point set.
[0145] S4. Add the location in the target location library that matches the location identifier information with the destination location description text to the second destination set if the match degree meets the second destination matching condition and is located in the second reference area.
[0146] Optionally, in some embodiments, adding the location corresponding to the location identifier information in the target location library and the destination location description text to the second destination set, where the matching degree between them satisfies the second destination matching condition and is located in the second reference area, may include, but is not limited to, adding the location corresponding to the location identifier information in the target location library and the destination location description text to the second destination set, where the matching degree between them is greater than or equal to the second destination matching threshold and is located in the second reference area.
[0147] In this embodiment, locations in the target location database whose matching degree between the corresponding location identifier information and the starting point location description text satisfies the third starting point matching condition and are located in the target area where the target account is located are added to the third starting point set. The regions where each starting point location in the third starting point set is located are determined to obtain a second region set, and the number of each region in the second region set is counted. Based on the number of each region in the second region set, a second reference region is obtained from the second region set, and locations in the target location database whose matching degree between the corresponding location identifier information and the starting point location description text satisfies the fourth starting point matching condition and are located in the second reference region are added to the fourth starting point set. Similarly, locations in the target location database whose matching degree between the corresponding location identifier information and the ending point location description text satisfies the second ending point matching condition and are located in the second reference region are added to the second ending point set. In other words, by combining the matching degree between the location identifier information and the starting and ending point description text with the region where the target account is located, the correlation between the user's geographical location can be identified more accurately, and these locations can be given priority. This makes location recommendations closer to the user's actual geographical location and improves the personalization of the recommendations. On the other hand, the process of determining the second reference area introduces a higher level of regional analysis, considering not only the direct matching degree of the location but also the distribution and quantity of the regions where the location is located. By comprehensively analyzing regional information, it is possible to more intelligently filter out areas that users may be interested in or frequently visit, which helps reduce false matches and improve the accuracy of location recommendations. Furthermore, a multi-level filtering approach is used to construct the location set. First, an initial set is built based on the matching degree of location identifier information and description text. Then, by analyzing the regions where these locations are located, a more precise set is subdivided and constructed. This multi-step filtering mechanism can effectively improve the quality of the location set and reduce interference from irrelevant locations. In summary, by incorporating the consideration of the target region where the target account is located and combining it with a multi-level location filtering mechanism, the personalization, accuracy, and computational efficiency of location recommendations are optimized, providing users with higher-quality route generation services.
[0148] Optionally, as an optional approach, based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, a set of M starting points that satisfy M starting point recall conditions is determined, and a set of N ending points that satisfy N ending point recall conditions is determined, further including:
[0149] S1, determine the third reference region that matches the starting position description text based on the starting position description text.
[0150] It should be noted that the aforementioned determination of the third reference region matching the starting location description text may include, but is not limited to, determining the region containing the starting location in the user's requested location pair based on keywords included in the starting location description text, and defining this region as the aforementioned third reference region. For example, assuming the starting location description text is "Park A", then the third reference region matching the starting location description text could be various cities that include "Park A".
[0151] S2, add the location in the target location library that matches the location identifier information with the starting point location description text to the fifth starting point set if the match degree meets the fifth starting point matching condition and is located in the third reference area.
[0152] Optionally, the fifth starting point matching condition mentioned above may include, but is not limited to, a matching degree between the location identifier information used to indicate the location and the starting point location description text being greater than or equal to the fifth starting point matching threshold.
[0153] S3, add the location in the target location library that matches the location identifier information with the destination location description text to the third destination set if the match meets the third destination matching condition and is located in the third reference area.
[0154] Accordingly, the aforementioned third endpoint matching condition may, but is not limited to, indicate that the degree of matching between the location identification information and the endpoint location description text is greater than or equal to the third endpoint matching threshold.
[0155] In this embodiment, a third reference region matching the starting point location description text is determined. Then, locations in the target location database whose matching degree with the starting point location description text satisfies the fifth starting point matching condition and are located within the third reference region are added to the fifth starting point set. Next, locations in the target location database whose matching degree with the ending point location description text satisfies the third ending point matching condition and are located within the third reference region are added to the third ending point set. In other words, by determining the third reference region matching the starting point location description text and constructing the fifth starting point set and the third ending point set based on this region, the geographical areas that users may be interested in can be identified more accurately, thereby improving the accuracy and targeting of location filtering. This refined recall strategy, compared to simply matching based on the global location database, significantly reduces interference from irrelevant locations and improves recall efficiency and effectiveness. On the other hand, by performing location filtering within the third reference region, the computational load of the global search can be reduced. Especially in large-scale location databases, this local search method can significantly save computational resources and improve the efficiency of the entire route generation process. In summary, by refining the location retrieval strategy, the route generation system enhances its ability to provide personalized and contextualized location recommendations, while optimizing the utilization of computing resources, thus providing users with more accurate and efficient route planning services.
[0156] Optionally, as an alternative approach, based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, a set of M starting points that satisfy M starting point recall conditions is determined, and a set of N ending points that satisfy N ending point recall conditions is determined, including:
[0157] S1, add the locations in the target location library that match the location identifier information with the destination location description text and meet the fourth destination matching condition to the fourth destination set. The matching degree is obtained based on the character matching degree between the location identifier information and the destination location description text.
[0158] It should be noted that, in some embodiments, the matching degree mentioned above may be determined based on at least one of the character similarity and access frequency between the location identification information and the destination location description text. For example, the matching degree may be obtained by weighted summation of the character similarity and access frequency between the location identification information and the destination location description text. Specifically, the character similarity may be obtained through edit distance, cosine similarity, longest common subsequence, or other similar methods, and this embodiment does not limit this.
[0159] S2, determine the region where each endpoint is located in the fourth endpoint set, obtain the fourth region set, and count the number of each region in the fourth region set.
[0160] Optionally, in some embodiments, the aforementioned determination of the region where each endpoint location in the fourth endpoint set is located may be, but is not limited to, indicating the determination of the specific region, such as a city or district, based on the geographical location information of each endpoint location in the fourth endpoint set. Further, the aforementioned fourth region set may be, but is not limited to, indicating the set composed of the regions where each endpoint location in the fourth endpoint set is located. The counting of regions may be, but is not limited to, indicating the counting of each region in the fourth region set to understand the distribution of different regions and provide a basis for subsequent region selection.
[0161] S3. Based on the number of each region in the fourth endpoint set, obtain the fourth reference region from the fourth region set, and add the location in the target location library that matches the location identifier information with the endpoint location description text to the fifth endpoint set if the match degree meets the fifth endpoint matching condition and is located in the fourth reference region.
[0162] Optionally, in some embodiments, the above-mentioned method of obtaining the fourth reference region from the fourth region set based on the number of each region in the fourth endpoint set may be used, but is not limited to, to indicate that the region in the fourth region set with a number greater than the third threshold is determined as the fourth reference region, or the region with the largest number in the fourth region set is determined as the fourth reference region. In this embodiment, no limitation is made in this regard.
[0163] S4. Add the location in the target location library that matches the location identifier information with the starting point location description text to the sixth starting point set if the match degree meets the sixth starting point matching condition and is located in the fourth reference area.
[0164] Furthermore, in some embodiments, the fourth endpoint matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the fourth endpoint matching degree threshold; the fifth endpoint matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the fifth endpoint matching threshold; and the sixth starting point matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the sixth starting point matching threshold.
[0165] In this embodiment, locations in the target location database whose matching degree between the corresponding location identifier information and the destination location description text satisfies the fourth endpoint matching condition are added to the fourth endpoint set. The matching degree is obtained based on the character matching degree between the location identifier information and the destination location description text. Then, the regions where each endpoint location in the fourth endpoint set is located are determined, resulting in a fourth region set, and the number of each region in the fourth region set is counted. Next, based on the number of each region in the fourth endpoint set, a fourth reference region is obtained from the fourth region set, and locations in the target location database whose matching degree between the corresponding location identifier information and the destination location description text satisfies the fifth endpoint matching condition and are located in the fourth reference region are added to the fifth endpoint set. Furthermore, locations in the target location database whose matching degree between the corresponding location identifier information and the starting point location description text satisfies the sixth starting point matching condition and are located in the fourth reference region are added to the sixth starting point set. In other words, using this embodiment, not only are locations filtered based on character matching degree, but the location set is further optimized through regional analysis (such as the statistics of the fourth region set and the determination of the fourth reference region). This enables the identification of hotspot areas or specific geographical areas that users may be interested in, thereby recommending locations more intelligently. By initially constructing the fourth endpoint set, then analyzing and determining the fourth reference region, and filtering out the fifth endpoint set and the sixth starting point set, this series of operations helps to optimize computational efficiency and reduce unnecessary global searches. Especially in large-scale location databases, targeted searches for locations within specific regions can significantly accelerate the speed of location retrieval.
[0166] Optionally, as an optional approach, based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, a set of M starting points that satisfy M starting point recall conditions is determined, and a set of N ending points that satisfy N ending point recall conditions is determined, further including:
[0167] S1. Add the location in the target location library that matches the location identifier information with the destination location description text to the sixth destination set if the match meets the sixth destination matching condition and is located in the target area where the target account is located.
[0168] Optionally, in some embodiments, the target area where the target account is located may be, but is not limited to, the area indicating the current location of the target account, such as the city where the target account is located.
[0169] S2, determine the regions where each endpoint location in the sixth endpoint set is located, obtain the fifth region set, and count the number of each region in the fifth region set.
[0170] S3. Based on the number of each region in the fifth region set, obtain the fifth reference region from the fifth region set, and add the location in the target location library that matches the location identifier information and the endpoint location description text with the seventh endpoint matching condition and is located in the fifth reference region to the seventh endpoint set.
[0171] It should be noted that the above-mentioned method of obtaining the fifth reference region from the fifth region set based on the number of each region in the fifth region set may include, but is not limited to: determining the region in the fifth region set whose number is greater than the fourth threshold as the fifth reference region, or determining the region with the largest number in the fifth region set as the fifth reference region.
[0172] S4. Add the location in the target location library that matches the location identifier information with the starting point location description text to the seventh starting point set if the match degree meets the seventh starting point matching condition and is located in the fifth reference area.
[0173] Optionally, in some embodiments, the sixth endpoint matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the sixth endpoint matching threshold; the seventh endpoint matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the seventh endpoint matching threshold; and the seventh starting point matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the seventh starting point matching threshold.
[0174] In this embodiment, locations in the target location database whose matching degree between the corresponding location identifier information and the destination location description text satisfies the sixth endpoint matching condition and are located in the target area where the target account is located are added to the sixth endpoint set. The regions where each endpoint location in the sixth endpoint set is located are determined to obtain the fifth region set, and the number of each region in the fifth region set is counted. Based on the number of each region in the fifth region set, the fifth reference region is obtained from the fifth region set, and locations in the target location database whose matching degree between the corresponding location identifier information and the destination location description text satisfies the seventh endpoint matching condition and are located in the fifth reference region are added to the seventh endpoint set. Similarly, locations in the target location database whose matching degree between the corresponding location identifier information and the starting point location description text satisfies the seventh starting point matching condition and are located in the fifth reference region are added to the seventh starting point set. In other words, by setting location recall conditions related to the target area where the target account is located, this embodiment can more accurately recommend starting and ending points related to the user's current geographical location. This recommendation based on the user's geographical location enhances the personalization and contextual relevance of the recommendation, ensuring that the recommended locations are more practically meaningful and valuable to the user. The process of constructing the sixth and seventh endpoint sets involves multi-level filtering (matching conditions for the sixth and seventh endpoints) to ensure that the final recommended location sets not only match the user's input in terms of textual description but are also more accurate in terms of geographical location. This multi-level filtering mechanism effectively improves the quality of location matching. By limiting the location search to the target area and its derived fifth reference area, the system reduces the search of the entire location database, avoids unnecessary global matching calculations, effectively improves computational efficiency, and speeds up system response.
[0175] Optionally, as an optional approach, based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, a set of M starting points that satisfy M starting point recall conditions is determined, and a set of N ending points that satisfy N ending point recall conditions is determined, further including:
[0176] S1, determine the sixth reference region that matches the endpoint location description text based on the endpoint location description text.
[0177] Optionally, in some embodiments, determining the sixth reference region matching the destination location description text based on the destination location description text may include, but is not limited to, determining the region where the starting point of the location pair requested by the user is located based on the keywords included in the destination location description text, and defining the region as the sixth reference region. For example, assuming the destination location description text is "Café B", then the sixth reference region matching the destination location description text could be various cities that include "Café B".
[0178] S2, add the location in the target location library that matches the location identifier information with the destination location description text to the eighth destination set if the match degree meets the eighth destination matching condition and is located in the sixth reference area.
[0179] S3. Add the location in the target location library that matches the location identifier information with the starting point location description text to the eighth starting point set if the match meets the eighth starting point matching condition and is located in the sixth reference area.
[0180] Optionally, in some embodiments, the above-mentioned eighth endpoint matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the eighth endpoint matching threshold; the above-mentioned eighth starting point matching condition may be used, but is not limited to, to indicate that the matching degree is greater than or equal to the eighth starting point matching threshold.
[0181] As an optional example, it can be, but is not limited to, by means of, such as Figure 6 The following example illustrates the steps for determining that there are M starting sets and N ending sets:
[0182] like Figure 6 As shown, the candidate set (used to represent the set of candidate start points and the set of candidate end points) includes:
[0183] 1) Based on the starting point keywords (used to represent the starting point location description text or keywords in the starting point location description text), call the navigation application interface to determine the starting point candidate set 1 (used to represent the first starting point set) from the target location library;
[0184] 2) Based on the starting point keywords and starting point city 1 (used to represent the first reference area), call the navigation application interface to determine the starting point candidate set 2 (used to represent the second starting point set) from the target location library;
[0185] 3) Based on the destination keywords (used to represent the keywords in the destination location description text or the destination location description text) and the starting city 1, call the navigation application interface to determine the destination candidate set 6 (used to represent the first destination set) from the target location database;
[0186] 4) Based on the starting point keywords and user location (used to represent the target area where the target account is located), call the navigation application interface to determine the starting point candidate set 3 (used to represent the third starting point set) from the target location library;
[0187] 5) Based on the starting point keywords and starting point city 2 (used to represent the second reference area), call the navigation application interface to determine the starting point candidate set 4 (used to represent the fourth starting point set) from the target location library;
[0188] 6) Based on the destination keywords and the starting city 2, call the navigation application interface to determine the destination candidate set 7 (used to represent the second destination set) from the target location database;
[0189] 7) Using the starting point keywords and the starting point city 3 determined based on the ending point keywords (used to represent the third reference area), call the navigation application interface to determine the starting point candidate set 5 (used to represent the fifth starting point set) from the target location library;
[0190] 8) Based on the destination keywords and the starting city 3, call the navigation application interface to determine the destination candidate set 8 (used to represent the third destination set) from the target location library;
[0191] 9) Based on the destination keywords, call the navigation application interface to determine the destination candidate set 1 (used to represent the fourth destination set) from the target location library;
[0192] 10) Based on the destination keywords and destination city 1 (used to represent the fourth reference area), call the navigation application interface to determine the destination candidate set 2 (used to represent the fifth destination set) from the target location library;
[0193] 11) Based on the starting point keyword and the destination city 1, call the navigation application interface to determine the starting point candidate set 6 (used to represent the sixth starting point set) from the target location database;
[0194] 12) Based on the destination keywords and user location, call the navigation application interface to determine the destination candidate set 3 (used to represent the sixth destination set) from the target location database;
[0195] 13) Based on the destination keywords and destination city 2 (used to represent the fifth reference area), call the navigation application interface to determine the destination candidate set 4 (used to represent the seventh destination set) from the target location library;
[0196] 14) Based on the starting point keyword and the destination city 2, call the navigation application interface to determine the starting point candidate set 7 (for the seventh starting point set) from the target location database;
[0197] 15) Using the endpoint keywords and the endpoint city 3 determined based on the endpoint keywords (used to represent the sixth reference area), call the navigation application interface to determine the endpoint candidate set 8 (used to represent the eighth endpoint set) from the target location library;
[0198] 16) Based on the starting point keyword and the destination city 3, call the navigation application interface to determine the starting point candidate set 8 from the target location library (used to represent the eighth starting point set).
[0199] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0200] In this embodiment, a sixth reference region matching the endpoint location description text is determined. Next, locations in the target location database whose matching degree with the endpoint location description text satisfies the eighth endpoint matching condition and are located within the sixth reference region are added to the eighth endpoint set. Then, locations in the target location database whose matching degree with the starting point location description text satisfies the eighth starting point matching condition and are located within the sixth reference region are added to the eighth starting point set. In other words, by determining the sixth reference region matching the endpoint location description text, this embodiment more accurately identifies geographical areas that users may be interested in, making the recommended endpoint locations closer to the user's personalized needs and enhancing the targeting of the recommendations. The eighth endpoint set, filtered through the eighth endpoint matching condition, ensures a high degree of matching between the recommended endpoint locations and the user's description text based on a stricter matching degree standard, improving the accuracy of location recommendations. Limiting the location recall scope to the sixth reference region reduces the computational load of global search and improves filtering efficiency. Simultaneously, this focused filtering method helps reduce interference from irrelevant locations, ensuring the effectiveness and relevance of the recommended locations.
[0201] Optionally, as an alternative approach, adding the starting positions that satisfy the starting position conditions from the candidate starting position set to the starting position set includes:
[0202] S1, input the starting position description text and each starting position in the candidate starting position set into the similarity matching model to obtain the starting position semantic similarity between the starting position description text and each starting position.
[0203] It should be noted that in some embodiments, the similarity matching model described above may, but is not limited to, using a large oracle model, such as a bidirectional transformer encoder, a generative pre-trained transformer, or other large oracle models with similar functions. This embodiment does not impose any limitations on this approach. The similarity matching model, through its ability to learn and understand natural language, can evaluate and calculate the semantic similarity between input texts.
[0204] Furthermore, the aforementioned starting point semantic similarity is used to characterize the semantic relevance between the starting point location description text and each location in the candidate starting point location set. The higher the starting point semantic similarity, the more semantically the location description matches the starting point location.
[0205] S2, sort the candidate starting point positions in the set according to the semantic similarity of the starting point.
[0206] Optionally, in some embodiments, the candidate starting positions in the set of starting positions can be sorted in ascending order according to the semantic similarity of the starting points, or in descending order according to the semantic similarity of the starting points.
[0207] S3, determine the starting position that satisfies the starting position condition from the candidate starting position set according to the sorting order of each starting position.
[0208] It should be noted that, taking the above sorting process as an ascending sorting process as an example, the above starting position condition can be, but is not limited to, an indication that the corresponding sorting position number is greater than the first number; taking the above sorting process as a descending sorting process as an example, the above starting position condition can be, but is not limited to, an indication that the corresponding sorting position number is less than the second number.
[0209] S4 adds the starting positions that meet the starting position conditions to the starting position set.
[0210] In this embodiment, the starting point location description text and each starting point location in the candidate starting point location set are input into a similarity matching model to obtain the semantic similarity between the starting point location description text and each starting point location. Then, the starting points in the candidate starting point location set are sorted according to their semantic similarity. Next, starting points that meet the starting point location criteria are determined from the candidate starting point location set according to their sorted order. Finally, the starting points that meet the starting point location criteria are added to the starting point set. In other words, by using a similarity matching model to calculate the semantic similarity between the starting point location description text and the candidate locations, this embodiment can more accurately understand the geographical location information referred to by the user's input text, thereby improving the accuracy of location recognition and the ability to understand user intent. Based on semantic similarity sorting, starting points that are semantically more compatible with the user's input text can be recommended first. This personalized recommendation method can better meet the specific needs of users and improve user satisfaction.
[0211] Optionally, as an alternative approach, adding endpoint locations that satisfy the endpoint location conditions from the candidate endpoint location set to the endpoint set includes:
[0212] S1, input the endpoint location description text and each endpoint location in the candidate endpoint location set into the similarity matching model to obtain the endpoint semantic similarity between the endpoint location description text and each endpoint location.
[0213] Optionally, in some embodiments, the aforementioned endpoint semantic similarity is used to characterize the semantic relevance between the endpoint location description text and each location in the candidate endpoint location set. A higher endpoint semantic similarity indicates a better semantic match between the location description and the endpoint location.
[0214] S2, sort the candidate endpoint locations in the endpoint location set according to the endpoint semantic similarity.
[0215] Optionally, in some embodiments, the candidate endpoint locations in the set of endpoint locations may be sorted in ascending order according to the semantic similarity of the endpoints, or in descending order according to the semantic similarity of the endpoints.
[0216] S3, determine the endpoint position that satisfies the endpoint position condition from the candidate endpoint position set according to the sorting order of each endpoint position.
[0217] It should be noted that, taking the above sorting process as an ascending sorting process as an example, the above endpoint position condition may, but is not limited to, indicating that the corresponding sorting position number is greater than the third number; taking the above sorting process as a descending sorting process as an example, the above endpoint position condition may, but is not limited to, indicating that the corresponding sorting position number is less than the fourth number.
[0218] S4 adds the endpoint locations that meet the endpoint location conditions to the endpoint set.
[0219] As an optional example, it can be, but is not limited to, by means of, such as Figure 7 The following steps illustrate the above steps with examples:
[0220] like Figure 7 As shown, when a candidate set (including the above M starting point sets and N ending point sets) 702 is obtained, the location identification information of each starting point position in the M starting point sets and the starting point keywords (used to represent the starting point location description text) input by the user are input into the similarity matching model 704 to obtain the starting point semantic similarity of each starting point position; at the same time, the location identification information of each ending point position in the N ending point sets and the ending point keywords (used to represent the ending point location description text) input by the user are input into the similarity matching model 704 to obtain the ending point semantic similarity of each ending point position; then, according to the starting point semantic similarity and the ending point semantic similarity, the M starting point sets and N ending point sets are coarsely ranked to obtain the starting point set 706 and the ending point set 708.
[0221] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0222] In this embodiment, the endpoint location description text and each endpoint location in the candidate endpoint location set are input into a similarity matching model to obtain the endpoint semantic similarity between the endpoint location description text and each endpoint location. Then, the endpoint locations in the candidate endpoint location set are sorted according to their semantic similarity. Next, endpoint locations that meet the endpoint location criteria are determined from the candidate endpoint location set according to their sorting order. Finally, endpoint locations that meet the endpoint location criteria are added to the endpoint set. In other words, by using this embodiment and calculating the semantic similarity between the endpoint description text and candidate locations through a similarity matching model, a deeper understanding of the endpoint information input by the user can be achieved. Especially when dealing with complex text containing aliases, abbreviations, or descriptive language, the endpoint location intended by the user can be accurately identified, reducing the possibility of mismatched locations. Based on the sorting of endpoint semantic similarity, the endpoint location that best matches the user's description text is prioritized for recommendation. This not only enhances the personalization of the recommendation but also ensures the high relevance of the recommended location, improving user satisfaction with the recommended endpoint location.
[0223] Optionally, as an alternative approach, obtaining the location text similarity between each of the Z location pairs and the requested location pair includes:
[0224] Determine the Z position pairs as the current position pairs and perform the following steps:
[0225] Get the starting position identifier information of the current starting position in the current position pair, and get the ending position identifier information of the current ending position in the current position pair.
[0226] Determine the first semantic similarity between the starting point location identifier information and the starting point location description text, and determine the second semantic similarity between the ending point location identifier information and the ending point location description text.
[0227] Determine the first character similarity between the starting point location identifier information and the starting point location description text, and determine the second character similarity between the ending point location identifier information and the ending point location description text.
[0228] It should be noted that, in some embodiments, the aforementioned first semantic similarity and second semantic similarity may be, but are not limited to, those determined by the similarity matching model described above. Furthermore, the aforementioned first character similarity and second character similarity may be, but are not limited to, indicating edit distance, cosine similarity, longest common subsequence, etc., and are not limited in this embodiment.
[0229] Semantic similarity parameters are generated using the first semantic similarity and the second semantic similarity, and character similarity parameters are generated using the first character similarity and the second character similarity. The positional text similarity includes both semantic similarity parameters and character similarity parameters.
[0230] Optionally, in some embodiments, the above-mentioned generation of semantic similarity parameters using the first semantic similarity and the second semantic similarity may include, but is not limited to: performing a weighted summation of the first semantic similarity and the second semantic similarity to obtain a semantic intermediate result, and then obtaining the semantic similarity parameters based on the first semantic intermediate result.
[0231] Furthermore, in some embodiments, the generation of character similarity parameters using the first character similarity and the second character similarity may include, but is not limited to: performing a weighted summation of the first character similarity and the second character similarity to obtain an intermediate character result, and then obtaining the character similarity parameters based on the first character intermediate result.
[0232] As an optional example, taking the current starting position as the i-th starting position in the starting set and the current ending position as the j-th ending position in the ending set as an example, the generation process of the above semantic similarity parameters can be explained through the following example, but is not limited to:
[0233]
[0234] Among them, the above Used to represent the first semantic similarity, above Used to represent second semantic similarity, above Used to represent semantic similarity parameters.
[0235] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0236] As an optional example, taking the current starting position as the i-th starting position in the starting set and the current ending position as the j-th ending position in the ending set as an example, the generation process of the above character similarity parameters can be explained through, but is not limited to, the following example:
[0237]
[0238] Among them, the above K s The above is used to indicate the starting position description text. The starting position identifier information used to represent the i-th starting position, K above e The above is used to indicate the description text of the endpoint location. The endpoint location identifier information used to represent the j-th endpoint location, above The edit distance similarity (used to characterize the first character similarity) between the starting position identifier information and the starting position description text of the i-th starting position is used to represent the starting position position. The edit distance similarity (used to characterize the second character similarity) between the endpoint location identifier information and the endpoint location description text is used to represent the j-th endpoint location. Used to represent character similarity parameters.
[0239] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0240] In this embodiment, Z location pairs are determined as current location pairs, and the following steps are performed: obtaining the start position identifier information of the current start position in the current location pair, and obtaining the end position identifier information of the current end position in the current location pair; determining the first semantic similarity between the start position identifier information and the start position description text, and determining the second semantic similarity between the end position identifier information and the end position description text; determining the first character similarity between the start position identifier information and the start position description text, and determining the second character similarity between the end position identifier information and the end position description text; generating semantic similarity parameters using the first semantic similarity and the second semantic similarity, and generating character similarity parameters using the first character similarity and the second character similarity, wherein the location text similarity includes semantic similarity parameters and character similarity parameters. In other words, by combining semantic similarity and character similarity, the matching degree between the location pair and the requested location pair can be evaluated more comprehensively using this embodiment. Semantic similarity considers the inherent meaning and contextual understanding of the location name, while character similarity focuses on the text matching of the name. The combination of the two makes the location matching more accurate and reasonable.
[0241] Optionally, as an alternative approach, obtaining the position pair relation description parameters corresponding to each of the Z position pairs includes at least one of the following:
[0242] Based on the target distance matrix used to characterize the distance between the start position and the end position in each of the Z position pairs, and the current distance information between the current start position and the current end position, the first relation description parameters are generated.
[0243] It should be noted that, in some embodiments, the target distance matrix described above may be, but is not limited to, a two-dimensional array used to store the distance information between the start and end positions of each of the Z position pairs. These distances may be geodesic distances, great circle distances, or actual distances on a transportation network, etc., and are not limited in this embodiment.
[0244] Optionally, in some embodiments, the current distance information between the current starting point position and the current ending point position may be used, but is not limited to, to indicate the physical distance between the current starting point position and the current ending point position. The physical distance may be used, but is not limited to, to indicate geodesic distance, great circle distance, or actual distance on a transportation network, etc., and this embodiment does not limit this.
[0245] The second relation description parameter is generated by using the number of times the current starting position is visited and the number of times the current ending position is visited, as well as the number of times each position in the target position library is visited.
[0246] Optionally, in some embodiments, the aforementioned number of visits to the starting point and the number of visits to the ending point may be used, but are not limited to, to indicate the number of visits to each location in the target location library. For example, the frequency with which a user or system visits a location within a specific time range. This could be the number of times a user searches for or selects a location as a starting point or ending point during application usage, the number of times the system records the number of times a user navigates to that location, or the frequency of mentions or visits to the location in other user behavior data. In this embodiment, this is not limited.
[0247] Using the sorting order of the current starting position in each of the M starting position sets, and the sorting order of the current ending position in each of the N ending position sets, a third relation description coefficient is generated. The positions included in each starting position set are sorted according to their matching degree with the starting position description text, and the positions included in each ending position set are sorted according to their matching degree with the starting position description text.
[0248] It should be noted that the above sorting order can be used, but is not limited to, to indicate the sorting position of the candidate position in each starting point set or ending point set during the multi-step recall and sorting process, and the sorting basis can be the degree of matching with the position description text.
[0249] In this embodiment, a first relation description parameter is generated based on a target distance matrix representing the distance between the start and end positions in each of the Z location pairs, and the current distance information between the current start and end positions. A second relation description parameter is generated using the number of times the current start position is accessed and the number of times the current end position is accessed, as well as the number of times each position in the target location database is accessed. A third relation description coefficient is generated using the sorting order of the current start position in each of the M start set sets and the sorting order of the current end position in each of the N end set sets. The positions included in each start set are sorted according to their matching degree with the start position description text, and the positions included in each end set are also sorted according to their matching degree with the start position description text. In other words, using this embodiment, the first relation description parameter considers the distance between the start and end points in the location pair, and the degree of matching between these distances and the requested location pair. This helps to recommend location pairs whose distance between the start and end points matches the user's expectations, thereby improving the rationality of the recommendation. On the other hand, the second relation description parameter utilizes the number of visits to the origin and destination points to reflect the popularity of the location and user preferences. This allows for the recommendation of more frequently visited and popular location pairs, improving the usability of the recommendation results and user satisfaction. Furthermore, the third relation description parameter is based on the ranking order of multiple screening stages, which helps the system identify location pairs that perform better and better match user descriptions during the location retrieval process. The ranking order reflects the relative importance of locations in the similarity matching process, thereby improving the accuracy of location pair recommendations. In summary, by integrating multi-dimensional information such as distance, number of visits, and ranking order into the location pair relation description parameters, a more comprehensive understanding of user needs can be achieved, leading to more personalized location pair recommendations.
[0250] Optionally, as an alternative approach, based on the target distance matrix used to characterize the distance between the start position and the end position included in each of the Z position pairs, and the current distance information between the current start position and the current end position, the first relation description parameters are generated as follows:
[0251] S1, obtain first distance information that is greater than a first distance threshold and second distance information that is less than a second distance threshold from the target distance matrix, wherein the first distance threshold is greater than the second distance threshold.
[0252] It should be noted that the first distance information greater than the first distance threshold can be used, but is not limited to, to indicate the largest distance information in the target distance matrix that is greater than the first distance threshold, or all distance information greater than the first distance threshold; correspondingly, the second distance information less than the second distance threshold can be used, but is not limited to, to indicate the smallest distance information in the target distance matrix that is less than the second distance threshold, or all distance information less than the second distance threshold, and this is not limited in this embodiment.
[0253] S2, normalize the current distance information using the first distance information and the second distance information to obtain normalized current distance information.
[0254] Optionally, in some embodiments, the normalization process of the current distance information using the first distance information and the second distance information to obtain the normalized current distance information may include, but is not limited to: generating first intermediate distance information using the current distance information and the second distance information; generating second intermediate distance information based on the first distance information and the second distance information; and generating the normalized current distance information using the first intermediate distance information and the second intermediate distance information.
[0255] S3 generates the first relation description parameters using the normalized current distance information.
[0256] Optionally, as an optional example, assuming the above distance information is used to characterize geodesic distance, and taking the first distance information greater than the first distance threshold as the largest distance information in the target distance matrix that is greater than the first distance threshold, and the second distance information as the smallest distance information in the target distance matrix that is less than the second distance threshold, and assuming the above current starting point position is the i-th starting point position in the starting point set, and the above current ending point position is the j-th ending point position in the ending point set, the generation process of the above first relation description parameters can be illustrated by example based on, but is not limited to, the following steps:
[0257]
[0258] d min =min(D) (7)
[0259] d max =max(D) (8)
[0260]
[0261] In formula (5) above: The longitude used to represent the position of the i-th starting point. The latitude used to represent the position of the i-th starting point. The longitude used to represent the location of the j-th endpoint. The latitude d is used to represent the position of the j-th endpoint. i,j Used to represent the i-th starting point position and the geodesic distance between the i-th starting point position (used to characterize the above current distance information).
[0262] Furthermore, in the above formula (6): D is used to represent the target distance matrix.
[0263] Alternatively, in the above formula (7): d min Used to represent the second distance information mentioned above.
[0264] Alternatively, in the above formula (8): d max Used to represent the aforementioned first distance information.
[0265] Alternatively, in the above formula (9): d i,j -d min d is used to represent the aforementioned first intermediate distance information. max -d min Used to represent the aforementioned second intermediate distance information. Used to represent the normalized current distance information.
[0266] Alternatively, in the above formula (10): Used to represent the parameters describing the first relation.
[0267] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0268] In this embodiment, first distance information greater than a first distance threshold and second distance information less than a second distance threshold are obtained from the target distance matrix, wherein the first distance threshold is greater than the second distance threshold. Then, the current distance information is normalized using the first and second distance information to obtain normalized current distance information. Next, the normalized current distance information is used to generate a first relationship description parameter. In other words, by obtaining the first and second distance information from the target distance matrix and normalizing the current distance information based on this information, the impact of distance differences between location pairs on the location pair recommendation results can be effectively reduced, ensuring a fairer and more objective recommendation process. By normalizing the distance information between the current starting and ending positions, the distance differences between different location pairs can be transformed into a unified scale, making the distance information more comparable during calculation and avoiding evaluation bias caused by differences in distance magnitude. The normalized distance information is used as the basis for generating the first relationship description parameter, which helps to more accurately describe the relationship between the starting and ending positions. Especially when evaluating the comprehensive matching degree of location pairs, it ensures the reasonable inclusion of distance factors and improves the rationality of location pair recommendations.
[0269] Optionally, as an alternative approach, the second relation description parameters are generated by utilizing the number of times the current starting point location is visited and the number of times the current ending point location is visited, as well as the number of times each location in the target location database is visited.
[0270] S1, sort the access counts of each location in the target location database to obtain the first access count sequence.
[0271] It should be noted that the first access sequence obtained by sorting the access counts of each location in the target location database can be sorted in descending order or ascending order, but this embodiment does not limit this.
[0272] S2, sort the number of visits to each position in the starting set to obtain the second number of visits sequence, and sort the number of visits to each position in the ending set to obtain the third number of visits sequence.
[0273] Accordingly, the second access sequence is obtained by sorting the access counts of each position in the starting point set and the third access sequence is obtained by sorting the access counts of each position in the ending point set. The sorting can be done in descending order or ascending order. In this embodiment, there is no limitation on this.
[0274] S3, determine the first starting point access sequence and the first ending point access sequence in the first access sequence, and determine the second starting point access sequence in the second access sequence, and the second ending point access sequence in the third access sequence.
[0275] S4. Using the first starting point access sequence, the second starting point access sequence, the first ending point access sequence, and the second ending point access sequence, generate the second relation description parameters.
[0276] Optionally, the generation of the second relation description parameters using the first starting point access sequence, the second starting point access sequence, the first ending point access sequence, and the second ending point access sequence may include, but is not limited to:
[0277] S4-1, using the first starting point access sequence and the sequence corresponding to the access with the largest access count in the first access count sequence, a first intermediate access value is generated, and then the first access parameter is generated using the first intermediate access value; then, using the second starting point access sequence and the number of starting positions included in the starting point set, a second intermediate access value is generated, and then the second access parameter is generated using the second intermediate access value; next, based on the first access parameter and the second access parameter, a starting point access parameter is generated.
[0278] S4-2, using the second endpoint access sequence and the sequence corresponding to the largest access number in the first access sequence, a third intermediate access value is generated, and then a third access parameter is generated using the third intermediate access value; then, using the second endpoint access sequence and the number of endpoint positions included in the endpoint set, a fourth intermediate access value is generated, and then a fourth access parameter is generated using the fourth intermediate access value; finally, based on the third and fourth access parameters, an endpoint access parameter is generated.
[0279] S4-3, perform weighted fusion processing on the above starting point access parameters and the above ending point access parameters to obtain intermediate access parameters;
[0280] S4-4, Based on the above intermediate access parameters, generate the above second relation description parameters.
[0281] Optionally, still assuming that the current starting position is the i-th starting position in the starting point set and the current ending position is the j-th ending position in the ending point set, the generation process of the above second relation description parameters can be illustrated with examples based on, but is not limited to, the following steps:
[0282]
[0283] In formula 11 above: The first starting point access sequence is used to represent the access position mentioned above, and max_heat is used to represent the position corresponding to the access with the largest access count in the first access count sequence mentioned above. Used to represent the first intermediate access value mentioned above. This is used to represent the first access parameter mentioned above; correspondingly, the generation process of the third access parameter is described in Formula 11, which will not be elaborated in this example.
[0284] Alternatively, in Formula 12 above: Used to represent the access sequence of the second starting point mentioned above, len(S) s The ) is used to represent the number of starting positions included in the above starting point set. Used to represent the second intermediate access value mentioned above. This is used to represent the second access parameter mentioned above; correspondingly, the generation process of the fourth access parameter is described in Formula 12, which will not be repeated in this example.
[0285] Alternatively, in Formula 13 above: This is used to represent the above starting point access parameters; correspondingly, the process of generating the ending point access parameters is described in Formula 13, which will not be elaborated in this example.
[0286] Alternatively, in Formula 14 above: Used to represent the above starting point access parameters. ) is used to represent the endpoint access parameters mentioned above. Heat_Score is used to represent the intermediate access parameter mentioned above. i,j Used to represent the parameters describing the second relation.
[0287] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0288] As an optional example, it can be, but is not limited to, by means of, such as Figure 8 The following example illustrates the method for generating the above routes:
[0289] like Figure 8As shown, after obtaining the candidate set (including the above M starting point sets and N ending point sets) 802, the location identifier information of each starting point position in the M starting point sets and the starting point keywords (used to represent the starting point location description text) input by the user are input into the similarity matching model 804 to obtain the starting point semantic similarity of each starting point position; at the same time, the location identifier information of each ending point position in the N ending point sets and the ending point keywords (used to represent the ending point location description text) input by the user are input into the similarity matching model 804 to obtain the ending point semantic similarity of each ending point position; then, according to the starting point semantic similarity... Similarity and semantic similarity of endpoints are used to perform a coarse ranking of the M starting point sets and N endpoint sets, resulting in starting point set 806 and endpoint set 808. Then, the name similarity (used to represent character similarity), distance score (used to represent the first relation description parameter), ranking score (third relation description parameter), popularity score (second relation description parameter), and semantic score (used to represent semantic similarity) corresponding to each starting point position in the starting point set and each endpoint position in the endpoint set are determined to perform a fine ranking of the starting point set and endpoint set, resulting in target position pair 810 (including target starting point position and target endpoint position).
[0290] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0291] In this embodiment, the access counts of each location in the target location database are sorted to obtain a first access count sequence; the access counts of each location in the starting point set are sorted to obtain a second access count sequence; and the access counts of each location in the ending point set are sorted to obtain a third access count sequence. A first starting point access sequence and a first ending point access sequence are determined in the first access count sequence, and a second starting point access sequence and a second ending point access sequence are determined in the second access count sequence. A second relation description parameter is generated using the first starting point access sequence, the second starting point access sequence, the first ending point access sequence, and the second ending point access sequence. In other words, by calculating the access sequences of the current starting point and the current ending point, this embodiment can identify which locations a user might be more interested in, especially when dealing with users with specific access needs, enabling more personalized recommendations.
[0292] Optionally, as an alternative approach, the third relation descriptor coefficients are generated by utilizing the sorting order of the current starting position within each of the M starting position sets and the sorting order of the current ending position within each of the N ending position sets, including:
[0293] S1, merges the sorting order of the current starting position in each of the M starting set sets to obtain the starting sorting parameters.
[0294] Optionally, in some embodiments, the above-mentioned fusion processing of the sorting order of the current starting position in each of the M starting point sets to obtain the starting point sorting parameters may include, but is not limited to, fusion processing of the sorting order of the current starting position in each of the M starting point sets based on weight parameters to obtain the starting point sorting parameters.
[0295] S2, merges the sorting order of the current endpoint position in each of the N endpoint sets to obtain the endpoint sorting parameters.
[0296] Optionally, in some embodiments, the above-mentioned fusion processing of the sorting order of the current endpoint position in each of the N endpoint sets to obtain endpoint sorting parameters may include, but is not limited to, fusion processing of the sorting order of the current endpoint position in each of the N endpoint sets based on weight parameters to obtain endpoint sorting parameters.
[0297] S3 generates third relation descriptive coefficients based on the starting point sorting parameters and the ending point sorting parameters.
[0298] It should be noted that, in some embodiments, the above-mentioned generation of third relation descriptive coefficients based on the starting point sorting parameters and the ending point sorting parameters may include, but is not limited to: normalizing the starting point sorting parameters and the ending point sorting parameters respectively to obtain normalized starting point sorting parameters and normalized ending point sorting parameters; performing weighted summation on the normalized starting point sorting parameters and normalized ending point sorting parameters to obtain intermediate sorting parameters; and then generating the above-mentioned third relation descriptive coefficients based on the intermediate sorting parameters.
[0299] Optionally, we still assume that the current starting position is the i-th starting position in the starting set, and the current ending position is the j-th ending position in the ending set. We also assume that the sorting order of the current starting position in each of the M starting sets includes: exist r in i 1 r is used to represent the sorting order of the current starting position in the first set of M starting positions. i p This is used to indicate the sorting order of the current starting position within the last set of M starting point sets. Assume the sorting order of the current ending position within each of the N ending point sets includes: exist In r is used to represent the sorting order of the current destination position within the first destination set out of N destination sets. j q The generation process of the above third relation description parameter, which indicates the sorting order of the current endpoint position in the last endpoint set out of N endpoint sets, can be illustrated with examples, but is not limited to, the following steps:
[0300]
[0301] In Formula 15 above: α represents the aforementioned weighting parameter, and r represents... The various elements in This is used to represent the starting point sorting parameter mentioned above; correspondingly, the steps for generating the ending point sorting parameter are described in Formula 15, which will not be repeated in this example.
[0302] Alternatively, in Formula 16 above: The starting sorting parameter is used to represent the normalization starting point; correspondingly, the steps for generating the normalization ending point sorting parameter are given in Formula 16, which will not be repeated in this example.
[0303] Alternatively, in Formula 17 above: The starting sorting parameter used to represent the normalization starting point. Used to represent the endpoint sorting parameter for normalization. Sort intermediate parameters, Used to represent parameters describing a third relationship.
[0304] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0305] In this embodiment, the ranking of the current starting point position within each of the M starting point sets is fused to obtain starting point ranking parameters; the ranking of the current ending point position within each of the N ending point sets is fused to obtain ending point ranking parameters; and a third relation description coefficient is generated based on the starting point ranking parameters and the ending point ranking parameters. In other words, using this embodiment, the starting point ranking parameters and the ending point ranking parameters combine position ranking information under different filtering conditions. This allows the system to consider the relative importance of positions in different contexts when evaluating the relevance of position pairs, enhancing the rationality of the recommendation logic. The third relation description coefficient generated based on the fusion of the starting point and ending point rankings can more precisely capture user preferences, especially when processing user-specific starting point and ending point descriptions, providing location pair recommendations that are closer to user needs and improving personalized recommendation effects.
[0306] Optionally, as an optional approach, before obtaining the set of start points matching the request start point location description text in the request location pair and the set of end points matching the request end point location description text in the request location pair, the method further includes:
[0307] Obtain the semantic similarity between the current location information pair and the tag of the current location information pair, and perform the following steps:
[0308] Input the current location identifier and the current historical location description text from the current location information pair into the candidate similarity matching model to obtain the predicted semantic similarity between the current location identifier and the current historical location description text.
[0309] It should be noted that inputting the current location identifier information and the current historical location description text into the candidate similarity matching model may include, but is not limited to: inputting first prompt information (used to prompt the output of the predicted semantic similarity between the current location identifier information and the current historical location description text), sample location identifier information (including the aforementioned current location identifier information), and second prompt information (used to prompt the output of the predicted semantic similarity according to a predetermined format) and the current historical location description text into the candidate similarity matching model. Specifically, it may refer to, but is not limited to, references Figure 9 ,like Figure 9 As shown in (a), the input includes: a candidate sample location list 902, including the location identifier information (i.e., full name) of each sample location (including the current location), the ID of each sample location, and the type of each sample location; a first prompt message 904 (i.e., "Please score the semantic relevance of each location from the candidate sample location list based on the following user's desired location keywords, where the user keywords are"); a second prompt message 906 (i.e., "The output format is"); the output content is as follows. Figure 9 As shown in (b), it includes the ID and predicted similarity for each sample location.
[0310] Optionally, in other embodiments, the current location identifier information and the current historical location description text in each current location information pair, as well as the third prompt information used to prompt the semantic similarity between the current location identifier information and the current historical location description text, can be separately input into the candidate similarity matching model. This embodiment does not limit this.
[0311] Optionally, in some embodiments, the aforementioned current historical location description text may be, but is not limited to, a historical starting point location description text or an ending point location description text collected by the user in the historical navigation request in the navigation application, and the aforementioned current location identification information may be, but is not limited to, identification information used to indicate a location in the target database.
[0312] It should be noted that, in some embodiments, the aforementioned label semantic similarity may be, but is not limited to, the true similarity used to characterize the semantic relationship between the current location identification information and the historical location description text. It may be manually labeled or pre-calculated by other algorithms and used as labeled data for training the similarity matching model.
[0313] Furthermore, in some embodiments, the predicted semantic similarity can be, but is not limited to, used to indicate the semantic similarity predicted by the model between current location identifier information and historical location description text. This is the result of the model output, reflecting the model's current learning state and matching ability.
[0314] Optionally, in some embodiments, after inputting the current location identifier information and the current historical location description text from the current location information pair into the candidate similarity matching model to obtain the predicted semantic similarity between the current location identifier information and the current historical location description text, the process may include, but is not limited to: generating a loss value between the label semantic similarity and the predicted semantic similarity based on the aforementioned label semantic similarity and predicted semantic similarity. This loss value may, but is not limited to, indicating mean squared error, cross-entropy loss, zero-one loss, absolute error loss, etc., and is not limited in this embodiment. If the aforementioned loss value is less than the target loss value, it is determined that the candidate similarity matching model has reached the convergence condition.
[0315] If the candidate similarity matching model meets the convergence condition based on the semantic similarity of the label and the predicted semantic similarity, the candidate similarity matching model is determined as the similarity matching model. The similarity matching model is used to identify the semantic similarity between the location identification information and the location description text carried in the route request.
[0316] If the candidate similarity matching model determined based on label semantic similarity and predicted semantic similarity does not reach the convergence condition, the model parameters in the candidate similarity matching model are adjusted to obtain the updated candidate similarity matching model. Among them, label semantic similarity is used to characterize the semantic similarity between the current location identifier information and the historical location description text in the current location information pair. The historical location description text is obtained from the historical route generation request initiated before the route generation request.
[0317] Optionally, in some embodiments, after adjusting the model parameters in the candidate similarity matching model to obtain the updated candidate similarity matching model, it may include, but is not limited to: obtaining the next position pair as the current position pair, and continuing to train the updated candidate similarity matching model based on the semantic similarity of the labels of the next current position pair and the next current position pair, until the above convergence condition is reached.
[0318] In this embodiment, the current location identifier and the current historical location description text from the current location information pair are input into a candidate similarity matching model to obtain the predicted semantic similarity between the current location identifier and the current historical location description text. If the candidate similarity matching model has reached the convergence condition based on the label semantic similarity and the predicted semantic similarity, it is determined as the similarity matching model. The similarity matching model is used to identify the semantic similarity between the location identifier and the location description text carried in the route request. If the candidate similarity matching model has not reached the convergence condition based on the label semantic similarity and the predicted semantic similarity, the model parameters in the candidate similarity matching model are adjusted to obtain an updated candidate similarity matching model. The label semantic similarity is used to characterize the semantic similarity between the current location identifier and the historical location description text in the current location information pair. The historical location description text is obtained from historical route generation requests initiated before the route generation request. In other words, by using this embodiment, data from historical route generation requests is used for training during the training process, enabling the similarity matching model to accurately evaluate semantic similarity in different contexts, thus enhancing the model's adaptability and generalization ability to new input data. By comparing the semantic similarity predicted by the model with the semantic similarity of the actual labels, the model parameters can be quickly adjusted, thereby accelerating the model convergence speed and improving training efficiency.
[0319] Optionally, as an alternative approach, the target location pair is determined from the Z location pairs based on the similarity of the location text corresponding to each location pair and the location pair relationship description parameters, including:
[0320] S1, respectively, fuses the position text similarity and position pair relationship description parameters for each position pair to obtain Z decision parameters corresponding to Z position pairs.
[0321] It should be noted that the above-mentioned fusion processing of the positional text similarity and positional pair relation description parameters for each positional pair to obtain the Z decision parameters corresponding to the Z positional pairs may include, but is not limited to, fusing at least one of the semantic similarity and character similarity in the positional text similarity for each positional pair, and at least one of the first relation description parameter, second relation description parameter, and third relation description parameter in the positional pair relation description parameters to obtain the Z decision parameters corresponding to the Z positional pairs. Furthermore, in some embodiments, the above fusion processing may be used, but is not limited to, indicating weighted summation processing, weighted multiplication processing, etc., and this embodiment does not limit this.
[0322] For example, suppose the above-described fusion processing of the position text similarity for each position pair and the position pair relation description parameters is used to indicate the fusion processing of the semantic similarity and character similarity in the position text similarity for each position pair and the first relation description parameter, second relation description parameter, and third relation description parameter in the position pair relation description parameters. Suppose the above fusion processing is used to indicate the weighted summation processing. The above steps can be illustrated with examples, but are not limited to, the following:
[0323]
[0324] In Formula 18, w i x is used to represent one of the following: semantic similarity, character similarity, first relation description parameter, second relation description parameter, and third relation description parameter, which represents the position pair consisting of the i-th start position and the j-th end position. i Used to represent w i The corresponding weights, Sim i,j Decision parameters used to represent position pairs consisting of the i-th starting position and the j-th ending position.
[0325] It should be noted that the above examples are optional examples provided to facilitate the explanation of the above steps, and there is no limitation on the specific implementation of the above route generation method.
[0326] S2, determine the target position pairs as the position pairs whose decision parameters satisfy the decision conditions among the Z position pairs.
[0327] Optionally, in some embodiments, determining the position pairs whose decision parameters satisfy the decision conditions among the Z position pairs as target position pairs may include, but is not limited to, determining the position pairs whose decision parameters are greater than the decision threshold among the Z position pairs as target position pairs, or determining the position pairs with the largest decision parameters among the Z position pairs as target position pairs. This embodiment does not limit this.
[0328] In this embodiment, the location text similarity and the location pair relationship description parameters for each location pair are fused to obtain Z decision parameters corresponding to Z location pairs. The location pairs whose decision parameters satisfy the decision conditions are determined as target location pairs. In other words, by fusing the location text similarity with the location pair relationship description parameters (such as at least one of the first relationship description parameters, the second relationship description parameters, and the third relationship description coefficient), the matching degree and recommendation value of location pairs can be evaluated more comprehensively, ensuring the overall quality of the recommendation results.
[0329] Optionally, as an optional solution, the above-mentioned addition of starting positions that satisfy the starting position conditions from the candidate starting position set to the starting position set, and addition of ending positions that satisfy the ending position conditions from the candidate ending position set to the ending position set, further includes:
[0330] Based on the historical navigation information of the target account, the account preference characteristics of the target account are determined.
[0331] Optionally, in some embodiments, the historical navigation information of the target account may be, but is not limited to, navigation history data recorded by the navigation application and associated with a specific user account, including but not limited to the user's past start and end points, navigation time, and preferred location types (such as coffee shops, bookstores), etc. Furthermore, the account preference characteristics may be, but are not limited to, user preference characteristics derived from analyzing the target account's historical navigation information, including the user's preferred location categories, time periods, and frequently used routes, etc., which are not limited in this embodiment.
[0332] Based on the account preference features of the target account and the semantic similarity between each starting position in the candidate starting position set and the starting position description text, the starting positions that meet the starting position conditions are determined from the candidate starting position set and added to the starting position set.
[0333] Optionally, the determination of starting positions that meet the starting position conditions from the candidate starting position set based on the account preference features of the target account and the semantic similarity between each starting position in the candidate starting position set and the description text of the starting position may include, but is not limited to: determining the positions in the candidate starting position set whose semantic similarity is greater than the similarity threshold and matches the account preference features as starting positions that meet the starting position conditions. Specifically, it may be possible, but is not limited to, determining whether there is a matching relationship between the starting position and the account preference features based on the location labels of the starting positions in the candidate starting position set (used to characterize the location features of the starting position, such as the surrounding environment, whether the location is a case, the size of the location, etc.). For example, assuming that the location label of the starting position indicates that the location is very lively and noisy, but the account preference features indicate that the target account prefers a quiet environment, then it can be determined that the starting position and the account's preference features do not match; conversely, if the account preference features indicate that the target account prefers a lively environment, then it can be determined that there is a matching relationship between the starting position and the account's preference features.
[0334] Based on the account preference features of the target account and the semantic similarity between each endpoint location in the candidate endpoint location set and the endpoint location description text, endpoint locations that meet the endpoint location conditions are determined from the candidate endpoint location set, and endpoint locations that meet the endpoint location conditions are added to the endpoint set.
[0335] Accordingly, the determination of endpoint locations that meet the endpoint location conditions from the candidate endpoint location set based on the account preference features of the target account and the semantic similarity between each endpoint location in the candidate endpoint location set and the endpoint location description text may include, but is not limited to, determining locations in the candidate endpoint location set whose semantic similarity is greater than a similarity threshold and matches the account preference features as endpoint locations that meet the endpoint location conditions. Specifically, it may be possible, but is not limited to, determining whether there is a matching relationship between the endpoint location and the account preference features based on the location labels of the endpoint locations in the candidate endpoint location set (used to characterize the location features of the endpoint location, such as the surrounding environment, whether the location is a case, the size of the location, etc.).
[0336] In this embodiment, based on the historical navigation information of the target account, the account preference characteristics of the target account are determined. Based on the account preference characteristics of the target account and the semantic similarity between each starting point location in the candidate starting point location set and the description text of the starting point location, starting points that meet the starting point location conditions are determined from the candidate starting point location set and added to the starting point set. Based on the account preference characteristics of the target account and the semantic similarity between each ending point location in the candidate ending point location set and the description text of the ending point location, ending points that meet the ending point location conditions are determined from the candidate ending point location set and added to the ending point set. In other words, by combining the user's historical behavior patterns and preferences, this embodiment can provide more personalized starting point and ending point location recommendations, thereby improving user experience and increasing user satisfaction.
[0337] Alternatively, as an optional example, it can be, but is not limited to, by means of, such as Figure 10 The following steps illustrate the overall method for generating the above routes:
[0338] Step S1002, Respond to user request: Receive route generation request initiated by target account, and parse the starting point and destination location description text.
[0339] Step S1004, Initial Recall: Based on the description text, recall the set of candidate start and end point locations from the target location library, considering different matching conditions and reference areas to enhance the comprehensiveness and personalization of the recall.
[0340] Step S1006, Personalized Filtering: Using user historical navigation information and a similarity matching model, the candidate location set is personalized and start and end points that meet the conditions are added to the final set.
[0341] Step S1008, construct position pair relationships: For the Z selected position pairs, calculate the text similarity between them and the request description text, including semantic and character similarity, as well as position pair relationship description parameters, such as position distance relationship, simultaneous access frequency, and matching relationship with the description text.
[0342] Step S1010, Decision parameter generation: The text similarity and relationship description parameters of each position pair are comprehensively evaluated to generate decision parameters to assist in the determination of the target position pair.
[0343] Step S1012, determine the target location pair: based on the decision parameters, select the target location pair that best matches the user's request.
[0344] Step S1014, Generate navigation route: Based on the selected target location pair, generate accurate navigation route information to complete the route generation process.
[0345] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0346] According to another aspect of the embodiments of this application, a route generation apparatus for implementing the above-described route generation method is also provided. For example... Figure 11 As shown, the device includes:
[0347] The first acquisition unit 1102 is used to respond to a route generation request initiated by the target account, and based on the location description text of the request location pair carried in the route generation request, acquire a set of starting points that match the request starting point location description text in the request location pair and a set of ending points that match the request ending point location description text in the request location pair.
[0348] The second acquisition unit 1104 is used to acquire the location text similarity between each of the Z location pairs constructed based on the starting point set and the ending point set and the location text similarity between each of the Z location pairs and the requested location pair, as well as the location pair relationship description parameters corresponding to each of the Z location pairs. The location pair relationship description parameters include at least one of the following: a first relationship description parameter for describing the location distance relationship between the starting point position and the ending point position contained in the location pair; a second relationship description parameter for describing the access statistics result of the location pair being accessed simultaneously; and a third relationship description parameter for describing the location matching relationship between the location pair and the requested location pair. Z is a positive integer.
[0349] The determining unit 1106 is used to determine the target position pair from Z position pairs based on the position text similarity of each position pair and the position pair relationship description parameters.
[0350] The generation unit 1108 is used to generate a target result route based on the target location pair for the route generation request.
[0351] Optionally, in this embodiment, the second acquisition unit includes: a first acquisition module, configured to acquire a set of candidate starting points that match the starting point location description text from the target location library of the route generation application logged in by the target account, and acquire a set of candidate ending points that match the ending point location description text; and an adding module, configured to add the starting points that meet the starting point location conditions from the candidate starting point location set to the starting point set, and add the ending points that meet the ending point location conditions from the candidate ending point location set to the ending point set.
[0352] Optionally, in this embodiment, the first acquisition module is further configured to: determine M sets of starting points that satisfy M starting point recall conditions and N sets of ending points that satisfy N ending point recall conditions from the target location library based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location library, wherein the candidate starting point location set includes M starting point sets, the candidate ending point location set includes N ending point sets, M is a positive integer, and N is a positive integer.
[0353] Optionally, in this embodiment, the first acquisition module is further configured to: add the locations in the target location library whose matching degree between the corresponding location identifier information and the starting point location description text satisfies the first starting point matching condition to the first starting point set, wherein the matching degree is obtained based on the character matching degree between the location identifier information and the starting point location description text; determine the regions where each starting point location in the first starting point set is located, obtain a first region set, and count the number of each region in the first region set; obtain a first reference region from the first region set based on the number of each region in the first starting point set, and add the locations in the target location library whose matching degree between the corresponding location identifier information and the starting point location description text satisfies the second starting point matching condition and is located in the first reference region to the second starting point set; and add the locations in the target location library whose matching degree between the corresponding location identifier information and the ending point location description text satisfies the first ending point matching condition and is located in the first reference region to the first ending point set.
[0354] Optionally, in this embodiment, the first acquisition module is further configured to: add the location in the target location library that matches the location identifier information and the starting point location description text with a matching degree satisfying the third starting point matching condition and is located in the target area where the target account is located to the third starting point set; determine the area where each starting point location in the third starting point set is located to obtain a second area set, and count the number of each area in the second area set; obtain a second reference area from the second area set based on the number of each area in the second area set, and add the location in the target location library that matches the location identifier information and the starting point location description text with a matching degree satisfying the fourth starting point matching condition and is located in the second reference area to the fourth starting point set; add the location in the target location library that matches the location identifier information and the ending point location description text with a matching degree satisfying the second ending point matching condition and is located in the second reference area to the second ending point set.
[0355] Optionally, in this embodiment, the first acquisition module is further configured to: determine a third reference region that matches the starting point location description text based on the starting point location description text; add the positions in the target location library where the matching degree between the corresponding location identifier information and the starting point location description text satisfies the fifth starting point matching condition and is located in the third reference region to the fifth starting point set; and add the positions in the target location library where the matching degree between the corresponding location identifier information and the ending point location description text satisfies the third ending point matching condition and is located in the third reference region to the third ending point set.
[0356] Optionally, in this embodiment, the first acquisition module is further configured to: add the locations in the target location library whose matching degree between the corresponding location identifier information and the destination location description text satisfies the fourth endpoint matching condition to the fourth endpoint set, wherein the matching degree is obtained based on the character matching degree between the location identifier information and the destination location description text; determine the regions where each endpoint location in the fourth endpoint set is located to obtain a fourth region set, and count the number of each region in the fourth region set; obtain a fourth reference region from the fourth region set based on the number of each region in the fourth endpoint set, and add the locations in the target location library whose matching degree between the corresponding location identifier information and the destination location description text satisfies the fifth endpoint matching condition and are located in the fourth reference region to the fifth endpoint set; add the locations in the target location library whose matching degree between the corresponding location identifier information and the starting point location description text satisfies the sixth starting point matching condition and are located in the fourth reference region to the sixth starting point set.
[0357] Optionally, in this embodiment, the first acquisition module is further configured to: add the location in the target location library that matches the location identifier information and the destination location description text with the sixth endpoint matching condition and is located in the target area where the target account is located to the sixth endpoint set; determine the area where each endpoint location in the sixth endpoint set is located to obtain a fifth area set, and count the number of each area in the fifth area set; obtain a fifth reference area from the fifth area set based on the number of each area in the fifth area set, and add the location in the target location library that matches the location identifier information and the destination location description text with the seventh endpoint matching condition and is located in the fifth reference area to the seventh endpoint set; add the location in the target location library that matches the location identifier information and the starting point location description text with the seventh starting point matching condition and is located in the fifth reference area to the seventh starting point set.
[0358] Optionally, in this embodiment, the first acquisition module is further configured to: determine a sixth reference region that matches the endpoint location description text based on the endpoint location description text; add the positions in the target location library that match the endpoint location description text with the matching degree between the corresponding location identifier information and the endpoint location description text and are located in the sixth reference region to the eighth endpoint set; and add the positions in the target location library that match the starting point location description text with the matching degree between the corresponding location identifier information and the starting point location description text and are located in the sixth reference region to the eighth starting point set.
[0359] Optionally, in this embodiment, the above-mentioned adding module is further configured to: input the starting position description text and each starting position in the candidate starting position set into the similarity matching model respectively to obtain the starting position semantic similarity between the starting position description text and each starting position respectively; sort each starting position in the candidate starting position set according to the starting position semantic similarity; determine the starting position that meets the starting position condition from the candidate starting position set according to the sorting order of each starting position; and add the starting position that meets the starting position condition to the starting position set.
[0360] Optionally, in this embodiment, the above-mentioned adding module is further configured to: input the endpoint location description text and each endpoint location in the candidate endpoint location set into the similarity matching model respectively to obtain the endpoint semantic similarity between the endpoint location description text and each endpoint location respectively; sort each endpoint location in the candidate endpoint location set according to the endpoint semantic similarity; determine the endpoint location that meets the endpoint location condition from the candidate endpoint location set according to the sorting order of each endpoint location; and add the endpoint location that meets the endpoint location condition to the endpoint set.
[0361] Optionally, in this embodiment, the first acquisition unit includes: a first determining module, configured to determine Z position pairs as current position pairs respectively; a second acquisition module, configured to acquire the starting position identifier information of the current starting position in the current position pair, and acquire the ending position identifier information of the current ending position in the current position pair; a second determining module, configured to determine the first semantic similarity between the starting position identifier information and the starting position description text, and determine the second semantic similarity between the ending position identifier information and the ending position description text; a third determining module, configured to determine the first character similarity between the starting position identifier information and the starting position description text, and determine the second character similarity between the ending position identifier information and the ending position description text; and a first generating module, configured to generate semantic similarity parameters using the first semantic similarity and the second semantic similarity, and generate character similarity parameters using the first character similarity and the second character similarity, wherein the position text similarity includes semantic similarity parameters and character similarity parameters.
[0362] Optionally, in this embodiment, the first acquisition unit further includes at least one of the following: a second generation module, configured to generate a first relation description parameter based on a target distance matrix representing the distance between the start position and the end position in each of the Z position pairs, and current distance information between the current start position and the current end position; a third generation module, configured to generate a second relation description parameter using the number of start accesses of the current start position and the number of end accesses of the current end position, and the number of accesses of each position in the target position library; and a fourth generation module, configured to generate a third relation description coefficient using the sorting order of the current start position in each of the M start set sets and the sorting order of the current end position in each of the N end set sets, wherein the positions included in each start set are sorted according to their matching degree with the start position description text, and the positions included in each end set are sorted according to their matching degree with the start position description text.
[0363] Optionally, in this embodiment, the second generation module is further configured to: obtain first distance information greater than a first distance threshold and second distance information less than a second distance threshold from the target distance matrix, wherein the first distance threshold is greater than the second distance threshold; normalize the current distance information using the first distance information and the second distance information to obtain normalized current distance information; and generate a first relation description parameter using the normalized current distance information.
[0364] Optionally, in this embodiment, the third generation module is further configured to: sort the access counts of each location in the target location library to obtain a first access count sequence; sort the access counts of each location in the starting point set to obtain a second access count sequence, and sort the access counts of each location in the ending point set to obtain a third access count sequence; determine the first starting point access sequence and the first ending point access sequence in the first access count sequence, and determine the second starting point access sequence and the second ending point access sequence in the third access count sequence; and generate a second relation description parameter using the first starting point access sequence, the second starting point access sequence, the first ending point access sequence, and the second ending point access sequence.
[0365] Optionally, in this embodiment, the fourth generation module is further configured to: perform a fusion process on the sorting order of the current starting position in each of the M starting point sets to obtain starting point sorting parameters; perform a fusion process on the sorting order of the current ending position in each of the N ending point sets to obtain ending point sorting parameters; and generate third relational description coefficients based on the starting point sorting parameters and the ending point sorting parameters.
[0366] Optionally, in this embodiment, the above-mentioned device further includes: a third acquisition unit, used to acquire the current location information pair and the label semantic similarity of the current location information pair; a first generation unit, used to input the current location identifier information and the current historical location description text in the current location information pair into the candidate similarity matching model to obtain the predicted semantic similarity between the current location identifier information and the current historical location description text; a first determination unit, used to determine the candidate similarity matching model as a similarity matching model when it is determined that the candidate similarity matching model has reached the convergence condition based on the label semantic similarity and the predicted semantic similarity, the similarity matching model being used to identify the semantic similarity between the location identifier information and the location description text carried in the route request; and an adjustment unit, used to adjust the model parameters in the candidate similarity matching model when it is determined that the candidate similarity matching model has not reached the convergence condition based on the label semantic similarity and the predicted semantic similarity to obtain an updated candidate similarity matching model; wherein, the label semantic similarity is used to characterize the semantic similarity between the current location identifier information and the historical location description text in the current location information pair, the historical location description text being obtained from the historical route generation request initiated before the route generation request.
[0367] Optionally, in this embodiment, the determining unit includes: a fusion processing module, used to perform fusion processing on the location text similarity and the location pair relationship description parameters corresponding to each location pair respectively, to obtain Z decision parameters corresponding to Z location pairs; and a fourth determining module, used to determine the location pairs whose decision parameters satisfy the decision conditions among the Z location pairs as target location pairs.
[0368] For specific implementation examples, please refer to the examples shown in the above route generation method; these examples will not be repeated here.
[0369] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described route generation method is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses the electronic device as a server as an example for illustration. Figure 12As shown, the electronic device includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps of any of the above method embodiments through the computer program.
[0370] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0371] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0372] S1, in response to the route generation request initiated by the target account, based on the location description text of the request location pair carried in the route generation request, obtain the set of starting points that match the request starting point location description text in the request location pair and the set of ending points that match the request ending point location description text in the request location pair.
[0373] S2, based on the Z position pairs constructed from the starting point set and the ending point set, obtain the position text similarity between each position pair and the requested position pair, and the position pair relationship description parameter corresponding to each position pair in the Z position pairs, wherein the position pair relationship description parameter includes at least one of the following: a first relationship description parameter for describing the position distance relationship between the starting point position and the ending point position contained in the position pair, a second relationship description parameter for describing the access statistics result of the position pair being accessed simultaneously, and a third relationship description parameter for describing the position matching relationship between the position pair and the requested position pair, where Z is a positive integer;
[0374] S3, Based on the similarity of the location text corresponding to each location pair and the relationship description parameters of the location pairs, determine the target location pair from the Z location pairs;
[0375] S4, Generate the target result route for the route generation request based on the target location pair.
[0376] Alternatively, as those skilled in the art will understand, Figure 12 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 12 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 12 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 12 The different configurations shown.
[0377] The memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the route generation method and apparatus in this embodiment. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, thereby implementing the aforementioned route generation method. The memory 1202 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include memory remotely located relative to the processor 1204, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. As an example, such as... Figure 12 As shown, the memory 1202 may include, but is not limited to, the first acquisition unit 1102, the second acquisition unit 1104, the determination unit 1106, and the generation unit 1108 in the route generation device. Furthermore, it may include, but is not limited to, other module units in the route generation device, which will not be elaborated upon in this example.
[0378] Optionally, the transmission device 1206 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1206 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1206 is a radio frequency (RF) module, used for wireless communication with the Internet.
[0379] In addition, the above-mentioned electronic device also includes: a display 1208 and a connection bus 1210 for connecting the various module components in the above-mentioned electronic device.
[0380] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a point-to-point network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this point-to-point network.
[0381] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in the embodiments of this application.
[0382] According to one aspect of this application, another computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the methods in various embodiments of this application.
[0383] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described method.
[0384] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0385] S1, in response to the route generation request initiated by the target account, based on the location description text of the request location pair carried in the route generation request, obtain the set of starting points that match the request starting point location description text in the request location pair and the set of ending points that match the request ending point location description text in the request location pair.
[0386] S2, based on the Z position pairs constructed from the starting point set and the ending point set, obtain the position text similarity between each position pair and the requested position pair, and the position pair relationship description parameter corresponding to each position pair in the Z position pairs, wherein the position pair relationship description parameter includes at least one of the following: a first relationship description parameter for describing the position distance relationship between the starting point position and the ending point position contained in the position pair, a second relationship description parameter for describing the access statistics result of the position pair being accessed simultaneously, and a third relationship description parameter for describing the position matching relationship between the position pair and the requested position pair, where Z is a positive integer;
[0387] S3, Based on the similarity of the location text corresponding to each location pair and the relationship description parameters of the location pairs, determine the target location pair from the Z location pairs;
[0388] S4, Generate the target result route for the route generation request based on the target location pair.
[0389] It should be noted that the data collection and processing described in this application should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0390] Optionally, in the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0391] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0392] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0393] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0394] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0395] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0396] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0397] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating a route, characterized in that, include: In response to a route generation request initiated by a target account, based on the location description text of the request location pair carried in the route generation request, a set of starting points that match the request starting point location description text in the request location pair and a set of ending points that match the request ending point location description text in the request location pair are obtained. Based on the Z location pairs constructed from the starting point set and the ending point set, the location text similarity between each of the Z location pairs and the requested location pair is obtained, as well as the location pair relationship description parameter corresponding to each of the Z location pairs. The location pair relationship description parameter includes at least one of the following: a first relationship description parameter for describing the location distance relationship between the starting point and the ending point contained in the location pair; a second relationship description parameter for describing the access statistics result of the location pair being accessed simultaneously; and a third relationship description parameter for describing the location matching relationship between the location pair and the requested location pair. Z is a positive integer. Based on the location text similarity corresponding to each location pair and the location pair relationship description parameters, the target location pair is determined from the Z location pairs; Based on the target location pair, generate the target result route for the route generation request.
2. The method according to claim 1, characterized in that, The step of generating location description text for request location pairs carried in the route request, and obtaining a set of starting points matching the request starting point location description text in the request location pair and a set of ending points matching the request ending point location description text in the request location pair, includes: From the target location library of the route generation application logged in by the target account, obtain a set of candidate starting points that match the starting point location description text, and obtain a set of candidate ending points that match the ending point location description text. Add the starting positions that meet the starting position conditions from the candidate starting position set to the starting position set, and add the ending positions that meet the ending position conditions from the candidate ending position set to the ending position set.
3. The method according to claim 2, characterized in that, The step of obtaining a set of candidate starting points that match the starting point location description text from the target location library of the route generation application logged in by the target account, and obtaining a set of candidate ending points that match the ending point location description text, includes: Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points that satisfy M starting point recall conditions are determined, and N sets of ending points that satisfy N ending point recall conditions are determined. The candidate starting point location set includes the M starting point sets, and the candidate ending point location set includes the N ending point sets, where M is a positive integer and N is a positive integer.
4. The method according to claim 3, characterized in that, Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points that satisfy M starting point recall conditions are determined, and N sets of ending points that satisfy N ending point recall conditions are determined, including: Locations in the target location database whose matching degree between the corresponding location identifier information and the starting point location description text meets the first starting point matching condition are added to the first starting point set, wherein the matching degree is obtained based on the character matching degree between the location identifier information and the starting point location description text; Determine the regions where each starting point is located in the first set of starting points to obtain the first set of regions, and count the number of each region in the first set of regions; Based on the number of each region in the first starting point set, a first reference region is obtained from the first region set, and the location of the corresponding location identifier information in the target location library that matches the starting point location description text with the second starting point matching condition and is located in the first reference region is added to the second starting point set. If the matching degree between the location identifier information corresponding to the target location library and the destination location description text meets the first destination matching condition and is located in the first reference area, add it to the first destination set.
5. The method according to claim 3, characterized in that, Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points that satisfy M starting point recall conditions are determined, and N sets of ending points that satisfy N ending point recall conditions are determined, further including: If the matching degree between the location identifier information corresponding to the target location library and the starting point location description text meets the third starting point matching condition and is located in the target area where the target account is located, add it to the third starting point set; Determine the regions where each starting point in the third starting point set is located to obtain the second region set, and count the number of each region in the second region set; Based on the number of each region in the second region set, a second reference region is obtained from the second region set. The location of the corresponding location identifier information in the target location library and the starting point location description text, which meet the fourth starting point matching condition and are located in the second reference region, are added to the fourth starting point set. The location that matches the location identifier information in the target location library with the destination location description text and meets the second destination matching condition, and is located in the second reference area, is added to the second destination set.
6. The method according to claim 3, characterized in that, Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points that satisfy M starting point recall conditions are determined, and N sets of ending points that satisfy N ending point recall conditions are determined, further including: A third reference region matching the starting point location description text is determined based on the starting point location description text. If the matching degree between the location identifier information corresponding to the target location library and the starting point location description text meets the fifth starting point matching condition and is located in the third reference area, add it to the fifth starting point set; If the matching degree between the location identifier information corresponding to the target location library and the destination location description text meets the third destination matching condition and is located in the third reference area, add it to the third destination set.
7. The method according to claim 3, characterized in that, Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points that satisfy M starting point recall conditions are determined, and N sets of ending points that satisfy N ending point recall conditions are determined, including: Locations in the target location database whose matching degree between the corresponding location identifier information and the destination location description text meets the fourth destination matching condition are added to the fourth destination set, wherein the matching degree is obtained based on the character matching degree between the location identifier information and the destination location description text; Determine the regions where each endpoint location is located in the fourth endpoint set to obtain the fourth region set, and count the number of each region in the fourth region set; Based on the number of each region in the fourth endpoint set, a fourth reference region is obtained from the fourth region set, and the location of the corresponding location identifier information in the target location library and the endpoint location description text are matched to the fifth endpoint matching condition and located in the fourth reference region, and then added to the fifth endpoint set. If the matching degree between the location identifier information corresponding to the target location library and the starting point location description text meets the sixth starting point matching condition and is located in the fourth reference area, add it to the sixth starting point set.
8. The method according to claim 3, characterized in that, Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points that satisfy M starting point recall conditions are determined, and N sets of ending points that satisfy N ending point recall conditions are determined, further including: If the matching degree between the location identifier information corresponding to the target location library and the destination location description text meets the sixth destination matching condition and is located in the target area where the target account is located, add it to the sixth destination set; Determine the regions where each endpoint location in the sixth endpoint set is located to obtain the fifth region set, and count the number of each region in the fifth region set; Based on the number of each region in the fifth region set, a fifth reference region is obtained from the fifth region set. The matching degree between the location identifier information corresponding to the target location library and the endpoint location description text satisfies the seventh endpoint matching condition and is located in the fifth reference region. It is then added to the seventh endpoint set. If the matching degree between the location identifier information corresponding to the target location library and the starting point location description text meets the seventh starting point matching condition and is located in the fifth reference area, add it to the seventh starting point set.
9. The method according to claim 3, characterized in that, Based on the starting point location description text, the ending point location description text, and the location identifier information of each location in the target location database, M sets of starting points that satisfy M starting point recall conditions are determined, and N sets of ending points that satisfy N ending point recall conditions are determined, further including: A sixth reference region matching the endpoint location description text is determined based on the endpoint location description text. If the matching degree between the location identifier information corresponding to the target location library and the destination location description text meets the eighth destination matching condition and is located in the sixth reference area, add it to the eighth destination set; If the matching degree between the location identifier information corresponding to the target location library and the starting point location description text meets the eighth starting point matching condition and is located in the sixth reference area, add it to the eighth starting point set.
10. The method according to claim 2, characterized in that, Adding starting positions that meet the starting position conditions from the candidate starting position set to the starting position set includes: inputting the starting position description text and each starting position in the candidate starting position set into a similarity matching model to obtain the starting position semantic similarity between the starting position description text and each starting position; sorting each starting position in the candidate starting position set according to the starting position semantic similarity; determining the starting positions that meet the starting position conditions from the candidate starting position set according to the sorting order of the starting positions; and adding the starting positions that meet the starting position conditions to the starting position set. Adding endpoints that meet the endpoint location conditions from the candidate endpoint location set to the endpoint set includes: inputting the endpoint location description text and each endpoint location in the candidate endpoint location set into a similarity matching model to obtain the endpoint semantic similarity between the endpoint location description text and each endpoint location; sorting each endpoint location in the candidate endpoint location set according to the endpoint semantic similarity; determining endpoint locations that meet the endpoint location conditions from the candidate endpoint location set according to the sorting order of the endpoint locations; and adding the endpoint locations that meet the endpoint location conditions to the endpoint set.
11. The method according to claim 3, characterized in that, The step of obtaining the location text similarity between each of the Z location pairs and the requested location pair includes: The Z position pairs are respectively determined as the current position pairs, and the following steps are performed: Obtain the starting position identifier information of the current starting position in the current position pair, and obtain the ending position identifier information of the current ending position in the current position pair; Determine a first semantic similarity between the starting point location identifier information and the starting point location description text, and determine a second semantic similarity between the ending point location identifier information and the ending point location description text; Determine the first character similarity between the starting point location identifier information and the starting point location description text, and determine the second character similarity between the ending point location identifier information and the ending point location description text; A semantic similarity parameter is generated using the first semantic similarity and the second semantic similarity, and a character similarity parameter is generated using the first character similarity and the second character similarity, wherein the positional text similarity includes the semantic similarity parameter and the character similarity parameter.
12. The method according to claim 11, characterized in that, Obtaining the position pair relationship description parameters corresponding to each of the Z position pairs includes at least one of the following: Based on the target distance matrix used to characterize the distance between the start position and the end position in each of the Z position pairs, and the current distance information between the current start position and the current end position, the first relationship description parameter is generated. The second relationship description parameter is generated by using the number of times the current starting point position is visited and the number of times the current ending point position is visited, as well as the number of times each position in the target location database is visited. The third relation description coefficient is generated by using the sorting order of the current starting position in each of the M starting position sets and the sorting order of the current ending position in each of the N ending position sets. The positions included in each starting position set are sorted according to their matching degree with the starting position description text, and the positions included in each ending position set are sorted according to their matching degree with the starting position description text.
13. The method according to claim 12, characterized in that, The generation of the first relationship description parameters based on the target distance matrix used to characterize the distance between the start position and the end position in each of the Z position pairs, and the current distance information between the current start position and the current end position, includes: Obtain first distance information greater than a first distance threshold and second distance information less than a second distance threshold from the target distance matrix, wherein the first distance threshold is greater than the second distance threshold; The current distance information is normalized using the first distance information and the second distance information to obtain normalized current distance information; The first relation description parameters are generated using the normalized current distance information.
14. The method according to claim 12, characterized in that, The step of generating the second relationship description parameters by utilizing the number of times the current starting position is visited and the number of times the current ending position is visited, as well as the number of times each position in the target location database is visited, includes: The access count of each location in the target location database is sorted to obtain the first access count sequence; The access counts of each position in the starting point set are sorted to obtain a second access count sequence, and the access counts of each position in the ending point set are sorted to obtain a third access count sequence. Determine the first starting access sequence position of the starting access count in the first access count sequence and the first ending access sequence position of the ending access count in the first access count sequence; determine the second starting access sequence position of the starting access count in the second access count sequence and the second ending access sequence position of the ending access count in the third access count sequence. The second relation description parameters are generated using the first starting point access sequence, the second starting point access sequence, the first ending point access sequence, and the second ending point access sequence.
15. The method according to claim 12, characterized in that, The step of generating the third relation description coefficient by utilizing the sorting order of the current starting position in each of the M starting point sets and the sorting order of the current ending position in each of the N ending point sets includes: The sorting order of the current starting position in each of the M starting point sets is fused to obtain the starting point sorting parameters; The sorting order of the current endpoint position in each of the N endpoint sets is fused to obtain endpoint sorting parameters; The third relation description coefficient is generated based on the starting point sorting parameter and the ending point sorting parameter.
16. The method according to any one of claims 1 to 15, characterized in that, The step of determining the target location pair from the Z location pairs based on the location text similarity corresponding to each location pair and the location pair relationship description parameter includes: The text similarity of each location pair and the relationship description parameters of each location pair are fused to obtain the Z decision parameters corresponding to the Z location pairs. The pair of positions whose decision parameters satisfy the decision conditions among the Z position pairs are determined as the target position pairs.
17. A route generation device, characterized in that, include: The first acquisition unit is used to respond to a route generation request initiated by the target account, and based on the location description text of the request location pair carried in the route generation request, acquire a set of starting points that match the request starting point location description text in the request location pair and a set of ending points that match the request ending point location description text in the request location pair. The second acquisition unit is configured to acquire, based on the Z location pairs constructed from the starting point set and the ending point set, the location text similarity between each of the Z location pairs and the requested location pair, and the location pair relationship description parameter corresponding to each of the Z location pairs, wherein the location pair relationship description parameter includes at least one of the following: a first relationship description parameter for describing the location distance relationship between the starting point position and the ending point position contained in the location pair, a second relationship description parameter for describing the access statistics result of the location pair being accessed simultaneously, and a third relationship description parameter for describing the location matching relationship between the location pair and the requested location pair, where Z is a positive integer; The determining unit is configured to determine the target location pair from the Z location pairs based on the location text similarity corresponding to each location pair and the location pair relationship description parameters; The generation unit is used to generate a target result route for the route generation request based on the target location.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed by a processor, performs the method according to any one of claims 1 to 16.
19. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 16.
20. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 16 through the computer program.