Method, apparatus, electronic device, and storage medium for determining a service site

By determining the service site, obtaining and analyzing site data, selecting target centroid points and distance matrix, and matching the newly built service site and demand site, the problem of poor site selection effect of new warehouses in the existing technology is solved, and transportation costs are reduced and efficiency is improved.

CN115689454BActive Publication Date: 2025-08-01CHINA POST INFORMATION TECH (BEIJING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211532486.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-01
Publication Date
2025-08-01
Estimated Expiration
2042-12-01

AI Technical Summary

Technical Problem

The existing technology cannot meet the needs of new warehouses in warehouse site selection, resulting in poor site selection results and cannot effectively reduce transportation costs and improve transportation efficiency.

Method used

By obtaining the site selection data of the service site to be selected and the associated data of the demand site, the target center of mass and distance matrix is determined. Based on the center of mass point data and site selection data, a new service site is selected and matched with the demand site to form the most suitable target service site.

Benefits of technology

It realizes the selection of the most suitable service site according to user needs, reduces transportation costs, improves transportation efficiency, and meets the site selection needs of new sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115689454B_ABST
    Figure CN115689454B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, electronic device and storage medium for determining service sites. The method includes: obtaining first site selection data of at least one service site to be selected, the number of service sites to be newly built, and first association data of at least one demand site; determining a target centroid point and corresponding centroid point data based on the first number of service sites to be selected, the number of service sites to be newly built and the first association data, and determining a first distance matrix based on each centroid point data and each first site selection data; determining at least one newly built service site data based on the first distance matrix and the centroid point data; and determining a target service site corresponding to each demand site based on the newly built service site data, each first site selection data and each first association data. It realizes meeting the user's demand for new sites, and at the same time can allocate the most suitable target service site for the demand site, achieving the effect of reducing transportation costs and improving transportation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer processing technologies, and in particular, to a method, apparatus, electronic device, and storage medium for determining a service site. Background Art

[0002] Nowadays, with the continuous improvement of the degree of attention to the logistics supply chain, it usually involves site selection for warehousing locations in the logistics industry to select suitable warehousing locations to make the cost of goods transportation lower and the efficiency faster.

[0003] Current warehouse site selection methods usually determine the most suitable warehouse site selection based on a comprehensive consideration of multiple site selection factors such as the quantity of goods in existing warehouses and transportation costs, but this method can only select sites from existing warehouses and cannot meet the user's demand for new warehouses, resulting in poor site selection effects. Summary of the Invention

[0004] The present invention provides a method, apparatus, electronic device, and storage medium for determining a service site to meet the user's demand for new sites, and at the same time, the target service site allocated to the demand site is the most suitable for the demand site, achieving the technical effects of reducing transportation costs and improving transportation efficiency.

[0005] According to one aspect of the present invention, there is provided a method for determining a service site, the method comprising:

[0006] Obtaining first site selection data of at least one service site to be selected, the number of service sites to be newly built, and first association data of at least one demand site; wherein, the first association data includes at least one of a first identifier, a first location, a shipment volume, and a unit transportation cost;

[0007] Based on the first quantity of the at least one service site to be selected, the number of service sites to be newly built, and the first association data of the at least one demand site, determining at least one target centroid point and corresponding centroid point data, and based on each centroid point data and each of the first site selection data, determining a first distance matrix; wherein, the rows in the first distance matrix represent the target centroid points, the columns represent the service sites to be selected, and the cross elements of the rows and columns represent the distance values between the target centroid points and the corresponding service sites to be selected;

[0008] Based on the first distance matrix and the centroid point data of the at least one target centroid point, determining at least one newly built service site data; wherein, the number of the newly built service site data is consistent with the number of the service sites to be newly built;

[0009] Determine a target service site corresponding to each demand site based on the newly built service site data, each of the first site selection data, and each of the first association data; wherein, the target service site is a certain site among the newly built service sites and / or the to-be-selected service sites.

[0010] According to another aspect of the present invention, there is provided an apparatus for determining a service site, the apparatus comprising:

[0011] A data acquisition module, configured to acquire first site selection data of at least one to-be-selected service site, the number of to-be-built service sites, and first association data of at least one demand site; wherein, the first association data includes at least one of a first identifier, a first location, a shipment volume, and a unit transportation cost;

[0012] A distance matrix determination module, configured to determine at least one target centroid point and corresponding centroid point data based on the first quantity of the at least one to-be-selected service site, the number of to-be-built service sites, and the first association data of the at least one demand site, and determine a first distance matrix based on each centroid point data and each of the first site selection data; wherein, the rows in the first distance matrix represent the target centroid points, the columns represent the to-be-selected service sites, and the cross elements of the rows and columns represent the distance values between the target centroid points and the corresponding to-be-selected service sites;

[0013] A newly built service site determination module, configured to determine at least one newly built service site data based on the first distance matrix and the centroid point data of the at least one target centroid point; wherein, the quantity of the newly built service site data is consistent with the number of to-be-built service sites;

[0014] A target service site determination module, configured to determine a target service site corresponding to each demand site based on the newly built service site data, each of the first site selection data, and each of the first association data; wherein, the target service site is a certain site among the newly built service sites and / or the to-be-selected service sites.

[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining a service site according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the method for determining a service site according to any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention obtains the first site selection data of at least one service site to be selected, the number of service sites to be newly built, and the first association data of at least one demand site; based on the first quantity of at least one service site to be selected, the number of service sites to be newly built, and the first association data of at least one demand site, determines at least one target centroid point and corresponding centroid point data, and determines a first distance matrix based on each centroid point data and each first site selection data; determines at least one newly built service site data based on the first distance matrix and the centroid point data of at least one target centroid point; and determines a target service site corresponding to each demand site based on the newly built service site data, each first site selection data, and each first association data, solving the problem in the prior art that the selected site warehouse is determined by considering the self-transportation attributes of the existing warehouse, resulting in a selection result that does not meet the user's needs and a poor selection effect. By setting a parameter of the number of service sites to be newly built, clustering the demand sites based on the first quantity and the number of service sites to be newly built to obtain target centroid points, and then combining the distances between each centroid point data and each first site selection data to determine the newly built service site data, and determining the target service site corresponding to each demand site from the newly built service site data and each first site selection data. At this time, the target service site is a certain site among the newly built service sites and / or the service sites to be selected, meeting the user's needs for new sites, and at the same time making the target service site assigned to the demand site the most suitable for the demand site, achieving the technical effects of reducing transportation costs and improving transportation efficiency.

[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0023] Figure 1 is a flowchart of a method for determining a service site according to Embodiment 1 of the present invention;

[0024] Figure 2 is a flowchart of a method for determining a service site according to Embodiment 2 of the present invention;

[0025] Figure 3 is a flowchart of a method for determining a service site according to Embodiment 3 of the present invention;

[0026] Figure 4 is a schematic diagram of a method for determining a service site according to Embodiment 4 of the present invention;

[0027] Figure 5 is a schematic diagram of a distance matrix to be used according to Embodiment 4 of the present invention;

[0028] Figure 6 is a schematic structural diagram of a device for determining a service site according to Embodiment 5 of the present invention;

[0029] Figure 7 is a schematic structural diagram of an electronic device for implementing the method for determining a service site according to the embodiment of the present invention. Detailed implementation manners

[0030] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0032] Embodiment 1

[0033] Figure 1This is a flow chart of a method for determining a service site according to a first embodiment of the present invention. This embodiment is applicable to site selection. The method can be executed by a device for determining a service site. The device for determining a service site can be implemented in the form of hardware and / or software. The device for determining a service site can be configured in a computing device. Figure 1 As shown, the method includes:

[0034] S110: Obtain first site selection data of at least one service site to be selected, the number of service sites to be newly built, and first association data of at least one required site.

[0035] The service site to be selected can be a pre-designated service site. A service site refers to a supplier that can provide goods. For example, it can be a warehouse that stores or manages goods. The goods can include daily necessities, electronic products, mechanical products, and so on. This will not be described in detail here. The first site selection data may include information such as the province and city to which the service site belongs, as well as information such as the address, longitude, and latitude of the service site. A demand site can refer to a demander with a demand for goods, such as a supermarket, gas station, express delivery point, or restaurant. The number of new service sites to be established refers to the number of new goods supply sites that can be established. For example, the number can be 3 or 6. The specific number can be determined by technical personnel based on actual work conditions and is not limited. The first associated data includes at least one of a first identifier, a first location, a shipment volume, and a unit transportation cost. The first identifier can be used to uniquely represent the demand site and can be represented by the name of the demand site or the ID of the demand site. The first location can be used to represent the location information of the demand site, such as its address or longitude and latitude information. The shipment volume can be the number of goods shipped out of the warehouse (unit can be pieces) or the weight of goods shipped out of the warehouse (unit can be tons). The unit transportation cost can be understood as the transportation rate, which refers to the freight rate per unit of transportation distance or per unit of transportation weight when transporting a specific type of goods between two locations.

[0036] In this embodiment, the user can trigger the edit control on the system page to import the first location data of the service site to be selected, the number of service sites to be newly created, and the first associated data of at least one desired site into the system. When the confirmation control is triggered, it can be considered that the server has received the imported data. Alternatively, the server can retrieve the data from the location where the data is stored through the interface. The acquired data can be used to select the location of the service site serving the desired site.

[0037] Exemplarily, the first site selection data of at least one service site to be selected can be stored in Data Table 1. The fields in Data Table 1 can include: province, city, address, longitude, latitude, etc. The first association data of at least one demand site is stored in Data Table 2. The fields in Data Table 2 can include: site name (i.e., the first identifier), province, city, address, longitude, latitude, sales volume (i.e., the shipment volume), transportation rate (i.e., the unit transportation cost), etc. Data Table 1 and Data Table 2 can be imported into the system, and the parameter of the number of service sites to be newly built can also be imported into the system and received by the system server.

[0038] S120. Based on the first quantity of at least one service site to be selected, the quantity of service sites to be newly built, and the first association data of at least one demand site, determine at least one target centroid point and the corresponding centroid point data, and based on each centroid point data and each first site selection data, determine the first distance matrix.

[0039] Among them, the first quantity refers to the number of all service sites to be selected. The rows in the first distance matrix represent the target centroid points, the columns represent the service sites to be selected, and the cross elements of the rows and columns represent the distance values between the target centroid points and the corresponding service sites to be selected. It should be noted that the rows and columns in the first distance matrix are relative. If the rows represent the target centroid points, then the columns represent the service sites to be selected; if the rows represent the service sites to be selected, then the columns represent the target centroid points.

[0040] In this embodiment, after receiving the quantity of service sites to be newly built, if the quantity of service sites to be newly built is greater than 0, the number of service sites to be selected can be counted as the first quantity. Further, a certain number of sites can be selected from multiple demand sites through the quantity of service sites to be newly built and the first quantity as the target centroid points, and the first association data of the demand sites corresponding to the target centroid points can be used as the centroid point data of the target centroid points. Among them, the certain number can be the same as the quantity of service sites to be newly built, can also be the same as the first quantity, or can also be the same as the total quantity of the quantity of service sites to be newly built and the first quantity. The distance values from each target centroid point to each service site to be selected can be calculated based on the centroid point data of each target centroid point and the first site selection data of each service site to be selected, and a distance matrix, that is, the first distance matrix, can be generated. For example, if the number of target centroid points is z + y and the number of service sites to be selected is z, then a first distance matrix with z + y rows and z columns can be solved, such as:

[0041]

[0042] Among them, d (z+y)z represents the distance value between the (z + y)-th target centroid point and the z-th service site to be selected.

[0043] In order to improve the accuracy of site selection, the clustering method can be used to cluster each demand site, and the center points within each cluster obtained by clustering are used as the target centroid points, so that the finally determined target centroid points are optimal in terms of distance dimension. Optionally, based on the first quantity of at least one service site to be selected, the quantity of service sites to be newly built, and the first associated data of at least one demand site, at least one target centroid point and corresponding centroid point data are determined, including: determining the quantity of target sites based on the first quantity and the quantity of service sites to be newly built, and determining the initial centroid points and corresponding second positions that are consistent with the quantity of target sites from the first associated data of at least one demand site; for each first position, determining the relative distance between the current first position and each second position; determining the initial centroid point to which the current first position belongs according to at least one relative distance of the current first position; and updating the corresponding initial centroid point and the corresponding second position according to at least one first position associated with the initial centroid point, so as to obtain at least one target centroid point and corresponding centroid point data.

[0044] It should be noted that the method for determining the initial centroid point to which each first position belongs is the same, and any one of the first positions can be used as the current first position for description. Among them, the initial centroid point can be a randomly selected demand site.

[0045] In this embodiment, the sum of the first quantity and the number of service sites to be newly built can be calculated, and the sum value can be used as the target number of sites. For example, assume that the first quantity z = 3 and the number of service sites to be newly built y = 2, then the target number of sites is z + y = 5. Initial centroid points consistent with the target number of sites can be randomly selected from each demand site, and the first position in the first association data of the demand site corresponding to the initial centroid point can be used as the second position of the initial centroid point. Further, the distance value between each first position and each second position can be determined as the relative distance. The initial centroid point corresponding to the minimum distance among the relative distances corresponding to the current first position can be used as the initial centroid point to which the current first position belongs, that is, at this time, the current first position is assigned to the cluster corresponding to the initial centroid point. Correspondingly, the initial centroid point to which each current first position belongs can be determined, realizing the first round of clustering, obtaining clusters consistent with the target number of sites, and each cluster contains the first positions associated with the corresponding initial centroid points. Exemplarily, z + y demand sites can be randomly selected from x demand sites as initial centroid points, the distances from the x demand sites to the z + y initial centroid points can be calculated, and the x demand sites can be respectively assigned to the initial centroid point with the minimum distance to it. At this time, the x demand sites are divided into z + y groups (i.e., clusters) according to the different centroid points to which they belong. Further, based on all the first positions associated with the initial centroid points, a position can be re-determined. For example, this position can be the center point of the cluster, and this position can be re-used as the initial centroid point to update the initial centroid point and the second position of the initial centroid point until the final position point is obtained as the target centroid point and the corresponding centroid point data.

[0046] Specifically, the implementation method of updating the corresponding initial centroid point and the corresponding second position based on at least one first position associated with the initial centroid point to obtain at least one target centroid point and the corresponding centroid point data can be: based on at least one first position associated with the initial centroid point, determine the position to be used for updating; based on the position error between the position to be used for updating and the second position of the initial centroid point, determine the processing method for updating the initial centroid point and the corresponding second position, so as to update the initial centroid point and the corresponding second position based on the processing method to obtain at least one target centroid point and the corresponding centroid point data.

[0047] Among them, the processing method refers to the method used to update the initial centroid point and the corresponding second position.

[0048] In this embodiment, for a certain initial centroid point, at least one first position associated with the initial centroid point can be used to determine the center point of the cluster to which the initial centroid point belongs. The position of this center point can be used as the update position to be used. Then, the difference between the update position to be used and the second position of the initial centroid point is calculated, and the difference value is used as the position error between the two positions. Correspondingly, the position error between each second position and the corresponding update position to be used can be obtained. Based on the position error, it is determined whether the initial centroid point needs to be updated based on the update position to be used, and the corresponding processing method is executed until the target centroid point and the corresponding centroid point data are obtained.

[0049] It should be noted that during the process of clustering demand sites, a clustering end condition can be set. When the clustering end condition is met, it is considered that the clustering is completed and the target centroid point is obtained. For example, the clustering end condition can be that the actual number of clustering times reaches the preset number of clustering times, or the position error is less than the preset error threshold.

[0050] Optionally, in order to improve the accuracy of site selection, based on the position error between the update position to be used and the second position of the initial centroid point, the processing method for updating the initial centroid point and the corresponding second position includes: if the position error is greater than the first preset error threshold, the initial centroid point and the corresponding second position are updated based on the update position to be used, and the step of determining the relative distance between the current first position and each second position is re-executed, so as to determine the position error between the update position to be used and the second position of the corresponding initial centroid point based on the relative distance, and determine the target centroid point and the corresponding centroid point data based on the position error; if the position error is not greater than the first preset error threshold, the initial centroid point is used as the target centroid point, and the second position of the initial centroid point is used as the centroid point data corresponding to the target centroid point.

[0051] Among them, the first preset error threshold can be a preset position difference, including longitude and latitude errors.

[0052] Specifically, the position error can be compared with the first preset error threshold. If the position error is greater than the first preset error threshold, the second position of the initial centroid point can be updated to the position to be used for update. After obtaining the updated initial centroid point, clustering is continued based on the new initial centroid point, and the relative distance between each first position and each second position is determined again, and the initial centroid point to which each demand site belongs is determined based on the relative distance. Further, according to at least one first position associated with the initial centroid point, the position to be used for update is determined, and the position error between the position to be used for update and the second position of the corresponding initial centroid point is determined, and it is continuously determined whether the position error is greater than the first preset error threshold, and the loop iteration is performed until the position error is not greater than the first preset error threshold, at which point the clustering is considered complete, the final initial centroid point can be used as the target centroid point, and the second position of the initial centroid point can be used as the centroid point data corresponding to the target centroid point. Based on the centroid point data of each target centroid point and the first site selection data of each service site to be selected, the first distance matrix is determined.

[0053] S130. Determine at least one piece of new service site data based on the first distance matrix and the centroid point data of at least one target centroid point.

[0054] Among them, the number of new service site data is consistent with the number of service sites to be newly built. The new service site data may include the location information of the service sites to be newly built.

[0055] It should be noted that, in the first distance matrix, the larger the distance value of the intersection element of the row and column between the target centroid point and the corresponding service site to be selected, the farther the distance between the target centroid point and the corresponding service site to be selected; the smaller the distance value, the closer the distance between the target centroid point and the corresponding service site to be selected.

[0056] In this embodiment, the distance values with smaller numerical values in the first distance matrix can be screened out, and the centroid point data of the target centroid point corresponding to the screened-out distance values can be used as the new service site data; or it can also be that if the screened-out distance values are in the same row or the same column, the smallest distance value can be selected as the target distance value, and the distance values in the remaining same row or the same column can be excluded, so that the screened-out target distance values are not related to each other, and the centroid point data of the target centroid point corresponding to the screened-out target distance values can be used as the new service site data, so as to determine the final service site for the demand site based on the new service site data, the first site selection data, etc.

[0057] S140. Determine the target service site corresponding to each demand site based on the new service site data, each first site selection data, and each first association data.

[0058] Among them, the target service site is a certain site among the newly built service sites and / or the to-be-selected service sites.

[0059] In this embodiment, each first location can be compared with the location information in each newly built service site data respectively to obtain a distance value, and each first location can also be compared with the location information in each first site selection data respectively to obtain a distance value. The location information corresponding to the minimum distance value of the current first location can be used as the target service site of the demand site to which the current first location belongs, so that services can be provided for the demand site based on the target service site.

[0060] On the basis of the above solution, when the first site selection data of at least one to-be-selected service site, the number of to-be-built service sites, and the first association data of at least one demand site are obtained, if the number of to-be-built service sites is 0, it means that there is no need to build new service sites. At this time, the distance between each to-be-selected service site and each demand site can be calculated, and the to-be-selected service site with the smallest distance from the demand site can be used as the target service site of the demand site. Accordingly, the target service site corresponding to each demand site can be determined.

[0061] Exemplarily, when the number y of to-be-built service sites is 0, the site selection process can be as follows: Initialize z warehouses as to-be-selected service sites, calculate the distances from x demand sites to z to-be-selected service sites. The distance can be calculated using the following formula:

[0062] d(xi1,xi2,zi1,zi2) = r * arccos(sin(xi1) * sin(zi1) + cos(xi1) * cos(xi2 - zi2)) * β

[0063] Where xi is the i-th demand site, xi1 and xi2 are the longitude radian and latitude radian of the demand site xi respectively, zi is the i-th to-be-selected service site, and zi1 and zi2 are the longitude radian and latitude radian of the to-be-selected service site zi respectively. r is the radius of the earth, and β is the actual path distance coefficient. Further, the distances from x demand sites to z to-be-selected service sites can be calculated respectively to form a second distance matrix with x rows and z columns. The rows in the second distance matrix represent demand sites, the columns represent to-be-selected service sites, and the cross elements of the rows and columns represent the distance values between the demand sites and the corresponding to-be-selected service sites. The second distance matrix can be shown as follows:

[0064]

[0065] For the row vectors of the second distance matrix, the distance minimum index can be solved: d(min_index) = argmin([di1, di2, di3, ……, diz]), and the demand site xi can be assigned to the to-be-selected service site z(min_index) corresponding to the minimum index d(min_index) in the i-th row to complete the site selection.

[0066] The technical solution of this embodiment obtains the first site selection data of at least one to-be-selected service site, the number of to-be-built service sites, and the first association data of at least one demand site; based on the first quantity of at least one to-be-selected service site, the number of to-be-built service sites, and the first association data of at least one demand site, determines at least one target centroid point and the corresponding centroid point data, and determines the first distance matrix based on each centroid point data and each first site selection data; determines at least one to-be-built service site data based on the first distance matrix and the centroid point data of at least one target centroid point; determines the target service site corresponding to each demand site based on the to-be-built service site data, each first site selection data, and each first association data, solving the problem in the prior art that the site selection result does not meet the user's needs and the site selection effect is poor by considering the self-transportation attributes of the existing warehouse to determine the site selection warehouse. It realizes that by giving the parameter of the number of to-be-built service sites, clustering the demand sites based on the first quantity and the number of to-be-built service sites to obtain the target centroid points, and then combining the distances between each centroid point data and each first site selection data to determine the to-be-built service site data, and determining the target service site corresponding to each demand site from the to-be-built service site data and each first site selection data. At this time, the target service site is a certain site among the to-be-built service sites and / or the to-be-selected service sites, meeting the user's needs for new sites, and at the same time making the target service site assigned to the demand site the most suitable for the demand site, achieving the technical effect of reducing transportation costs and improving transportation efficiency.

[0067] Embodiment 2

[0068] Figure 2 It is a flowchart of a method for determining a service site according to Embodiment 2 of the present invention. On the basis of the foregoing embodiment, S130 is further refined. The specific implementation manner can refer to the technical solution of this embodiment. Among them, the same or corresponding technical terms as those in the above embodiment will not be elaborated here.

[0069] As Figure 2 shown, the method specifically includes the following steps:

[0070] S210. Obtain the first site selection data of at least one to-be-selected service site, the number of to-be-built service sites, and the first association data of at least one demand site.

[0071] S220. Determine at least one target centroid point and corresponding centroid point data based on the first quantity of at least one service site to be selected, the quantity of service sites to be newly built, and the first association data of at least one demand site, and determine the first distance matrix based on each centroid point data and each first site selection data.

[0072] S230. Determine the element to be used corresponding to the minimum distance value in the first distance matrix and the corresponding row and column, and perform deletion processing on the row and column to obtain the distance matrix to be used.

[0073] Specifically, after determining the first distance matrix, the minimum distance value in the first distance matrix and the row-column intersection element corresponding to the minimum distance value, that is, the element to be used, can be found. The row and column where the minimum distance value is located in the first distance matrix can be deleted, and the matrix after deletion is used as the distance matrix to be used to continue searching for the minimum distance value based on the distance matrix to be used.

[0074] Exemplarily, the argmin(matrix) function can be used to obtain the row and column indices of the minimum distance value in the first distance matrix, delete the corresponding row and column of this value, and record the row and column indices. Assume that the first quantity z = 3, the quantity of service sites to be newly built y = 2, that is, the number of target sites is z + y = 5, there are 5 target centroid points, the first distance matrix is a 5×3 matrix, and the minimum distance value is located in the second row and the third column. Then, all elements in the second row and the third column of the first distance matrix can be deleted to obtain the distance matrix to be used. At this time, the distance matrix to be used is a 4×2 matrix.

[0075] S240. Determine whether the distance matrix to be used is empty. If not, execute step S250; if so, execute step S260.

[0076] S250. Reuse the distance matrix to be used as the first distance matrix, and return to execute step S230.

[0077] Specifically, it can be determined whether there are still elements in the distance matrix to be used. If there are, it is considered that the distance matrix to be used is not empty. At this time, the distance matrix to be used can be reused as the first distance matrix, and based on the new first distance matrix, return to step S230 to continue execution to obtain the distance matrix to be used, and continue to execute step S240 to determine whether the distance matrix to be used is empty.

[0078] S260. Use the centroid point data of all target centroid points corresponding to all elements to be used as the data of the newly built service sites.

[0079] Specifically, if there are no elements in the distance matrix to be used, it can be considered that the distance matrix to be used is empty. At this time, the centroid data of the target centroid points corresponding to all the elements to be used recorded can be used as the data of the newly built service sites.

[0080] Exemplarily, the row and column indices of the minimum value in the first distance matrix can be obtained using argmin(matrix), the row and column corresponding to this value are deleted, and the row and column indices are recorded. This step is looped until all elements in the first distance matrix are deleted, that is, the first distance matrix is empty. According to the recorded deletion indices, y newly built service sites are obtained.

[0081] S270. Based on the data of the newly built service sites, each of the first site selection data, and each of the first association data, determine the target service site corresponding to each demand site.

[0082] The technical solution of this embodiment determines the element to be used corresponding to the minimum distance value in the first distance matrix, as well as the corresponding row and column, and performs row and column deletion processing on the row and column to obtain the distance matrix to be used; if the distance matrix to be used is not empty, the distance matrix to be used is re - used as the first distance matrix, and the operation of performing row and column deletion processing on the element to be used corresponding to the minimum distance value in the first distance matrix is repeated, so as to determine at least one piece of data of the newly built service sites based on the processed first distance matrix; if the distance matrix to be used is empty, the centroid data of the target centroid points corresponding to all the elements to be used are used as the data of the newly built service sites. In the case of existing service sites, a distance matrix between the centroids and the existing service sites is constructed, and the distance matrix is processed using the centroid nearest - neighbor deletion method, realizing the comprehensive site selection combining the existing service sites and the centroid points, allocating the most suitable target service sites for the demand sites, and achieving the effect of reducing transportation costs and improving transportation efficiency.

[0083] Embodiment III

[0084] Figure 3 FIG. is a flowchart of a method for determining service sites according to Embodiment III of the present invention. On the basis of the foregoing embodiments, S140 is further refined. The specific implementation manner can refer to the technical solution of this embodiment. Among them, the same or corresponding technical terms as those in the above embodiments will not be elaborated here.

[0085] As Figure 3 shown, the method specifically includes the following steps:

[0086] S310. Obtain the first site selection data of at least one service site to be selected, the number of service sites to be newly built, and the first association data of at least one demand site.

[0087] S320. Determine at least one target centroid point and corresponding centroid point data based on the first quantity of at least one service site to be selected, the quantity of service sites to be newly built, and the first association data of at least one demand site, and determine a first distance matrix based on each centroid point data and each first site selection data.

[0088] S330. Determine at least one newly built service site data based on the first distance matrix and the centroid point data of at least one target centroid point.

[0089] S340. Take the newly built service sites corresponding to each first site selection data and the newly built service site data as service sites to be used, and determine the third positions corresponding to each service site to be used.

[0090] Specifically, the service sites to be selected belonging to each first site selection data and the newly built service sites corresponding to each newly built service site data can be taken as service sites to be used. Correspondingly, the location information in the first site selection data or the newly built service site data corresponding to the service site to be used can be taken as the third position of the service site to be used, so as to determine the service site to be selected corresponding to the demand site from the service sites to be used.

[0091] Exemplarily, z service sites to be selected and y service sites to be newly built can be concatenated to obtain z + y service sites to be used.

[0092] S350. For each first association data, take the service site to be used belonging to the third position with the smallest distance from the current first association data as the service site to be selected corresponding to the demand site to which the current first association data belongs.

[0093] Specifically, the distance between each demand site and each service site to be used can be calculated according to each first association data and each third position, and the service site to be used belonging to the third position with the smallest distance from the demand site can be taken as the service site to be selected corresponding to the demand site.

[0094] S360. For each demand site, determine the target service site corresponding to the current demand site based on the point position error between the fourth position of the service site to be selected corresponding to the current demand site and the fifth position of the corresponding historical site selection service site.

[0095] Among them, the historical site selection service site refers to the service site to be selected assigned to the demand site last time. It should be noted that if it is the first time to determine the service site to be selected corresponding to the demand site, then it can be considered that the data of the historical site selection service site is empty. If it is not the first time to determine the service site to be selected corresponding to the demand site, then the data of the historical site selection service site determined last time in this time is not empty.

[0096] Specifically, after determining the to-be-located service sites corresponding to each demand site, the fourth position of the to-be-located service site corresponding to the current demand site can be compared with the fifth position of the service site allocated to the current demand site last time (i.e., the historical located service site) to determine the point position error, and it can be judged whether the point position error meets the pre-configured error requirement, so as to obtain the target service site corresponding to the current demand site when the error requirement is met.

[0097] Optionally, determining the target service site corresponding to the current demand site based on the point position error between the fourth position of the to-be-located service site corresponding to the current demand site and the fifth position of the corresponding historical located service site includes: if the point position error is less than the second preset error threshold, taking the to-be-located service site as the target service site of the current demand site; if the point position error is not less than the second preset error threshold, updating the fifth position of the historical located service site corresponding to the corresponding demand site based on the fourth position of each to-be-located service site, and determining the to-be-used updated site data based on the newly built service site data and the first association data of each demand site, so as to update the newly built service site data based on the to-be-used updated site data, and re-executing the steps of determining the to-be-used service site and the corresponding third position, the to-be-located service site and the point position error based on the updated newly built service site data and each first location data, so as to determine the target service site corresponding to each demand site based on the point position error.

[0098] In this embodiment, the point position error can be compared with the second preset error threshold. If the point position error is less than the second preset error threshold, the to-be-located service site can be used as the target service site for the current demand site. If the point position error is not less than the second preset error threshold, it can be indicated that the newly determined data of the new service site is not optimal for the demand site. The to-be-located service sites determined for each demand site this time can be used as the historical located service sites corresponding to the respective demand sites, and the fourth position of the to-be-located service site can be used as the fifth position of the corresponding historical located service site, so that after the fourth position of the to-be-located service site is determined, the fifth position and the fourth position can be retrieved and compared to determine the point position error. The transportation attributes of the new service site to each demand site, such as the transportation distance or transportation cost, can also be comprehensively considered to calculate the to-be-used updated site data corresponding to the new service site. The to-be-used updated site data can be used as the data of the new service site of the new service site, that is, the data of the new service site is updated based on the to-be-used updated site data. Based on the updated data of the new service site and each first located site data, the process returns to step S340 to execute the determination of the to-be-used service site and the corresponding third position, and execute step S350 to determine the to-be-located service site, and step S360 to determine the point position error, so that when the point position error is less than the second preset error threshold, the to-be-located service site is used as the target service site for the current demand site.

[0099] In this embodiment, the implementation manner of determining the to-be-used updated site data based on the data of the new service site and the first association data of each demand site can be: based on the data of the new service site and the first association data of each demand site, determine the transportation attribute information of the new service site under each demand site; based on the respective transportation attribute information corresponding to the new service site, determine the to-be-used updated site data, so as to update the data of the new service site based on the to-be-used updated site data.

[0100] Among them, the transportation attribute information includes the single-site transportation cost, transportation distance, and transported cargo volume. The to-be-used updated site data can be the site location, such as the longitude and latitude location.

[0101] In practical applications, based on the various information in the first association data of each demand site (such as the first location, shipment volume, unit transportation cost, etc.) and the data of each newly built service site (such as location information, transportation cost, etc.), information such as the transportation distance, single-site transportation cost, and transportation volume from each newly built service site to each demand site can be determined. For example, based on the three fields of the first location, shipment volume (tons), and unit transportation cost (yuan / ton-kilometer) obtained from the first association data, the shipment volume (tons) from the j-th newly built service site to the i-th demand site can be calculated, denoted as wji; the single-site transportation cost (yuan / ton-kilometer) from the j-th newly built service site to the i-th demand site can be calculated, denoted as aji, and the distance from the j-th historical site selection service site to the i-th demand site can be calculated, denoted as dji. Further, after determining the transportation attribute information of the newly built service site under each demand site, the corresponding transportation attribute information of the newly built service site can be processed to obtain the data of the site to be used for update. Optionally, in the process of determining the data of the site to be used for update based on the corresponding transportation attribute information of the newly built service site, the target transportation cost data can be determined based on the corresponding transportation attribute information of the newly built service site; the position parameters in the target transportation cost data can be differentiated to obtain the data of the site to be used for update. Among them, the position parameters can include longitude and latitude. The various transportation attributes in the transportation attribute information of the newly built service site can be multiplied to obtain the total transportation cost from the newly built service site to a demand site. For example, the total transportation cost from the j-th newly built service site to the i-th demand site is: a ji w ji d ji . Further, the total transportation costs from the newly built service site to each demand site can be summed up, and the sum value is used as the target transportation cost data. For example, the target transportation cost data of the j-th newly built service site can be expressed as: Further, the position parameters in the target transportation cost data can be differentiated to obtain the position information as the data of the site to be used for update. For example, the longitude position parameter in the target transportation cost data can be differentiated to obtain the longitude position, the latitude position parameter in the target transportation cost data can be differentiated to obtain the latitude position, and the longitude position and the latitude position can be integrated to obtain the data of the site to be used for update. Exemplarily, the following formula can be referred to:

[0102]

[0103] Among them, x i is the longitude position of the i-th demand site, and y i is the latitude position of the i-th demand site. (x j , y j)As the updated site data to be used corresponding to the j-th newly built service site. Further, after obtaining the updated site data to be used, the updated site data to be used can be used as the new newly built service site data of the newly built service site. Accordingly, the new newly built service site data corresponding to each newly built service site can be obtained. Based on the newly determined newly built service site data and each first site selection data, the process returns to step S340 to execute the determination of the service site to be used and the corresponding third position, and execute step S350 to determine the service site to be selected, and step S360 to determine the point position error, until the point position error is less than the second preset error threshold, and the iteration stops. At this time, the service site to be selected can be used as the target service site of the current demand site. The position of the target service site at this time is the most suitable position for the current demand site.

[0104] The technical solution of this embodiment determines the third position corresponding to each service site to be used by using each first site selection data and the newly built service site corresponding to the newly built service site data as the service site to be used; for each first associated data, the service site to be used to which the third position with the smallest distance from the current first associated data belongs is used as the service site to be selected corresponding to the demand site to which the current first associated data belongs; based on the point position error between the fourth position of the service site to be selected corresponding to the current demand site and the fifth position of the corresponding historical site selection service site, the target service site corresponding to the current demand site is determined. By merging the first site selection data and the newly built service site data, the initial service site to be used is obtained, which is not limited to the existing service sites, the position of the newly added service site is determined, the service site to be selected corresponding to each demand site is determined from the service sites to be used, and then based on the point position error between the fourth position of the service site to be selected corresponding to the current demand site and the fifth position of the corresponding historical site selection service site, the target service site corresponding to the current demand site is determined, improving the accuracy of site selection determination.

[0105] Embodiment 4

[0106] As an optional embodiment of the above embodiment, Figure 4 It is a schematic diagram of the method for determining a service site according to Embodiment 4 of the present invention. Specifically, the following specific content can be referred to.

[0107] See Figure 4, in the technical solution provided by the present invention, the data table 1 storing the first associated data of "demand points (i.e., demand sites)" and the data table 2 storing the first site selection data of "designated warehouses (i.e., service sites to be selected)" can be imported into the system. Among them, the fields in the data table 1 can be: site name, province, city, address, longitude, latitude, sales volume (i.e., shipment volume), transportation rate (i.e., unit transportation cost), etc. The fields in the data table 2 can be: province, city, address, longitude, latitude, etc. Based on the imported data, the number of demand sites (such as x) and the number of service sites to be selected (such as z, and z≠0) can be determined, and the parameter of the number of newly built warehouses, that is, the number of service sites to be newly built (such as y), can also be received from the user. Further, it can be judged whether y is equal to 0. If y is equal to 0, z service sites to be selected can be initialized, and the distances from x demand sites to z service sites to be selected can be calculated respectively. The distance calculation formula is as shown in the following formula (1):

[0108] d(xi1,xi2,zi1,zi2)=r*arccos(sin(xi1)*sin(zi1)+cos(xi1)*cos(xi2 - zi2))*β(1)

[0109] Where xi is the i-th demand site, xi1 and xi2 are the longitude radian and latitude radian of the demand site xi respectively, zi is the i-th service site to be selected, and zi1 and zi2 are the longitude radian and latitude radian of the service site to be selected zi respectively. r is the radius of the earth, and β is the actual path distance coefficient. Further, the distances from x demand sites to z service sites to be selected can be calculated respectively to form a second distance matrix with x rows and z columns. The rows in the second distance matrix represent the demand sites, the columns represent the service sites to be selected, and the cross elements of the rows and columns represent the distance values between the demand sites and the corresponding service sites to be selected. The second distance matrix can be as follows:

[0110]

[0111] The index of the minimum distance can be solved for the row vectors of the second distance matrix: d(min_index)=argmin([di1,di2,di3,……,diz]). The demand site xi can be assigned to the service site to be selected z(min_index) corresponding to the minimum distance index d(min_index) in the i-th row, that is, the service site to be selected closest to the demand site is used as the target service site to complete the site selection.

[0112] If y is not equal to 0, it is necessary to cluster x demand sites to obtain z + y target centroid points. The process of solving z + y target centroid points is an internal iterative process. First, z + y demand sites can be randomly selected from x demand sites as the initial centroid points, calculate the distances from x demand sites to z + y initial centroid points, and assign the demand sites to the nearest initial centroid point. At this time, x demand sites are divided into z + y groups according to the different centroid points they belong to, and the center points of each group (i.e., the positions to be updated) are calculated respectively. The center point calculation formula: xi_mid = (xi_max + xi_min) / 2, where xi is the centroid point data in the i-th group. Iterate cyclically until the centroid points no longer change, and the target centroid points to which each demand site belongs are obtained. Further, calculate the distances between z + y target centroid points and z service sites to be selected to obtain the first distance matrix. Using the distance calculation formula of formula (1), the first distance matrix with z + y rows and z columns is solved. The first distance matrix is shown as follows:

[0113]

[0114] Further, perform a nearest neighbor deletion process on the first distance matrix to obtain y new service sites. For example, use argmin(matrix) to obtain the row and column indices of the minimum value in the matrix, delete the row and column corresponding to this value, and record the row and column indices. The deleted first distance matrix is used as the distance matrix to be used. Assume z = 3, y = 2, d 23 is the minimum distance value. The elements in the second row and third column where d 23 is located can be deleted. The schematic diagram of the distance matrix to be used is as shown in Figure 5As shown, use the distance matrix to be used as the first distance matrix again, and repeat the step of performing nearest neighbor deletion processing on the first distance matrix until the first distance matrix is empty. According to the recorded deletion indices, use the target centroid points corresponding to the deleted elements as the newly established service sites. Further, y newly established service sites and z service sites to be selected can be merged to determine z + y service sites to be used. Calculate the distances from x demand sites to the z + y service sites to be used, and use the service site to be used that is closest to the demand site as the service site to be located. Determine whether the service site to be located corresponding to the demand site is the same as the previously assigned service site. If so, use the service site to be located as the target service site for the demand site, that is, the site selection is completed; if not, the differential method can be used to solve the positions of the y newly established service sites. Specifically, using the differential method to solve the positions of the y newly established service sites includes: using the service site to be located corresponding to the demand site as the historical site selection service site. Based on the data of the newly established service sites determined, obtain the three fields of the sales volume, transportation rate, and longitude and latitude of the demand site according to the data in Data Table 1 and Data Table 2, and calculate the shipment volume (tons) from the jth newly established service site to the ith demand site, denoted as w ji ; calculate the single-site transportation cost (yuan / ton-kilometer) from the jth newly established service site to the ith demand site, denoted as a ji , calculate the distance from the jth newly established service site to the ith demand site, denoted as d ji . Calculate the total cost C j of the jth newly established service site. C j can be expressed as:

[0115]

[0116] C j can be differentiated. The data of the updated site to be used corresponding to the jth newly established service site (x j , y j ) satisfies the following formula:

[0117]

[0118] where x i is the longitude position of the ith demand site, and y i is the latitude position of the ith demand site. (x j , y j)As the updated site data to be used corresponding to the j-th newly built service site. Further, after obtaining the updated site data to be used, the updated site data to be used can be used as the newly determined newly built service site data corresponding to the newly built service site, that is, y newly built service sites are obtained, and then return to execute the merging of the y newly built service sites and the z service sites to be selected, determine z + y service sites to be used, and continue to calculate the distances from the x demand sites to the z + y service sites to be used respectively until it is judged that the service site to be located corresponding to the demand site is the same as the service site allocated last time and then end. At this time, the target service site is the optimal location that matches the demand site. After the site selection is completed, the system can output Data Table 3 and Data Table 4. Among them, Data Table 3 adds fields such as the target service site, distance, and total cost on the basis of all fields of Data Table 1. The target service site field is the corresponding relationship between the demand site and the target service site, the distance field is the distance between the demand site and the target service site, and the cost is the cost of transporting goods from the demand site to the target service site. Data Table 4 is the list of calculated target service sites, which can include fields such as site name, longitude, latitude, and address.

[0119] The technical solution of this embodiment is to obtain the first site selection data of at least one service site to be selected, the number of service sites to be newly built, and the first associated data of at least one demand site; based on the first quantity of at least one service site to be selected, the number of service sites to be newly built, and the first associated data of at least one demand site, determine at least one target centroid point and the corresponding centroid point data, and based on each centroid point data and each first site selection data, determine the first distance matrix; based on the first distance matrix and the centroid point data of at least one target centroid point, determine at least one newly built service site data; based on the newly built service site data, each first site selection data, and each first associated data, determine the target service site corresponding to each demand site, which solves the problem in the prior art that the selected site warehouse is determined by considering the self-transportation attributes of the existing warehouse, resulting in the selected site result not meeting the user's needs and poor site selection effect. It realizes that by giving a parameter of the number of service sites to be newly built, clustering the demand sites based on the first quantity and the number of service sites to be newly built to obtain the target centroid point, and then combining the distance between each centroid point data and each first site selection data to determine the newly built service site data, and determining the target service site corresponding to each demand site from the newly built service site data and each first site selection data. At this time, the target service site is a certain site among the newly built service sites and / or the service sites to be selected, which meets the user's demand for new sites, and at the same time makes the target service site allocated to the demand site the most suitable for the demand site, achieving the technical effect of reducing transportation costs and improving transportation efficiency.

[0120] Embodiment Five

[0121] Figure 6 It is a schematic structural diagram of a device for determining a service site according to Embodiment 5 of the present invention. As Figure 6 shown, the device includes: a data acquisition module 610, a distance matrix determination module 620, a new service site determination module 630, and a target service site determination module 640.

[0122] Among them, the data acquisition module 610 is configured to acquire first site selection data of at least one service site to be selected, the number of service sites to be newly built, and first association data of at least one demand site; wherein, the first association data includes at least one of a first identifier, a first location, a shipment volume, and a unit transportation cost; the distance matrix determination module 620 is configured to determine at least one target centroid point and corresponding centroid point data based on the first quantity of the at least one service site to be selected, the number of service sites to be newly built, and the first association data of the at least one demand site, and determine a first distance matrix based on each centroid point data and each of the first site selection data; wherein, the rows in the first distance matrix represent target centroid points, the columns represent service sites to be selected, and the cross elements of the rows and columns represent the distance values between the target centroid points and the corresponding service sites to be selected; the new service site determination module 630 is configured to determine at least one new service site data based on the first distance matrix and the centroid point data of the at least one target centroid point; wherein, the quantity of the new service site data is consistent with the number of service sites to be newly built; the target service site determination module 640 is configured to determine a target service site corresponding to each demand site based on the new service site data, each of the first site selection data, and each of the first association data; wherein, the target service site is a certain site among the newly built service sites and / or the service sites to be selected.

[0123] The technical solution of this embodiment is to obtain the first site selection data of at least one service site to be selected, the number of service sites to be newly built, and the first association data of at least one demand site; based on the first quantity of at least one service site to be selected, the number of service sites to be newly built, and the first association data of at least one demand site, determine at least one target centroid point and the corresponding centroid point data, and based on each centroid point data and each first site selection data, determine the first distance matrix; based on the first distance matrix and the centroid point data of at least one target centroid point, determine at least one newly built service site data; based on the newly built service site data, each first site selection data, and each first association data, determine the target service site corresponding to each demand site, solving the problem in the prior art that the selected site warehouse is determined by considering the self-transportation attributes of the existing warehouse, resulting in the selection result not meeting the user's needs and poor selection effect. It realizes that by setting a parameter of the number of service sites to be newly built, clustering the demand sites based on the first quantity and the number of service sites to be newly built to obtain the target centroid points, and then combining the distances between each centroid point data and each first site selection data to determine the newly built service site data, and determining the target service site corresponding to each demand site from the newly built service site data and each first site selection data. At this time, the target service site is a certain site among the newly built service sites and / or the service sites to be selected, meeting the user's demand for new sites, and at the same time making the target service site assigned to the demand site the most suitable for the demand site, achieving the technical effects of reducing transportation costs and improving transportation efficiency.

[0124] Based on the above device, optionally, the distance matrix determination module 620 includes an initial centroid point determination unit, a relative distance determination unit, a belonging centroid point determination unit, and a target centroid point determination unit.

[0125] The initial centroid point determination unit is configured to determine the number of target sites based on the first quantity and the number of service sites to be newly built, and determine the initial centroid points and the corresponding second positions that are consistent with the number of target sites from the first association data of at least one demand site;

[0126] The relative distance determination unit is configured to determine the relative distance between the current first position and each second position for each first position;

[0127] The belonging centroid point determination unit is configured to determine the initial centroid point to which the current first position belongs according to at least one relative distance of the current first position;

[0128] The target centroid point determination unit is configured to update the corresponding initial centroid point and the corresponding second position according to at least one first position associated with the initial centroid point to obtain at least one target centroid point and the corresponding centroid point data.

[0129] Based on the above device, optionally, the target centroid point determination unit includes a to-be-used update position determination subunit and a processing method determination subunit.

[0130] The to-be-used update position determination subunit is configured to determine a to-be-used update position based on at least one first position associated with the initial centroid point;

[0131] The processing method determination subunit is configured to determine a processing method for updating the initial centroid point and the corresponding second position based on the position error between the to-be-used update position and the second position of the initial centroid point, so as to update the initial centroid point and the corresponding second position based on the processing method to obtain at least one target centroid point and corresponding centroid point data.

[0132] Based on the above device, optionally, the processing method determination subunit includes a first position error comparison subunit and a second position error comparison subunit.

[0133] The first position error comparison subunit is configured to, if the position error is greater than a first preset error threshold, update the initial centroid point and the corresponding second position based on the to-be-used update position, and re-execute the step of determining the relative distance between the current first position and each second position, so as to determine the position error between the to-be-used update position and the second position of the corresponding initial centroid point based on the relative distance, and determine the target centroid point and corresponding centroid point data based on the position error;

[0134] The second position error comparison subunit is configured to, if the position error is not greater than the first preset error threshold, use the initial centroid point as the target centroid point, and use the second position of the initial centroid point as the centroid point data corresponding to the target centroid point.

[0135] Based on the above device, optionally, the new service site determination module 630 includes a to-be-used distance matrix determination unit, a deletion processing unit, and a new service site data determination unit.

[0136] The to-be-used distance matrix determination unit is configured to determine a to-be-used element corresponding to the minimum distance value in the first distance matrix and the corresponding row and column, and perform deletion processing on the row and column to obtain a to-be-used distance matrix;

[0137] The deletion processing unit is configured to, if the to-be-used distance matrix is not empty, re-use the to-be-used distance matrix as the first distance matrix, and repeatedly execute the operation of performing deletion processing on the row and column of the to-be-used element corresponding to the minimum distance value in the first distance matrix, so as to determine at least one new service site data based on the processed first distance matrix;

[0138] A new service site data determination unit, which is used to, if the to-be-used distance matrix is empty, take the centroid data of the centroid points corresponding to all to-be-used elements as the new service site data.

[0139] Based on the above device, optionally, the target service site determination module 640 includes a to-be-used service site determination unit, a to-be-located service site determination unit, and a target service site determination unit.

[0140] The to-be-used service site determination unit is used to take the new service sites corresponding to each of the first site selection data and the new service site data as the to-be-used service sites, and determine the third positions corresponding to each to-be-used service site;

[0141] The to-be-located service site determination unit is used to, for each of the first association data, take the to-be-used service site to which the third position with the minimum distance from the current first association data belongs as the to-be-located service site corresponding to the demand site to which the current first association data belongs;

[0142] The target service site determination unit is used to, for each demand site, determine the target service site corresponding to the current demand site based on the position error between the fourth position of the to-be-located service site corresponding to the current demand site and the fifth position of the corresponding historical located service site.

[0143] Based on the above device, optionally, the target service site determination unit includes a first small unit for comparing point position errors and a second small unit for comparing point position errors.

[0144] The first small unit for comparing point position errors is used to, if the point position error is less than the second preset error threshold, take the to-be-located service site as the target service site of the current demand site;

[0145] The second small unit for comparing point position errors is used to, if the point position error is not less than the second preset error threshold, update the fifth position of the historical located service site corresponding to the corresponding demand site based on the fourth position of each to-be-located service site, and determine the to-be-used updated site data based on the new service site data and the first association data of each demand site, so as to update the new service site data based on the to-be-used updated site data, and re-execute the steps of determining the to-be-used service sites and the corresponding third positions, the to-be-located service sites and the point position errors based on the updated new service site data and each of the first site selection data, so as to determine the target service site corresponding to each demand site based on the point position error.

[0146] Based on the above device, optionally, the point error comparison second smallest unit includes a transportation attribute information determination subunit, a to-be-used updated site data determination subunit, and a target service site determination subunit.

[0147] The transportation attribute information determination subunit is configured to determine the transportation attribute information of the newly built service site under each demand site based on the newly built service site data and the first association data of each demand site; wherein, the transportation attribute information includes the single-site transportation cost, transportation distance, and transportation volume.

[0148] The to-be-used updated site data determination subunit is configured to determine the to-be-used updated site data based on the respective transportation attribute information corresponding to the newly built service site, so as to update the newly built service site data based on the to-be-used updated site data.

[0149] Based on the above device, optionally, the to-be-used updated site data determination subunit includes:

[0150] The target transportation cost data determination subunit is configured to determine the target transportation cost data based on the respective transportation attribute information corresponding to the newly built service site.

[0151] The to-be-used updated site data determination subunit is configured to perform differential processing on the position parameters in the target transportation cost data to obtain the to-be-used updated site data.

[0152] The device for determining a service site provided by an embodiment of the present invention can execute the method for determining a service site provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

[0153] Embodiment Six

[0154] Figure 7 It is a schematic structural diagram of an electronic device for implementing the method for determining a service site according to an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only for illustration and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0155] As Figure 7As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0156] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0157] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for determining a service site.

[0158] In some embodiments, the method for determining a service site can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for determining a service site described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for determining a service site by any other appropriate means (e.g., by means of firmware).

[0159] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0160] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing device, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0161] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0162] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0163] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0164] The computing system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0165] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0166] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for determining a service site, characterized in that, Including: Obtain the first site selection data of at least one service site to be selected, the number of service sites to be newly built, and the first association data of at least one demand site; wherein, the first association data includes at least one of a first identifier, a first location, a shipment volume, and a unit transportation cost; Determine the number of target sites based on the first quantity of the at least one service site to be selected and the number of service sites to be newly built, and determine an initial centroid point and a corresponding second location that are consistent with the number of target sites from the first association data of the at least one demand site; For each first location, determine the relative distance between the current first location and each second location; Determine the initial centroid point to which the current first location belongs according to at least one relative distance of the current first location; Update the corresponding initial centroid point and the corresponding second location according to at least one first location associated with the initial centroid point to obtain at least one target centroid point and corresponding centroid point data; Determine a first distance matrix based on each centroid point data and each of the first site selection data; wherein, the rows in the first distance matrix represent target centroid points, the columns represent service sites to be selected, and the cross elements of the rows and columns represent the distance values between the target centroid points and the corresponding service sites to be selected; Determine the element to be used corresponding to the minimum distance value in the first distance matrix and the corresponding row and column, and perform deletion processing on the row and column to obtain a distance matrix to be used; If the distance matrix to be used is not empty, re-use the distance matrix to be used as the first distance matrix, and repeat the operation of deleting the row and column of the element to be used corresponding to the minimum distance value in the first distance matrix, so as to determine at least one newly built service site data based on the processed first distance matrix; If the distance matrix to be used is empty, use the centroid point data of the target centroid points corresponding to all the elements to be used as the newly built service site data; wherein, the number of the newly built service site data is consistent with the number of service sites to be newly built; Determine a target service site corresponding to each demand site based on the newly built service site data, each of the first site selection data, and each of the first association data; wherein, the target service site is a certain site among the newly built service sites and / or the service sites to be selected.

2. The method according to claim 1, characterized in that, The updating the corresponding initial centroid point and the corresponding second location according to at least one first location associated with the initial centroid point to obtain at least one target centroid point and corresponding centroid point data includes: Determine a position to be updated for use based on at least one first location associated with the initial centroid point; Determine a processing method for updating the initial centroid point and the corresponding second location based on the position error between the position to be updated for use and the second location of the initial centroid point, so as to update the initial centroid point and the corresponding second location based on the processing method to obtain at least one target centroid point and corresponding centroid point data.

3. The method according to claim 2, characterized in that, The method for determining a processing manner of updating the initial centroid point and the corresponding second position based on the position error between the to-be-used updated position and the second position of the initial centroid point includes: If the position error is greater than a first preset error threshold, update the initial centroid point and the corresponding second position based on the to-be-used updated position, and re-execute the step of determining the relative distance between the current first position and each second position, so as to determine the position error between the to-be-used updated position and the second position of the corresponding initial centroid point based on the relative distance, and determine the target centroid point and the corresponding centroid point data based on the position error; If the position error is not greater than the first preset error threshold, use the initial centroid point as the target centroid point, and use the second position of the initial centroid point as the centroid point data corresponding to the target centroid point.

4. The method according to claim 1, wherein The method for determining a target service site corresponding to each demand site based on the newly created service site data, each of the first site selection data, and each of the first association data includes: Use each of the first site selection data and the newly created service site corresponding to the newly created service site data as the to-be-used service sites, and determine the third positions corresponding to the to-be-used service sites; For each of the first association data, use the to-be-used service site to which the third position with the smallest distance from the current first association data belongs as the to-be-selected service site corresponding to the demand site to which the current first association data belongs; For each demand site, determine the target service site corresponding to the current demand site based on the point position error between the fourth position of the to-be-selected service site corresponding to the current demand site and the fifth position of the corresponding historical site selection service site.

5. The method according to claim 4, wherein The method for determining the target service site corresponding to the current demand site based on the point position error between the fourth position of the to-be-selected service site corresponding to the current demand site and the fifth position of the corresponding historical site selection service site includes: If the position error is less than a second preset error threshold, use the to-be-selected service site as the target service site of the current demand site; If the point position error is not less than the second preset error threshold, update the fifth position of the historical site selection service site corresponding to the corresponding demand site based on the fourth positions of the to-be-selected service sites, and determine the to-be-used updated site data based on the newly created service site data and the first association data of each demand site, so as to update the newly created service site data based on the to-be-used updated site data, and re-execute the steps of determining the to-be-used service sites and the corresponding third positions, the to-be-selected service sites and the point position errors based on the updated newly created service site data and each of the first site selection data, so as to determine the target service site corresponding to each demand site based on the point position error.

6. The method according to claim 5, wherein The method for determining the to-be-used updated site data based on the newly created service site data and the first association data of each demand site includes: Based on the newly built service site data and the first association data of each demand site, determine the transportation attribute information of the newly built service site under each demand site; wherein, the transportation attribute information includes single-site transportation cost, transportation distance, and transportation volume of goods. Based on the respective transportation attribute information corresponding to the newly built service site, determine the data of the site to be used for update, so as to update the newly built service site data based on the data of the site to be used for update.

7. The method according to claim 6, characterized in that, The determining the data of the site to be used for update based on the respective transportation attribute information corresponding to the newly built service site includes: Based on the respective transportation attribute information corresponding to the newly built service site, determine the target transportation cost data. Perform differential processing on the position parameters in the target transportation cost data to obtain the data of the site to be used for update.

8. An apparatus for determining a service site, characterized in that, It includes: A data acquisition module, configured to acquire the first site selection data of at least one service site to be selected, the number of newly built service sites to be built, and the first association data of at least one demand site; wherein, the first association data includes at least one of a first identifier, a first location, a shipment volume, and a unit transportation cost. A distance matrix determination module, including: An initial centroid point determination unit, configured to determine the number of target sites based on the first number of the at least one service site to be selected and the number of newly built service sites to be built, and determine an initial centroid point and the corresponding second location that are consistent with the number of target sites from the first association data of the at least one demand site. A relative distance determination unit, configured to determine the relative distance between the current first location and each second location for each first location. An affiliated centroid point determination unit, configured to determine the initial centroid point to which the current first location belongs according to at least one relative distance of the current first location. A target centroid point determination unit, configured to update the corresponding initial centroid point and the corresponding second location according to at least one first location associated with the initial centroid point to obtain at least one target centroid point and the corresponding centroid point data. A distance matrix determination module, configured to determine a first distance matrix based on each centroid point data and each of the first site selection data; wherein, the rows in the first distance matrix represent target centroid points, the columns represent service sites to be selected, and the cross elements of the rows and columns represent the distance values between the target centroid points and the corresponding service sites to be selected. A to-be-used distance matrix determination unit, configured to determine the to-be-used element corresponding to the minimum distance value in the first distance matrix and the corresponding row and column, and perform deletion processing on the row and column to obtain a to-be-used distance matrix. A deletion processing unit, configured to, if the to-be-used distance matrix is not empty, re-use the to-be-used distance matrix as the first distance matrix, and repeat the operation of performing deletion processing on the row and column of the to-be-used element corresponding to the minimum distance value in the first distance matrix, so as to determine the data of at least one newly built service site based on the processed first distance matrix. A new service site data determination unit, which is used to, if the to-be-used distance matrix is empty, use all the centroid data of the centroid points corresponding to all the to-be-used elements as the new service site data; wherein, the quantity of the new service site data is consistent with the quantity of the to-be-newly-built service sites; A target service site determination module, which is used to determine a target service site corresponding to each demand site based on the new service site data, each of the first site selection data, and each of the first association data; wherein, the target service site is a certain site among the newly-built service sites and / or the to-be-selected service sites.

Citation Information

Patent Citations

  • Position data division method and device, computer equipment and storage medium

    CN112948512A

  • Address selection method and device of distribution center, electronic equipment and storage medium

    CN113807555A