Map processing method, device, equipment and computer readable storage medium
By conducting network training and clustering on the grids in the map, the problem that the independence of the grids in the map cannot reflect the user's travel characteristics is solved, and the user's travel intensity is displayed.
Patent Information
- Application Number
- CN201910860108.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-11
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-09-06
AI Technical Summary
In the existing technology, each grid in the map is a plurality of mutually independent areas, which cannot reflect the user's travel characteristics.
By determining the starting and ending grids of each trip from multiple travel data, network training is performed to obtain a grid vector matrix, and the grids in the map are clustered according to the grid vector matrix, using a neural network model and hierarchical clustering algorithm. , representing the adjacent relationship between grids.
It is possible to reflect the user's travel characteristics through clustered grids and display the user's travel intensity in different areas.
Smart Images

Figure CN111831763B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and more specifically, to a map processing method, device, equipment and computer-readable storage medium. Background Art
[0002] With the continuous development of science and technology, maps are being used more and more widely in daily life, and maps are also being continuously optimized in different applications.
[0003] In the related art, each area in the map can be divided into a grid according to the area corresponding to the preset size, thereby forming a map composed of multiple grids. Correspondingly, each grid can correspond to a unique label, so that the grids corresponding to the starting point and the end point of the user's travel can be determined according to the label.
[0004] However, each grid in the map is a multiple independent area and cannot reflect the user's travel characteristics. Summary of the invention
[0005] In view of this, the purpose of the embodiments of the present application is to provide a map processing method, device, equipment and computer-readable storage medium, which can solve the problem in the prior art that the grids in the map are multiple independent areas and cannot reflect the travel characteristics of the user by classifying the grids in the map.
[0006] According to a first aspect of the present application, a map processing method is provided, the method comprising:
[0007] Determine the starting and ending grids of each trip from the plurality of travel data, wherein the grids correspond to preset location areas on the map;
[0008] Performing network training according to the data of the plurality of grids to obtain a grid vector matrix, wherein the grid vector matrix includes: vectors of labels of the plurality of grids sorted according to grid travel frequencies;
[0009] Clustering is performed on a plurality of the grids in the map according to the grid vector matrix.
[0010] In some embodiments, performing network training according to the data of the plurality of grids to obtain a grid vector matrix includes:
[0011] Sorting the plurality of grids according to the travel frequency of each grid;
[0012] Network training is performed based on the sorted data of the plurality of grids to obtain the grid vector matrix.
[0013] In some embodiments, performing network training according to the data of the plurality of grids to obtain a grid vector matrix includes:
[0014] The data of each of the grids is input into a preset neural network model to obtain the probability value of each of the grids to multiple grids; the neural network model is used to obtain the probability value of each of the grids to multiple grids according to the data of each of the grids, the input vector corresponding to the label of the grid in the first vector matrix, and the output vector corresponding to the label of the grid in the second vector matrix; wherein the row vector of the first vector matrix includes: the input vector corresponding to the label of each of the grids sorted by the travel frequency, and the input vector is used to represent the vector of the grid as the starting grid; the column vector of the second vector matrix includes: the output vector corresponding to the label of each of the grids sorted by the travel frequency, and the output vector is used to represent the vector of the grid as the ending grid;
[0015] Calculating the loss function value of the neural network model according to the probability value of each grid to the plurality of grids and the true label of the terminal grid corresponding to each grid;
[0016] According to the loss function value of the neural network model, adjusting the vector values in the first vector matrix and the second vector matrix;
[0017] If the loss function curve of the neural network model obtained by training based on the adjusted first vector matrix and the adjusted second vector matrix converges, the first vector matrix corresponding to the convergence of the loss function curve is determined as the lattice vector matrix.
[0018] In some embodiments, clustering the plurality of grids in the map according to the grid vector matrix includes:
[0019] According to the grid vector matrix and the preset connectivity matrix, a preset hierarchical clustering algorithm is used to cluster the multiple grids of the map; the connectivity matrix includes: parameters for characterizing the adjacent relationship between grids, and the grids of the same type after clustering are located in the same area on the map.
[0020] In some embodiments, the grids of the same type after clustering have the same category label.
[0021] According to a second aspect of the present application, a map processing device is provided, the device comprising:
[0022] A determination module, used to determine the starting and ending grids of each trip from a plurality of travel data, wherein the grids correspond to preset location areas on a map;
[0023] A training module, used for performing network training according to the data of the plurality of grids to obtain a grid vector matrix, wherein the grid vector matrix includes: vectors of labels of the plurality of grids sorted according to grid travel frequencies;
[0024] A clustering module is used to cluster the multiple grids in the map according to the grid vector matrix.
[0025] In some embodiments, the training module is further used to sort the plurality of grids according to the travel frequency of each grid; and to perform network training based on the data of the plurality of grids after sorting to obtain the grid vector matrix.
[0026] In some embodiments, the training module is also used to input the data of each of the grids into a preset neural network model to obtain the probability value of each of the grids to multiple grids; the neural network model is used to obtain the probability value of each of the grids to multiple grids based on the data of each of the grids, the input vector corresponding to the label of the grid in the first vector matrix, and the output vector corresponding to the label of the grid in the second vector matrix; wherein the row vector of the first vector matrix includes: the input vector corresponding to the label of each of the grids sorted according to the travel frequency, and the input vector is used to characterize the grid as the vector of the starting grid; the column vector of the second vector matrix includes: the vector of the grid corresponding to the travel frequency. An output vector corresponding to the label of each of the sorted grids, the output vector being used to characterize the grid as a vector of the termination grid; calculating the loss function value of the neural network model according to the probability value of each grid to multiple grids and the true label of the termination grid corresponding to each grid; adjusting the vector values in the first vector matrix and the second vector matrix according to the loss function value of the neural network model; if the loss function curve of the neural network model obtained by training based on the adjusted first vector matrix and the adjusted second vector matrix converges, determining that the first vector matrix corresponding to the convergence of the loss function curve is determined as the grid vector matrix.
[0027] In some embodiments, the clustering module is also used to cluster the multiple grids of the map using a preset hierarchical clustering algorithm based on the grid vector matrix and a preset connectivity matrix; the connectivity matrix includes: parameters for characterizing the adjacent relationship between grids, and the grids of the same class after clustering are located in the same area on the map.
[0028] In some embodiments, the grids of the same type after clustering have the same category label.
[0029] According to the third aspect of the present application, a map processing device is provided, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the map processing device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the map processing method as described in any one of the first aspects.
[0030] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the map processing method as described in any one of the first aspects are executed.
[0031] Based on any of the above aspects, in the embodiments provided by the present application, the grids of the start and end of multiple trips are determined from multiple travel data, and network training is performed based on the data of multiple grids to obtain a grid vector matrix, and then the grid vector matrix is used to cluster multiple grids in the map. By training based on travel data to obtain a grid vector matrix, and then clustering each grid in the map through the grid vector matrix, the travel characteristics of the user can be reflected through the clustered grids, thereby reflecting the density of users' travel in different regions. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 A block diagram of a map application system showing application scenarios involved in the map processing methods of some embodiments of the present application;
[0034] Figure 2 A schematic diagram showing exemplary hardware and software components of a map processing device that can implement the concept of the present application according to some embodiments of the present application;
[0035] Figure 3 A flowchart of a map processing method provided by an embodiment of the present application is shown;
[0036] Figure 4 A flowchart of a map processing method provided by another embodiment of the present application is shown;
[0037] Figure 5 A block diagram of a map processing device according to an embodiment of the present application is shown;
[0038] Figure 6 A schematic diagram of the structure of a map processing device provided in one embodiment of the present application is shown. DETAILED DESCRIPTION
[0039] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0040] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0041] In order to enable those skilled in the art to use the contents of this application, the following implementation methods are given in conjunction with the specific application scenario "maps in taxi-hailing applications". For those skilled in the art, the general principles defined here can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the scenario of map optimization processing in taxi-hailing applications, it should be understood that this is only an exemplary embodiment. This application can be applied to any other type of transportation. For example, this application can be applied to different transportation system environments, including land, sea, or aviation, or any combination thereof. This application may also include any service system that provides services based on maps, for example, a system for sending and / or receiving express deliveries, a service system for transactions between buyers and sellers. Applications of the system or method of this application may include web pages, browser plug-ins, client terminals, customized systems, internal analysis systems, or artificial intelligence robots, or any combination thereof.
[0042] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0043] The term "user" in this application may refer to a person, entity or tool that requests a service, orders a service, provides a service or facilitates the provision of a service. For example, a user may be a passenger, a driver, an operator, etc., or any combination thereof. In this application, "passenger" and "passenger terminal" may be used interchangeably, and "driver" and "driver terminal" may be used interchangeably.
[0044] The terms "service request" and "order" in this application are used interchangeably to refer to a request initiated by a passenger, a service requester, a driver, a service provider, a supplier, etc., or any combination thereof. The "service request" or "order" may be accepted by a passenger, a service requester, a driver, a service provider, a supplier, etc., or any combination thereof. A service request may be charged or free of charge.
[0045] The positioning technology used in this application can be based on the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the Beidou system, the Compass Navigation System (COMPASS), the Galileo Positioning System, the Quasi-Zenith Satellite System (QZSS), the Wireless Fidelity (WiFi) positioning technology, etc., or any combination thereof. One or more of the above positioning systems can be used interchangeably in this application.
[0046] Before the present application was filed, the existing technical solution was to simply divide the map in the application into multiple grids according to multiple preset areas, and determine the starting and ending points of the user's travel through the labels of each grid.
[0047] The technical problem caused by this is that the grids in the map are multiple independent areas and cannot reflect the user's travel characteristics.
[0048] In order to solve the above technical problems, an embodiment of the present invention provides a map processing method. The core improvement point is: by performing network training based on multiple travel data, a grid vector matrix is obtained, and then each grid in the map is clustered by the grid vector matrix. While determining the starting point and end point of the user's travel based on the grid, the type corresponding to the area where the user travels can also be determined according to the classification corresponding to the grid, thereby reflecting the user's travel information in many aspects.
[0049] The technical solution of the present invention is described below through possible implementation methods.
[0050] Figure 1 A block diagram of a map application system 100 for application scenarios involved in the map processing methods of some embodiments of the present application is shown. For example, the map application system 100 may be an online transportation service platform for transportation services such as taxis, chauffeur services, express trains, carpooling, bus services, driver rentals, or shuttle services, or any combination thereof. The map application system 100 may include one or more of a server 110, a network 120, a service requester terminal 130, a service provider terminal 140, and a database 150, and the server 110 may include a processor for executing instruction operations.
[0051] In some embodiments, the server 110 may be a single server or a server group. The server group may be centralized or distributed (for example, the server 110 may be a distributed system). In some embodiments, the server 110 may be local or remote relative to the terminal. For example, the server 110 may access information and / or data stored in the service requester terminal 130, the service provider terminal 140, or the database 150, or any combination thereof via the network 120. As another example, the server 110 may be directly connected to at least one of the service requester terminal 130, the service provider terminal 140, and the database 150 to access the stored information and / or data. In some embodiments, the server 110 may be implemented on a cloud platform; as an example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, a multi-cloud, etc., or any combination thereof.
[0052] In some embodiments, the server 110 may include a processor. The processor may process information and / or data related to the service request to perform one or more functions described in the present application. For example, the processor may determine the starting point and end point of the user's travel based on the service request obtained from the service requester terminal 130. In some embodiments, the processor may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). By way of example only, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.
[0053] The network 120 may be used for the exchange of information and / or data. In some embodiments, one or more components in the map application system 100 (e.g., the server 110, the service requester terminal 130, the service provider terminal 140, and the database 150) may send information and / or data to other components. For example, the server 110 may obtain a service request from the service requester terminal 130 via the network 120. In some embodiments, the network 120 may be any type of wired or wireless network, or a combination thereof. By way of example only, the network 120 may include a wired network, a wireless network, a fiber optic network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, or a near field communication (NFC) network, or any combination thereof. In some embodiments, the network 120 may include one or more network access points. For example, the network 120 may include a wired or wireless network access point, such as a base station and / or a network switching node, through which one or more components of the map application system 100 may connect to the network 120 to exchange data and / or information.
[0054] In some embodiments, the user of the service requester terminal 130 may be someone other than the actual service demander. For example, user A of the service requester terminal 130 may use the service requester terminal 130 to initiate a service request for the actual service demander B (for example, user A may call a car for his friend B), or receive service information or instructions from the server 110. In some embodiments, the user of the service provider terminal 140 may be the actual service provider, or someone other than the actual service provider. For example, user C of the service provider terminal 140 may use the service provider terminal 140 to receive a service request provided by the actual service provider D (for example, user C may accept an order for driver D hired by himself), and / or information or instructions from the server 110. In some embodiments, "service requester" and "service requester terminal" may be used interchangeably, and "service provider" and "service provider terminal" may be used interchangeably.
[0055] In some embodiments, the service requester terminal 130 may include a mobile device, a tablet computer, a laptop computer, or a built-in device in a motor vehicle, or any combination thereof. In some embodiments, the mobile device may include a smart home device, a wearable device, a smart mobile device, a virtual reality device, an augmented reality device, or any combination thereof. In some embodiments, the smart home device may include a smart lighting device, a control device for a smart electrical device, a smart monitoring device, a smart TV, a smart camera, or an intercom, or any combination thereof. In some embodiments, the wearable device may include a smart bracelet, a smart helmet, a smart watch, smart clothing, a smart backpack, a smart accessory, or any combination thereof. In some embodiments, the smart mobile device may include a smart phone, a personal digital assistant (PDA), a gaming device, a navigation device, or a point of sale (POS) device, or any combination thereof. In some embodiments, the virtual reality device and / or the augmented reality device may include a virtual reality helmet, virtual reality glass, a virtual reality patch, an augmented reality helmet, an augmented reality glass, or an augmented reality patch, or any combination thereof. For example, the virtual reality device and / or the augmented reality device may include various virtual reality products, etc. In some embodiments, the built-in device in the motor vehicle may include an onboard computer, an onboard TV, etc. In some embodiments, the service requester terminal 130 may be a device having positioning technology for locating the position of the service requester and / or the service requester terminal.
[0056] In some embodiments, the service provider terminal 140 may be a device similar or identical to the service requester terminal 130. In some embodiments, the service provider terminal 140 may be a device with positioning technology for locating the location of the service provider and / or the service provider terminal. In some embodiments, the service requester terminal 130 and / or the service provider terminal 140 may communicate with other positioning devices to determine the location of the service requester, the service requester terminal 130, the service provider, or the service provider terminal 140, or any combination thereof. In some embodiments, the service requester terminal 130 and / or the service provider terminal 140 may send positioning information to the server 110.
[0057] The database 150 may store data and / or instructions. In some embodiments, the database 150 may store data obtained from the service requester terminal 130 and / or the service provider terminal 140. In some embodiments, the database 150 may store data and / or instructions of the exemplary methods described in the present application. In some embodiments, the database 150 may include a mass storage device, a removable storage device, a volatile read-write memory, or a read-only memory (ROM), etc., or any combination thereof. As an example, mass storage may include magnetic disks, optical disks, solid-state drives, etc.; removable storage may include flash drives, floppy disks, optical disks, memory cards, zip disks, magnetic tapes, etc.; volatile read-write storage may include random access memory (Random Access Memory, RAM); RAM may include dynamic RAM (Dynamic RandomAccess Memory, DRAM), double data rate synchronous dynamic RAM (Double Date-Rate Synchronous RAM, DDR SDRAM); static RAM (Static Random-Access Memory, SRAM), thyristor RAM (Thyristor-Based Random Access Memory, T-RAM) and zero capacitor RAM (Zero-RAM), etc. As an example, ROM may include mask ROM (Mask Read-Only Memory, MROM), programmable ROM (Programmable Read-Only Memory, PROM), erasable programmable ROM (Programmable Erasable Read-only Memory, PEROM), electrically erasable programmable ROM (Electrically Erasable Programmable read only memory, EEPROM), CD-ROM (CD-ROM), and digital versatile disk ROM, etc. In some embodiments, database 150 can be implemented on a cloud platform. As an example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, a cross-cloud, a multi-cloud, or other similar, etc., or any combination thereof.
[0058] In some embodiments, the database 150 may be connected to the network 120 to communicate with one or more components in the map application system 100 (e.g., the server 110, the service requester terminal 130, the service provider terminal 140, etc.). One or more components in the map application system 100 may access data or instructions stored in the database 150 via the network 120. In some embodiments, the database 150 may be directly connected to one or more components in the map application system 100 (e.g., the server 110, the service requester terminal 130, the service provider terminal 140, etc.); or, in some embodiments, the database 150 may also be part of the server 110.
[0059] In some embodiments, one or more components in the map application system 100 (e.g., server 110, service requester terminal 130, service provider terminal 140, etc.) may have access to the database 150. In some embodiments, when certain conditions are met, one or more components in the map application system 100 may read and / or modify information related to the service requester, the service provider, or the public, or any combination thereof. For example, the server 110 may read and / or modify information of one or more users after receiving a service request.
[0060] In some embodiments, information exchange of one or more components in the map application system 100 can be achieved by requesting services. The object of the service request can be any product. In some embodiments, the product can be a tangible product or an intangible product. Tangible products may include food, medicine, goods, chemical products, electrical appliances, clothing, cars, houses, or luxury goods, etc., or any combination thereof. Intangible products may include service products, financial products, knowledge products, or Internet products, etc., or any combination thereof. Internet products may include separate host products, network products, mobile Internet products, commercial host products, or embedded products, etc., or any combination thereof. Internet products can be used in software, programs, or systems of mobile terminals, etc., or any combination thereof. Mobile terminals may include tablet computers, laptop computers, mobile phones, personal digital assistants (PDAs), smart watches, point of sales (POS) devices, car computers, car televisions, or wearable devices, etc., or any combination thereof. For example, Internet products may be any software and / or applications used in computers or mobile phones. Software and / or applications may involve socializing, shopping, transportation, entertainment time, learning, or investment, etc., or any combination thereof. In some embodiments, transportation-related software and / or applications may include travel software and / or applications, vehicle dispatch software and / or applications, mapping software and / or applications, etc. In vehicle dispatch software and / or applications.
[0061] Figure 2 The schematic diagram shows exemplary hardware and software components of a map processing device 200 that can implement the concept of the present application according to some embodiments of the present application. For example, the processor 220 can be used on the map processing device 200 and used to perform the functions in the present application.
[0062] The map processing device 200 can be a general-purpose computer or a special-purpose computer, both of which can be used to implement the map processing method of the present application. Although only one computer is shown in the present application, for convenience, the functions described in the present application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0063] For example, the map processing device 200 may include a network port 210 connected to a network, one or more processors 220 for executing program instructions, a communication bus 230, and storage media 240 in different forms, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the computer platform may also include program instructions stored in ROM, RAM, or other types of non-temporary storage media, or any combination thereof. The method of the present application may be implemented according to these program instructions. The map processing device 200 also includes an input / output (I / O) interface 250 between the computer and other input / output devices (e.g., a keyboard, a display screen).
[0064] For ease of description, only one processor is described in the map processing device 200. However, it should be noted that the map processing device 200 in the present application may also include multiple processors, so the steps performed by one processor described in the present application may also be performed jointly or individually by multiple processors. For example, if the processor of the map processing device 200 performs step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or individually in one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor perform steps A and B together.
[0065] It should be noted that the map processing device 200 may be Figure 1 The computer equipment connected to the server link shown in Figure 1 The server shown in obtains the user's travel request information so as to optimize the map according to the request information.
[0066] The computer device may be a terminal device or a server, which is not limited in the embodiments of the present application.
[0067] Figure 3 The flowchart of the map processing method provided by an embodiment of the present application is shown in FIG. Figure 2 The map processing device shown in FIG. Figure 3 As shown, the method includes:
[0068] Step 301: Determine the start and end grids of each trip from a plurality of travel data.
[0069] The grid corresponds to a preset location area on the map.
[0070] In order to optimize the map so that more user travel information can be reflected according to the optimized map, the grids corresponding to the starting point and the end point of each trip in the multiple travel data can be determined according to the travel data of a large number of users, so as to determine the data of each grid, so that in the subsequent steps, the grids can be clustered according to the data of each grid.
[0071] Among them, the travel data can be travel data obtained by the map processing device from the map application system within a preset time period. The travel data can be the starting point and end point of the trip included in the service request sent by the service request end to the server. The embodiment of the present application does not limit the travel data.
[0072] Moreover, the data of each grid may be a label of the grid, which is used to uniquely identify the grid in the map, and the label may be represented in the form of a hash code.
[0073] In an optional embodiment, if it is detected that a preset time has passed since the last time the map was processed and optimized, all travel data received from the last time the map was processed and optimized to the current moment can be obtained, that is, travel data within the preset time period can be obtained, and the starting point and end point of each trip in the travel data can be extracted to determine the grids corresponding to each starting point and end point in the map, thereby determining the data of each grid.
[0074] For example, all travel data within one month can be obtained, and all itineraries as shown in Table 1 can be obtained based on the travel data, and the starting point and end point included in each itinerary can be extracted to obtain the data of each grid. The data of the grid corresponding to the extracted starting point can be [400, 722, 3009, 1843, 302], and the data of the grid corresponding to the end point can be [66, 553, 3943, 2749, 401].
[0075] Table 1
[0076] journey starting point end Order 0 OL14F7i9664j9125 400 OL14F7i9662j9113 66 Order 1 OL14F7i9670j9127 722 OL14F7i9668j9124 553 Order 2 OL14F7i9689j9102 3009 OL14F7i9690j9107 3943 Order 3 OL14F7i9642j9154 1843 OL14F7i9645j9152 2749 Order 4 OL14F7i9674j9129 302 OL14F7i9673j9127 401
[0077] Step 302: Perform network training based on the data of multiple grids to obtain a grid vector matrix.
[0078] After determining each grid and obtaining the data of each grid, network training can be performed based on the data of each grid to obtain a grid vector matrix, so that in subsequent steps, each grid in the map can be classified through the grid vector matrix.
[0079] In an optional embodiment, the data of each grid can be input into a preset model so as to perform training through the data of each grid, and the preset model includes a preset initial grid vector matrix. During the training of the preset model, the initial grid vector matrix in the model can be continuously optimized and trained. When the loss function of the result output by the preset model converges, or the number of times the model is trained reaches a preset threshold number of times, it means that the model training is completed, that is, the initial grid vector matrix in the model is trained, and the grid vector matrix can be obtained.
[0080] It should be noted that the grid vector matrix may include: vectors of labels of multiple grids sorted according to the grid travel frequency, that is, each vector in the grid vector matrix can be a label corresponding to each grid in the map, and each vector in the grid vector matrix is sorted according to the travel frequency of each grid.
[0081] Among them, the travel frequency of the grid is used to indicate the number of times the grid appears in each travel data. If the travel frequency is higher, it means that the grid appears more frequently in the travel data.
[0082] Step 303: Cluster multiple grids in the map according to the grid vector matrix.
[0083] After obtaining the grid vector matrix, each grid can be clustered according to the vector corresponding to the label of each grid included in the grid vector matrix and based on the travel frequency of each grid, so as to obtain multiple clustered grids, and then the multiple clustered grids form an optimized map.
[0084] In an optional embodiment, the labels of the grids corresponding to each vector in the grid vector matrix can be obtained in turn according to the order of the vectors in the grid vector matrix from top to bottom or from left to right, and then the corresponding grids can be identified in the map according to the label of each grid. Finally, according to the order in which the grids in the map are identified, the grids of different orders are clustered, thereby achieving classification of multiple grids.
[0085] It should be noted that, in practical applications, after the grids in the map are clustered, different types of grids can be displayed in the map using different identification information based on the different types corresponding to each grid.
[0086] For example, different types of grids can be displayed by numbering the grids, filling them with colors, or filling them with different stripes.
[0087] In summary, the map processing method provided in the embodiment of the present application determines the starting and ending grids of multiple trips from multiple travel data, and performs network training based on the data of multiple grids to obtain a grid vector matrix, and then clusters multiple grids in the map based on the grid vector matrix. By training based on travel data to obtain a grid vector matrix, and then clustering each grid in the map through the grid vector matrix, the travel characteristics of the user can be reflected through the clustered grids, thereby reflecting the density of users' travel in different regions.
[0088] Figure 4 A flowchart of a map processing method provided by another embodiment of the present application is shown as follows: Figure 4 As shown, the method includes:
[0089] Step 401: Determine the start and end grids of each trip from a plurality of travel data.
[0090] The grid corresponds to a preset location area on the map.
[0091] Since the process of determining each grid in step 401 is similar to the process in step 301, it will not be repeated here.
[0092] Step 402: Perform network training based on the data of multiple grids to obtain a grid vector matrix.
[0093] The grid vector matrix may include: vectors of labels of multiple grids sorted according to grid travel frequencies.
[0094] After obtaining the data of each grid, network training can be performed based on the data of each grid to obtain a grid vector matrix for classifying grids, so that in subsequent steps, each grid in the map can be clustered based on the grid vector matrix.
[0095] Since a lattice vector matrix can be obtained by training in a variety of ways, this application only uses the method of training through a neural network model as an example for explanation, and this application does not limit the method of training to obtain a lattice vector matrix.
[0096] Optionally, the data of each grid can be input into a preset neural network model to obtain the probability value of each grid to multiple grids, and the loss function value of the neural network model can be calculated based on the probability value of each grid to multiple grids and the true label of the terminal grid corresponding to each grid. Then, based on the loss function value of the neural network model, the vector values in the first vector matrix and the second vector matrix are adjusted.
[0097] If the loss function curve of the neural network model obtained by training based on the adjusted first vector matrix and the adjusted second vector matrix converges, then the first vector matrix corresponding to the convergence of the loss function curve can be determined as a lattice vector matrix.
[0098] In an optional embodiment, the data of each grid can be input into a preset neural network model, so as to perform calculations and analysis through the first vector matrix and the second vector matrix in the neural network model, output the probability of starting from each grid to other grids, and then combine the starting grid and the ending grid in each trip to calculate the loss function value of the neural network model. Finally, according to the loss function value, the vector values in the first vector matrix and the second vector matrix are adjusted to obtain an adjusted first vector matrix and an adjusted second vector matrix.
[0099] Afterwards, the data of each grid can be trained based on the adjusted first vector matrix and the adjusted second vector matrix, so as to calculate the corresponding loss function value again. If it is determined that the curve corresponding to the loss function converges, it means that the training is completed, and the current first vector matrix can be used as the grid vector matrix.
[0100] Among them, the neural network model can be used to obtain the probability value of each grid to multiple grids based on the data of each grid, the input vector corresponding to the label of the grid in the first vector matrix, and the output vector corresponding to the label of the grid in the second vector matrix.
[0101] That is, in the process of training through the neural network model, the neural network model can receive the input data of each grid, and calculate in combination with the first grid vector matrix to obtain the input vector of each grid, and then calculate based on the input vector and the second grid vector matrix, and output the probability value starting from each grid and ending at other grids.
[0102] Moreover, the row vectors of the first vector matrix may include: an input vector corresponding to the labels of each grid sorted by travel frequency, and the input vector is used to represent the grid as a vector of the starting grid; and the column vectors of the second vector matrix may include: an output vector corresponding to the labels of each grid sorted by travel frequency, and the output vector is used to represent the grid as a vector of the ending grid.
[0103] In addition, in practical applications, the neural network model may be a skip-gram model, or other neural network models used for data prediction, which is not limited in the embodiments of the present application.
[0104] It should be noted that in practical applications, when performing network training on data of multiple grids, the multiple grids can be sorted according to the travel frequency of each grid, and then network training can be performed based on the data of the sorted multiple grids to obtain a grid vector matrix.
[0105] That is, we can first conduct statistics based on a large amount of travel data to determine the number of times each grid at the start and end of the trip appears in the travel data, thereby determining the travel frequency of each grid, and then sort each grid according to the travel frequency to obtain the sorted grids, and according to the sorted grids, the vectors corresponding to each grid in the first grid vector matrix and the second vector matrix are also sorted to obtain the sorted first grid vector matrix and the sorted second vector matrix, and finally, according to the data of multiple grids, the sorted first grid vector matrix and the sorted second vector matrix are trained to obtain the grid vector matrix.
[0106] It should be noted that in actual applications, there are a large number of grids in the map, and the travel frequency of most grids is low. In this case, most grids with low travel frequency can be uniformly represented by preset labels.
[0107] For example, a frequency threshold can be set in advance. If the travel frequency of a certain grid is greater than or equal to the frequency threshold, the hash code corresponding to the unique identifier of the grid in the map can be used to represent the label of the grid. For grids whose travel frequency is less than the frequency threshold, the preset code "UNK" can be uniformly used to represent the label of the grid.
[0108] Step 403: Cluster multiple grids of the map using a preset hierarchical clustering algorithm according to the grid vector matrix and the preset connectivity matrix.
[0109] The connectivity matrix may include: parameters for characterizing the neighboring relationship between grids, and grids of the same type after clustering are located in the same area on the map.
[0110] After the grid vector matrix is determined, clustering can be performed based on the vectors corresponding to each grid in the grid vector matrix and combined with the street matrix, so as to obtain an optimized map composed of clustered grids.
[0111] In an optional embodiment, the vector value of the vector corresponding to each grid in the grid vector matrix can be determined according to the grid vector matrix, and hierarchical clustering can be performed through the vector value of each grid. In the clustering process, the connectivity matrix representing the connectivity between each grid can be combined to perform clustering based on the vector value of each grid and the adjacent relationship between each grid in the connectivity matrix to obtain regional clustering results, and then a map composed of clustered grids can be obtained.
[0112] It should be noted that the grids of the same type after clustering have the same category label. That is, in a map formed by clustered grids, grids of different types may be included, and grids of each type may have the same category label, so that grids of different types in the map can be clearly displayed.
[0113] In summary, the map processing method provided in the embodiment of the present application determines the starting and ending grids of multiple trips from multiple travel data, and performs network training based on the data of multiple grids to obtain a grid vector matrix, and then clusters multiple grids in the map based on the grid vector matrix. By training based on travel data to obtain a grid vector matrix, and then clustering each grid in the map through the grid vector matrix, the travel characteristics of the user can be reflected through the clustered grids, thereby reflecting the density of users' travel in different regions.
[0114] Figure 5 A block diagram of a map processing device of an embodiment of the present application is shown, and the functions implemented by the map processing device correspond to the steps performed by the above method. The device can be understood as the above map processing device, or the processor of the map processing device, or can be understood as a component independent of the above map processing device or processor that implements the functions of the present application under the control of the map processing device. As shown in the figure, the map processing device may include: a determination module 501, a training module 502 and a clustering module 503:
[0115] A determination module 501 is used to determine the starting and ending grids of each trip from a plurality of travel data, where the grids correspond to a preset location area on a map;
[0116] The training module 502 is used to perform network training based on the data of the plurality of grids to obtain a grid vector matrix, wherein the grid vector matrix includes: vectors of labels of the plurality of grids sorted according to the grid travel frequency;
[0117] The clustering module 503 is used to cluster the multiple grids in the map according to the grid vector matrix.
[0118] Optionally, the training module 502 is further used to sort the multiple grids according to the travel frequency of each grid; perform network training based on the data of the multiple grids after sorting to obtain the grid vector matrix.
[0119] Optionally, the training module 502 is also used to input the data of each grid into a preset neural network model to obtain the probability value of each grid to multiple grids; the neural network model is used to obtain the probability value of each grid to multiple grids based on the data of each grid, the input vector corresponding to the label of the grid in the first vector matrix, and the output vector corresponding to the label of the grid in the second vector matrix; wherein the row vector of the first vector matrix includes: the input vector corresponding to the label of each grid sorted by travel frequency, the input vector is used to characterize the grid as the vector of the starting grid; the column vector of the second vector matrix includes: the vector corresponding to the label of each grid sorted by travel frequency The output vector corresponding to the label of each sorted grid is used to characterize the grid as a vector of the termination grid; the loss function value of the neural network model is calculated according to the probability value of each grid to multiple grids, and the true label of the termination grid corresponding to each grid; according to the loss function value of the neural network model, the vector values in the first vector matrix and the second vector matrix are adjusted; if the loss function curve of the neural network model obtained by training based on the adjusted first vector matrix and the adjusted second vector matrix converges, the first vector matrix corresponding to the convergence of the loss function curve is determined as the grid vector matrix.
[0120] Optionally, the clustering module 503 is also used to cluster the multiple grids of the map according to the grid vector matrix and the preset connectivity matrix using a preset hierarchical clustering algorithm; the connectivity matrix includes: parameters for characterizing the adjacent relationship between grids, and the grids of the same class after clustering are located in the same area on the map.
[0121] Optionally, the grids of the same type after clustering have the same category label.
[0122] In summary, the map processing device provided in the embodiment of the present application determines the starting and ending grids of multiple trips from multiple travel data, and performs network training based on the data of multiple grids to obtain a grid vector matrix, and then clusters multiple grids in the map based on the grid vector matrix. By training based on travel data to obtain a grid vector matrix, and then clustering each grid in the map through the grid vector matrix, the travel characteristics of the user can be reflected through the clustered grids, thereby reflecting the density of users' travel in different regions.
[0123] The above modules can be connected or communicated with each other via wired connection or wireless connection. The wired connection may include metal cables, optical cables, hybrid cables, etc., or any combination thereof. The wireless connection may include a connection in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any module may be divided into two or more units. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between each other shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0124] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0126] It should be noted that the above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0127] Figure 6 A schematic diagram of the structure of a map processing device provided by an embodiment of the present application is shown. Figure 6 As shown, the map processing device includes: a processor 601, a storage medium 602 and a bus 603, wherein:
[0128] The storage medium 602 stores machine-readable instructions executable by the processor 601. When the map processing device is running, the processor 601 communicates with the storage medium 602 via the bus 603, and the processor 601 executes the machine-readable instructions to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0129] Optionally, the present invention further provides a program product, such as a computer-readable storage medium, on which a computer program is stored, and the computer program is used to execute the above method embodiment when executed by a processor.
[0130] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A map processing method, characterized in that: The method comprises: Determine the starting and ending grids of each trip from the plurality of travel data, wherein the grids correspond to preset location areas on the map; According to the data of the plurality of grids, network training is performed to obtain a grid vector matrix, wherein the grid vector matrix includes: vectors of labels of the plurality of grids sorted according to the grid travel frequency; the data of each grid is a label used to uniquely identify the grid in the map; the grid travel frequency is used to indicate the number of times the grid appears in each travel data; Clustering is performed on a plurality of the grids in the map according to the grid vector matrix.
2. The method according to claim 1, characterized in that The network training is performed according to the data of the plurality of grids to obtain a grid vector matrix including: Sorting the plurality of grids according to the travel frequency of each grid; Network training is performed based on the sorted data of the plurality of grids to obtain the grid vector matrix.
3. The method according to claim 1, characterized in that The network training is performed according to the data of the plurality of grids to obtain a grid vector matrix including: The data of each of the grids is input into a preset neural network model to obtain the probability value of each of the grids to multiple grids; the neural network model is used to obtain the probability value of each of the grids to multiple grids according to the data of each of the grids, the input vector corresponding to the label of the grid in the first vector matrix, and the output vector corresponding to the label of the grid in the second vector matrix; wherein the row vector of the first vector matrix includes: the input vector corresponding to the label of each of the grids sorted by the travel frequency, and the input vector is used to represent the vector of the grid as the starting grid; the column vector of the second vector matrix includes: the output vector corresponding to the label of each of the grids sorted by the travel frequency, and the output vector is used to represent the vector of the grid as the ending grid; Calculating the loss function value of the neural network model according to the probability value of each grid to the plurality of grids and the true label of the terminal grid corresponding to each grid; According to the loss function value of the neural network model, adjusting the vector values in the first vector matrix and the second vector matrix; If the loss function curve of the neural network model obtained by training based on the adjusted first vector matrix and the adjusted second vector matrix converges, the first vector matrix corresponding to the convergence of the loss function curve is determined as the lattice vector matrix.
4. The method according to any one of claims 1 to 3, characterized in that: Clustering the plurality of grids in the map according to the grid vector matrix includes: According to the grid vector matrix and the preset connectivity matrix, a preset hierarchical clustering algorithm is used to cluster the multiple grids of the map; the connectivity matrix includes: parameters for characterizing the adjacent relationship between grids, and the grids of the same type after clustering are located in the same area on the map.
5. The method according to claim 4, characterized in that After clustering, the grids of the same type have the same category label.
6. A map processing device, characterized in that: The device comprises: A determination module, used to determine the starting and ending grids of each trip from a plurality of travel data, wherein the grids correspond to preset location areas on a map; A training module, used for performing network training according to the data of the plurality of grids to obtain a grid vector matrix, wherein the grid vector matrix includes: vectors of labels of the plurality of grids sorted according to the grid travel frequency; the data of each grid is a label used to uniquely identify the grid in the map; the grid travel frequency is used to indicate the number of times the grid appears in each travel data; A clustering module is used to cluster the multiple grids in the map according to the grid vector matrix.
7. The device according to claim 6, characterized in that The training module is also used to sort the multiple grids according to the travel frequency of each grid; perform network training based on the data of the multiple grids after sorting to obtain the grid vector matrix.
8. The device according to claim 6, characterized in that The training module is further used to input the data of each grid into a preset neural network model to obtain the probability value of each grid to multiple grids; the neural network model is used to obtain the probability value of each grid to multiple grids according to the data of each grid, the input vector corresponding to the label of the grid in the first vector matrix, and the output vector corresponding to the label of the grid in the second vector matrix; wherein the row vector of the first vector matrix includes: the input vector corresponding to the label of each grid sorted by travel frequency, the input vector is used to characterize the grid as the vector of the starting grid; the column vector of the second vector matrix includes: the vector of each grid sorted by travel frequency an output vector corresponding to the label of the grid, the output vector being used to characterize the grid as a vector of the termination grid; calculating the loss function value of the neural network model according to the probability value of each grid to multiple grids and the true label of the termination grid corresponding to each grid; adjusting the vector values in the first vector matrix and the second vector matrix according to the loss function value of the neural network model; if the loss function curve of the neural network model obtained by training based on the adjusted first vector matrix and the adjusted second vector matrix converges, determining that the first vector matrix corresponding to the convergence of the loss function curve is determined as the grid vector matrix.
9. The device according to any one of claims 6 to 8, characterized in that: The clustering module is further used to cluster the plurality of grids of the map using a preset hierarchical clustering algorithm according to the grid vector matrix and a preset connectivity matrix; The connectivity matrix includes: parameters for characterizing the neighboring relationship between grids, and the grids of the same type after clustering are located in the same area on the map.
10. The device according to claim 9, characterized in that After clustering, the grids of the same type have the same category label.
11. A map processing device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the map processing device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the map processing method as described in any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the map processing method according to any one of claims 1 to 5 are executed.
