A method and apparatus for determining available inventory information
By applying feature matrices and weight matrices, recommended routes for logistics trunk lines are determined, solving the problem that drivers or carriers have difficulty efficiently screening available cargo sources during freight transportation, and achieving more efficient cargo source information matching.
Patent Information
- Application Number
- CN202111222441.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-20
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2041-10-20
AI Technical Summary
During freight transport on logistics trunk lines, drivers or carriers often struggle to efficiently filter available cargo information, leading to a waste of processing resources and time, especially when they want to return via the same route, making it even more difficult to find suitable cargo.
By obtaining information about the desired routes, the recommended routes are determined using feature matrices and weight matrices. Combined with the cargo information set, loading and unloading areas are matched to filter out available cargo information that meets the criteria.
It improves the efficiency of identifying available cargo information, reduces processing time and resource consumption, and meets the needs of drivers or carriers.
Smart Images

Figure CN116011914B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics technology, and in particular to a method and apparatus for determining available cargo information. Background Technology
[0002] In the freight process of logistics trunk lines, due to the differences in cargo size, storage requirements, order amount and transportation time, drivers (or carriers) need to spend a lot of time to find suitable cargo information (cargo information contains relevant information needed to complete the freight task). Especially in some specific scenarios, such as when a driver (or carrier) wants to return via the same route after completing a freight task, it is difficult to find available cargo information on the return route.
[0003] In existing technologies, platforms can only provide a set of freight information, which includes a large amount of complex freight information. Drivers (or carriers) cannot efficiently filter out available freight information and need to browse through a large amount of complex freight information multiple times and filter it one by one. Therefore, the above method of determining available freight consumes processing and network resources, is time-consuming, and has low processing efficiency. Summary of the Invention
[0004] This invention provides a method and apparatus for determining available goods information, thereby improving processing efficiency.
[0005] In a first aspect, the present invention provides a method for determining available cargo information, the method comprising: acquiring information about a desired route, the information of the desired route including loading areas and unloading areas of the desired route; determining information about at least one recommended route based on a feature matrix, a weight matrix, and the information of the desired route, wherein the feature matrix is related to a destination matrix, an origin matrix, and the great circle distances of multiple reference routes respectively, the weight matrix is related to the transportation prices of the destination matrix, the origin matrix, and the multiple reference routes respectively, the destination matrix including the latitude and longitude of the destinations of the multiple reference routes, the origin matrix including the latitude and longitude of the origins of the multiple reference routes, and the information of the recommended route including loading areas and unloading areas of the recommended route; and determining available cargo information corresponding to the recommended route from a set of cargo information based on the information of the recommended route, wherein the loading areas included in the available cargo information are different from the loading areas of the desired route, and / or, the unloading areas included in the available cargo information are different from the unloading areas of the desired route.
[0006] In one possible design, the method further includes: determining, based on the information of the desired route and the set of cargo information, at least one of the following conditions is met: the loading area of the desired route does not include the cargo source corresponding to the set of cargo information; and / or, the unloading area of the desired route does not include the unloading location corresponding to the set of cargo information.
[0007] In one possible design, the method further includes: determining a feature matrix based on a destination matrix, a origin matrix, the longitude and latitude of a first reference area within the target area, the longitude and latitude of a second reference area within the target area, and the great circle distances of the multiple reference routes, wherein the target area includes the destinations of the multiple reference routes and the origins of the multiple reference routes.
[0008] In one possible design, the method further includes: determining a feature matrix based on the differences between the longitudes of the destinations of the multiple reference routes included in the destination matrix and the longitudes of the first reference area, the differences between the latitudes of the destinations of the multiple reference routes included in the destination matrix and the latitudes of the first reference area, the differences between the longitudes of the origins of the multiple reference routes included in the origin matrix and the longitudes of the second reference area, the differences between the latitudes of the origins of the multiple reference routes included in the origin matrix and the latitudes of the second reference area, and the great circle distances of the multiple reference routes respectively.
[0009] In one possible design, the first element in the feature matrix... row elements according to Sure; include , , , , , , , , , and d in the middle , The number of reference lines; among which, , Indicates the distance between great circles. It is Euler's constant;
[0010] , Represents the destination matrix. Represents the origin matrix;
[0011] , A matrix representing the longitude and latitude of the first reference region;
[0012] ;
[0013] , A matrix representing the longitude and latitude of the second reference area;
[0014] ;
[0015] ;
[0016] ;
[0017] ;
[0018] ;
[0019] Represents the vector cosine radian function; Represents the vector magnitude function; This represents the transpose of a matrix.
[0020] In one possible design, information on at least one recommended route is determined based on the feature matrix, weight matrix, and desired route information. This includes: determining the approximation between the desired route and the reference route based on the metric formula, feature matrix, and weight matrix; and identifying the route with the highest approximation as the recommended route.
[0021] In one possible design, based on the feature matrix, weight matrix, and information about the desired route, information about at least one recommended route is determined, including: determining the approximation between the desired route and a reference route based on a metric formula, the feature matrix, and the weight matrix; and identifying the route with the highest approximation as the recommended route; the metric formula satisfies:
[0022] ;
[0023] in, This indicates the degree of similarity between the desired route and the comparison route. The value can be set in advance, preferably... The value is 2. It is the first in the weight matrix One element, It is the first feature in the feature matrix corresponding to the desired line. One characteristic, It is the first feature in the feature matrix corresponding to the feature of the comparison line. One characteristic, .
[0024] In one possible design, a price matrix is determined based on the transportation prices of multiple reference routes, where the price matrix contains the first... The row element is the first The transportation price of the reference route; determine the intermediate feature matrix based on the feature matrix, the number of rows in the intermediate feature matrix is the same as the number of rows in the price matrix, and the digit of the intermediate feature matrix is... The row element is the element corresponding to the first row in the characteristic matrix. Elements of a reference line, , The number of reference routes with valid transportation prices among multiple reference routes; the weight matrix is determined based on the price matrix and the intermediate feature matrix.
[0025] In one possible design, the weight matrix is determined based on the price matrix and the intermediate feature matrix, including: constructing a linear model between the price matrix, the intermediate feature matrix, and the linear weight matrix.
[0026]
[0027] in, Representing the price matrix, Represents the intermediate feature matrix. Represents a linear weight matrix; the weight matrix is based on... Sure, satisfy:
[0028] .
[0029] Secondly, the present invention also provides an apparatus for determining available cargo information, the apparatus including an acquisition module and a processing module. The acquisition module is used to acquire information about a desired route, including the loading area and unloading area of the desired route. The processing module is used to determine information about at least one recommended route based on a feature matrix, a weight matrix, and the information about the desired route. The feature matrix is related to a destination matrix, an origin matrix, and the great circle distances of multiple reference routes; the weight matrix is related to the transportation prices of the destination matrix, the origin matrix, and the multiple reference routes; the destination matrix includes the latitude and longitude of the destinations of the multiple reference routes; the origin matrix includes the latitude and longitude of the origins of the multiple reference routes; and the information about the recommended route includes the loading area and unloading area of the recommended route. The processing module can also be used to determine available cargo information corresponding to the recommended route from a set of cargo information, wherein the loading area included in the available cargo information differs from the loading area of the desired route, and / or, the unloading area included in the available cargo information differs from the unloading area of the desired route.
[0030] Thirdly, the present invention also provides an electronic device comprising a processor, the processor being configured to execute a computer program stored in a memory to implement the steps of the method for determining available supply information as described above.
[0031] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for determining available supply information as described above.
[0032] In this application, information about a desired route is obtained, including the loading and unloading areas of the desired route. At least one recommended route is determined based on a feature matrix, a weight matrix, and the information about the desired route. Available cargo information is then determined based on the information about the recommended route. The available cargo information determined through this step is related to the loading and unloading areas of the desired route, thus providing information that better meets user needs and significantly improving the efficiency of determining available cargo information. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 A flowchart illustrating a method for determining available goods information provided in an embodiment of the present invention;
[0035] Figure 2 A flowchart illustrating another method for determining available supply information provided in an embodiment of the present invention;
[0036] Figure 3 A flowchart illustrating another method for determining available supply information provided in an embodiment of the present invention;
[0037] Figure 4 A flowchart illustrating another method for determining available supply information provided in an embodiment of the present invention;
[0038] Figure 5 This is a schematic diagram of the structure of a device for determining available supply information provided in an embodiment of the present invention;
[0039] Figure 6 This is a schematic diagram of another device for determining available source information provided in an embodiment of the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0041] To improve the efficiency of determining available cargo information, embodiments of the present invention provide a method and apparatus for determining available cargo information. This method can be executed by a driver's (or carrier's) client. The client can be a driver's (or carrier's) mobile phone, personal computer (PC), wearable device, or other electronic device, without specific limitations.
[0042] Figure 1 This is a schematic diagram of a method for determining available supply information according to an embodiment of the present invention. The process includes the following steps:
[0043] S101: Obtain information about the desired route, including the loading area and unloading area of the desired route.
[0044] Specifically, the system obtains the cargo search request sent by the user to the platform. This cargo search request may include information needed to search for cargo, such as the desired loading location, desired unloading location, and vehicle type. Based on the desired loading location and desired unloading location, the system determines the desired loading area and desired unloading area, and uses the corresponding route between the two areas as the desired route.
[0045] For example, the platform may provide various regions as options to drivers (or carriers), allowing them to choose their desired loading and unloading regions; or, the platform may determine the desired loading and unloading regions based on the desired loading and unloading addresses filled in by the drivers (or carriers), which is not limited in this application.
[0046] In one possible implementation, when it is determined, based on the desired route information and the cargo information set, that there is currently no available cargo information to push, at least one of the following conditions must be met: the loading area of the desired route does not include the cargo location corresponding to the cargo information set; and / or, the unloading area of the desired route does not include the unloading location corresponding to the cargo information set. The cargo information set can be a collection of all cargo information on the platform.
[0047] Optionally, the above conditions may also include: the vehicle models in the cargo search request do not include the corresponding vehicle models in the cargo information set.
[0048] For example, the loading area of the desired route, the unloading area of the desired route, and the vehicle type in the cargo search request are matched with the cargo source location, the unloading location, and the vehicle type corresponding to the cargo source information set, and it is determined whether the above conditions are met. If the above conditions are met, it means that there is currently no available cargo source information, so steps S102 and S103 are executed to determine the available cargo source information.
[0049] Conversely, if it is determined that the loading location address of a certain cargo information in the cargo information set is located within the loading location area of the desired route, and the unloading location address of the same cargo information is located within the unloading location area of the desired route, and the vehicle type corresponding to this cargo information matches the vehicle type in the cargo search request, then this cargo information can be considered as pushable cargo information, indicating the existence of pushable cargo information. This pushable cargo information can then be pushed to the user without needing to execute steps S102 and S103.
[0050] S102: Based on the information of the feature matrix, weight matrix, and desired route, determine the information of at least one recommended route. The feature matrix is related to the destination matrix, origin matrix, and the great circle distances of multiple reference routes. The weight matrix is related to the transportation prices of the destination matrix, origin matrix, and multiple reference routes. The destination matrix includes the latitude and longitude of the destinations of multiple reference routes. The origin matrix includes the latitude and longitude of the origins of multiple reference routes. The information of the recommended route includes the loading area and unloading area of the recommended route.
[0051] In one possible implementation of S102, the feature matrix can be determined based on the destination matrix, the origin matrix, the latitude and longitude of the first reference area, the latitude and longitude of the second reference area, and the great circle distances of the multiple reference routes.
[0052] For example, The first reference matrix is specifically represented as follows: ; The second reference matrix is specifically represented as follows: ; The origin matrix is specifically represented as follows: ; The destination matrix is specifically represented as follows .in, and These represent the latitudes of the first reference region; and These represent the latitudes of the first reference region; and These represent the latitude of the origin; and These represent the latitude of the place of origin.
[0053] Optionally, the steps for determining the feature matrix can also be performed before S101.
[0054] Optional, can be based on Figure 2 The following steps are shown to determine the feature matrix:
[0055] S201: Divide the target area into regions and determine the latitude and longitude of each region.
[0056] Specifically, the target area can be determined in advance, such as using the administrative region of Hubei Province as the target area. The target area is then divided according to a preset regional division rule. This rule can be a national administrative division rule, a grid division, or other rules; this application does not impose any limitations. It should be noted that the regional division method referred to in step S101 should be consistent with this method. That is, the regional division method for loading and unloading areas in S101 should be consistent with the regional division method in this step, so that the same locations can be placed within the same region. The corresponding latitude and longitude are determined for each region. This latitude and longitude can be the latitude and longitude of any point within the region, or the latitude and longitude of the center point of the region; this application does not impose any limitations. East and west longitudes can be distinguished using positive and negative relationships, as can south and north latitudes.
[0057] For example, in this application embodiment, the rules of national administrative regions are used to divide the target area, and the latitude and longitude of any point in each region are determined as the latitude and longitude of that region.
[0058] It's important to note that finer granularity in regional division leads to better recommended routes, but also significantly increases the amount of data processed initially. For example, dividing by administrative districts results in finer granularity than dividing by city. Similarly, when using grid partitioning, smaller areas for each cell result in finer granularity.
[0059] S202: Select two regions as the first reference region and the second reference region, respectively.
[0060] Specifically, in the multiple regions obtained in step S201, two regions with different latitudes and longitudes are selected as the first reference region and the second reference region, respectively. The selection method can be random or other methods, which are not limited in this application.
[0061] Optionally, the first reference matrix and the second reference matrix are determined based on the latitude and longitude of the first reference area and the second reference area.
[0062] Specifically, the first and second reference matrices are determined using the longitude and latitude corresponding to each reference region. The first reference matrix is represented as follows: That is, [the longitude and latitude corresponding to the first reference area]; the second reference matrix is represented as... That is, [the longitude corresponding to the second reference area, and the latitude corresponding to the second reference area].
[0063] For example, two reference areas are selected: Shijiazhuang and Changsha. Shijiazhuang is the first reference area, and Changsha is the second reference area. The longitude corresponding to Shijiazhuang is... Latitude is The longitude corresponding to Changsha is Latitude is Therefore, the first reference matrix at this point is [ , The second reference matrix is [ , ].
[0064] S203: Determine multiple reference routes based on any two reference areas, with each reference route corresponding to a departure point and a destination. The same area can serve as both a departure point and a destination in different reference routes.
[0065] For example, there are three reference areas: Baoding, Xingtai, and Beijing. By determining reference routes based on any two different reference areas, six routes can be identified: Baoding-Xingtai, Baoding-Beijing, Xingtai-Beijing, Xingtai-Baoding, Beijing-Xingtai, and Beijing-Baoding.
[0066] Optionally, a origin matrix, destination matrix, and great circle distance can be determined for each reference route.
[0067] Specifically, the origin matrix is represented as follows: That is, [the longitude and latitude of the originating region]. The destination matrix is represented as follows: That is, [the longitude and latitude of the destination area]. The great circle distance of the reference route is:
[0068]
[0069] in, The longitude corresponding to the origin region. The latitude corresponding to the origin region. The longitude corresponding to the destination region. This refers to the latitude of the destination region. In this embodiment of the application, Right now The value, Right now The value, Right now The value, Right now The value of .
[0070] S204: Determine the feature matrix based on the latitude and longitude of the first reference area, the latitude and longitude of the second reference area, the origin matrix, the destination matrix, and the great circle distance.
[0071] Specifically, feature data is determined based on the latitude and longitude of the first reference area, the latitude and longitude of the second reference area, the origin matrix, the destination matrix, and the great circle distance, thereby further determining the feature matrix. The feature matrix may include feature data from multiple reference routes.
[0072] In one possible design, characteristic data is determined based on the difference between the longitude of the destination and the longitude of the first reference area, the difference between the latitude of the destination and the latitude of the first reference area, the difference between the longitude of the origin and the longitude of the second reference area, the difference between the latitude of the origin and the latitude of the second reference area, and the great circle distances of multiple reference routes.
[0073] Specifically, in the embodiments of this application, and These represent the latitudes of the first reference region, and These represent the latitudes of the first reference region, and These represent the latitudes of the originating points, and These represent the latitudes of the originating points, therefore, we can use... The difference between the longitude of the destination and the longitude of the first reference area can be expressed as... The difference between the latitude of the destination and the latitude of the first reference area can be represented by... The difference between the longitude of the origin and the longitude of the second reference area can be expressed as... This represents the difference between the latitude of the origin and the latitude of the second reference area. This feature matrix may include the following feature data: , , , , , , , , and The calculation formulas are as follows:
[0074] 1.
[0075] 2.
[0076] 3.
[0077] 4.
[0078] 5.
[0079] 6.
[0080] 7.
[0081] 8.
[0082] 9.
[0083] 10.
[0084] in, Represents the natural logarithm operation. Indicates the distance between great circles. It is Euler's constant; It is a vector magnitude function. It is a custom vector cosine radian function; This is a reference route origination matrix. This is the destination matrix for the reference route. It is the first reference matrix. It is the second reference matrix.
[0085] Optional, and The formulas are as follows:
[0086]
[0087]
[0088] in, It is a matrix norm, To represent the transpose of a matrix, for example, Representation matrix The transpose of . It is the arctangent function. It is a function that converts radians to angles. It is an angle-to-radian function. It is a remainder function.
[0089] It should be noted that, and In , and This is an example identifier; during the calculation process, it is necessary to match the corresponding matrix or value based on the actual situation. With the aforementioned matrix , , , , Correspondingly; similarly, and , , , or The differences correspond to each other; and and , , , or The differences correspond to each other. Represented as a matrix For example, then , ,Right now This represents the difference between the longitude corresponding to the second reference area and the longitude corresponding to the destination area. This represents the difference between the latitude of the second reference area and the latitude of the destination area.
[0090] Furthermore, a feature matrix is determined based on the aforementioned feature data. Specifically, the feature matrix may include feature data from multiple reference lines, with each reference line corresponding to 10 of the aforementioned feature data, resulting in a 1×10 line matrix. Assuming there are a total of n reference lines, a [missing information - likely a specific matrix or matrix] can be obtained. A 10 × matrix .
[0091] For example, matrix It can be represented as:
[0092]
[0093] in, In other words, the matrix It is The matrix, This refers to the number of features corresponding to a reference line. In this embodiment of the application, , This refers to the number of reference lines.
[0094] Optionally, the matrix can be As a feature matrix Use it.
[0095] Optionally, the elements in the matrix can be standardized column-wise to obtain the feature matrix. .
[0096] For example, for a matrix Each element in Standardization is obtained The formula is:
[0097]
[0098] in, It is the row number in the matrix. , The number of reference lines; It is the column number in the matrix. , In this embodiment of the application, the number of features corresponding to a reference line is... ; It is a matrix The Middle The mean of the column; It is a matrix The Middle The standard deviation of the column. The resulting feature matrix. Also one A 10 × 10 matrix.
[0099] For example, assuming there are a total of 8 reference lines, an 8×10 feature matrix is determined according to the aforementioned steps. , where the characteristic matrix First action , It can be viewed as a 1×10 matrix, corresponding to reference line 1; characteristic matrix The second act , This can be viewed as a 1×10 matrix, corresponding to reference line 2; and so on. Corresponding to reference route 3, Corresponding to reference line 4, ... Corresponding reference line 8.
[0100] In one possible implementation of S102, the weight matrix can be determined based on the transportation price corresponding to the reference route.
[0101] Optionally, the steps for determining the weight matrix can also be performed before S101.
[0102] Optional, can be based on Figure 3 The following steps are shown to determine the weight matrix:
[0103] S301: Determine the transportation price for each reference route. The transportation price may reflect the price of transporting goods on that reference route. There are many methods for determining transportation prices in the prior art, and this application is not limited to any particular method; the existing methods for determining transportation prices can be used here.
[0104] For example, since the origin and destination of the reference route are already determined, historical orders can be queried from the database. The transportation price of the reference route can be determined based on the transaction price, loading location information, and unloading location information in the historical orders. For instance, historical orders with loading locations within the origin region and unloading locations within the destination region can be selected from the database, and the average transaction price of these historical orders can be calculated to obtain the average transaction price, which is then used as the transportation price for the reference route. If a reference route cannot be matched with historical orders, and therefore no usable transportation price can be obtained, or no transportation price can be obtained at all, the transportation price for that reference route can be recorded as empty before further processing.
[0105] S302: Determine the price matrix based on the transportation prices of multiple reference routes. The price matrix contains the... The row element is the first The transportation prices for the reference routes, where the price matrix uses... express, Let be the row number of the matrix. , yes The number of reference routes for transportation prices was obtained from the reference routes.
[0106] Optionally, an intermediate feature matrix is determined based on the feature matrix. The intermediate feature matrix has the same number of rows as the price matrix, and the intermediate feature matrix is... The row element is the element corresponding to the first row in the characteristic matrix. Elements of a reference line, , This represents the number of reference routes with valid transportation prices among multiple reference routes.
[0107] Specifically, reference routes with empty transportation price records are included in the feature matrix. By deleting the corresponding rows, we obtain the intermediate feature matrix. , characteristic matrix It can be the matrix obtained in step S204, and the price matrix is determined based on the transportation price of each reference route. .
[0108] For example, the 8×10 feature matrix obtained in step S204 is still used. For example, if no transportation price is obtained for reference route 4, then the feature matrix will be... Delete line 4 in the text, that is... Deletion yields the intermediate feature matrix. , Given a 7×10 matrix, determine a 7×1 price matrix based on the transportation prices of these 7 reference routes. In this price matrix, each row contains elements corresponding to the transportation price of each reference route. sum matrix The reference route corresponding to each row should be consistent.
[0109] S303: Determine the weight matrix based on the price matrix and the intermediate feature matrix.
[0110] Optionally, it can be based on a price matrix. and intermediate feature matrix Define a linear model, which includes a linear weight matrix. Specifically, the linear model is as follows:
[0111]
[0112] in, , , , yes The number of reference routes for transportation prices was obtained from the reference routes. It is the number of features corresponding to a reference line, that is, It is The matrix, It is The matrix, It is A matrix. For example, in an embodiment of this application, =7, .
[0113] Optionally, the matrix is determined based on the linear model. .
[0114] Specifically, the matrix can be determined based on the linear model and the least squares method. , Take the minimum sum of errors of all reference lines. Here is a matrix It is A matrix of size 1, The value can be positive or negative; a negative number indicates an inverse relationship between the reorganization characteristics and the final result. The error of each reference line can be used... Sure, Let be the row number of the matrix. .
[0115] Alternatively, the formula for minimizing the sum of errors of all reference lines using the least squares method can be:
[0116]
[0117] in, Representation matrix 2-norm, This indicates the step to minimize the sum of errors of all reference lines. .
[0118] Optionally, the matrix obtained above can be... As a weight matrix.
[0119] Optionally, the matrix obtained above can be... The elements in the matrix are standardized, and the resulting matrix is used as the weight matrix.
[0120] Specifically, for the matrix Scale all elements to obtain a matrix That is, compress all elements to 0. The interval is 1, to prevent negative numbers; for the matrix The matrix is obtained by translation mapping. The matrix The elements in the equation are shifted to the right to a constant. To the right, increase data density to prevent weight values from becoming too extreme; for the matrix Normalization yields the matrix Even if the matrix The sum of the elements in the matrix is 1. It can be used as a weight matrix.
[0121] For example, for a matrix The formula for scaling all elements in the array can be:
[0122]
[0123] in, In the embodiments of this application, ; It is a matrix The first in One element; It is a matrix The first in The elements after scaling are the matrix. The first in One element; It is a matrix The element with the smallest value in the middle; It is a matrix The element with the largest value in the middle.
[0124] For example, for a matrix The formula for translating all elements in can be:
[0125]
[0126] in, In the embodiments of this application, ; It is a matrix The first in One element; It is a matrix The first in The elements after the mapping adjustment are the matrix elements. The first in One element; It is a matrix The element with the smallest value in the middle. It is a matrix The absolute value of the smallest element in the set. This mapping formula also applies to normalized scaling.
[0127] For example, for a matrix The formula for normalizing all elements can be:
[0128]
[0129] in, In the embodiments of this application, ; It is a matrix The first in One element; It is a matrix The first in The elements that have undergone normalization adjustment are the matrix elements. The elements in.
[0130] For example, the matrix after the above processing As the weight matrix, the matrix at this time It could be:
[0131]
[0132] Similarly, the above can also be used as needed. or As a weight matrix.
[0133] In one possible implementation of S102, information about at least one recommended route can be determined based on the feature matrix, weight matrix, and information about the desired route.
[0134] Optional, can be based on Figure 4 The following steps are shown to determine the recommended route:
[0135] S401: Based on the metric formula, feature matrix, and weight matrix, determine the approximation between the desired route and the comparison route. The comparison route represents the route used to compare the similarity with the desired route; in other words, the comparison route is the possible recommended route.
[0136] Specifically, this has already been obtained. The weight matrix, a Feature matrix The 10 elements in the weight matrix correspond to the 10 features of the comparison line, and the feature matrix... It includes For each of the 10 features corresponding to a given route, the approximation between the desired route and the comparison route is determined based on the aforementioned feature matrix, weight matrix, and metric formula. The approximation between the two routes is calculated using... This means that the smaller the value, the higher the similarity between the lines. Determining the similarity. The measurement formula is:
[0137]
[0138] in, The value can be set in advance by human intervention. In this embodiment of the application, it is preferred that... The value is 2. These are the indexes corresponding to the weights and features. , , It is the first in the weight matrix One element, It is the first element in the characteristic matrix corresponding to the desired path. The value of each feature data, It is the first line in the feature matrix corresponding to the comparison line. The value of each feature data, yes and The absolute value of the difference.
[0139] Optionally, the comparison route can be one or more of the reference routes, and the comparison routes can be selected manually in advance. For example, you can choose routes from the reference routes that have corresponding historical orders as comparison routes, or you can use all the reference routes as comparison routes.
[0140] For example, the weight matrix is The matrix, where each row has one element, is the feature matrix. Each row in the matrix corresponds to a comparison line, as mentioned above, in the feature matrix. First action , This can be viewed as a 1×10 matrix, corresponding to comparison line 1. Similarly, the matrices corresponding to the other comparison lines can be obtained. The elements of each row in the weight matrix correspond to the matrix... Each column of the matrix corresponds one-to-one with its elements; that is, the elements in the first row of the weight matrix correspond to the elements in the matrix. The element in the first column corresponds to the index 1, which corresponds to the element in the formula above. The elements in the second row of the weight matrix correspond to the elements in the second column of the line matrix, denoted as index 2, which corresponds to the elements in the formula above. Similarly, the correspondence of other serial numbers can be obtained.
[0141] For example, substituting the above parameters into the measurement formula yields the approximation between the desired route and the comparison route. For instance, taking the m-th row of the feature matrix corresponding to the desired route and the n-th row of the matrix corresponding to the comparison route as an example, when... At that time, seek The value of , where, These are the elements in the first row of the weight matrix. Characteristic matrix The element in the m-th row and first column of the array. Characteristic matrix The element in the nth row and first column. Similarly, the element in the nth row and first column. Substitute them separately The results are summed to further determine the approximation degree. The value of .
[0142] S402: Determine at least one route with the highest approximation as the recommended route.
[0143] Specifically, based on the aforementioned steps, the approximation of the desired route and each comparison route has been obtained. Based on the approximation values, the comparison routes are sorted from smallest to largest, and then the top N comparison routes are selected as recommended routes for the desired route. The value of N can be set manually in advance.
[0144] S103: Based on the information of the recommended routes, determine the available cargo information corresponding to the recommended routes from the cargo information set.
[0145] Specifically, the loading and unloading locations and required vehicle types in the cargo information set are matched with the origin, destination, and vehicle type in the cargo search request corresponding to the recommended routes, respectively, to determine available cargo information. It should be noted that there may be more than one recommended route. These routes can be sorted according to their similarity to the desired route, starting with the recommended route with the highest similarity, to determine the available cargo information for each recommended route.
[0146] For example, since the recommended route has been determined, the areas where the loading and unloading points are located on the recommended route have also been determined. The search is conducted in the set of cargo information in the database. If it is determined that the loading point address of a certain cargo information is located in the area where the origin is located on the recommended route, and the unloading point address is located in the area where the destination is located on the recommended route, and the required vehicle type matches the vehicle type in the cargo search request, then this cargo information is considered as available cargo information.
[0147] Optionally, after determining at least one available source of goods according to the above steps, the available source of goods information can be pushed to the user.
[0148] Based on the same concept as the method for determining available supply information described above, this application also provides an apparatus for determining available supply information to implement the above method.
[0149] Figure 5 The diagram shows a modular structure of a device 500 for determining available cargo information according to an embodiment of this application. The acquisition module 501 can be used to perform communication actions, and the processing module 502 can be used to implement processing actions. For example, the acquisition module 501 can be used to perform the action of acquiring information about the desired route in S101, and the processing module 502 can be used to perform the action of determining information about at least one recommended route based on the feature matrix, weight matrix, and information about the desired route in S102, and / or to perform the action of determining available cargo information corresponding to the recommended route based on the information about the recommended route in S103. The processing module 502 is also used to perform the action of determining the feature matrix in S201 to S204. The processing module 502 is also used to perform the action of determining the weight matrix in S301 to S303. The processing module 502 is also used to perform the action of determining the recommended route in S401 to S402. The specific actions and functions performed are not detailed here, but can be referred to the description in the foregoing method embodiment section.
[0150] Figure 6 This illustration shows a structural diagram of an electronic device 600 for determining available supply information, provided in an embodiment of this application.
[0151] The electronic device in this embodiment may include a processor 601. The processor 601 is the control center of the device, and can connect to various parts of the device via various interfaces and lines, executing instructions stored in a memory 602 and accessing data stored in the memory 602. Optionally, the processor 601 may include one or more processing units. The processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip; in some embodiments, they may be implemented separately on independent chips.
[0152] The processor 601 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps performed by the switch disclosed in the embodiments of this application can be directly executed by the hardware processor, or executed by a combination of hardware and software modules within the processor.
[0153] In this embodiment of the application, the memory 602 stores instructions that can be executed by at least one processor 601. By executing the instructions stored in the memory 602, the at least one processor 601 can perform the aforementioned process of determining available supply information.
[0154] Memory 602, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 602 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 602 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 602 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0155] In this embodiment, the device may further include a communication interface 603 through which the electronic device can transmit data. For example, if the electronic device is a client, the communication interface 603 can be used to obtain information about the desired line.
[0156] Optional, can be made by Figure 6 The processor 601 (or processor 601 and memory 602) shown implements Figure 5 The processing module 502 shown, and / or, is implemented by the communication interface 603. Figure 5 The acquisition module 501 is shown.
[0157] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium that can store instructions, which, when executed on a computer, cause the computer to perform the operation steps provided in the above-described method embodiments. This computer-readable storage medium may be... Figure 6 The memory 602 shown.
[0158] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0159] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0160] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0161] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0162] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for determining available supply information, characterized in that, The method includes: Obtain information about the desired route, including the loading area and the unloading area of the desired route; Based on the metric formula, feature matrix, and weight matrix, the approximation degree between the desired route and multiple reference routes is determined; and at least one route with the highest approximation degree is selected as the recommended route. The feature matrix is related to the destination matrix, origin matrix, and the great circle distances of the multiple reference routes. The weight matrix is related to the transportation prices of the destination matrix, origin matrix, and multiple reference routes. The destination matrix includes the latitude and longitude of the destinations of the multiple reference routes, the origin matrix includes the latitude and longitude of the origins of the multiple reference routes, and the recommended route information includes the loading area and unloading area of the recommended route. The multiple reference routes are determined by selecting any two reference areas within the target range, and each reference route corresponds to one origin and one destination. Based on the information of the recommended route, the available cargo information corresponding to the recommended route is determined from the cargo information set. The loading area included in the available cargo information is different from the loading area of the desired route, and / or the unloading area included in the available cargo information is different from the unloading area of the desired route.
2. The method as described in claim 1, characterized in that, Also includes: The feature matrix is determined based on the destination matrix, the origin matrix, the longitude and latitude of the first reference area within the target area, the longitude and latitude of the second reference area within the target area, and the great circle distances of the multiple reference routes; the first reference area and the second reference area are contained within the target range.
3. The method as described in claim 2, characterized in that, Also includes: The feature matrix is determined based on the differences between the longitudes of the destinations of the multiple reference routes included in the destination matrix and the longitudes of the first reference area, the differences between the latitudes of the destinations of the multiple reference routes included in the destination matrix and the latitudes of the first reference area, the differences between the longitudes of the origins of the multiple reference routes included in the origin matrix and the longitudes of the second reference area, the differences between the latitudes of the origins of the multiple reference routes included in the origin matrix and the latitudes of the second reference area, and the great circle distances between the origins and destinations of the multiple reference routes.
4. The method as described in claim 3, characterized in that, The first in the feature matrix row elements according to Sure; include , , , , , , , , and d in the middle , The number of reference lines; d=10; in, , This represents the distance of the great circle. It is Euler's constant; , Represents the destination matrix, Represents the origin matrix; , A matrix representing the longitude and latitude of the first reference region; ; , A matrix representing the longitude and latitude of the second reference area; ; ; ; ; ; Represents the vector cosine radian function; Represents the vector magnitude function; This represents the transpose of a matrix.
5. The method as described in claim 4, characterized in that, The metric formula satisfies: ; in, This indicates the degree of similarity between the desired route and the comparison route. The value is 2. It is the first in the weight matrix One element, It is the dth feature in the feature matrix corresponding to the desired line. The value of each feature data, It is the dth feature in the feature matrix corresponding to the comparison line. The value of each feature data, ;d=10.
6. The method according to any one of claims 1-5, characterized in that, Also includes: A price matrix is determined based on the respective transportation prices of the multiple reference routes, wherein the price matrix contains the first... The row element is the first Transportation prices for the reference routes; An intermediate feature matrix is determined based on the feature matrix, wherein the number of rows in the intermediate feature matrix is the same as the number of rows in the price matrix, and the number of rows in the intermediate feature matrix is... The row element is the element in the feature matrix corresponding to the first row. Elements of a reference line, 1≤ ≤ , This refers to the number of reference routes with valid transportation prices among the multiple reference routes; The weight matrix is determined based on the price matrix and the intermediate feature matrix.
7. The method as described in claim 6, characterized in that, Determining the weight matrix based on the price matrix and the intermediate feature matrix includes: Construct a linear model between the price matrix, the intermediate feature matrix, and the linear weight matrix; the linear model is used to approximate the relationship between the price matrix, the intermediate feature matrix, and the linear weight matrix. and The relationship; among them, Represents the price matrix, This represents the intermediate feature matrix. Represents the linear weight matrix; The weight matrix is based on Sure, The weight matrix is obtained by minimizing the error L2 norm. satisfy: 。 8. An apparatus for determining available source information, characterized in that, The device includes: An acquisition module is used to acquire information about a desired route, including the loading area and the unloading area of the desired route. The processing module is used to determine the approximation degree between the desired route and multiple reference routes based on the metric formula, feature matrix, and weight matrix; and to determine at least one route with the highest approximation degree as the recommended route; wherein, the feature matrix is related to the destination matrix, the origin matrix, and the great circle distances of the multiple reference routes respectively; the weight matrix is related to the transportation prices of the destination matrix, the origin matrix, and the multiple reference routes respectively; the destination matrix includes the latitude and longitude of the destinations of the multiple reference routes; the origin matrix includes the latitude and longitude of the origins of the multiple reference routes; and the information of the recommended route includes the loading area and the unloading area of the recommended route; the multiple reference routes are determined by any two reference areas selected within the target range, and each reference route corresponds to one origin and one destination; The processing module is further configured to determine available cargo information corresponding to the recommended route from the cargo information set based on the information of the recommended route, wherein the loading area included in the available cargo information is different from the loading area of the desired route, and / or the unloading area included in the available cargo information is different from the unloading area of the desired route.
9. An electronic device, characterized in that, The electronic device includes a processor that executes a computer program stored in a memory to implement the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1-7.