A port data trace-back method, system and related device
By combining data fragment access volume analysis of port data with blockchain technology, the problems of low port data storage efficiency and untimely early warning of transportation anomalies have been solved, achieving efficient data storage and real-time transportation monitoring, and improving port data management and transportation security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN PORT HOLDINGS
- Filing Date
- 2026-03-17
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies for port data traceability suffer from low data storage efficiency and untimely early warning of transportation anomalies. They also make it difficult to effectively migrate data based on data volume-labeled queues and to provide early warnings in conjunction with transportation deviations.
By analyzing the access volume of port data segments, a historical data volume labeling queue is obtained, and a freight entity blockchain is created using blockchain technology to conduct real-time transportation data analysis and traceability, and to issue early warnings based on transportation distance and angle deviations.
It improved the efficiency of port data storage, ensured sufficient storage space, and enhanced the safety and transparency of the transportation process through real-time monitoring and early warning, achieving efficient data storage and reliable traceability.
Smart Images

Figure CN121879689B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of port transportation and involves blockchain technology. Specifically, it is a port data traceability method, system and related equipment. Background Technology
[0002] Existing technologies for port data tracing have the following specific drawbacks:
[0003] 1. When analyzing the access volume of port data segments stored on SSDs for historical storage periods, it is difficult to obtain the historical data volume labeling queue based on the analysis results. When storing real-time data to be stored, it is impossible to perform targeted data migration of port historical data based on the storage volume corresponding to the real-time data to be stored and the historical data volume labeling queue. As a result, it is difficult to provide sufficient SSD storage space to store real-time data to be stored, which can easily hinder the port data storage process, significantly reduce the overall storage efficiency, and thus affect the normal operation of port data management.
[0004] 2. While using a blockchain to create a freight entity for real-time transportation data analysis and traceability is possible, it is difficult to fully combine the deviations in freight transportation distance and angle to provide early warnings of transportation anomalies. This results in the inability to issue timely and accurate early warnings of transportation anomalies when faced with complex transportation situations.
[0005] To this end, we propose a port data traceability method, system, and related equipment. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a port data traceability method, system, and related equipment, thereby improving port data storage efficiency and port data traceability effectiveness.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a port data traceability method, comprising the following steps:
[0008] Step S1: Obtain the real-time acquisition period and historical storage period of port data. Perform data segment access volume analysis on the port data stored on SSD during the historical storage period. Based on the analysis results, obtain the historical data volume labeling queue to obtain the historical analysis data of the port.
[0009] Step S2: Analyze the amount of real-time data to be stored generated by the target cargo port during the real-time data collection period, and store the real-time data to be stored based on the analysis results to obtain the port storage data.
[0010] Step S3: Screen the freight entities corresponding to the port storage data, verify the traceability information of each freight entity, and issue a freight warning based on the traceability verification results.
[0011] Furthermore, step S1 also includes the following steps:
[0012] Step S11: Obtain the cargo ports that need to be traced for data, obtain multiple cargo ports, and arbitrarily select one target cargo port from the multiple cargo ports obtained.
[0013] Step S12: Set the real-time data collection period and the historical data storage period for the target cargo ports respectively;
[0014] Step S13: Perform data segment analysis on the port data in the port data historical storage period, and obtain the historical segment queue based on the analysis results;
[0015] Step S14: Obtain the data volume corresponding to historical data segments P1 to Pa respectively, and obtain the segment storage volume Q1 to segment storage volume Qa;
[0016] Step S15: In the historical fragment queue, synchronize the fragment storage quantity Q1 to the queue element corresponding to the historical data fragment P1 to obtain the historical queue element T1. Synchronize the sum of the fragment storage quantity Q1 and the fragment storage quantity Q2 to the queue element corresponding to the historical data fragment P2 to obtain the historical queue element T2. Synchronize the sum of the fragment storage quantities Q1 to Q3 to the queue element corresponding to the historical data fragment P3 to obtain the historical queue element T3. And so on, synchronize the sum of the fragment storage quantities Q1 to Qa to the queue element corresponding to the historical data fragment Pa to obtain the historical queue element T1. The historical data quantity labeling queue is obtained.
[0017] Step S16: Define the real-time acquisition cycle of port data, the historical storage cycle of port data, and the historical data volume labeling queue as port historical analysis data.
[0018] Furthermore, step S13 also includes the following steps:
[0019] Step S131: Obtain the port data stored by SSD in the historical storage period of port data by the distributed storage device, divide the obtained port data into several historical data segments, and arbitrarily select a sample data segment from the obtained data segments.
[0020] Step S132: Obtain the interval between the third periodic feature time point and the current time to get the periodic interval duration;
[0021] Step S133: Obtain the number of times the port data traceability system accesses each data segment in the port data historical storage period, and calculate the average number of accesses of multiple segments to obtain the average number of accesses of the first period segment.
[0022] Step S134: Obtain the number of times the port data traceability system accesses each data segment during the real-time acquisition cycle of port data, and calculate the average number of accesses for multiple segments to obtain the average number of accesses for the second cycle segment.
[0023] Step S135: Calculate the sum of the average number of visits to the first period segment and the average number of visits to the second period segment to obtain the average number of visits per period segment;
[0024] Step S136: Perform access frequency analysis on the sample data segment, and obtain the access frequency index corresponding to the sample data segment based on the analysis results;
[0025] Step S137: Obtain the access frequency index corresponding to each historical data segment, sort the obtained access frequency indices in ascending order, and mark the obtained historical data segments as historical data segments P1 to Pa according to the ascending order. Store historical data segments P1 to Pa as elements to obtain a historical segment queue.
[0026] Furthermore, step S2 also includes the following steps:
[0027] Step S21: Obtain historical port analysis data, and obtain the real-time data collection cycle and historical data volume labeling queue based on the historical port analysis data;
[0028] Step S22: Perform real-time port data analysis on the target cargo port in the real-time port data collection cycle, and divide the real-time port data collection cycle into a first data storage period and a second data storage period based on the analysis results;
[0029] Step S23: If the real-time acquisition period of port data is the first data storage period, then the real-time data to be stored is directly stored to the SSD storage medium to obtain the port storage data;
[0030] Step S24: If the real-time acquisition period of port data is the second data storage period, then perform data volume analysis on the real-time data to be stored and the historical data volume labeling queue, and store the real-time data to be stored according to the analysis results to obtain the port storage data.
[0031] Furthermore, step S24 also includes the following steps:
[0032] Obtain the historical data volume labeling queue, obtain the labeled data volume corresponding to historical queue element T1 to historical queue element T1, and obtain the first cumulative labeled data volume to the a-th cumulative labeled data volume;
[0033] Obtain the required storage capacity and the remaining capacity of the target medium, calculate the difference between the required storage capacity and the remaining capacity of the target medium, and obtain the SSD expansion capacity;
[0034] If the SSD expansion capacity is equal to the amount of cumulative labeled data of the i-th generation, then historical queue elements T1 to Ti will be transferred to the HDD storage medium. After the transfer is completed, the real-time data to be stored will be stored to the SSD storage medium.
[0035] If the SSD expansion capacity is between the i-th cumulative labeled data volume and the i+1-th cumulative labeled data volume, then historical queue elements T1 to Ti+1 will be transferred to the HDD storage medium. After the transfer is completed, the real-time data to be stored will be stored to the SSD storage medium.
[0036] Furthermore, step S3 also includes the following steps:
[0037] Step S31: Obtain port storage data, and obtain the freight entities contained in the port storage data. Then, arbitrarily select a sample freight entity from the multiple freight entities obtained, and set the storage data involved in the port storage data of the sample freight entity as the sample freight storage data.
[0038] Step S32: Create a blockchain for the sample freight entity through the existing blockchain platform to obtain the sample entity blockchain. Divide the sample freight storage data into several different types of traceable data and name them as Type I traceable data to Type b traceable data respectively. Set Type I traceable data to Type b traceable data into several blocks respectively and synchronize them to the sample entity blockchain.
[0039] Step S33: If the first type of traceable data is the real-time location corresponding to the sample freight entity, then the sample freight entity is analyzed for location deviation through the sample entity blockchain, the real-time location deviation degree corresponding to the sample freight entity is obtained according to the analysis results, and the real-time location deviation degree is analyzed and warned.
[0040] Step S34: Perform traceability analysis on the traceable data from the second type to the traceable data of the b type respectively.
[0041] Furthermore, step S33 also includes the following steps:
[0042] Step S331: During the location monitoring of the sample freight vehicle, the current time point is set as the end time point of the cycle and the real-time location monitoring cycle is set.
[0043] Step S332: Obtain the real-time location of the sample freight entity synchronized to the sample entity blockchain within the real-time location monitoring period, and set the real-time location as W1 actual location to Wc actual location according to the synchronization order. Obtain the time value of the synchronization from W1 actual location to Wc actual location to the sample entity blockchain to obtain the synchronization time point from W1 location to Wc location.
[0044] Step S333: Obtain the preset transportation route corresponding to the sample freight entity through the sample entity blockchain, and obtain the preset positions corresponding to the W1 location synchronization time point to the Wc location synchronization time point according to the preset transportation route, so as to obtain the preset positions from W1 to Wc.
[0045] Step S334: Obtain the port map corresponding to the sample cargo carrier to obtain the sample port map. In the sample port map, set the position of the sample cargo carrier at the end of the cycle as the origin of the coordinate system and create a Cartesian coordinate system to obtain the sample cycle coordinate system.
[0046] Step S335: In the sample periodic coordinate system, obtain the distance value from the preset position of W1 to the preset position of Wc and the origin of the coordinate system, obtain the distance value from the preset distance value of W1 to the preset distance value of Wa, obtain the distance value from the actual position of W1 to the actual position of Wc and the origin of the coordinate system, and obtain the distance value from the actual distance value of W1 to the actual distance value of Wa.
[0047] Step S336: Calculate the distance deviation of the sample freight vehicle by combining the actual distance value of W1 to the actual distance value of Wa and the preset distance value of W1 to the preset distance value of Wa;
[0048] Step S337: Analyze the transportation direction of the sample freight vehicle according to the sample periodic coordinate system, and obtain the transportation angle deviation corresponding to the sample freight vehicle based on the analysis results;
[0049] Step S338: Calculate the transportation trajectory deviation corresponding to the sample freight entity by combining the transportation angle deviation and the positional distance deviation;
[0050] Step S339: Obtain the reasonable range of trajectory deviation. If the transportation trajectory deviation is within the reasonable range, there is no need to issue a trajectory deviation warning for the sample freight entity. If the transportation trajectory deviation is not within the reasonable range, then issue a trajectory deviation warning for the sample freight entity.
[0051] Furthermore, step S337 also includes the following steps:
[0052] In the sample period coordinate system, connect the actual position of W1 with the actual position of W2 to obtain the first actual transportation trajectory line, connect the actual position of W2 with the actual position of W3 to obtain the second actual transportation trajectory line, and so on. Connect the actual position of Wc-1 with the actual position of Wc to obtain the (c-1)th actual transportation trajectory line.
[0053] Connect the preset position W1 with the preset position W2 to obtain the first preset transportation trajectory line; connect the preset position W2 with the preset position W3 to obtain the second preset transportation trajectory line; and so on. Connect the preset position Wc-1 with the preset position Wc to obtain the (c-1)th preset transportation trajectory line.
[0054] Draw the extension line of the first actual transportation trajectory line until the extension line intersects the x-axis. Obtain the angle between the extension line of the first actual transportation trajectory line and the positive half-axis of the x-axis to obtain the transportation direction angle of the first actual trajectory.
[0055] Repeat the process of obtaining the first actual trajectory transportation direction angle to obtain the trajectory transportation direction angles corresponding to the second actual transportation trajectory line to the (c-1)th actual transportation trajectory line and the first preset transportation trajectory line to the (c-1)th preset transportation trajectory line respectively, and obtain the first preset trajectory transportation direction angle to the (c-1)th preset trajectory transportation direction angle.
[0056] Calculate the difference between the first actual trajectory transport direction angle and the first preset trajectory transport direction angle, and take the absolute value of the difference to obtain the first transport direction angle deviation. Similarly, calculate the difference between the (c-1)th actual trajectory transport direction angle and the (c-1)th preset trajectory transport direction angle, and take the absolute value of the difference to obtain the (c-1)th transport direction angle deviation.
[0057] The average value of the transportation direction angle from the first preset trajectory to the (c-1)th preset trajectory is calculated to obtain the preset mean direction angle. The average value of the deviation of the first transportation direction angle to the (c-1)th transportation direction angle is calculated to obtain the mean direction angle deviation. The ratio of the mean direction angle deviation to the preset mean direction angle is calculated to obtain the transportation angle deviation degree corresponding to the sample freight entity.
[0058] A port data traceability system includes:
[0059] Data acquisition module: Acquires the real-time acquisition period and historical storage period of port data, performs data segment access volume analysis on port data stored on SSD during the historical storage period, obtains the historical data volume labeling queue based on the analysis results, and obtains the port historical analysis data.
[0060] Data storage module: Analyzes the amount of real-time data to be stored generated by the target cargo port during the real-time data collection period, and stores the real-time data to be stored based on the analysis results to obtain the port storage data;
[0061] Data traceability module: Screens the freight entities corresponding to the port's stored data, verifies the traceability information of each freight entity, and issues freight warnings based on the traceability verification results.
[0062] A port data traceability device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it performs the above-mentioned operations.
[0063] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0064] 1. This invention analyzes the access volume of port data segments stored on SSDs during the historical storage period of port data. Based on the analysis results, a historical data volume labeling queue is obtained. When storing real-time data to be stored, the port historical data is migrated in a targeted manner according to the storage volume corresponding to the real-time data to be stored and the historical data volume labeling queue. This provides sufficient SSD storage space to store the real-time data to be stored, thereby improving the port data storage efficiency.
[0065] 2. This invention uses a blockchain to create a freight entity blockchain for real-time transportation data analysis and traceability. In the process of tracing real-time location deviation, it fully combines transportation distance deviation and transportation angle deviation to provide early warning for the freight entity, so that the traceability method can be fully applied to specific practice, thereby improving the practical effect of the traceability method. Attached Figure Description
[0066] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.
[0067] Figure 1 This is a diagram illustrating the implementation steps of the present invention;
[0068] Figure 2 This is an overall system block diagram of the present invention;
[0069] Figure 3 This is a schematic diagram of the historical fragment queue of the present invention;
[0070] Figure 4 This is a schematic diagram of the sample period coordinate system of the present invention;
[0071] Figure 5 This is a schematic diagram of the first actual trajectory transportation direction angle in this invention. Detailed Implementation
[0072] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0073] Example:
[0074] Firstly, please refer to Figure 1 This invention provides a technical solution: a port data traceability method, comprising the following steps:
[0075] Step S1: Obtain the real-time acquisition period and historical storage period of port data. Perform data segment access volume analysis on the port data stored on SSD during the historical storage period. Based on the analysis results, obtain the historical data volume labeling queue to obtain the historical analysis data of the port.
[0076] Step S1 further includes the following steps:
[0077] Step S11: Obtain the cargo ports that need to be traced for data, obtain multiple cargo ports, and arbitrarily select one target cargo port from the multiple cargo ports obtained.
[0078] Step S12: Set the real-time data collection period and the historical data storage period for the target cargo ports respectively;
[0079] Step S13: Perform data segment analysis on the port data in the port data historical storage period, and obtain the historical segment queue based on the analysis results;
[0080] Step S13 further includes the following steps:
[0081] Step S131: Obtain the port data stored by SSD in the historical storage period of port data by the distributed storage device, divide the obtained port data into several historical data segments, and arbitrarily select a sample data segment from the obtained data segments.
[0082] Step S132: Obtain the interval between the third periodic feature time point and the current time to get the periodic interval duration;
[0083] Step S133: Obtain the number of times the port data traceability system accesses each data segment in the port data historical storage period, and calculate the average number of accesses of multiple segments to obtain the average number of accesses of the first period segment.
[0084] Step S134: Obtain the number of times the port data traceability system accesses each data segment during the real-time acquisition cycle of port data, and calculate the average number of accesses for multiple segments to obtain the average number of accesses for the second cycle segment.
[0085] Step S135: Calculate the sum of the average number of visits to the first period segment and the average number of visits to the second period segment to obtain the average number of visits per period segment;
[0086] Step S136: Perform access frequency analysis on the sample data segment, and obtain the access frequency index corresponding to the sample data segment based on the analysis results;
[0087] Step S137: Obtain the access frequency index corresponding to each historical data segment, sort the obtained access frequency indices in ascending order, and mark the obtained historical data segments as historical data segment P1 to historical data segment Pa according to the ascending order. Store historical data segments P1 to historical data segment Pa as elements to obtain a historical segment queue.
[0088] Step S14: Obtain the data volume corresponding to historical data segments P1 to Pa respectively, and obtain the segment storage volume Q1 to segment storage volume Qa;
[0089] Step S15: In the historical fragment queue, synchronize the fragment storage quantity Q1 to the queue element corresponding to the historical data fragment P1 to obtain the historical queue element T1. Synchronize the sum of the fragment storage quantity Q1 and the fragment storage quantity Q2 to the queue element corresponding to the historical data fragment P2 to obtain the historical queue element T2. Synchronize the sum of the fragment storage quantities Q1 to Q3 to the queue element corresponding to the historical data fragment P3 to obtain the historical queue element T3. And so on, synchronize the sum of the fragment storage quantities Q1 to Qa to the queue element corresponding to the historical data fragment Pa to obtain the historical queue element T1. The historical data quantity labeling queue is obtained.
[0090] Step S16: Define the real-time port data acquisition cycle, the historical port data storage cycle, and the historical data volume labeling queue as port historical analysis data;
[0091] Step S2: Analyze the amount of real-time data to be stored generated by the target cargo port during the real-time data collection period, and store the real-time data to be stored based on the analysis results to obtain the port storage data.
[0092] Step S2 further includes the following steps:
[0093] Step S21: Obtain historical port analysis data, and obtain the real-time data collection cycle and historical data volume labeling queue based on the historical port analysis data;
[0094] Step S22: Perform real-time port data analysis on the target cargo port in the real-time port data collection cycle, and divide the real-time port data collection cycle into a first data storage period and a second data storage period based on the analysis results;
[0095] Step S23: If the real-time acquisition period of port data is the first data storage period, then the real-time data to be stored is directly stored to the SSD storage medium to obtain the port storage data;
[0096] Step S24: If the real-time acquisition period of port data is the second data storage period, then perform data volume analysis on the real-time data to be stored and the historical data volume labeling queue, and store the real-time data to be stored according to the analysis results to obtain the port storage data.
[0097] Step S24 further includes the following steps:
[0098] Obtain the historical data volume labeling queue, and obtain the labeled data volume corresponding to historical queue element T1 to historical queue element T1 to obtain the first cumulative labeled data volume to the a-th cumulative labeled data volume;
[0099] Obtain the required storage capacity and the remaining capacity of the target medium, calculate the difference between the required storage capacity and the remaining capacity of the target medium, and obtain the SSD expansion capacity;
[0100] If the SSD expansion capacity is equal to the amount of cumulative labeled data of the i-th generation, then historical queue elements T1 to Ti will be transferred to the HDD storage medium. After the transfer is completed, the real-time data to be stored will be stored to the SSD storage medium.
[0101] If the SSD expansion capacity is between the i-th cumulative labeled data volume and the i+1-th cumulative labeled data volume, then historical queue elements T1 to Ti+1 will be transferred to the HDD storage medium. After the transfer is completed, the real-time data to be stored will be stored to the SSD storage medium.
[0102] It should be noted that the above steps analyze the access volume of port data segments stored on SSDs during the historical storage period of port data. Based on the analysis results, a historical data volume labeling queue is obtained. When storing real-time data to be stored, the port historical data is migrated in a targeted manner according to the storage volume corresponding to the real-time data to be stored and the historical data volume labeling queue. This provides sufficient SSD storage space for storing real-time data to be stored, and has the following advantages:
[0103] By dynamically analyzing the access characteristics of historical port data, a data activity marker queue is formed, and precise storage scheduling is implemented based on this. This significantly optimizes storage resource allocation. At the same time, by identifying high-frequency access segments and low-frequency cold data in historical data, the system can proactively migrate low-activity data to low-cost storage media. Sufficient SSD space is reserved to prioritize the fast writing needs of real-time data, avoiding business delays caused by insufficient storage space. Furthermore, by maintaining the proximity access of high-frequency data to high-speed storage media, the overall efficiency of data retrieval is improved, achieving dynamic matching between storage resources and data value. While controlling costs, this ensures the efficient flow and real-time response capability of core port business data, providing a reliable storage foundation for intelligent port operations.
[0104] Step S3: Screen the freight entities corresponding to the port storage data, verify the traceability information of each freight entity, and issue a freight warning based on the traceability verification results;
[0105] Step S3 further includes the following steps:
[0106] Step S31: Obtain port storage data, and obtain the freight entities contained in the port storage data. Then, arbitrarily select a sample freight entity from the multiple freight entities obtained, and set the storage data involved in the port storage data of the sample freight entity as the sample freight storage data.
[0107] Step S32: Create a blockchain for the sample freight entity through the existing blockchain platform to obtain the sample entity blockchain. Divide the sample freight storage data into several different types of traceable data and name them as Type I traceable data to Type b traceable data respectively. Set Type I traceable data to Type b traceable data into several blocks respectively and synchronize them to the sample entity blockchain.
[0108] Step S33: If the first type of traceable data is the real-time location corresponding to the sample freight entity, then the sample freight entity is analyzed for location deviation through the sample entity blockchain, the real-time location deviation degree corresponding to the sample freight entity is obtained according to the analysis results, and the real-time location deviation degree is analyzed and warned.
[0109] Step S33 further includes the following steps:
[0110] Step S331: During the location monitoring of the sample freight vehicle, the current time point is set as the end time point of the cycle and the real-time location monitoring cycle is set.
[0111] Step S332: Obtain the real-time location of the sample freight entity synchronized to the sample entity blockchain within the real-time location monitoring period, and set the real-time location as W1 actual location to Wc actual location according to the synchronization order. Obtain the time value of the synchronization from W1 actual location to Wc actual location to the sample entity blockchain to obtain the synchronization time point from W1 location to Wc location.
[0112] Step S333: Obtain the preset transportation route corresponding to the sample freight entity through the sample entity blockchain, and obtain the preset positions corresponding to the W1 location synchronization time point to the Wc location synchronization time point according to the preset transportation route, so as to obtain the preset positions from W1 to Wc.
[0113] Step S334: Obtain the port map corresponding to the sample cargo carrier to obtain the sample port map. In the sample port map, set the position of the sample cargo carrier at the end of the cycle as the origin of the coordinate system and create a Cartesian coordinate system to obtain the sample cycle coordinate system.
[0114] Step S335: In the sample periodic coordinate system, obtain the distance value from the preset position of W1 to the preset position of Wc and the origin of the coordinate system, obtain the distance value from the preset distance value of W1 to the preset distance value of Wa, obtain the distance value from the actual position of W1 to the actual position of Wc and the origin of the coordinate system, and obtain the distance value from the actual distance value of W1 to the actual distance value of Wa.
[0115] Step S336: Calculate the distance deviation of the sample freight vehicle by combining the actual distance value of W1 to the actual distance value of Wa and the preset distance value of W1 to the preset distance value of Wa;
[0116] Step S337: Analyze the transportation direction of the sample freight vehicle according to the sample periodic coordinate system, and obtain the transportation angle deviation corresponding to the sample freight vehicle based on the analysis results;
[0117] Step S337 further includes the following steps:
[0118] In the sample period coordinate system, connect the actual position of W1 with the actual position of W2 to obtain the first actual transportation trajectory line, connect the actual position of W2 with the actual position of W3 to obtain the second actual transportation trajectory line, and so on. Connect the actual position of Wc-1 with the actual position of Wc to obtain the (c-1)th actual transportation trajectory line.
[0119] Connect the preset position W1 with the preset position W2 to obtain the first preset transportation trajectory line; connect the preset position W2 with the preset position W3 to obtain the second preset transportation trajectory line; and so on. Connect the preset position Wc-1 with the preset position Wc to obtain the (c-1)th preset transportation trajectory line.
[0120] Draw the extension line of the first actual transportation trajectory line until the extension line intersects the x-axis. Obtain the angle between the extension line of the first actual transportation trajectory line and the positive half-axis of the x-axis to obtain the transportation direction angle of the first actual trajectory.
[0121] Repeat the process of obtaining the first actual trajectory transportation direction angle to obtain the trajectory transportation direction angles corresponding to the second actual transportation trajectory line to the (c-1)th actual transportation trajectory line and the first preset transportation trajectory line to the (c-1)th preset transportation trajectory line respectively, and obtain the first preset trajectory transportation direction angle to the (c-1)th preset trajectory transportation direction angle.
[0122] Calculate the difference between the first actual trajectory transport direction angle and the first preset trajectory transport direction angle, and take the absolute value of the difference to obtain the first transport direction angle deviation. Similarly, calculate the difference between the (c-1)th actual trajectory transport direction angle and the (c-1)th preset trajectory transport direction angle, and take the absolute value of the difference to obtain the (c-1)th transport direction angle deviation.
[0123] The average value of the transportation direction angle from the first preset trajectory to the (c-1)th preset trajectory is calculated to obtain the preset mean direction angle. The average value of the deviation of the first transportation direction angle to the (c-1)th transportation direction angle is calculated to obtain the mean direction angle deviation. The ratio of the mean direction angle deviation to the preset mean direction angle is calculated to obtain the transportation angle deviation degree corresponding to the sample freight body.
[0124] Step S338: Calculate the transportation trajectory deviation corresponding to the sample freight entity by combining the transportation angle deviation and the positional distance deviation;
[0125] Step S339: Obtain the reasonable range of trajectory deviation. If the transportation trajectory deviation is within the reasonable range, there is no need to issue a trajectory deviation warning for the sample freight entity. If the transportation trajectory deviation is not within the reasonable range, then issue a trajectory deviation warning for the sample freight entity.
[0126] Step S34: Perform traceability analysis on the traceable data from the second type to the traceable data of the b type respectively.
[0127] It should be noted here that:
[0128] The above steps utilize a blockchain to perform real-time transportation data analysis and traceability for freight entities. In the process of tracing real-time location deviations, the integration of transportation distance and angle deviations provides early warnings for freight entities, offering the following advantages:
[0129] By constructing a trusted data chain for freight transport entities using blockchain technology, and combining the dual deviation analysis of transport distance and angle to achieve real-time trajectory monitoring and dynamic early warning, the safety and transparency of the transport process can be significantly improved. The immutability of blockchain ensures the traceability of transport data throughout the entire process, providing a reliable data storage foundation for freight transport entities.
[0130] Multidimensional deviation analysis, by combining linear and directional deviations of the transportation path, more accurately identifies abnormal transportation behavior. This mechanism not only enhances data collaboration and trust among all links in the supply chain, but also quickly locates problem nodes when anomalies occur, providing support for timely intervention and decision-making, and ultimately achieving a dual improvement in transportation efficiency and safety.
[0131] Secondly, please refer to Figure 2 Based on another concept of the same invention, a port data traceability system is proposed, comprising a data acquisition module, a data storage module, a data traceability module, and a server. The data acquisition module, the data storage module, and the data traceability module are respectively connected to the server, and the server controls the data acquisition module, the data storage module, and the data traceability module respectively.
[0132] The data acquisition module acquires the real-time collection period and the historical storage period of port data. It performs data segment access volume analysis on the port data stored on SSD during the historical storage period and obtains the historical data volume labeling queue based on the analysis results to obtain the port historical analysis data.
[0133] Specifically as follows:
[0134] The cargo ports that need to be traced are acquired, resulting in multiple cargo ports. Then, one target cargo port is randomly selected from the acquired multiple cargo ports.
[0135] During the process of collecting port data for the target cargo port, the time point corresponding to the current moment is set as the first period feature time point, the time point corresponding to the feature storage duration before the first period feature time point is set as the second period feature time point, and the time point corresponding to the feature storage duration before the second period feature time point is set as the third period feature time point.
[0136] The time period between the first period feature time point and the second period feature time point is set as the real-time acquisition period for port data, and the time period between the second period feature time point and the third period feature time point is set as the historical storage period for port data.
[0137] It should be noted here that:
[0138] In this application, the feature storage duration referred to herein is specifically the transportation duration of the target freight entity at the port;
[0139] Perform data segment analysis on port data that is in the historical storage period of port data, and obtain the historical segment queue based on the analysis results;
[0140] Specifically as follows:
[0141] The port data stored on SSDs within the historical storage period of the port data is acquired by the distributed storage device, and the acquired port data is divided into several historical data segments. A sample data segment is randomly selected from the acquired data segments.
[0142] It should be noted here that:
[0143] In this application, the SSD referred to herein is a storage medium involved in a distributed storage device, and the storage medium corresponding to the distributed storage device here includes SSD and HDD.
[0144] The data segments involved here refer to the smallest access unit corresponding to port data. For structured data, the smallest access unit is a row or field, and for unstructured data, the smallest access unit is an object or frame.
[0145] The interval between the third periodic characteristic time point and the current time is obtained to obtain the periodic interval duration;
[0146] The port data traceability system obtains the number of times each data segment is accessed during the historical storage period of port data, and the average number of accesses of multiple segments is calculated to obtain the average number of accesses of the segment in the first period.
[0147] The port data traceability system obtains the number of times each data segment is accessed during the real-time acquisition cycle of port data, and the average number of accesses of multiple segments is calculated to obtain the average number of accesses of segments in the second cycle.
[0148] The average number of visits per period is calculated by summing the average number of visits per period segment with the average number of visits per period segment.
[0149] Perform access frequency analysis on sample data segments, and obtain the access frequency index corresponding to the sample data segments based on the analysis results;
[0150] Specifically as follows:
[0151] The storage duration of the sample data segment is obtained by calculating the distributed storage duration corresponding to the sample data segment.
[0152] The number of times the port data traceability system accesses the sample data segment during the historical storage period of port data is obtained to get the number of times the first sample segment is accessed. The number of times the port data traceability system accesses the sample data segment during the real-time acquisition period of port data is obtained to get the number of times the second sample segment is accessed. The sum of the number of times the first sample segment is accessed and the number of times the second sample segment is accessed is calculated to get the number of times the sample segment is accessed in the period.
[0153] The access frequency index corresponding to the sample data segment is obtained by calculating the number of accesses in the periodic sample segment, the average number of accesses in the periodic sample segment, the storage duration of the sample segment, and the periodic interval duration.
[0154] The access frequency index corresponding to the sample data segment is calculated using the following formula:
[0155] ;
[0156] Where Pfw is the access frequency index corresponding to the sample data segment, Ydp is the number of times the sample segment is accessed in a period, Zfc is the average number of times the segment is accessed in a period, Ysc is the storage duration of the sample segment, and Zsc is the period interval duration.
[0157] It should be noted here that:
[0158] In this application, the measured number of accesses per period of the sample fragment was 20, the average number of accesses per period of the fragment was 38, the storage time of the sample fragment was 61h, and the period interval was 97h. Therefore, the access frequency index corresponding to the sample data fragment can be calculated to be 0.323.
[0159] Repeat the process of obtaining the access frequency index corresponding to the sample data segment, obtain the access frequency index corresponding to each historical data segment, sort the obtained access frequency indices in ascending order, and mark the multiple obtained historical data segments as historical data segment P1 to historical data segment Pa according to the ascending order. Store historical data segments P1 to historical data segment Pa as elements to obtain the historical segment queue.
[0160] It should be noted here that:
[0161] In the historical data segments P1 to Pa, P1, P2, P2...Pa are the numbers corresponding to the historical data segments, and a is the quantity value corresponding to the historical data segment, and a is an integer greater than 0.
[0162] The data volume corresponding to historical data segments P1 to Pa is obtained respectively, and the segment storage volume Q1 to segment storage volume Qa are obtained.
[0163] Please see Figure 3In the historical fragment queue, the storage quantity Q1 of the fragment is synchronized to the queue element corresponding to the historical data fragment P1 to obtain the historical queue element T1. The sum of the storage quantities Q1 and Q2 of the fragment is synchronized to the queue element corresponding to the historical data fragment P2 to obtain the historical queue element T2. The sum of the storage quantities Q1 to Q3 of the fragment is synchronized to the queue element corresponding to the historical data fragment P3 to obtain the historical queue element T3. And so on, the sum of the storage quantities Q1 to Qa of the fragment is synchronized to the queue element corresponding to the historical data fragment Pa to obtain the historical queue element T1. Thus, the historical data quantity labeling queue is obtained.
[0164] The real-time data collection cycle of port data, the historical storage cycle of port data, and the historical data volume labeling queue are defined as port historical analysis data.
[0165] The data storage module analyzes the amount of real-time data to be stored generated by the target cargo port during the real-time data collection period, and stores the real-time data to be stored based on the analysis results to obtain the port storage data.
[0166] Specifically as follows:
[0167] Obtain historical port analysis data, and based on the historical port analysis data, obtain the real-time data collection cycle and the historical data volume labeling queue.
[0168] Real-time analysis of port data is performed on target cargo ports that are in the real-time port data collection cycle. Based on the analysis results, the real-time port data collection cycle is divided into a first data storage period and a second data storage period.
[0169] Specifically as follows:
[0170] The port data generated during the real-time port data collection period of the target cargo port is acquired to obtain real-time data to be stored.
[0171] It should be noted here that:
[0172] In this application, all real-time data to be stored has been preprocessed. The data preprocessing process includes, but is not limited to, deleting duplicate values, filling missing values, and handling outliers in the collected raw data.
[0173] In this application, the port data referred to herein includes, but is not limited to, data generated during cargo loading, unloading, and transportation.
[0174] The data storage volume corresponding to the real-time data to be stored is obtained to get the required storage capacity. The data storage capacity that the SSD storage medium can store at the current moment is obtained to get the remaining capacity of the target medium.
[0175] If the required storage capacity is less than or equal to the remaining capacity of the target medium, the real-time acquisition period of port data is divided into the first data storage period. If the required storage capacity is greater than the remaining capacity of the target medium, the real-time acquisition period of port data is divided into the second data storage period.
[0176] If the real-time data acquisition period for port data is the first data storage period, then the real-time data to be stored will be directly stored to the SSD storage medium to obtain the port storage data.
[0177] If the real-time data collection period for port data is the second data storage period, then the real-time data to be stored and the historical data volume labeling queue will be analyzed for data volume. Based on the analysis results, the real-time data to be stored will be stored to obtain the port storage data.
[0178] Specifically as follows:
[0179] Obtain the historical data volume labeling queue, and obtain the historical queue elements T1 to T1 in the historical data volume labeling queue, and obtain the labeled data volume corresponding to the historical queue elements T1 to T1, to obtain the first cumulative labeled data volume to the a-th cumulative labeled data volume;
[0180] It should be noted here that:
[0181] In this application, the first cumulative labeled data amount involved here is equal to the fragment storage amount Q1, the second cumulative labeled data amount involved here is equal to the sum of fragment storage amounts Q1 to Q2, and so on, the a-th cumulative labeled data amount involved here is equal to the sum of fragment storage amounts Q1 to Qa.
[0182] Calculate the difference between the required storage capacity and the remaining capacity of the target medium to obtain the SSD expansion capacity;
[0183] If the SSD expansion capacity is equal to the amount of cumulative labeled data of the i-th generation, then historical queue elements T1 to Ti will be transferred to the HDD storage medium. After the transfer is completed, the real-time data to be stored will be stored to the SSD storage medium.
[0184] It should be noted here that:
[0185] In this application, the i-th cumulative labeled data volume involved herein can be any cumulative labeled data volume between the first cumulative labeled data volume and the a-th cumulative labeled data volume;
[0186] If the SSD expansion capacity is between the i-th cumulative labeled data volume and the i+1-th cumulative labeled data volume, then historical queue elements T1 to Ti+1 will be transferred to the HDD storage medium. After the transfer is completed, the real-time data to be stored will be stored to the SSD storage medium.
[0187] The data traceability module screens the freight entities corresponding to the port's stored data, verifies the traceability information of each freight entity, and issues freight warnings based on the traceability verification results.
[0188] Specifically as follows:
[0189] Acquire port storage data, and acquire the freight entities contained in the port storage data. Then, arbitrarily select one sample freight entity from the acquired multiple freight entities, and set the storage data involved in the port storage data of the sample freight entity as the sample freight storage data.
[0190] It should be noted here that:
[0191] In this application, the freight carrier involved here is specifically a port cargo automated transport vehicle, which is an unmanned driving device that realizes automated horizontal transport of goods within the port, and achieves efficient, accurate and safe container handling operations through the integration of multiple technologies.
[0192] The sample freight storage data involved here specifically refers to the transportation data and cargo data registered by the sample freight entity before transportation. The transportation data involved here includes, but is not limited to, transportation routes, transportation plans, and transportation destinations. The cargo data involved here includes, but is not limited to, cargo type, cargo quality, and cargo storage type.
[0193] The sample freight entity blockchain is created by using an existing blockchain platform. The sample freight storage data is divided into several different types of traceable data, which are named from Type I traceable data to Type b traceable data. The Type I traceable data to Type b traceable data are set into several blocks and synchronized to the sample entity blockchain.
[0194] It should be noted here that:
[0195] In this application, 1, 2, 3...b in the first type of traceable data to the b type of traceable data are the numbers corresponding to different types of traceable data.
[0196] In this application, the first type of traceable data may be the real-time location of the sample freight entity, the second type of traceable data may be the remaining transportation time of the sample freight entity, and the third type of traceable data may be the remaining fuel of the sample freight entity.
[0197] If the first type of traceable data is the real-time location corresponding to the sample freight entity, then the sample freight entity is analyzed for location deviation through the sample entity blockchain. Based on the analysis results, the real-time location deviation degree corresponding to the sample freight entity is obtained, and the real-time location deviation degree is analyzed and warned.
[0198] Specifically as follows:
[0199] During the location monitoring of the sample freight carrier, the current time point is set as the end time point of the cycle and the real-time location monitoring cycle is set.
[0200] The real-time location of the sample freight entity synchronized to the sample entity blockchain during the real-time location monitoring period is obtained, and the real-time location is set as W1 actual location to Wc actual location according to the synchronization order.
[0201] It should be noted here that:
[0202] In this application, W1, W2, W3...Wc in the actual positions W1 to Wc are all actual position numbers, and c is the quantity value corresponding to the actual position, and c is an integer greater than 0.
[0203] The time values from the actual location of W1 to the actual location of Wc are synchronized to the blockchain of the sample subject, respectively, to obtain the synchronization time point from the location of W1 to the location of Wc.
[0204] The sample entity blockchain is used to obtain the preset transportation route corresponding to the sample freight entity. Based on the preset transportation route, the preset locations corresponding to the W1 location synchronization time point to the Wc location synchronization time point are obtained respectively, thus obtaining the preset locations from W1 to Wc.
[0205] It should be noted here that:
[0206] In this application, the preset transportation route referred to herein is specifically the transportation route determined in advance by the sample freight carrier at the cargo port.
[0207] Obtain the port map corresponding to the sample freight entity to obtain the sample port map. In the sample port map, set the position of the sample freight entity at the end of the cycle as the origin of the coordinate system and create a Cartesian coordinate system to obtain the sample cycle coordinate system.
[0208] It should be noted here that:
[0209] In this application, a north-south straight line is drawn through the origin to obtain the y-axis of the sample periodic coordinate system, and an east-west straight line is drawn through the origin to obtain the x-axis of the sample periodic coordinate system.
[0210] Please see Figure 4 In the sample periodic coordinate system, obtain the distance value from the preset position of W1 to the preset position of Wc and the origin of the coordinate system, obtain the distance value from the preset distance value of W1 to the preset distance value of Wa, obtain the distance value from the actual position of W1 to the actual position of Wc and the origin of the coordinate system, and obtain the distance value from the actual distance value of W1 to the actual distance value of Wa.
[0211] The distance deviation of the sample freight vehicle is obtained by calculating the distance between the actual distance value of W1 and the actual distance value of Wa, as well as the distance between the preset distance value of W1 and the preset distance value of Wa.
[0212] The location distance deviation corresponding to the sample freight carrier is calculated using the following formula:
[0213] ;
[0214] Where Wpd is the location distance deviation corresponding to the sample freight entity, Ysji is the preset distance value of Wi, Sjji is the actual distance value of Wi, and c is the quantity value corresponding to the actual location.
[0215] It should be noted here that:
[0216] In this application, the Wi preset distance value can be any preset distance value from W1 preset distance value to Wa preset distance value, and the Wi actual distance value can be any actual distance value from W1 actual distance value to Wa actual distance value.
[0217] The transportation direction of the sample freight vehicle is analyzed based on the sample periodic coordinate system, and the transportation angle deviation of the sample freight vehicle is obtained based on the analysis results.
[0218] Specifically as follows:
[0219] In the sample period coordinate system, connect the actual position of W1 with the actual position of W2 to obtain the first actual transportation trajectory line, connect the actual position of W2 with the actual position of W3 to obtain the second actual transportation trajectory line, and so on. Connect the actual position of Wc-1 with the actual position of Wc to obtain the (c-1)th actual transportation trajectory line.
[0220] Connect the preset position W1 with the preset position W2 to obtain the first preset transportation trajectory line; connect the preset position W2 with the preset position W3 to obtain the second preset transportation trajectory line; and so on. Connect the preset position Wc-1 with the preset position Wc to obtain the (c-1)th preset transportation trajectory line.
[0221] Please see Figure 5Draw the extension line of the first actual transportation trajectory line until the extension line intersects the x-axis, obtain the angle between the extension line of the first actual transportation trajectory line and the positive half axis of the x-axis, and obtain the transportation direction angle of the first actual trajectory line.
[0222] Repeat the process of obtaining the first actual trajectory transportation direction angle to obtain the trajectory transportation direction angles corresponding to the second actual transportation trajectory line to the (c-1)th actual transportation trajectory line and the first preset transportation trajectory line to the (c-1)th preset transportation trajectory line respectively, and obtain the first preset trajectory transportation direction angle to the (c-1)th preset trajectory transportation direction angle.
[0223] It should be noted here that:
[0224] All the trajectory transport direction angles mentioned here are positive values. If the transport trajectory line is parallel to the x-axis, then the trajectory transport direction angle is 0.
[0225] Calculate the difference between the first actual trajectory transport direction angle and the first preset trajectory transport direction angle, and take the absolute value of the difference to obtain the first transport direction angle deviation. Similarly, calculate the difference between the (c-1)th actual trajectory transport direction angle and the (c-1)th preset trajectory transport direction angle, and take the absolute value of the difference to obtain the (c-1)th transport direction angle deviation.
[0226] The average value of the transportation direction angle from the first preset trajectory to the (c-1)th preset trajectory is calculated to obtain the preset mean direction angle. The average value of the deviation of the first transportation direction angle to the (c-1)th transportation direction angle is calculated to obtain the mean direction angle deviation. The ratio of the mean direction angle deviation to the preset mean direction angle is calculated to obtain the transportation angle deviation degree corresponding to the sample freight body.
[0227] It should be noted here that:
[0228] The transport angle deviation involved here does not take into account the situation where the freight carrier readjusts its position.
[0229] The deviation of the transportation trajectory corresponding to the sample freight entity is obtained by calculating the deviation of the transportation angle and the deviation of the location distance.
[0230] The formula for calculating the deviation of the transportation trajectory is as follows:
[0231] ;
[0232] Wherein, Hgp is the transport trajectory deviation, Wpd is the position distance deviation, and Jpc is the transport angle deviation;
[0233] Obtain a reasonable range for the trajectory deviation. If the trajectory deviation is within the reasonable range, there is no need to issue a trajectory deviation warning for the sample freight vehicle. If the trajectory deviation is not within the reasonable range, then a trajectory deviation warning will be issued for the sample freight vehicle.
[0234] It should be noted here that:
[0235] In this application, the absence of trajectory deviation warning for sample freight entities includes situations where the transportation trajectory deviation is within the reasonable range of trajectory deviation.
[0236] The lower limit of the reasonable range for trajectory deviation is 0, meaning there is no trajectory deviation. Several historical freight entities that have exhibited trajectory deviation are obtained, and the transportation trajectory deviation corresponding to each freight entity is obtained. The transportation trajectory deviation with the smallest value is set as the upper limit of the reasonable range for trajectory deviation.
[0237] Repeat the process of performing traceability analysis on the first type of traceable data, and then perform traceability analysis on the second type of traceable data up to the b type of traceable data.
[0238] Thirdly, a port data traceability device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program performs the above operations when executed by the processor.
[0239] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A port data traceability method, characterized in that, include: Step S1: Analyze the access volume of port data stored on SSD during the historical storage period of port data at the target cargo port, obtain the historical data volume labeling queue based on the analysis results, and obtain the port historical analysis data. Step S11: Obtain the cargo ports that need to be traced, obtain multiple cargo ports, and arbitrarily select a target cargo port from among the cargo ports. Step S12: Set the real-time data collection period and the historical data storage period for the target cargo ports respectively; Step S13: Collect data segments from port data that are in the port data historical storage period to obtain historical data segments P1 to Pa, and obtain the historical segment queue by analyzing historical data segments P1 to Pa. Step S14: Obtain the data volume corresponding to historical data segments P1 to Pa respectively, and obtain the segment storage volume Q1 to segment storage volume Qa; Step S15: In the historical fragment queue, synchronize the fragment storage quantity Q1 to the queue element corresponding to the historical data fragment P1 to obtain the historical queue element T1. Synchronize the sum of fragment storage quantity Q1 to fragment storage quantity Qa to the queue element corresponding to the historical data fragment Pa to obtain the historical queue element Ta. The historical data quantity labeling queue is obtained. Step S16: Define the real-time acquisition cycle of port data, the historical storage cycle of port data, and the historical data volume labeling queue as port historical analysis data; Step S2: Analyze the amount of real-time data to be stored generated by the target cargo port during the real-time data collection period, and store the real-time data to be stored based on the analysis results to obtain the port storage data. Step S21: Obtain historical port analysis data, and obtain the real-time data collection cycle and historical data volume labeling queue based on the historical port analysis data; Step S22: Perform real-time port data analysis on the target cargo port in the real-time port data collection period, and divide the real-time port data collection period into a first data storage period and a second data storage period. Step S23: Directly store the real-time data to be stored during the first data storage period to the SSD storage medium to obtain the port storage data; Step S24: Perform data volume analysis on the real-time data to be stored and the historical data volume labeling queue in the second data storage period, store the real-time data to be stored, and obtain the port storage data; Step S3: Screen the freight entities corresponding to the port storage data, verify the traceability information of the freight entities based on the screening results, and issue freight warnings based on the traceability verification results; Step S31: Obtain port storage data, and obtain the freight entities contained in the port storage data. Then, arbitrarily select a sample freight entity from the multiple freight entities obtained, and set the storage data involved in the port storage data of the sample freight entity as the sample freight storage data. Step S32: Create a blockchain for the sample freight entity to obtain the sample entity blockchain. Divide the sample freight storage data into traceable data of type I to type b, set it into several blocks, and synchronize it to the sample entity blockchain. Step S33: If the first type of traceable data is the real-time location corresponding to the sample freight entity, then the sample freight entity is analyzed for location deviation through the sample entity blockchain, the real-time location deviation degree corresponding to the sample freight entity is obtained according to the analysis results, and the real-time location deviation degree is analyzed and warned. Step S34: Perform traceability analysis on the traceable data from the second type to the traceable data of the b type respectively.
2. The port data traceability method according to claim 1, characterized in that, Step S13 further includes the following steps: The port data stored on SSDs within the historical storage period of the port data is acquired by the distributed storage device. The acquired port data is divided into several historical data segments. A sample data segment is randomly selected from the acquired data segments, and the period interval is obtained. Obtain the average number of visits to the first period segment and the average number of visits to the second period segment, calculate the sum of the average number of visits to the first period segment and the average number of visits to the second period segment to obtain the average number of visits per period segment. Perform access frequency analysis on sample data segments and obtain the access frequency index corresponding to the sample data segments based on the analysis results; Obtain the access frequency index corresponding to each historical data segment, mark the multiple historical data segments as historical data segment P1 to historical data segment Pa respectively, store the marked historical data segments as elements, and obtain the historical segment queue.
3. The port data traceability method according to claim 1, characterized in that, Step S24 further includes the following steps: Obtain the historical data volume labeling queue, obtain the labeled data volume corresponding to historical queue element T1 to historical queue element Ta, and obtain the first cumulative labeled data volume to the a-th cumulative labeled data volume; Obtain the required storage capacity and the remaining capacity of the target medium, calculate the difference between the required storage capacity and the remaining capacity of the target medium, and obtain the SSD expansion capacity; If the SSD expansion capacity is equal to the amount of cumulative labeled data of the i-th generation, then historical queue elements T1 to Ti are transferred to the HDD storage medium, and the real-time data to be stored is stored to the SSD storage medium. If the SSD expansion capacity is between the i-th cumulative labeled data volume and the i+1-th cumulative labeled data volume, then historical queue elements T1 to Ti+1 will be transferred to the HDD storage medium, and the real-time data to be stored will be stored to the SSD storage medium.
4. The port data traceability method according to claim 3, characterized in that, Step S33 further includes the following steps: Step S331: During the location monitoring of the sample freight vehicle, a real-time location monitoring cycle is set; Step S332: Obtain the real-time location of the sample freight entity synchronized to the sample entity blockchain within the real-time location monitoring period, and set the real-time location as W1 actual location to Wc actual location according to the synchronization order. Obtain the time value of the synchronization from W1 actual location to Wc actual location to the sample entity blockchain to obtain the synchronization time point from W1 location to Wc location. Step S333: Obtain the preset transportation route corresponding to the sample freight entity through the sample entity blockchain, and obtain the preset positions corresponding to the W1 location synchronization time point to the Wc location synchronization time point according to the preset transportation route, so as to obtain the preset positions from W1 to Wc. Step S334: In the sample port map, set the position of the sample cargo carrier at the end of the cycle as the origin of the coordinate system, create a plane rectangular coordinate system, and obtain the sample cycle coordinate system; Step S335: Obtain the distance value from the preset position of W1 to the preset position of Wc and the origin of the coordinate system, obtain the distance value from the preset distance value of W1 to the preset distance value of Wa, obtain the distance value from the actual position of W1 to the actual position of Wc and the origin of the coordinate system, and obtain the distance value from the actual distance value of W1 to the actual distance value of Wa. Step S336: Calculate the distance deviation of the sample freight vehicle by combining the actual distance value of W1 to the actual distance value of Wa and the preset distance value of W1 to the preset distance value of Wa; Step S337: Analyze the transportation direction of the sample freight vehicle according to the sample periodic coordinate system and obtain the transportation angle deviation corresponding to the sample freight vehicle. Step S338: Calculate the transportation trajectory deviation corresponding to the sample freight entity by combining the transportation angle deviation and the positional distance deviation; Step S339: Obtain the reasonable range of trajectory deviation. If the transportation trajectory deviation is within the reasonable range, there is no need to issue a trajectory deviation warning for the sample freight entity. If it is not within the reasonable range, then issue a trajectory deviation warning for the sample freight entity.
5. A port data traceability method according to claim 4, characterized in that, Step S337 further includes the following steps: In the sample period coordinate system, connect the actual position of W1 with the actual position of W2 to obtain the first actual transportation trajectory line, and connect the actual position of Wc-1 with the actual position of Wc to obtain the (c-1)th actual transportation trajectory line. Connect the preset positions W1 and W2 to obtain the first preset transportation trajectory line; connect the preset positions Wc-1 and Wc to obtain the (c-1)th preset transportation trajectory line. Draw the extension line of the first actual transportation trajectory line until the extension line intersects the x-axis. Obtain the angle between the extension line of the first actual transportation trajectory line and the positive half-axis of the x-axis to obtain the transportation direction angle of the first actual trajectory. Obtain the trajectory transportation direction angles corresponding to the second actual transportation trajectory line to the (c-1)th actual transportation trajectory line and the first preset transportation trajectory line to the (c-1)th preset transportation trajectory line respectively, and obtain the first preset trajectory transportation direction angle to the (c-1)th preset trajectory transportation direction angle; Calculate the difference between the first actual trajectory transport direction angle and the first preset trajectory transport direction angle to obtain the first transport direction angle deviation; calculate the difference between the (c-1)th actual trajectory transport direction angle and the (c-1)th preset trajectory transport direction angle to obtain the (c-1)th transport direction angle deviation. The average value of the acquired preset trajectory transportation direction angle is calculated to obtain the preset average direction angle. The average value of the acquired transportation direction angle deviation is calculated to obtain the average direction angle deviation. The ratio of the average direction angle deviation to the preset average direction angle is calculated to obtain the transportation angle deviation degree corresponding to the sample freight entity.
6. A port data traceability system, applicable to the port data traceability method described in any one of claims 1-5, characterized in that, The traceability system includes: Data acquisition module: Analyzes the access volume of port data stored on SSD during the historical storage period of the target cargo port, obtains the historical data volume labeling queue based on the analysis results, and obtains the port historical analysis data; Data storage module: Analyzes the amount of real-time data to be stored generated by the target cargo port during the real-time data collection period, and stores the real-time data to be stored based on the analysis results to obtain the port storage data; Data traceability module: Screens the freight entities corresponding to the port's stored data, verifies the traceability information of the freight entities based on the screening results, and issues freight warnings based on the traceability verification results.
7. A port data traceability device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data tracing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for identifying ship pre-abutting port
CN117808153A
Electronic management method and system for international standardization organization system files
CN119088761A