Inland river cargo classification flow direction data calculation method, device, equipment and medium
Through a multi-level correction method, combined with the water connection matrix and port-in and exit report data, the shortcomings of local waterway survey methods in inland waterway transportation are solved, the accuracy and accuracy of cargo flow data are improved, and the practicality of the calculation results are enhanced.
Patent Information
- Application Number
- CN202510983795.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-07-17
AI Technical Summary
In the prior art, in the inland waterway transportation, local waterway survey methods are difficult to fully reflect the cargo circulation situation, and the sampling deviations in the sample survey are not fully considered, resulting in insufficient accuracy of the calculation results.
Through a multi-level correction method, combined with the water connection matrix and port inlet and exit report data, the starting and end port area information and transportation distance of the sampled ship are corrected, the voyage data set is established, and the cargo flow direction calculation model is input to improve data accuracy.
The calculation accuracy of inland river cargo flow flow data has been significantly improved, the practicality and effectiveness of the calculation results have been enhanced, sample deviation has been eliminated, and the data is more in line with the actual operation of inland river transportation.
Smart Images

Figure CN120471546A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of waterway transportation, and in particular to a method, device, equipment and medium for calculating flow direction data of inland river cargo by cargo category. Background Art
[0002] As inland waterway transportation becomes increasingly important in the regional economy, the accurate acquisition and estimation of cargo flow data has become the key to optimizing transportation resource allocation and improving waterway management efficiency.
[0003] Currently, the main method for obtaining and estimating cargo flow data by category on inland waterways is to conduct surveys on local waterways. This involves setting up survey points on specific sections of the route and interviewing vessels on-site to collect basic information such as cargo type, volume, and flow direction. A sample data inference method is then employed to estimate regional cargo flow directions using direct aggregation and proportional structure methods based on the survey sample data. This involves simply aggregating the survey sample data and then factoring in the proportions of each cargo category within the sample and the total regional freight volume for breakdown and estimation.
[0004] Local waterway surveys only capture freight information for specific sections, making it difficult to fully reflect the flow of goods throughout the entire inland waterway system. Furthermore, existing methods fail to fully account for sampling bias in sample surveys, resulting in inaccurate estimates. Summary of the Invention
[0005] In light of this, the present invention aims to provide a method, device, equipment, and medium for estimating inland waterway cargo flow direction data by cargo type. Through multi-level correction, this method improves the accuracy of sampled data, effectively eliminates sample bias, and significantly increases the accuracy of estimated flow direction data for each cargo type for all ships in the vessel database. Furthermore, the correction process incorporates the water connectivity matrix and port arrival and departure report data, making the data more consistent with the actual operations of inland waterway transport and enhancing the practicality and effectiveness of the estimated results.
[0006] In a first aspect, an embodiment of the present invention provides a method for estimating flow direction data of inland waterway cargo by cargo type, comprising: Obtain basic voyage survey data or docking survey data corresponding to multiple sampling ships; For each sampled ship, determining voyage survey data corresponding to each sampled ship based on a plurality of call ports indicated by the call survey data, and loading data and unloading data corresponding to each of the call ports; Establishing a voyage data set according to the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships; According to the preset water area connectivity matrix and the port entry and exit report data, the starting and ending port information of each sampled ship in the voyage data set is corrected to obtain a first corrected data set; Correcting the transport distance of each sampled vessel in the first corrected dataset based on the originating and ending port information of each sampled vessel in the first corrected dataset to obtain a second corrected dataset; The second revised data set is input into the cargo flow direction estimation model to estimate the flow direction data of each type of cargo corresponding to the overall ship library.
[0007] In a preferred embodiment of the present invention, the above-mentioned obtaining of basic voyage survey data or docking survey data corresponding to a plurality of sampling ships includes: The multiple ships included in the overall ship database are stratified according to the city, type, and gross tonnage of the ship, and the number of ships corresponding to each level is obtained; According to the number of ships corresponding to each level, the number of sampling ships corresponding to each level is determined according to the proportional distribution method; According to the number of sampled ships, basic voyage survey data or docking survey data corresponding to the sampled ships are obtained from the ships corresponding to each level.
[0008] In a preferred embodiment of the present invention, for each sampled ship, the voyage survey data corresponding to each sampled ship is determined based on the multiple ports of call indicated by the port of call survey data, and the loading data and unloading data corresponding to each port of call, including: For each sampled ship, according to the order of the docking at each port of call, and based on the loading data and unloading data corresponding to the port of call, the freight volume matrix and the container volume matrix corresponding to each port of call are determined in sequence; For each sampled ship, determining the transport distance corresponding to the non-zero elements in the freight volume matrix and the container volume matrix according to the freight volume matrix and the container volume matrix; For each sampled ship, the cargo volume matrix, the container volume matrix and the transport distance are used as the voyage survey data corresponding to each sampled ship.
[0009] In a preferred embodiment of the present invention, the starting and ending port information of each sampled ship in the voyage data set is corrected according to the preset water connectivity matrix and the port entry and exit report data to obtain a first corrected data set, including: According to the preset water connectivity matrix, the starting and ending port information of each sampled ship in the voyage data set is compared to determine the voyage data that fails to match; Matching the voyage data that failed to match with the port arrival and departure report data to determine the port arrival and departure records corresponding to the voyage data that failed to match; updating the voyage data that failed to match according to the port arrival record and the port departure record to obtain updated voyage data; The updated voyage data and the successfully matched voyage data are used as the first revised data set.
[0010] In a preferred embodiment of the present invention, the transport distance of each sampled ship in the first corrected data set is corrected based on the starting and ending port information of each sampled ship in the first corrected data set to obtain a second corrected data set, including: Determining, based on the starting and ending port information of each sampled ship in the first corrected data set, a hierarchical starting and ending port combination corresponding to the starting and ending port information; The transport distances corresponding to the sampling vessels with the same hierarchical starting and ending point combinations are determined as transport distance groups; Determining an abnormal range of the transport distance group according to the first quartile and the third quartile corresponding to the transport distance group; Each of the transport distances in the transport distance group is compared with the abnormal range, and the transport distances outside the abnormal range are corrected to obtain a second corrected data set.
[0011] In a preferred embodiment of the present invention, determining the hierarchical starting and ending point combinations corresponding to the starting and ending port information of each sampled ship in the first corrected data set includes: According to the starting and ending port area information of each sampled ship in the first revised data set, grouping is performed according to the starting port area and the ending port area in the starting and ending port area information to obtain a first starting and ending port combination; When the number of sampled ships having the same first starting and ending point combination is greater than or equal to a preset threshold, the first starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information; When the number of sampled ships with the same first starting and ending port combination is less than the preset threshold, the ships are grouped according to the cities to which the starting port area and the ending port area in the starting and ending port area information belong to obtain a second starting and ending port combination; When the number of sampled ships having the same second starting and ending point combination is greater than or equal to a preset threshold, the second starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information; When the number of sampled ships with the same second starting and ending port combination is less than the preset threshold, the ships are grouped according to the provinces to which the starting and ending port areas in the starting and ending port area information belong to obtain the third starting and ending port combination; The third starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information.
[0012] In a second aspect, an embodiment of the present invention further provides a device for estimating flow direction data of inland waterway cargo by cargo type, comprising: A data acquisition module is used to obtain basic voyage survey data or docking survey data corresponding to multiple sampling ships; a data conversion module for determining, for each sampled ship, voyage survey data corresponding to each sampled ship based on a plurality of call ports indicated by the call survey data, and loading data and unloading data corresponding to each of the call ports; A data merging module is used to establish a voyage data set based on the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships; A first correction module is used to correct the origin and destination port information of each sampled ship in the voyage data set according to a preset water area connectivity matrix and port entry and exit report data to obtain a first corrected data set; A second correction module is configured to correct the transport distance of each sampled vessel in the first corrected data set according to the starting and ending port information of each sampled vessel in the first corrected data set to obtain a second corrected data set; The data calculation module is used to input the second corrected data set into the cargo flow calculation model to calculate the flow direction data of each type of cargo corresponding to the overall ship library.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for calculating flow direction data of inland waterway cargo by cargo category according to the first aspect.
[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method for calculating the flow direction data of inland waterway cargo by cargo category according to the first aspect.
[0015] The embodiments of the present invention bring the following beneficial effects: An embodiment of the present invention provides a method for estimating flow direction data of inland waterway cargo by cargo category, which takes into account the correction of the starting and ending port area information based on the water area connectivity matrix and entry and exit port report data, and uses the corrected starting and ending port area information to correct the transportation distance, thereby realizing multi-level correction, improving the accuracy of sampled data, making the data more consistent with the actual operation of inland waterway transportation, and effectively eliminating sample bias, significantly improving the estimation accuracy of flow data for all ships in the overall ship database for various types of cargo, and enhancing the practicality and effectiveness of the estimation results.
[0016] Other features and advantages of the present invention will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present invention.
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A flow chart of a method for estimating flow direction data of inland river cargo by cargo type provided by an embodiment of the present invention; Figure 2 A flowchart of another method for estimating flow direction data of inland waterway cargo by cargo type provided by an embodiment of the present invention; Figure 3 A flowchart of another method for estimating flow direction data of inland waterway cargo by cargo type provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a device for estimating flow direction data of inland river cargo by cargo type provided by an embodiment of the present invention; Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0021] Currently, the main method for obtaining and estimating cargo flow data by category on inland waterways is to conduct surveys on local waterways. This involves setting up survey points on specific sections of the route and interviewing vessels on-site to collect basic information such as cargo type, volume, and flow direction. A sample data inference method is then employed to estimate regional cargo flow directions using direct aggregation and proportional structure methods based on the survey sample data. This involves simply aggregating the survey sample data and then factoring in the proportions of each cargo category within the sample and the total regional freight volume for breakdown and estimation.
[0022] Local waterway surveys only capture freight information for specific sections, making it difficult to fully reflect the flow of goods throughout the entire inland waterway system. Furthermore, existing methods fail to fully account for sampling bias in sample surveys, resulting in inaccurate estimates.
[0023] Based on this, embodiments of the present invention provide a method, device, equipment, and medium for estimating inland waterway cargo flow direction data by cargo type. Through multi-level correction, the accuracy of sampled data is improved, effectively eliminating sample bias and significantly increasing the accuracy of estimated flow direction data for each cargo type across all ships in the vessel database. Furthermore, the correction process incorporates the water connectivity matrix and port arrival and departure report data, making the data more consistent with the actual operations of inland waterway transport and enhancing the practicality and effectiveness of the estimated results.
[0024] To facilitate understanding of this embodiment, a method for estimating flow direction data of inland waterway cargo by cargo type disclosed in an embodiment of the present invention is first introduced in detail.
[0025] Example 1 The embodiment of the present invention provides a method for estimating the flow direction data of inland river cargo by cargo type. Figure 1 This is a flow chart of a method for estimating the flow direction of inland river cargo by cargo type provided by an embodiment of the present invention. Figure 1 As shown, the method for estimating the flow direction data of inland river cargo by cargo type may include the following steps: Step S101: obtaining basic voyage survey data or docking survey data corresponding to a plurality of sampling ships.
[0026] Sampling ships refer to ships that need to be sampled for data. In an embodiment of the present invention, the overall ship database includes all ships involved in cargo transportation in the inland water system. Sampling ships are some ships selected from the overall ship database. The sampling ships are used to sample data during cargo transportation to obtain basic voyage survey data or docking survey data of the sampling ships. The number of sampling ships is the minimum sampling number that meets statistical requirements, and can also be pre-specified according to actual conditions. Basic voyage survey data refers to the survey data that needs to be collected when there is no intermediate loading and unloading of the ship during transportation, which at least includes: ship name, ship identification number, ship type, voyage number, start and end time, voyage starting point, loading port, unloading port, cargo type, transportation distance, cargo volume and container transportation volume and other data. The docking survey data refers to the survey data that needs to be collected when there is loading and unloading during the transportation process of the ship. Among them, data is collected once each time the sampled ship docks at a port and there is loading and unloading during the transportation process. The data collected each time include at least: ship name, ship identification number, ship type, voyage number, docking sequence number, docking time, docking port, mileage from the last port, loading volume, unloading volume, container loading volume, container unloading volume and other data.
[0027] Specifically, for each sampled vessel, basic voyage survey data or docking survey data are collected according to whether it has loading and unloading conditions.
[0028] Step S102 : for each sampled ship, determining the voyage survey data corresponding to each sampled ship according to the multiple ports of call indicated by the port of call survey data, and the loading data and unloading data corresponding to each port of call.
[0029] For each sampled vessel, only loading and unloading data is recorded during each call, and the origin and destination ports of cargo cannot be directly obtained. Therefore, it is necessary to calculate the cargo volume, container volume, and actual mileage between ports based on loading and unloading data to form the corresponding voyage survey data for the sampled vessel. A port of call refers to the port where the sampled vessel loads and unloads cargo during voyage. Loading data refers to the weight of cargo loaded by the sampled vessel, including both loaded and containerized cargo. Loading data refers to the weight of cargo loaded in tons, while containerized cargo refers to the number of containers loaded in containers. Unloading data refers to the weight of cargo unloaded by the sampled vessel, including both unloaded and containerized cargo. Unloading data refers to the weight of cargo unloaded in tons, while containerized cargo refers to the number of containers unloaded in containers.
[0030] Specifically, for each of the sampling ships, according to the multiple ports of call indicated by the docking survey data, for each port of call, based on the loading data and the loading and unloading data corresponding to each of the ports of call, the freight volume, container volume and actual transportation mileage between the ports are calculated as the voyage survey data corresponding to the sampling ship. Among them, the freight volume refers to the weight of cargo transported by the sampling ship from the time the cargo is loaded onto the sampling ship to the time it is unloaded at the port, for a certain type of cargo calculated in tons. The container volume refers to the number of containers transported by the sampling ship from the time the cargo is loaded onto the sampling ship to the time it is unloaded at the port, for cargo calculated in containers. The actual transportation mileage refers to the distance traveled by the sampling ship from the time the cargo is loaded onto the sampling ship to the time it is unloaded at the port.
[0031] For example, assume an inland waterway vessel docks at Port A, Port B, and Port C in sequence. The specific loading and unloading operations are as follows: Loading at Port A: The cargo type is steel, the loading volume is 80 tons, and the loading time is the start time of the voyage, recorded as t1. At Port B: The loading volume is 30 tons of cargo (the cargo type is grain), and the loading time is t2; the unloading volume is 50 tons (steel loaded from Port A), and the unloading time is t3. At Port C: The unloading volume is the remaining steel (80 - 50 = 30 tons) and the 30 tons of grain loaded at Port B, and the unloading times are t4 and t5, respectively. The process of allocating cargo according to the loading and unloading time is as follows: Step 1: Initialization After loading at Port A, the remaining cargo volume (ie, the steel loaded from Port A) is 80 tons, and the initial value of the transportation volume matrix (recording the freight volume between ports) is 0.
[0032] Step 2: Handle the loading and unloading situation at Port B Unloading: Since Port B has unloaded 50 tons, and according to the principle that cargo from the first loading port is prioritized for unloading, the steel loaded at Port A begins unloading. Therefore, the transport volume matrix value from Port A to Port B is updated to 50 tons. At this time, the remaining amount of steel loaded from Port A is 80 - 50 = 30 tons.
[0033] Loading: After loading 30 tons (grain) at port B, the remaining quantity increases by 30 tons (grain), and the transportation quantity matrix is allocated and calculated in the loading part related to port B (such as port B to subsequent ports) while waiting for subsequent unloading.
[0034] Step 3: Handle the unloading situation at Port C Unloading: First process the unloading of the remaining 30 tons of steel from Port A, and the transportation volume matrix value from Port A to Port C is updated to 30 tons; then process the unloading of the 30 tons of grain loaded at Port B, and the transportation volume matrix value from Port B to Port C is updated to 30 tons.
[0035] This completes the distribution of cargo between ports according to the order of loading and unloading times, and also determines the cargo volume between ports. This can be further used to calculate the actual transport mileage. At Port B, the 50 tons of steel unloaded from Port B traveled from Port A to Port B, and the actual transport mileage is the distance from Port A to Port B. At Port C, the 30 tons of steel unloaded from Port C have an actual transport mileage of the distance from Port A to Port C, and the 30 tons of grain unloaded from Port C have an actual transport mileage of the distance from Port B to Port C.
[0036] Voyage survey data refers to the data obtained after converting the dock survey data into basic voyage survey data, which is the same as the data included in the basic voyage survey data, among which the actual transportation mileage in the voyage survey data is equivalent to the transportation distance in the basic voyage survey data.
[0037] Step S103: establishing a voyage data set according to the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships.
[0038] Specifically, for sampling ships that do not have intermediate loading and unloading during transportation, the basic voyage survey data collected are merged with the voyage survey data obtained after data conversion processing for sampling ships that have intermediate loading and unloading, thereby constructing a voyage dataset.
[0039] Step S104 , based on the preset water area connectivity matrix and the port entry and exit report data, the starting and ending port information of each sampled ship in the voyage data set is corrected to obtain a first corrected data set.
[0040] The starting and ending port information refers to the starting port and the ending port of the sampled ship. The water connectivity matrix is used to describe whether the two ports can be connected through the inland water system. It can be understood that the water connectivity matrix includes all provinces in the country. If the value in the water connectivity matrix is 1, it means that the two provinces can be connected through the inland water system, that is, ships can transport cargo between the two provinces. If the value in the water connectivity matrix is 0, it means that the two provinces cannot be connected through the inland water system, that is, ships cannot transport cargo between the two provinces. For example, the water connectivity matrix is M i,j , M i,jThe value of indicates whether provinces i and j can be connected by an inland river system. Port entry and exit report data refers to the information registered by ships when entering and leaving ports, including at least the ship identification number, port reporting time, the region where the port is located, and the port reporting type (entry / exit).
[0041] Specifically, for each sampled vessel, based on the starting and ending port information of the sampled vessel in the voyage data set, the corresponding values of the province where the starting port is located and the province where the end port is located are queried from the water connectivity matrix. If the value is 1, it indicates that the starting and ending port information is correct and no correction is required. If the value is 0, it indicates that the starting and ending port information is incorrect and needs to be corrected. At this time, the port declaration records of the sampled vessel are selected from the port entry and exit report data according to the vessel identification number, and the provinces where the ports with the port declaration category of "outbound" are located in the port declaration records within the same time range are compared to see if they are the same as the provinces where the ports with the port declaration category of "inbound" are located to see if they are the same as the provinces where the end port is located; if any one of the two is different, the port in the port declaration record will replace the starting and ending ports, and the starting and ending port information of the sampled vessel will be corrected to obtain the first corrected data set.
[0042] Step S105 , correcting the transport distance of each sampled ship in the first corrected data set according to the starting and ending port information of each sampled ship in the first corrected data set to obtain a second corrected data set.
[0043] The shipping distance of a sampled vessel refers to the distance between the origin and destination ports. Based on the origin and destination port information of each sampled vessel in the first revised dataset, outlier correction for shipping distances was performed using a hierarchical and progressive approach. Specifically, within the same origin and destination port combination, when the number of records was ≥5, the 25th percentile (Q1) and 75th percentile (Q3) of the shipping distance for that group were calculated. Values outside the range [Q1-1.5×(Q3-Q1), Q3+1.5×(Q3-Q1)] were marked as outliers and replaced with the arithmetic mean of the non-outlier values within the group. For combinations that did not meet the required number of records, a second correction was performed at the origin and destination city level using the range [Q1-2×(Q3-Q1), Q3+2×(Q3-Q1)]. Records that still could not be corrected were finally corrected within the provincial-level administrative region combination using a threshold range of three times the IQR [Q1-3×(Q3-Q1), Q3+3×(Q3-Q1)].
[0044] For example, when the six distance data (100, 105, 110, 115, 120, 200 km) from the starting point Port A to the end point Port B are corrected at the port level, Q1=105 km, Q3=120 km, and IQR=15 km are calculated. It is determined that 200 km exceeds the normal range of 82.5-142.5 km and is replaced with the reasonable value mean of 110 km within the group; and the three records (including the outlier 50 km) from the starting point Port C to the end point Port D are upgraded to the prefecture-level combination and then corrected due to insufficient records; Port C belongs to City Y, and Port D belongs to City Z. Combined with one data from Port C to Port E (Port E belongs to City Z) (distance is 160 km), the combination of starting point City Y to end point City Z has a total of 4 records (150, 155, 50, 160 km), because this combination still has less than 5 data, it needs to be upgraded to the provincial level for processing; City Y belongs to Province P, City Z belongs to Province Q, combined with one data from Port C to Port F (Port F belongs to Province Q) (distance is 165 km), and one data from Port C to Port G (Port G belongs to Province Q) (distance is 170 km), that is, a total of 6 data (150, 155, 50, 160, 165, 170 km) are formed under the combination of starting Province P and ending Province Q. Q1=150km, Q3=165km, IQR=15km are calculated, of which 50km exceeds the provincial range of 105-210km, and is finally corrected to the non-outlier mean of 160km within the provincial group.
[0045] Step S106: input the second corrected data set into a cargo flow direction estimation model to estimate the flow direction data of each type of cargo corresponding to the overall ship inventory.
[0046] Traffic flow direction data includes total freight volume, total cargo turnover, total box volume, and total container turnover for different cargo categories and directions. The second revised data set is input into the cargo flow direction estimation model, which calculates cargo turnover and container turnover based on the freight volume, box volume, and transportation distance in the second revised data set. Cargo turnover = freight volume * transportation distance, and container turnover = box volume * transportation distance. Traffic flow direction data for each cargo type is then calculated based on the ratio of the number of sampled ships to the total number of ships in the overall ship database. Specifically, from each sampled ship, at least one sampled ship transporting the same cargo type from the same origin port to the destination port is selected. The sum of the cargo volumes of each selected sampled ship is multiplied by the ratio between the total number of ships in the overall ship database at the same level as the sampled ship to the number of sampled ships to obtain the total freight volume for that cargo category and direction. The same principle is used to calculate the total cargo turnover, total box volume, and total container turnover.
[0047] An embodiment of the present invention provides a method for estimating flow direction data of inland waterway cargo by cargo category, which takes into account the correction of the starting and ending port area information based on the water area connectivity matrix and entry and exit port report data, and uses the corrected starting and ending port area information to correct the transportation distance, thereby realizing multi-level correction, improving the accuracy of sampled data, making the data more consistent with the actual operation of inland waterway transportation, and effectively eliminating sample bias, significantly improving the estimation accuracy of flow direction data for all ships in the overall ship database for various types of cargo, and enhancing the practicality and effectiveness of the estimation results.
[0048] Example 2 An embodiment of the present invention also provides another method for estimating inland waterway cargo flow direction data by cargo type; this method is implemented on the basis of the method in the above embodiment; this method focuses on describing the specific implementation method of obtaining basic voyage survey data or docking survey data corresponding to multiple sampling ships.
[0049] Figure 2 A flowchart of another method for estimating the flow direction of inland river cargo by cargo type provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method for estimating the flow direction data of inland river cargo by cargo type may include the following steps: Step S201 : stratify the multiple ships included in the overall ship database according to the city to which the ships belong, type, and gross tonnage, and obtain the number of ships corresponding to each layer.
[0050] To group the multiple ships included in the overall ship database, first group them by their city of origin to determine the number of ships in each first-level grouping. Then, within each first-level grouping, group them by type to determine the number of ships in each second-level grouping. Then, within each second-level grouping, group them by gross tonnage to determine the number of ships in each third-level grouping. The number of ships corresponding to each level refers to the number of ships in each third-level grouping.
[0051] For example, the stratification results are shown in Table 1, wherein the stratification by the city to which the ship belongs is not shown: Table 1 Stratification results
[0052] Step S202: According to the number of ships corresponding to each level, the number of sampling ships corresponding to each level is determined according to the proportional distribution method.
[0053] Based on the number of vessels corresponding to each tier, a preset ratio is set. The number of vessels corresponding to each tier is multiplied by the preset ratio to obtain the number of sampling vessels corresponding to each tier. In other words, the number of vessels in each group within each tier is multiplied by the preset ratio to obtain the number of sampling vessels in each group within each tier.
[0054] Exemplarily, the number of sampled ships in the first group in the first level is the product of the number of ships in the first group in the first level and a preset ratio.
[0055] Step S203 , according to the number of sampled ships, basic voyage survey data or docking survey data corresponding to the sampled ships are obtained from the ships corresponding to each level.
[0056] In the three levels, for each group of ships in each level, the sampling ships are determined according to the number of sampling ships. Depending on whether the sampling ships have any intermediate loading and unloading of cargo, the basic voyage survey data corresponding to the sampling ships or the stopover survey data corresponding to the sampling ships are selected.
[0057] Step S204 : for each sampled ship, the voyage survey data corresponding to each sampled ship is determined according to the multiple ports of call indicated by the port of call survey data, and the loading data and unloading data corresponding to each port of call.
[0058] Specifically, the voyage survey data can be determined through steps A1 to A3.
[0059] Step A1: for each sampled ship, according to the docking order of each port of call and based on the loading data and unloading data corresponding to the port of call, determine the freight volume matrix and container volume matrix corresponding to each port of call in sequence.
[0060] Step A2: for each sampled ship, according to the freight volume matrix and the container volume matrix, determining the transportation distance corresponding to the non-zero elements in the freight volume matrix and the container volume matrix.
[0061] Step A3: For each sampled ship, the cargo volume matrix, the container volume matrix and the transport distance are used as the voyage survey data corresponding to each sampled ship.
[0062] Specifically, for each sampled ship, it is assumed that the ports of call are ,in: is the starting port, and the loading volume is , no unloading is 0. The terminal port is only used for unloading, and the unloading volume is all the remaining cargo volume. It is possible to load and unload at the same time. The loading amount at the i-th port is , the unloading volume is First check Is it 0? If not, make corrections. Correct to 0; then check and Are they equal, where , if they are not equal, then make corrections. Specifically, Adjust the value up or down to make and Equal. It refers to the sum of the loading volumes of n ports. It refers to the sum of the unloading volumes of n ports.
[0063] remember The remaining amount is , the remaining amounts of the other ports are initialized to 0, i.e. . Transport volume matrix Indicates from the port arrive The freight volume is initialized to 0.
[0064] For each port Traverse and perform the following operations: a) Process the unloading situation of the current port: (1) Calculate the current port Unloading volume :If k=n, then all remaining cargo needs to be unloaded, that is Otherwise, directly use Preset unloading volume ; (2) Allocate unloading volume according to loading order, starting from the earliest loading port Start allocating unloading volume , , , repeat this process until or all Allocation completed.
[0065] b) Process the current loading situation at the port: If , then update The remaining amount .
[0066] Traversing the Matrix , output all non-zero , and calculate the corresponding arrive Transport distance between , for arrive The cumulative distances to all intermediate adjacent ports.
[0067] The container volume matrix is calculated according to the above allocation principle to obtain voyage survey data, including basic information of each voyage vessel, voyage origin and destination ports, cargo volume, container volume, transportation distance, etc. Among them, cargo volume refers to each value in the cargo volume matrix, and container volume refers to each value in the container volume matrix.
[0068] For example, suppose a ship docks at ports P_0, P_1, P_2, and P_3 in sequence. P_0 has a loading capacity of x_0 = 100 tons, P_1 has a loading capacity of x_1 = 50 tons and a discharge capacity of y_1 = 30 tons; P_2 has a loading capacity of x_2 = 20 tons and a discharge capacity of y_2 = 40 tons; and P_3 has a discharge capacity of all remaining cargo.
[0069] First, check y_0 (initially 0, which meets the requirements), then calculate ∑x_i = 100 + 50 + 20 = 170 tons. The total unloading amount (not considering the final unloading amount of P_3) is calculated as y_1 + y_2 = 30 + 40 = 70 tons. The data accuracy will be adjusted later based on the unloading situation of P_3.
[0070] Initialize the remaining quantity r_0 = 100 tons, r_1 = 0 tons, r_2 = 0 tons, and the transportation quantity matrix T_(i,j) is initialized to 0.
[0071] For port P_1: The unloading quantity y_1 = 30 tons. The unloading quantity is distributed starting from the earliest loading port P_0, t_(0,1) = min(r_0,y_1) = min (100,30) = 30 tons, r_0 = 100 - 30 = 70 tons, y_1 = 30 - 30 = 0 tons.
[0072] After loading r_1 = x_1 = 50 tons.
[0073] For port P_2: The unloading quantity y_2 = 40 tons. The unloading quantity is distributed starting from the earliest loading port (at this time r_0 = 70 tons, r_1 = 50 tons), t_(0,2) = min (r_0,y_2) = min (70,40) = 40 tons, r_0 = 70 - 40 = 30 tons, y_2 = 40 - 40 = 0 tons.
[0074] After loading r_2 = x_2 = 20 tons.
[0075] For port P_3: Unloaded volume y_3 = r_0 + r_1 + r_2 = 30 + 50 + 20 = 100 tons.
[0076] Traverse the transport volume matrix and obtain non-zero values such as t_(0,1) = 30 tons, t_(0,2) = 40 tons, etc. Calculate the transport distances between ports d_(0,1), d_(0,2), etc. (assuming the distances between adjacent ports are known, calculate the transport distances between ports cumulatively).
[0077] The container volume is calculated according to the above allocation principle (assuming that the number of containers corresponding to each batch of cargo is known). Finally, a voyage freight volume waybill is generated, which contains indicators such as basic ship information (such as ship name, identification number, etc.), voyage origin and destination ports (P_0 to P_3), cargo volume (cargo volume between ports, such as 30 tons from P_0 to P_1), container volume and voyage mileage (the sum of the calculated distances of each section). The collection of voyage freight volume waybills of each sampled ship is the voyage survey data.
[0078] Step S205 : establishing a voyage data set according to the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships.
[0079] Step S206 , based on the preset water area connectivity matrix and the port entry and exit report data, the starting and ending port information of each sampled ship in the voyage data set is corrected to obtain a first corrected data set.
[0080] Step S207: correcting the transport distance of each sampled ship in the first corrected data set according to the starting and ending port information of each sampled ship in the first corrected data set to obtain a second corrected data set.
[0081] Step S208: input the second corrected data set into a cargo flow direction estimation model to estimate the flow direction data of each type of cargo corresponding to the overall ship inventory.
[0082] Specifically, the voyage survey data can be determined through steps B1 to B6.
[0083] Step B1, determining the cargo turnover and container turnover of each sampled ship according to the cargo volume, container volume and transportation distance of each sampled ship in the second revised data set.
[0084] Step B2: determining the estimation factor corresponding to each sampling ship according to the level corresponding to each sampling ship.
[0085] Step B3: For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the cargo volume is added together to obtain the overall cargo volume.
[0086] Step B4: For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the container transport volume is added together to obtain the overall container transport volume.
[0087] Step B5: For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the cargo turnover is added together to obtain the overall cargo turnover.
[0088] Step B6: For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the container turnover is added together to obtain the total container turnover.
[0089] Specifically, the cargo turnover volume and container turnover volume of each sampled ship are determined according to the cargo volume, container volume and transportation distance of each sampled ship in the second revised data set.
[0090] Cargo turnover = freight volume * transport distance, container turnover = container volume * transport distance. The level corresponding to the sampled vessel refers to the group to which the sampled vessel belongs in the third level. For each sampled vessel, the corresponding estimation factor is determined according to the level corresponding to the sampled vessel. The estimation factor is determined as follows:
[0091] is the number of ships at level b in the overall ship library, is the number of sampled ships at level b, is the estimation factor.
[0092] For each sampled vessel, the departure port is recorded in the voyage survey data. , the terminal port , cargo type , freight volume , cargo turnover , container volume and container turnover .
[0093] For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same starting and ending port information and the cargo volume is added together to obtain the overall cargo volume.
[0094] That is to say, for each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same starting port and destination port and the cargo volume is added together to obtain the overall cargo volume.
[0095] For example, the total freight volume can be calculated using the following formula:
[0096] in, The starting port i, the destination port j, cargo type is the total freight volume of o; It refers to the estimated factor of sampling ship k; is the cargo volume of sample ship k, and K refers to the total ship pool.
[0097] For each cargo type, the product of the estimated factors for each sampled vessel with the same origin and destination port information and the container volume is added together to obtain the overall container volume. For each cargo type, the product of the estimated factors for each sampled vessel with the same origin and destination port information and the cargo turnover is added together to obtain the overall cargo turnover. For each cargo type, the product of the estimated factors for each sampled vessel with the same origin and destination port information and the container turnover is added together to obtain the total container turnover.
[0098] That is, the calculation principles of the total box volume, total cargo turnover and total container turnover are the same as the calculation principles of the total freight volume, and will not be repeated here.
[0099] The method for calculating the flow direction data of inland waterway cargo by cargo category provided in an embodiment of the present invention realizes stratified sampling by stratifying ships and determining the number of sampled ships according to the number of ships corresponding to each stratum. On this basis, by setting weights for each stratum, the flow direction data is calculated based on the stratified sampling weights. This method can effectively eliminate sample bias, significantly improve the calculation accuracy of flow direction data, and accurately calculate the overall freight volume, cargo turnover, box volume and container turnover of different flow directions of each cargo category. This method is not only suitable for daily shipping management, but also can provide strong data support for waterway planning, capacity allocation, policy formulation, etc., and has broad application value and promotion potential.
[0100] Example 3 The embodiment of the present invention also provides another method for estimating the flow direction data of inland waterway cargo by cargo type; this method is implemented based on the method of the above embodiment; this method focuses on describing the specific implementation of the first corrected data set and the second corrected data set.
[0101] Figure 3 A flow chart of another method for estimating the flow direction data of inland river cargo by cargo type provided by an embodiment of the present invention is shown as follows: Figure 3 As shown, the method for estimating the flow direction data of inland river cargo by cargo type may include the following steps: Step S301: obtaining basic voyage survey data or docking survey data corresponding to a plurality of sampling ships.
[0102] Step S302 : for each sampled ship, the voyage survey data corresponding to each sampled ship is determined according to the multiple ports of call indicated by the port of call survey data, and the loading data and unloading data corresponding to each port of call.
[0103] Step S303: establishing a voyage data set according to the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships.
[0104] Step S304: comparing the preset water connectivity matrix with the starting and ending port information of each sampled ship in the voyage data set to determine voyage data that fails to match.
[0105] Voyage data refers to the basic voyage survey data or voyage survey data corresponding to a sampling ship in the voyage data set.
[0106] Specifically, for each sampled vessel, based on the origin and destination port information in the voyage data, the corresponding values for the province where the origin port is located and the province where the destination port is located are queried from the water connectivity matrix. If the value is 1, it indicates that the origin and destination port information is correct and no correction is required. The voyage data is determined to be successfully matched. If the value is 0, it indicates that the origin and destination port information is incorrect and needs to be corrected. The voyage data is determined to be unmatched.
[0107] Step S305: Match the voyage data that failed to match with the port arrival and departure report data to determine the port arrival record and port departure record corresponding to the voyage data that failed to match.
[0108] Specifically, the vessel identification number is obtained from the voyage data that failed to match. Based on the vessel identification number, the port arrival and departure records for the vessel identification number are filtered from the port arrival and departure report data. Specifically, the port arrival and departure records for the vessel identification number that are within three days of the voyage start and end time can be filtered. The voyage start and end times can be queried from the voyage data.
[0109] Step S306: updating the voyage data that failed to match based on the port arrival record and the port departure record to obtain updated voyage data.
[0110] If the province of the port in the arrival record is the same as the province of the destination port in the voyage data, and the province of the port in the departure record is different from the province of the starting port in the voyage data, the port in the departure record will be used instead of the starting port to obtain the updated voyage data. If the province of the port in the arrival record is different from the province of the destination port in the voyage data, and the province of the port in the departure record is the same as the province of the starting port in the voyage data, the port in the arrival record will be used instead of the destination port to obtain the updated voyage data.
[0111] If the province where the port in the arrival record is located is different from the province where the destination port in the voyage data is located, and the province where the port in the departure record is located is different from the province where the starting port in the voyage data is located, the screening range of the arrival record and the departure record can be expanded and the process returns to step S305.
[0112] Step S307: taking the updated voyage data and the successfully matched voyage data as a first revised data set.
[0113] Furthermore, for voyage data that fails to match, if correction cannot be performed through steps S305 to S306, the following methods can be performed in sequence to correct the error: 1) Single-end matching data correction. For each sampled vessel, based on the start and end times in the voyage data, the port arrival and departure report data is filtered. For voyage data containing only the starting port, end port, and start and end times, the port arrival and departure report data is filtered for departure records with the same start time as the start and end times, and for arrival records with the same end time as the start and end times. If the port in the departure record is the same as the starting port, but the port in the arrival record is different from the end port, the port in the arrival record can be substituted for the end port. In this case, the corresponding value for the province where the starting port is located and the province where the port in the arrival record is located is queried from the water connectivity matrix. If the value is 1, the substitution is allowed; if it is 0, it is not allowed and the correction method needs to be changed. Conversely, if the port in the departure record is different from the starting port, but the port in the arrival record is the same as the end port, the port in the departure record can be substituted for the starting port. In this case, the corresponding value for the province where the end port is located and the province where the port in the departure record is located is queried from the water connectivity matrix. If the value is 1, the substitution is allowed; if it is 0, it is not allowed and the correction method needs to be changed.
[0114] 2) Classification of unmatched data. Based on method 1), if the port in the departure record differs from the origin port, and the port in the arrival record differs from the destination port, the ports of call are categorized and summarized for each sampled vessel based on the arrival and departure report data. If all ports of call are in the same province, the origin and destination ports of the sampled vessel are recorded as that province. The ports of call can be any port in all arrival and departure records, filtered from the arrival and departure report data by vessel identification number.
[0115] 3) Construction and Application of a Dataset of Error-Prone Ports. Based on the previously completed correction records, a dataset of error-prone ports is constructed by matching records where the correspondence between an incorrect port and a correct port occurs more than three times. The remaining voyage data that failed to match is then matched against the error-prone port dataset. Specifically, the starting and ending ports in the failed voyage data are compared with the error-prone ports in the error-prone port dataset. If they match, the match is successful, and the correct port corresponding to the error port is replaced with the port in the voyage data that successfully matched.
[0116] 4) Other error handling rules. For other error records, correct them according to the following rules: a) If one of the starting port and the ending port is in the same province as the port of the sampling vessel, that port is considered the correct port; the port of the sampling vessel can be found in the voyage data.
[0117] b) Modify the other port. If the correct port is the origin port, based on the transportation distance in the voyage data for which the match failed, search the historical voyage data set for historical voyages with the same origin port and a transportation distance difference of less than 20%. Replace the destination port in the voyage data for which the match failed with the correct port. If the correct port is the destination port, the principle is the same and will not be further explained.
[0118] c) Delete any extra records that cannot be matched.
[0119] Step S308: determining the hierarchical starting and ending point combinations corresponding to the starting and ending port area information according to the starting and ending port area information of each sampled ship in the first corrected data set.
[0120] The first corrected dataset includes voyage records for multiple sampled vessels. Each voyage record includes the origin port, destination port, and transport distance. In this embodiment of the present invention, a hierarchical and progressive mechanism is used to correct outliers in transport distance. A hierarchical origin-destination combination refers to a combination of a origin port and a destination port.
[0121] Specifically, the origin and destination port information of each sampled vessel in the first revised dataset was grouped according to different hierarchical levels, with the origin and destination ports of each group of sampled vessels belonging to the same origin and destination combination at the same hierarchical level, including port areas, prefecture-level cities, and provinces.
[0122] Specifically, according to the starting and ending port area information of each sampled ship in the first revised data set, determining the hierarchical starting and ending port area combination corresponding to the starting and ending port area information, including: according to the starting and ending port area information of each sampled ship in the first revised data set, grouping according to the starting port area and the ending port area in the starting and ending port area information to obtain a first starting and ending port combination; when the number of sampled ships with the same first starting and ending port combination is greater than or equal to a preset threshold, the first starting and ending port combination is used as the hierarchical starting and ending port combination corresponding to the starting and ending port area information; when the number of sampled ships with the same first starting and ending port combination is less than the preset threshold When the threshold is reached, the sampling vessels are grouped according to the cities to which the starting port area and the ending port area in the starting and ending port area information belong, and a second starting and ending combination is obtained; when the number of sampled ships with the same second starting and ending combination is greater than or equal to the preset threshold, the second starting and ending combination is used as the hierarchical starting and ending combination corresponding to the starting and ending port area information; when the number of sampled ships with the same second starting and ending combination is less than the preset threshold, the sampling vessels are grouped according to the provinces to which the starting port area and the ending port area in the starting and ending port area information belong, and a third starting and ending combination is obtained; the third starting and ending combination is used as the hierarchical starting and ending combination corresponding to the starting and ending port area information.
[0123] It will be appreciated that the starting and ending port areas of each sampled vessel are read from the first corrected data set. Pairs of sampled vessels with the same starting and ending port areas are grouped, that is, grouped according to the port areas to which the starting and ending port areas in the starting and ending port area information belong, to obtain multiple first starting and ending port combinations. For each first starting and ending port combination, the number of sampled vessels within the group is counted. When the number of sampled vessels within the group is greater than or equal to a preset threshold, the first starting and ending port combination is used as the hierarchical starting and ending port combination corresponding to the starting and ending port area information, and step S309 is executed. For all sampled vessels that do not meet the aforementioned conditions, that is, when the number of sampled vessels within the group is less than the preset threshold, the vessels are grouped according to the cities to which the starting and ending port areas in the starting and ending port area information belong, to obtain second starting and ending port combinations. For each second starting and ending port combination, the number of sampled vessels within the group is counted. When the number of sampled vessels within the group is greater than or equal to the preset threshold, the second starting and ending port combination is used as the hierarchical starting and ending port combination corresponding to the starting and ending port area information, and step S309 is executed. For all sampled vessels that do not meet the aforementioned conditions, that is, when the number of sampled vessels in a group is less than a preset threshold, the group is grouped according to the provinces of the starting and ending port areas in the starting and ending port area information to obtain a third starting and ending port combination. For each third starting and ending port combination, the number of sampled vessels in the group is counted. When the number of sampled vessels in the group is greater than or equal to the preset threshold, the third starting and ending port combination is used as the hierarchical starting and ending port combination corresponding to the starting and ending port area information, and step S309 is executed. The preset threshold can be set according to actual circumstances; for example, the preset threshold can be set to 5.
[0124] Step S309: The transport distances corresponding to the sampled ships having the same hierarchical starting and ending point combination are determined as a transport distance group.
[0125] For sampling ships belonging to the same level starting and ending point combination, the transportation distance of each sampling ship is queried from the first corrected data set, and the transportation distance of each sampling ship is used as a transportation distance group.
[0126] Step S310 : determining an abnormal range of the transport distance group according to the first quartile and the third quartile of the transport distance group.
[0127] For each transport distance group, arrange the transport distances in ascending order and determine the first quartile (i.e., the 25% quantile, also known as Q1) and the third quartile (i.e., the 75% quantile, also known as Q3) of the transport distance group. Specifically, the positions of the 25% quantile and the 75% quantile can be determined using the following formula: i Q1 =(n+1) / 4 i Q3 =3(n+1) / 4 Among them, i Q1 Refers to the 25% quantile position, i Q3 refers to the position of the 75% quantile, n refers to the number of transport distances in the transport distance group, Q1 refers to the 25% quantile, and Q3 refers to the 75% quantile.
[0128] Q1 is the transportation distance arranged in ascending order, located at i Q1 Q3 is the transportation distance of the location. Q3 The transportation distance of the location.
[0129] Furthermore, the abnormal range of the transport distance group is determined according to the 25% quantile and the 75% quantile of the transport distance group, including: determining the interquartile range IQR according to the 25% quantile and the 75% quantile; determining the abnormal range of the transport distance group according to the 25% quantile, the 75% quantile and the interquartile range.
[0130] Specifically, the interquartile range (IQR) can be determined by the following formula: IQR = Q3-Q1. At this time, the abnormal range can be determined as [Q1-k i ×IQR, Q3+ k i × IQR], where k iis the first constant, and i is the level. It is understood that when i is 2, the level is the port area, when i is 3, the level is the prefecture-level city, and when i is 1, the level is the province. k1, k2, and k3 can be set according to actual conditions, but k1>k2>k3 must be guaranteed. For example, k1, k2, and k3 are set to 1.5, 2, and 3, respectively.
[0131] Step S311 : comparing each transport distance in the transport distance group with the abnormal range, and correcting the transport distance outside the abnormal range to obtain a second corrected data set.
[0132] For each transport distance group, each transport distance in the transport distance group is compared with the abnormal range, and transport distances outside the abnormal range are corrected to obtain a second corrected data set. During the correction, the average value of at least one transport distance in the transport distance group that is within the abnormal range can be used to replace and correct the transport distance outside the abnormal range.
[0133] In one embodiment, the process of obtaining the second corrected data set is as follows: (a) Group voyage records with the same origin and destination ports. When the number of records in a group is ≥ a preset threshold, calculate the first quartile Q1 and the third quartile Q3 of the transport distance for that group. Determine the first outlier range [Q1-k1×IQR, Q3+k1×IQR] based on IQR=Q3-Q1, where k1 is the first constant. Replace outliers outside this range with the arithmetic mean of the non-outlier values in the group. (b) For records that do not meet the record number threshold in step (a), regroup them by the city where the origin port is located and the city where the destination port is located. When the number of records in a group is ≥ the preset threshold: calculate Q1 and Q3 of the transportation distance for this city group; determine the second outlier range [Q1-k2×IQR, Q3+k2×IQR] based on the IQR, where k2>k1; replace outliers outside this range with the arithmetic mean of the non-outlier values in the group; (c) For records that do not meet the record number threshold in step (b), regroup them according to the province where the starting port is located and the province where the ending port is located: calculate Q1 and Q3 of the transportation distance for this province group; determine the third outlier range [Q1-k3×IQR, Q3+k3×IQR] based on the IQR, where k3>k2; replace outliers outside this range with the arithmetic mean of non-outliers in the group; and output the corrected second dataset.
[0134] Step S312: input the second corrected data set into a cargo flow direction estimation model to estimate the flow direction data of each type of cargo corresponding to the overall ship inventory.
[0135] The method for calculating the flow direction data of inland waterway cargo by cargo category provided in an embodiment of the present invention realizes multi-level detection and correction for voyage data that fails to match through multiple correction methods. By establishing a detection and correction system for voyage transportation distance and accurately identifying and processing abnormal data through statistical methods, the accuracy of the data is significantly improved.
[0136] Example 4 Corresponding to the above method embodiment, the embodiment of the present invention provides a device for estimating the flow direction data of inland river cargo by cargo type. Figure 4 A schematic diagram of a device for calculating the flow direction of inland river cargo by cargo type provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the device for calculating the flow direction data of inland river cargo by cargo type may include: The data acquisition module 401 is used to obtain basic voyage survey data or docking survey data corresponding to multiple sampling ships; The data conversion module 402 is configured to determine, for each sampled ship, voyage survey data corresponding to each sampled ship based on the multiple ports of call indicated by the port of call survey data and the loading data and unloading data corresponding to each port of call; A data merging module 403 is configured to establish a voyage data set based on the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships; A first correction module 404 is configured to correct the origin and destination port information of each sampled vessel in the voyage data set according to a preset water connectivity matrix and port entry and exit report data to obtain a first corrected data set; A second correction module 405 is configured to correct the transport distance of each sampled vessel in the first corrected dataset based on the origin and destination port information of each sampled vessel in the first corrected dataset to obtain a second corrected dataset; The data calculation module 406 is configured to input the second corrected data set into a cargo flow direction calculation model to calculate the flow direction data of each type of cargo corresponding to the overall ship inventory.
[0137] An embodiment of the present invention provides a method for estimating flow direction data of inland waterway cargo by cargo category, which takes into account the correction of the starting and ending port area information based on the water area connectivity matrix and entry and exit port report data, and uses the corrected starting and ending port area information to correct the transportation distance, thereby realizing multi-level correction, improving the accuracy of sampled data, making the data more consistent with the actual operation of inland waterway transportation, and effectively eliminating sample bias, significantly improving the estimation accuracy of flow direction data for all ships in the overall ship database for various types of cargo, and enhancing the practicality and effectiveness of the estimation results.
[0138] In some embodiments, the data acquisition module 401 is further configured to: The multiple ships included in the overall ship database are stratified according to the city, type, and gross tonnage of the ship, and the number of ships corresponding to each level is obtained; According to the number of ships corresponding to each level, the number of sampling ships corresponding to each level is determined according to the proportional distribution method; According to the number of sampled ships, basic voyage survey data or docking survey data corresponding to the sampled ships are obtained from the ships corresponding to each level.
[0139] In some embodiments, the data conversion module 402 is further configured to: For each sampled ship, according to the order of the docking at each port of call, and based on the loading data and unloading data corresponding to the port of call, the freight volume matrix and the container volume matrix corresponding to each port of call are determined in sequence; For each sampled ship, determining the transport distance corresponding to the non-zero elements in the freight volume matrix and the container volume matrix according to the freight volume matrix and the container volume matrix; For each sampled ship, the cargo volume matrix, the container volume matrix and the transport distance are used as the voyage survey data corresponding to each sampled ship.
[0140] In some embodiments, the first correction module 404 is further configured to: According to the preset water connectivity matrix, the starting and ending port information of each sampled ship in the voyage data set is compared to determine the voyage data that fails to match; Matching the voyage data that failed to match with the port arrival and departure report data to determine the port arrival and departure records corresponding to the voyage data that failed to match; updating the voyage data that failed to match according to the port arrival record and the port departure record to obtain updated voyage data; The updated voyage data and the successfully matched voyage data are used as the first revised data set.
[0141] In some embodiments, the second correction module 405 is further configured to: Determining, based on the starting and ending port information of each sampled ship in the first corrected data set, a hierarchical starting and ending port combination corresponding to the starting and ending port information; The transport distances corresponding to the sampling vessels with the same hierarchical starting and ending point combinations are determined as transport distance groups; Determining an abnormal range of the transport distance group according to the first quartile and the third quartile corresponding to the transport distance group; Each of the transport distances in the transport distance group is compared with the abnormal range, and the transport distances outside the abnormal range are corrected to obtain a second corrected data set.
[0142] In some embodiments, the second correction module 405 is further configured to: According to the starting and ending port area information of each sampled ship in the first revised data set, grouping is performed according to the starting port area and the ending port area in the starting and ending port area information to obtain a first starting and ending port combination; When the number of sampled ships having the same first starting and ending point combination is greater than or equal to a preset threshold, the first starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information; When the number of sampled ships with the same first starting and ending port combination is less than the preset threshold, the ships are grouped according to the cities to which the starting port area and the ending port area in the starting and ending port area information belong to obtain a second starting and ending port combination; When the number of sampled ships having the same second starting and ending point combination is greater than or equal to a preset threshold, the second starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information; When the number of sampled ships with the same second starting and ending port combination is less than the preset threshold, the ships are grouped according to the provinces to which the starting and ending port areas in the starting and ending port area information belong to obtain the third starting and ending port combination; The third starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information.
[0143] In some embodiments, the data inference module 406 is further configured to: Determining the cargo turnover and container turnover of each sampled ship based on the cargo volume, container volume, and transportation distance of each sampled ship in the second revised data set; Determining the estimation factor corresponding to each sampling ship according to the level corresponding to each sampling ship; For each type of cargo, the product of the estimated factors and cargo volume corresponding to each sampled ship with the same origin and destination port information is added together to obtain the overall cargo volume. For each type of cargo, the product of the estimated factors and the container volume corresponding to each sampled ship with the same origin and destination port information is added together to obtain the overall container volume. For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the cargo turnover volume is added together to obtain the overall cargo turnover volume. For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the container turnover is added together to obtain the total container turnover.
[0144] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding content in the aforementioned method embodiment.
[0145] Example 5 The embodiment of the present invention also provides an electronic device for running the above-mentioned method for estimating the flow direction data of inland river cargo by cargo type; Figure 5 A structural schematic diagram of an electronic device is shown, which includes a memory 500 and a processor 501, wherein the memory 500 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 501 to implement the above-mentioned method for calculating the flow direction data of inland waterway cargo by cargo category.
[0146] Furthermore, Figure 5 The electronic device shown further includes a bus 502 and a communication interface 503 , and the processor 501 , the communication interface 503 and the memory 500 are connected via the bus 502 .
[0147] The memory 500 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 503 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 502 may be an ISA bus, a PCI bus, or an EISA bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0148] The processor 501 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 501 or software instructions. The above processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or register. The storage medium is located in the memory 500, and the processor 501 reads the information in the memory 500 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.
[0149] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for calculating the flow direction data of inland waterway cargo by cargo category. For specific implementation, please refer to the method embodiment and will not be repeated here.
[0150] The computer program product for the method of calculating the flow direction data of inland waterway cargo by cargo category provided in an embodiment of the present invention includes a computer-readable storage medium storing non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.
[0151] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0152] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0153] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0154] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0155] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0156] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for estimating the flow direction of inland river cargo by cargo type, characterized by: include: Obtain basic voyage survey data or docking survey data corresponding to multiple sampling ships; For each sampled ship, determining voyage survey data corresponding to each sampled ship based on a plurality of call ports indicated by the call survey data, and loading data and unloading data corresponding to each of the call ports; Establishing a voyage data set according to the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships; According to the preset water area connectivity matrix and the port entry and exit report data, the starting and ending port information of each sampled ship in the voyage data set is corrected to obtain a first corrected data set; Correcting the transport distance of each sampled vessel in the first corrected dataset based on the originating and ending port information of each sampled vessel in the first corrected dataset to obtain a second corrected dataset; The second revised data set is input into the cargo flow direction estimation model to estimate the flow direction data of each type of cargo corresponding to the overall ship library.
2. The method according to claim 1, characterized in that The obtaining of basic voyage survey data or docking survey data corresponding to a plurality of sampling ships includes: The multiple ships included in the overall ship database are stratified according to the city, type, and gross tonnage of the ship, and the number of ships corresponding to each level is obtained; According to the number of ships corresponding to each level, the number of sampling ships corresponding to each level is determined according to the proportional distribution method; According to the number of sampled ships, basic voyage survey data or docking survey data corresponding to the sampled ships are obtained from the ships corresponding to each level.
3. The method according to claim 2, characterized in that The method of determining, for each sampled ship, voyage survey data corresponding to each sampled ship based on the multiple ports of call indicated by the port of call survey data and the loading data and unloading data corresponding to each port of call, includes: For each sampled ship, according to the order of the docking at each port of call, and based on the loading data and unloading data corresponding to the port of call, the freight volume matrix and the container volume matrix corresponding to each port of call are determined in sequence; For each sampled ship, determining the transport distance corresponding to the non-zero elements in the freight volume matrix and the container volume matrix according to the freight volume matrix and the container volume matrix; For each sampled ship, the cargo volume matrix, the container volume matrix and the transport distance are used as the voyage survey data corresponding to each sampled ship.
4. The method according to claim 1, wherein The starting and ending port information of each sampled ship in the voyage data set is corrected according to the preset water area connectivity matrix and the port entry and exit report data to obtain a first corrected data set, including: According to the preset water connectivity matrix, the starting and ending port information of each sampled ship in the voyage data set is compared to determine the voyage data that fails to match; Matching the voyage data that failed to match with the port arrival and departure report data to determine the port arrival and departure records corresponding to the voyage data that failed to match; updating the voyage data that failed to match according to the port arrival record and the port departure record to obtain updated voyage data; The updated voyage data and the successfully matched voyage data are used as the first revised data set.
5. The method according to claim 1, wherein The method of correcting the transport distance of each sampled ship in the first corrected data set according to the starting and ending port information of each sampled ship in the first corrected data set to obtain a second corrected data set includes: Determining, based on the starting and ending port information of each sampled ship in the first corrected data set, a hierarchical starting and ending port combination corresponding to the starting and ending port information; The transport distances corresponding to the sampling vessels with the same hierarchical starting and ending point combinations are determined as transport distance groups; Determining an abnormal range of the transport distance group according to the first quartile and the third quartile corresponding to the transport distance group; Each of the transport distances in the transport distance group is compared with the abnormal range, and the transport distances outside the abnormal range are corrected to obtain a second corrected data set.
6. The method according to claim 5, characterized in that Determining, based on the starting and ending port information of each sampled ship in the first corrected data set, a hierarchical starting and ending port combination corresponding to the starting and ending port information, including: According to the starting and ending port area information of each sampled ship in the first revised data set, grouping is performed according to the starting port area and the ending port area in the starting and ending port area information to obtain a first starting and ending port combination; When the number of sampled ships having the same first starting and ending point combination is greater than or equal to a preset threshold, the first starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information; When the number of sampled ships with the same first starting and ending port combination is less than the preset threshold, the ships are grouped according to the cities to which the starting port area and the ending port area in the starting and ending port area information belong to obtain a second starting and ending port combination; When the number of sampled ships having the same second starting and ending point combination is greater than or equal to a preset threshold, the second starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information; When the number of sampled ships with the same second starting and ending port combination is less than the preset threshold, the ships are grouped according to the provinces to which the starting and ending port areas in the starting and ending port area information belong to obtain the third starting and ending port combination; The third starting and ending point combination is used as the hierarchical starting and ending point combination corresponding to the starting and ending port area information.
7. The method according to claim 3, characterized in that Inputting the second corrected data set into the cargo flow direction estimation model to estimate the flow direction data of each type of cargo corresponding to the overall ship library includes: Determining the cargo turnover and container turnover of each sampled ship based on the cargo volume, container volume, and transportation distance of each sampled ship in the second revised data set; Determining the estimation factor corresponding to each sampling ship according to the level corresponding to each sampling ship; For each type of cargo, the product of the estimated factors and cargo volume corresponding to each sampled ship with the same origin and destination port information is added together to obtain the overall cargo volume. For each type of cargo, the product of the estimated factors and the container volume corresponding to each sampled ship with the same origin and destination port information is added together to obtain the overall container volume. For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the cargo turnover volume is added together to obtain the overall cargo turnover volume. For each type of cargo, the product of the estimated factors corresponding to each sampled ship with the same origin and destination port information and the container turnover is added together to obtain the total container turnover.
8. A device for calculating the flow direction of inland river cargo by cargo type, characterized in that: include: A data acquisition module is used to obtain basic voyage survey data or docking survey data corresponding to multiple sampling ships; a data conversion module for determining, for each sampled ship, voyage survey data corresponding to each sampled ship based on a plurality of call ports indicated by the call survey data, and loading data and unloading data corresponding to each of the call ports; A data merging module, configured to establish a voyage data set based on the basic voyage survey data or the voyage survey data corresponding to each of the sampling ships; A first correction module is used to correct the origin and destination port information of each sampled ship in the voyage data set according to a preset water area connectivity matrix and port entry and exit report data to obtain a first corrected data set; A second correction module is configured to correct the transport distance of each sampled vessel in the first corrected data set according to the starting and ending port information of each sampled vessel in the first corrected data set to obtain a second corrected data set; The data calculation module is used to input the second corrected data set into the cargo flow calculation model to calculate the flow direction data of each type of cargo corresponding to the overall ship library.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for calculating the flow direction data of inland waterway cargo by cargo category as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the method for calculating the flow direction data of inland waterway cargo by cargo category as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent identification method and system for ship in-port loading and unloading
CN113935692A
Port distance matrix calculation method and device, electronic equipment and storage medium
CN115186234A
Global ship cargo quantity statistical analysis method and system
CN116596435A
Regional waterway transportation volume measuring and calculating method and device, electronic equipment and storage medium
CN116993245A
Comprehensive port operation prediction method and system based on big data analysis
CN117634926A