A logistics node site selection method, device and medium based on city clusters
By building a traffic flow matrix and using PCA decomposition technology to divide urban groups, identifying logistics nodes and configuring resources, the problems of logistics node location selection and resource allocation in the new area are solved, and efficient logistics network construction and scheduling are achieved.
Patent Information
- Application Number
- CN202410685089.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-05-30
AI Technical Summary
The existing technology is difficult to effectively select and allocate logistics nodes and resources in the new area, and cannot meet the explosive growth of logistics transportation needs.
By building a traffic flow matrix in multiple urban areas, using PCA decomposition technology to divide urban groups, identify core and general logistics nodes, and configure corresponding logistics routes and vehicle resources to optimize the scheduling authority of the logistics network.
It realizes reasonable site selection and resource allocation in the new area, improves the efficiency and flexibility of the logistics network, and meets the rapidly growing logistics needs.
Smart Images

Figure CN118485270B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of logistics and transportation, and in particular to a method, device and medium for selecting a logistics node site based on a city cluster. Background Art
[0002] With the vigorous development of online e-commerce in recent years, consumers' demand for logistics and transportation has shown explosive growth. For logistics and transportation companies, how to select suitable logistics nodes in a new distribution area and reasonably allocate logistics resources is an urgent problem to be solved.
[0003] In the prior art, patent CN111582794A provides a method and device for site selection of a logistics node, and patent CN115619304A provides a method for site selection planning of a logistics node based on a clustering algorithm, but both of them cannot solve the above-mentioned problems well. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and medium for selecting a logistics node site based on city clusters to solve the above problems.
[0005] In a first aspect, an embodiment of the present invention provides a method for selecting a logistics node location based on a city group, comprising:
[0006] Acquire traffic operation data of each city in the target area, and construct a flow matrix of the target area according to the traffic operation data, wherein each row and each column of the flow matrix corresponds to each city, and each matrix element is the traffic flow between the city corresponding to the row and the city corresponding to the column;
[0007] Perform PCA decomposition on the traffic matrix to obtain multiple first-level city clusters; continue to perform PCA decomposition on the traffic matrix of each first-level city cluster to obtain multiple second-level city clusters;
[0008] For each first-level city group, perform the following operations respectively:
[0009] S1-1. Calculate the global modularity of the current first-level city group according to the traffic flow of each second-level city group under the current first-level city group;
[0010] S1-2. If the global modularity meets the requirements, the local modularity of each secondary city group is calculated according to the traffic flow of each secondary city group under the current primary city group, and the secondary city groups that do not meet the requirements are eliminated; if the global modularity does not meet the requirements, all secondary city groups under the current primary city group are eliminated;
[0011] S1-3, taking the remaining second-level city clusters as new first-level city clusters, returning to the flow matrix of each first-level city cluster and continuing to perform PCA decomposition operation until the iteration termination condition is met, and obtaining multiple minimum city clusters;
[0012] Cities within each smallest city cluster are classified according to traffic flow, and the core cities within each smallest city cluster are selected as core logistics nodes, and the remaining cities within the smallest city cluster are selected as general logistics nodes;
[0013] Configure logistics routes between the core logistics nodes and general logistics nodes in the same minimum city group, allocate the number of logistics vehicles according to the traffic flow between the starting point and the end point of each logistics route, and open the vehicle dispatching authority to the core logistics nodes;
[0014] Logistics routes are configured between the core logistics nodes of each smallest city cluster, and the number of logistics vehicles is allocated according to the traffic flow between the starting point and the end point of each logistics route, and the vehicle dispatching authority is opened to the core logistics nodes with higher centrality among the starting point and the end point.
[0015] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0016] one or more processors;
[0017] a memory for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the logistics node site selection method based on city clusters as described in any embodiment.
[0019] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the logistics node site selection method based on city clusters as described in any embodiment.
[0020] The embodiment of the present invention provides a method, device and medium for selecting a logistics node site within an urban cluster, divides urban clusters based on the traffic flow matrix of a multi-city area, divides cities with close traffic connections into a cluster, and uses it as the minimum unit for building a logistics network. A divergent logistics network centered on the core city is established within the minimum urban cluster, and matching vehicle resources and scheduling authority are configured, fully considering existing transportation facilities and future logistics needs, and improving the rationality of site selection and construction in new areas. In addition, this embodiment adds the calculation of global modularity and local modularity in urban clusters to verify whether the division of each cluster is compact enough to ensure that the minimum unit for subsequent logistics network construction and scheduling is reasonable. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 It is a flow chart of a method for selecting a logistics node site based on a city cluster provided by an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of a logistics network map provided by an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0026] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0027] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an inner layer medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0028] Figure 1This is a flow chart of a method for selecting a logistics node location based on a city group provided by an embodiment of the present invention. The method is applicable to the situation of selecting a logistics node location and allocating logistics resources in a new distribution area across cities, and is executed by an electronic device. Figure 1 As shown, the method specifically includes:
[0029] S110, obtaining traffic operation data of each city in the target area, and constructing a flow matrix of the target area according to the traffic operation data.
[0030] The target area here refers to a large area including multiple cities, such as the Yangtze River Delta, where a logistics transportation company has not yet carried out logistics distribution. This embodiment will select suitable cities in the target area as logistics nodes, and allocate logistics routes, vehicles and other resources between the logistics nodes to provide a basis for logistics distribution in the new area. Specifically, this step first obtains the traffic operation data of each city and constructs a flow matrix as the data source of the entire method. In a specific implementation, the process may include the following steps:
[0031] Step 1: Obtain the traffic operation transit data of the target area. Traffic operation data can not only reflect the construction and use of inter-city transportation infrastructure (such as lines, vehicles, etc.), but also reflect the closeness of inter-city transportation relations, which can provide a reference for the construction of logistics networks.
[0032] Optionally, you can obtain the bus operation data of the target area. Through the open source data website, use Python to batch obtain the bus operation schedule information on the web page. Each data includes the departure time, the starting station, the arrival station, the arrival time, and the model of the bus. The data is stored in the MySQL open source database according to the index.
[0033] At the same time, the railway operation data of the target area can be obtained. Through the open source data website, Python is used to batch obtain the schedule information of the web page operation. Each data includes the departure time, the starting station, the arrival station, the arrival time, the type of train (high-speed trains such as EMU D, high-speed train G, intercity train C, temporary train L, fast train K, express train T, direct express train Z and other ordinary trains), the stations passed by the train along the way, etc., and the data is stored in the MySQL open source database according to the index.
[0034] At the same time, the aviation operation data of the target area can be obtained. Through the open source data website, Python is used to batch obtain the flight information of web aviation operations. Each data includes the departure time, departure airport, arrival time and arrival airport, and the data is stored in the MySQL open source database according to the index.
[0035] Step 2: Based on the operational data of automobiles, railways and aviation, the Python regular expression method is used to establish the mapping relationship between station names and city names in the station passing records.
[0036] Optionally, first establish a mapping relationship between bus stations, train / high-speed rail stations, airports and corresponding cities. Use POI data (Points of Interest, including the names and longitude and latitude information of various transportation operation points) to establish the corresponding relationship between cities and POIs. Each data includes the city name, the names of all transportation operation points in the city, and the administrative units under its jurisdiction (such as districts, counties and towns under the city). The data type of data storage is string.
[0037] Then, a regular expression is constructed. A string matching function is designed based on the re library function of Python. The re.match() function is used to match each shift data, and the connection relationship between the transportation operation points in the shift data is converted into the connection relationship between the traffic frequencies between cities. Specifically, if a station name / airport name is entered, the corresponding city name will be returned; the total number of shift records between the two cities is the number of accesses between the two cities. If the station / airport is in a certain district, county or township, in order to ensure the consistency of statistical caliber and spatial scale, the name of its superior prefecture-level city is still returned to ensure that the administrative levels between cities in the urban network are the same and comparable.
[0038] Step 3: Construct the traffic matrix of the three modes of transportation. According to the statistical data of different modes of transportation, assign different weights to the three traffic matrices, and obtain the traffic matrix of the comprehensive transportation network through weighted calculation. Specifically, each row and each column in the traffic matrix corresponds to a city, and the value of each element in the matrix is the traffic flow between the city corresponding to the row and the city corresponding to the column. Optionally, you can query the turnover ratio of the three modes of transportation from the website of the National Bureau of Statistics, and the weights of the traffic matrices of the three modes of transportation, and the sum of their weights is 1; then, according to the traffic matrices and weights of automobiles, railways and aviation, calculate the weighted comprehensive transportation matrix. For each city pair (such as Beijing-Shijiazhuang), each element of the comprehensive traffic matrix is equal to the weighted sum of the three matrices.
[0039] S120, performing PCA decomposition on the flow matrix to obtain a plurality of first-level city clusters; continuing to perform PCA decomposition on the flow matrix of each first-level city cluster to obtain a plurality of second-level city clusters.
[0040] In a specific implementation, in the first PCA decomposition, the data of each column in the traffic matrix of the entire target area is first standardized to obtain a standardized traffic matrix, wherein the calculation formula of each column of data includes:
[0041]
[0042] in, Indicates i The original data of the column, Indicates i The average value of the original data. Indicates i The standard deviation of the original data. Indicates i Column standardized data.
[0043] Perform principal component decomposition on the standardized traffic matrix to obtain multiple eigenvectors and eigenvalues, and select p eigenvectors whose eigenvalues are greater than 1:
[0044]
[0045] in, Indicates i feature vectors (i.e., principal components), n is the total number of cities in the target area, Indicates i The principal component j Factor loadings of cities; for the same principal component, . For each principal component, at least one city with a factor loading greater than a set threshold (such as 0.5) is selected to jointly form the city cluster corresponding to the principal component. Among them, when any city belongs to both the first city cluster and the second city cluster, the proximity centrality values of the any city and the first city cluster and the second city cluster are calculated respectively; finally, the any city is divided into the city cluster with a larger proximity centrality value in the first city cluster and the second city cluster.
[0046] After the first PCA decomposition, multiple city clusters can be obtained, and the traffic relationship within each city cluster is relatively close. Then, the following operations are performed for each city cluster: the traffic flow between cities in the current city cluster is used as an element to construct a traffic matrix of the current city cluster, that is, each row and each column in the traffic matrix corresponds to a city in the current city cluster, and the value of each element in the matrix is the traffic flow between the city corresponding to the row and the city corresponding to the column; the traffic matrix is PCA decomposed again, and the same method is used to extract multiple city clusters from the decomposition results. For the convenience of distinction and description, in this embodiment, the city cluster obtained by the first PCA decomposition in two adjacent PCA decompositions is called a first-level city cluster, and the city cluster obtained by the second PCA decomposition is called a second-level city cluster.
[0047] S130: Use each second-level city group to perform a modularity test on each first-level city group to verify whether the division of each city group is reasonable. Specifically, for each first-level city group, perform the following operations respectively:
[0048] S1-2. Calculate the global modularity of the current first-level city group according to the traffic flow of each second-level city group under the current first-level city group. Optionally, the global modularity of the current first-level city group can be calculated according to the following formula: :
[0049]
[0050] in, represents the sum of traffic flows of all cities in the current first-level city group; Indicates the cities in the current first-level city group With the city Traffic flow between Indicates the city Half of the sum of the traffic volume of all other cities in the current first-level city group, Indicates the city Half of the sum of the traffic volume of all other cities in the current first-level city group; and cities When it belongs to any second-level city group in the current first-level city group, ,otherwise .
[0051] S1-2. If the global modularity meets the requirements, calculate the local modularity of each secondary city group according to the traffic flow of each secondary city group under the current primary city group, and eliminate the secondary city groups that do not meet the requirements; if the global modularity does not meet the requirements, eliminate all secondary city groups under the current primary city group.
[0052] In one embodiment, the global modularity There are two situations:
[0053] Situation 1: Meet the set threshold range (e.g. ), indicating that the preliminary structure of the current first-level city cluster is reasonable, and further verifying whether each second-level city cluster is reasonable. Optionally, the local modularity of any second-level city cluster under the current first-level city cluster can be calculated according to the following formula: :
[0054]
[0055] Among them, when the city and cities When it belongs to any of the above-mentioned secondary city groups, ,otherwise .if Meet the set threshold range (e.g. ), the current secondary city group is considered reasonable and the secondary city group is retained; if If the set threshold range is not met, the current secondary city group is considered unreasonable and will be deleted.
[0056] Situation 2: Does not meet the set threshold range (e.g. ), indicating that the initial structure of the current first-level city cluster is unreasonable, then all second-level city clusters will be deleted.
[0057] S1-3. Take each remaining second-level city cluster as a new first-level city cluster, return to the traffic matrix of each first-level city cluster and continue to perform PCA decomposition until the iteration termination condition is met to obtain multiple minimum city clusters. Optionally, the conditions for iteration termination can be: a. It is no longer possible to decompose into two or more effective principal components, and the effective principal components have at least three city variables with factor loadings greater than the preset value, and the node centrality of at least one of the cities is higher than the threshold; b. It is no longer possible to eliminate new city variables; both conditions must be met at the same time. Among them, the node centrality of each city can be calculated using the following formula:
[0058]
[0059] in, Indicates the number of cities in the final first-level city group, Indicates the first-level city group i The nodal centrality of each city; represents the traffic flow between the i-th city and the j-th city in the first-level city cluster;
[0060] S140. Classify the cities in each smallest city cluster according to the traffic flow, select the core city in each smallest city cluster as the core logistics node, and select the remaining cities in the smallest city cluster as general logistics nodes.
[0061] This embodiment divides the cities in each smallest city cluster into three levels: core cities, inner cities and outer cities according to the influence of each city on other cities in the smallest city cluster, and selects the locations of logistics nodes at different levels according to the city level.
[0062] In a specific implementation, the connectivity of each city can be calculated using the following calculation formula:
[0063]
[0064] in, Indicates the smallest city group Connectivity of cities; and Respectively represent the first The variance explained by the principal components and the The weight of a city on the jth principal component, where
[0065]
[0066] in, represents the eigenvalue of the jth principal component;
[0067]
[0068] Then, cities with a connectivity greater than 1 are identified as core cities, which have a strong influence on other cities; cities with a connectivity greater than 0 and less than 1 are identified as inner cities, which have a stronger influence than outer cities; cities with a connectivity less than 0 are identified as outer cities, which are in a dominated position in the network and have little influence on other city nodes.
[0069] Based on the three city levels, this embodiment selects the core cities in each smallest city cluster as core logistics nodes, and selects the remaining cities in the smallest city cluster as general logistics nodes as the basis for logistics resource allocation.
[0070] S150. Configure logistics routes between the core logistics nodes and general logistics nodes in the same minimum city cluster, allocate the number of logistics vehicles according to the traffic flow between the starting point and the end point of each logistics route, and open the vehicle dispatch authority to the core logistics nodes.
[0071] This embodiment uses each smallest city cluster as the smallest unit for allocating logistics routes based on the compact relationship of traffic flow within each smallest city cluster; and based on the strong influence of core cities on other cities, a divergent logistics route network centered on core logistics nodes is constructed within the cluster, that is, directly connected logistics routes are allocated between each general logistics node and the core logistics node, and the number of vehicles matching the traffic flow (including direct transportation vehicles, vehicles connecting with railways and flights, etc.) is allocated to meet the transportation needs between the core logistics nodes and the general logistics nodes. In general, the greater the traffic flow, the more vehicles are allocated; the core logistics node will be used as a transit point between two general logistics nodes to complete transit transportation.
[0072] At the same time, this embodiment utilizes the compactness of the traffic connections between the smallest city clusters and uses each smallest city cluster as a vehicle dispatching unit; and utilizes the divergent route network structure within the smallest city cluster to open the dispatching authority of all logistics vehicles in the same smallest city cluster to the logistics station of the core logistics node of the cluster in the dispatching system, so that the core logistics station can perform cluster-wide vehicle dispatching according to the logistics routes of the station (i.e., all routes within the cluster).
[0073] S160. Configure logistics routes between the core logistics nodes of each smallest city cluster, allocate the number of logistics vehicles according to the traffic flow between the starting point and the end point of each logistics route, and open the vehicle dispatching authority to the core logistics nodes with higher centrality among the starting point and the end point.
[0074] On the basis of S150, this embodiment allocates logistics routes only between the core logistics nodes of each cluster according to the relatively independent characteristics of each city cluster, and allocates the number of vehicles that match the traffic flow of the route to meet the transportation needs between city clusters. Generally speaking, the greater the traffic flow, the more vehicles are allocated; the two smallest city clusters will use the two core logistics nodes as transit to complete multi-level transit transportation. At the same time, this embodiment uses node centrality to measure the scheduling ability of the node, and divides the logistics route between the smallest city clusters into the smallest city cluster where the core node with stronger node centrality is located, and the core node dispatches the vehicles allocated on the route.
[0075] Optionally, after logistics routes, vehicles and dispatching authority, the relative size of the logistics configuration network and the relative size of the transportation network can also be compared (for example, if the traffic flow size of Shanghai-Nantong is 6 and the traffic flow size of Shanghai-Jiaxing is 3, then the number of logistics vehicles in Shanghai-Nantong should be twice the number of logistics vehicles in Shanghai-Jiaxing), so as to preliminarily judge whether the logistics configuration plan is reasonable. Exemplarily, the ratio relationship between the mean normalized value of each route in the logistics network and the mean normalized value of each route in the transportation network is compared. The closer the ratio is to 1, the more reasonable the initial configuration of the logistics network is.
[0076] Furthermore, in a specific implementation, after the logistics nodes, routes, vehicles and dispatching authority are determined, the entire node site selection and resource allocation can also be visualized in an electronic map to intuitively display the traffic and logistics network structure of the target area. Optionally, the location of each city in each minimum city group is marked in the electronic map, and different levels correspond to different city marks; according to the logistics routes between cities, connecting lines are added between the city marks; the same color is drawn for the connecting lines within the same minimum city group, and the colors of the connecting lines of different minimum city groups are different; for the connecting lines between core cities, the color corresponding to the minimum city group where the city to which the vehicle dispatching authority of the connecting line belongs is drawn (that is, the connecting line is regarded as part of the minimum city group); and the thickness of each connecting line is adjusted according to the traffic flow of each logistics route to obtain a logistics network map. Figure 2 It is a logistics network map of the Yangtze River Delta region provided by an embodiment of the present invention, and the electronic map base map is hidden in the figure. It can be seen that the transportation network of the Yangtze River Delta is a closely connected whole, consisting of four minimum city groups, each of which uses connecting lines of different colors to form four networks of different colors (green, purple, orange, and yellow respectively); Shanghai, Hangzhou, Nanjing, and Hefei are the core cities of each minimum city group (represented by dark blue circles); Suzhou, Wuxi, Changzhou, Yangzhou, Zhenjiang, and Ningbo are important cities in the transportation network (represented by blue circles), and other cities are peripheral cities of the transportation network (represented by light blue circles); the size of the circle of the city mark indicates the size of the traffic flow flowing through the city, and the thickness of the line between the city marks indicates the size of the traffic flow between the two cities. The map clearly shows the influence range of different city groups through the network of lines of different colors, corresponding to the minimum transit unit and dispatching unit in the logistics network; the location and influence of the city are shown through circular city marks of different colors, corresponding to the dispatching authority in the logistics network; different traffic flows are shown through the size of the city mark and / or the connecting lines of different thicknesses, corresponding to the transportation demand and vehicle configuration in the logistics network.
[0077] This display method clearly displays and distinguishes the basic elements of the logistics network, which can provide strong visual support for the construction and optimization of the logistics network, and is therefore one of the core inventions of this application. Optionally, in response to a click on any city mark, the smallest city group to which the city mark belongs (i.e., the connecting line of the same color and all the city marks connected to it) can be extracted and displayed in an enlarged manner on the upper layer of the original map, highlighting the logistics network form within the smallest city group of interest and its relationship with the logistics network of the entire target area.
[0078] Furthermore, in a specific implementation, after a period of distribution according to the logistics nodes, routes, vehicles and dispatching authority, it is also possible to check whether the existing logistics network is reasonable and optimize it according to the actual logistics data between cities. Optionally, the process may include the following steps:
[0079] Step 1: Recalculate the local modularity of each minimum city cluster based on the actual logistics data between cities. Optionally, for any minimum city cluster, first trace back to the previous city cluster to which the minimum city cluster belongs in the multi-level PCA decomposition operation, and then extract the actual logistics orders between the cities in the minimum city cluster and the cities in the previous city cluster; use the actual logistics order quantities between these cities as the actual logistics flow between these cities, and update it to the flow matrix of the previous city cluster (i.e., use the actual logistics flow to replace the original traffic flow); and extract the data required by formula (1) from the new flow matrix to calculate the local modularity of any minimum city cluster. . That is to say, when recalculating the local modularity of a certain minimum city cluster, this embodiment only updates the traffic data related to the cities in the minimum city cluster, and the traffic data unrelated to these cities remain unchanged, so as to minimize the impact on other minimum city clusters. At the same time, due to reasons such as the different statistical time periods of traffic flow data and actual traffic data, there may be an order of magnitude difference between the updated data and the unupdated data, thereby forming unreal interference with the entire traffic matrix. In order to ensure the uniformity of the order of magnitude of new and old data, this embodiment can first calculate the sum of the traffic flow of all cities in the minimum city cluster and the sum of the actual logistics flow when updating the traffic matrix; and calculate the ratio of the sum of the traffic flow to the sum of the actual logistics flow, multiply the actual logistics flow of each city among all the cities with other cities by the ratio, and update each product to the element position corresponding to each city and other cities in the traffic matrix.
[0080] Step 2: select at least one minimum city cluster whose local modularity does not meet the requirements as the minimum city cluster to be optimized; and trace back the previous level city cluster to which each minimum city cluster to be optimized belongs in the multi-level PCA decomposition operation.
[0081] Step 3: For each upper-level city group, perform the following operations:
[0082] S2-1, update the actual logistics data of all the minimum city groups to be optimized in the current upper-level city group to the flow matrix of the current upper-level city group. The update process is as described in step 1. It should be emphasized that in step 1, only the data of one minimum city group to be optimized is updated, while in this step, the data of all the minimum city groups to be optimized in the upper-level city group are updated to achieve synchronous update. When a certain upper-level city group includes multiple minimum city groups to be optimized, there is a difference in the data update range in the two steps.
[0083] S2-2. Perform PCA decomposition on the new traffic matrix to obtain multiple new secondary city clusters.
[0084] S2-3. Based on each new second-level city group, redefine the logistics nodes, routes, vehicles and dispatch authority within the scope of the current upper-level city group.
[0085] S2-4. Configure logistics routes, vehicles and dispatching authority between each new secondary city cluster and the core logistics nodes of each smallest city cluster outside the scope of the current upper-level city cluster.
[0086] Correspondingly, in the visualization link, in response to a click operation on any city mark, the local modularity of the minimum city cluster can be recalculated and displayed to the user based on the latest actual logistics data between the cities, providing an intuitive basis for the user to judge whether the logistics network of the minimum city cluster is reasonable.
[0087] Furthermore, in a specific implementation, each time the logistics routes, vehicles and dispatching authority are reconfigured, the logistics network map can be partially updated within the area where the adjustment occurs, and the global logistics network map before and after the update can be screenshotted, and the screenshot before the update can be subtracted from the screenshot after the update to obtain a difference image and display it to the user. The difference image can vividly reflect the changes in logistics nodes, routes, number of vehicles and dispatching methods. The more non-zero elements in the difference image, the greater the transformation of the logistics network. Optionally, the electronic map base map can be stripped from the updated global logistics network map (only city marks and connecting lines are included after stripping, such as Figure 2 ), and the stripped logistics network map is displayed on the upper layer of the original map in a semi-transparent manner. At the same time, screenshots of the opaque logistics network stripped from the electronic map before and after the update are taken, and the screenshots before the update are subtracted from the screenshots after the update, and the difference image is displayed next to the map, so that users can more intuitively see the changed area and the magnitude of the change.
[0088] Furthermore, a cost adjustment prediction key can be set in the display interface to predict the cost required to adjust the logistics network. In response to the click operation of the key, the difference image can be input into the trained convolutional network inside the electronic device to obtain the cost level for adjusting the logistics network. Exemplarily, the cost level can include high, medium and low. Optionally, the convolutional network can adopt a VGG network structure, and the entire model can include a VGG16 convolutional layer, a maximum pooling layer, a fully connected layer and a normalization function connected in sequence. Among them, the VGG16 convolutional layer is used to extract the deep features in the difference image, and the maximum pooling layer is used to reduce the dimension of the deep features; the fully connected layer is used to connect the deep features after dimensionality reduction with the transformation cost level, and the number of its output channels is consistent with the number of cost levels; the normalization function is used to normalize the output of the fully connected layer to a value between [0-1] to obtain the prediction probability of each level, and the cost level with a high probability is the final prediction result. During the training process, the number of parameters of each layer can be set according to the actual situation, and the difference images obtained during the actual operation process can be regularly collected, and their adjustment cost levels can be manually annotated. Then, the annotated samples can be expanded through data enhancement and other methods to build a sample library to complete the training of the convolutional network. The trained convolutional network takes the difference images of the logistics network before and after the adjustment as input and the cost level required to complete this adjustment as output.
[0089] In summary, the embodiment of the present invention provides a method, device and medium for selecting a logistics node site based on a city group, divides the city group based on the traffic flow matrix of a multi-city area, divides the cities with close traffic connections into a group, and establishes a divergent logistics network centered on the core city within the smallest city group as the minimum unit for building a logistics network, and configures matching vehicle resources and scheduling authority, which fully considers the existing transportation facilities and future logistics needs, and improves the rationality of site selection and construction in new areas. In addition, this embodiment adds the calculation of global modularity and local modularity in the city group to verify whether the division of each group is compact enough to ensure that the minimum unit for subsequent logistics network construction and scheduling is reasonable. At the same time, this embodiment provides a visual display method of a logistics network, which clearly displays the global form and internal structure of the logistics network through elements such as city markings, colors, and lines; if an unreasonable group structure is found in actual distribution, the difference map of the logistics network map before and after adjustment can intuitively reflect the adjustment range of the network, and predict the adjustment cost, providing support for the adjustment and optimization of the logistics network.
[0090] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 3 A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0091] The memory 61, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method for selecting a logistics node based on city clusters in the embodiment of the present invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, realizing the above-mentioned method for selecting a logistics node based on city clusters.
[0092] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0093] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0094] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the logistics node site selection method based on city clusters of any embodiment.
[0095] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0096] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0097] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0098] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A method for selecting logistics nodes based on city clusters, characterized in that: include: Acquire traffic operation data of each city in the target area, and construct a flow matrix of the target area according to the traffic operation data, wherein each row and each column of the flow matrix corresponds to each city, and each matrix element is the traffic flow between the city corresponding to the row and the city corresponding to the column; Perform PCA decomposition on the traffic matrix to obtain multiple first-level city clusters; continue to perform PCA decomposition on the traffic matrix of each first-level city cluster to obtain multiple second-level city clusters; For each first-level city group, perform the following operations respectively: S1-1. Calculate the global modularity of the current first-level city group according to the traffic flow of each second-level city group under the current first-level city group; S1-2. If the global modularity meets the requirements, the local modularity of each secondary city group is calculated according to the traffic flow of each secondary city group under the current primary city group, and the secondary city groups that do not meet the requirements are eliminated; if the global modularity does not meet the requirements, all secondary city groups under the current primary city group are eliminated; S1-3, taking the remaining second-level city clusters as new first-level city clusters, returning to the flow matrix of each first-level city cluster and continuing to perform PCA decomposition operation until the iteration termination condition is met, and obtaining multiple minimum city clusters; Cities within each smallest city cluster are classified according to traffic flow, and the core cities within each smallest city cluster are selected as core logistics nodes, and the remaining cities within the smallest city cluster are selected as general logistics nodes; Configure logistics routes between the core logistics nodes and general logistics nodes in the same minimum city group, allocate the number of logistics vehicles according to the traffic flow between the starting point and the end point of each logistics route, and open the vehicle dispatching authority to the core logistics nodes; Configure logistics routes between the core logistics nodes of each smallest city cluster, allocate the number of logistics vehicles according to the traffic flow between the starting point and the end point of each logistics route, and open the vehicle dispatching authority to the core logistics nodes with higher centrality among the starting point and the end point; Specifically, the global modularity of the current first-level city group is calculated according to the traffic flow of each second-level city group under the current first-level city group, including: According to the following formula, the global modularity Q of the current first-level city group is calculated: global : Wherein, m represents the sum of traffic flows of all cities in the current first-level city cluster; σ ij represents the traffic flow between city i and city j in the current first-level city group, k i represents half of the sum of the traffic flows of city i and all other cities in the current first-level city group, k j represents half of the sum of the traffic flows of city j and all other cities in the current first-level city group; when city i and city j belong to any second-level city group in the current first-level city group, δ(i,j)=1, otherwise δ(i,j)=0; The calculating of the local modularity of each secondary city cluster respectively according to the traffic flow of each secondary city cluster under the current primary city cluster includes: The local modularity Q of any second-level city cluster under the current first-level city cluster is calculated according to the following formula: local : When city i and city j belong to any of the second-level city clusters, δ'(i,j) = 1, otherwise δ'(i,j) = 0; After a period of distribution according to the logistics nodes, routes, vehicles and dispatching authority, the local modularity of each minimum city group is recalculated based on the actual logistics data between cities; Screening at least one minimum city cluster to be optimized whose local modularity does not meet the requirement, and tracing back the previous level city cluster to which each minimum city cluster to be optimized belongs in the multi-level PCA decomposition operation; For each upper-level city group, perform the following operations respectively: S2-1, updating the actual logistics data of all the smallest city groups to be optimized in the current upper-level city group to the flow matrix of the current upper-level city group; S2-2, perform PCA decomposition on the new traffic matrix to obtain multiple new secondary city clusters; S2-3. Based on each new second-level city group, redefine the logistics nodes, routes, vehicles and dispatching authority within the current upper-level city group; S2-4. Configure logistics routes, vehicles and dispatching authority between the core logistics nodes of each new secondary city cluster and each smallest city cluster outside the current upper-level city cluster.
2. The method according to claim 1, wherein the recalculating the local modularity of each minimum city cluster based on the actual logistics data between the cities comprises: Tracing back to the previous level city group to which any minimum city group belongs in the multi-level PCA decomposition operation; Extracting actual logistics orders between each city in any of the smallest city groups and each city in the upper level city group; The actual logistics order quantity is used as the actual logistics flow, and updated to the flow matrix of the upper-level city group; According to the new traffic matrix, the local modularity of any minimum city cluster is calculated.
3. According to the method of claim 1, the step of updating the actual logistics data of all the smallest city clusters to be optimized in the current upper-level city cluster to the flow matrix of the current upper-level city cluster comprises: Calculate the sum of traffic flows of all cities in any minimum city group to be optimized, as well as the sum of actual logistics flows; Calculate the ratio of the sum of the traffic flow and the sum of the actual logistics flow, multiply the actual logistics flow of each city among all the cities with other cities by the ratio, and update each product to the element position corresponding to each city and other cities in the flow matrix.
4. The method according to claim 1, characterized in that: After the logistics nodes, routes, vehicles and dispatching authority are determined, it also includes: Cities in each smallest city cluster are divided into three levels: core cities, inner cities and outer cities; Mark the location of each city in each smallest city group on the electronic map, with different levels corresponding to different city marks; Add connecting lines between city markers based on the logistics routes between cities; The same color is used for the connecting lines within the same minimum city cluster, and the connecting lines of different minimum city clusters have different colors; For the connection lines between core cities, the color corresponding to the smallest city group where the city to which the vehicle dispatching authority of the connection line belongs is drawn; The thickness of each connecting line is adjusted according to the traffic flow of each logistics route to obtain a logistics network map.
5. The method according to claim 4, characterized in that After obtaining the logistics network map, the method further includes: In response to a click operation on any city mark, the smallest city group to which the city mark belongs is enlarged and displayed on an upper layer of the original map; According to the latest actual logistics data between cities, the local modularity of the minimum city cluster is recalculated and displayed on the upper layer of the original map, providing a basis for judging whether the logistics network of the minimum city cluster is reasonable.
6. The method according to claim 4, characterized in that Also includes: After each reallocation of logistics routes, vehicles and dispatching authority, the logistics network map is locally updated within the area where the adjustment occurs; Separate the electronic map from the global logistics network map before and after the update, and take a screenshot of the logistics network after the separation; Subtract the updated screenshot from the updated screenshot to obtain the difference image and display it; The difference image is input into the trained convolutional network to predict and display the adjustment cost of the logistics network.
7. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the logistics node site selection method based on city clusters as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, which, when executed by a processor, implements the logistics node site selection method based on city clusters as described in any one of claims 1-6.
Citation Information
Patent Citations
Logistics node site selection method and device
CN111582794A
Network grouping structure division method and device based on OD big data
CN114004551A
Urban intelligent infrastructure planning and designing method
CN115358544A