Container tracking data processing method based on machine learning
Through the container tracking data processing method based on machine learning, the container loading and unloading difficulty index and transportation urgency index are calculated, and combined with the port loading and unloading capabilities, the container loading and unloading order is predicted, which solves the problem that the container scheduling method in the existing technology fails to effectively consider transportation time and loading and unloading difficulty, and achieves the improvement of container loading and unloading efficiency and the optimization of port throughput.
Patent Information
- Application Number
- CN202411639061.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The existing container scheduling methods fail to effectively consider the transportation time and loading and unloading of containers to destinations, resulting in some containers not reaching the destination on time, and the port throughput failed to maximize, reducing the port's use efficiency.
Using machine learning-based container tracking data processing method, the loading and unloading difficulty index and transportation urgency index of each container are calculated by obtaining sample data of containers and ports, and combining the loading and unloading capabilities of ports, the loading and unloading priority index of each container is determined, and finally the loading and unloading order of containers is predicted using a random forest model.
It improves container loading and unloading efficiency, increases the possibility of containers reaching their destination on time, and improves port throughput and usage efficiency.
Smart Images

Figure CN119151411B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a container tracking data processing method based on machine learning. Background Art
[0002] With the development of the national economy and the transportation industry, the demand for cargo transportation is high. And due to the high safety, high efficiency of loading and unloading and transportation, and convenient transportation mode conversion of containers, the importance of containers in the cargo transportation industry is extremely prominent, which in turn makes the throughput of port containers large, resulting in huge pressure on the loading and unloading of port containers. Therefore, in order to improve the efficiency of cargo transportation and alleviate the pressure of container loading and unloading, a container scheduling method is needed.
[0003] Currently, ports load and unload containers in sequence according to the arrival time of the containers, without considering the transportation time of each container to the destination and the difficulty of loading and unloading each container. As a result, when loading and unloading containers using the existing container scheduling method, not only may some containers fail to arrive at the destination within the specified time, but the port's throughput may also fail to reach the maximum throughput, reducing the port's utilization efficiency. Summary of the invention
[0004] The present invention provides a container tracking data processing method based on machine learning to solve the existing problems.
[0005] The container tracking data processing method based on machine learning of the present invention adopts the following technical solutions:
[0006] The present invention proposes a container tracking data processing method based on machine learning, which comprises the following steps:
[0007] According to the port database, sample data of containers and sample data of ports are obtained, and a number of containers are divided into a training set and a validation set; the sample data of containers includes data of a number of different dimensions, and the sample data of ports includes data of a number of different dimensions;
[0008] According to the data of several dimensions in the sample data of each container, the loading and unloading difficulty index of each container is obtained;
[0009] According to the data of multiple dimensions in the sample data of each container, the transportation urgency index of each container is obtained;
[0010] According to the sample data of the port, the port loading and unloading capacity is obtained;
[0011] According to the port loading and unloading capacity, the loading and unloading difficulty index of each container and the transportation urgency index, the loading and unloading priority index of each container is obtained; according to the loading and unloading priority index of each container in the verification set, the loading and unloading order of the containers in the verification set is obtained;
[0012] The random forest model is used to obtain a container loading and unloading order prediction model. According to the loading and unloading order of the containers in the validation set, the loss function of the container loading and unloading prediction model is obtained, and then the final container loading and unloading order prediction model is obtained.
[0013] Furthermore, the method of obtaining sample data of containers and sample data of ports according to the port database and dividing a number of containers into a training set and a validation set includes the following specific methods:
[0014] Obtain the size, weight, distance from the destination to the port, type, remaining transportation time of the containers in the port, the batch to which the containers belong, the delay time before the containers arrive at the port, the time the containers wait for loading and unloading at the port, the time from the port to the destination of the containers under normal circumstances, whether the cargo loaded in the containers contains fragile goods, whether the cargo loaded in the containers contains goods with corrosive characteristics, whether the cargo loaded in the containers contains goods with special storage requirements, the fragility index of fragile goods in the cargo loaded in the containers, the corrosion intensity of goods with corrosive characteristics in the cargo loaded in the containers, the storage conditions of goods with special storage requirements in the cargo loaded in the containers, and the possibility of bad weather on the way from the port to the destination of the containers; obtain data of several dimensions of each container and use them as sample data of each container;
[0015] Obtain the availability of port loading and unloading equipment at the current time, the container density of the port yard, and the The average loading and unloading time of the port containers in the day was calculated to obtain the sample data of the port; Indicates the preset collection duration;
[0016] The containers are evenly divided into training sets and validation sets.
[0017] Furthermore, the loading and unloading difficulty index of each container is obtained according to the data of several dimensions in the sample data of each container, including the specific method of:
[0018]
[0019] In the formula, Indicates The loading and unloading difficulty index of each container, Indicates The number of container types in the batch of containers, Indicates The weight of the container, Indicates The volume of a container, Indicates The judgment coefficient of the container cargo type is When the cargo in a container contains fragile items , when fragile items are not included , when When the cargo in a container contains cargo with corrosive characteristics , does not contain goods with corrosive characteristics , when When a container contains goods with special storage requirements , does not include goods with special storage requirements ; Indicates The fragility index of the fragile items in the container, Indicates The corrosion intensity of the cargo with corrosion characteristics in the cargo loaded in the container, Indicates Storage conditions for goods with special storage requirements in each container; Represents the normalization function.
[0020] Furthermore, the transport urgency index of each container is obtained according to the data of multiple dimensions in the sample data of each container, including the specific method of:
[0021]
[0022] In the formula, Indicates The transport urgency index of containers, Indicates The distance from the container destination to the port, In normal circumstances, the distance from the port to Time to destination of container, Indicates The remaining transportation time for each container, Indicates Containers are waiting for loading and unloading time at the port. Indicates Delay time before a container arrives at the port, From the port to The probability of bad weather en route to the container destination, is an exponential function with a natural constant as base, Represents the normalization function.
[0023] Furthermore, the port loading and unloading capacity is obtained according to the sample data of the port, including the specific method of:
[0024]
[0025] In the formula, Indicates the port's loading and unloading capacity. represents the container density of the port yard, To prevent the first hyperparameter from having a denominator of 0, Indicates the availability of port loading and unloading equipment, represents the average loading and unloading time of containers at the port, Represents the sigmoid function.
[0026] Furthermore, the loading and unloading priority index of each container is obtained according to the port loading and unloading capacity, the loading and unloading difficulty index of each container and the transport urgency index, including the specific method of:
[0027]
[0028] In the formula, Indicates The loading and unloading priority index of each container, Indicates The loading and unloading difficulty index of each container, Indicates The transport urgency index of containers, Indicates the port's loading and unloading capacity. represents the second hyperparameter to prevent the denominator from being zero, is an exponential function with a natural constant as base, Represents the normalization function.
[0029] Furthermore, the loading and unloading order of the containers in the verification set is obtained according to the loading and unloading priority index of each container in the verification set, including the specific method of:
[0030] Randomly sort several containers with the same loading and unloading priority index in the validation set to obtain the corresponding container sequence of the loading and unloading priority index, and then obtain the order value of each container in the validation set in the corresponding container sequence; if there is no container with the same loading and unloading priority index in the validation set, the order value of the container in the corresponding container sequence in the validation set is 0;
[0031] The sum of the number of containers in the verification set whose loading and unloading priority index is greater than the loading and unloading priority index of any container plus 1 and the order value of the container in the corresponding container sequence in the verification set is recorded as the loading and unloading order value of the container in the verification set.
[0032] Furthermore, the random forest model is used to obtain a container loading and unloading sequence prediction model, including the following specific methods:
[0033] Using the sample data of containers in the training set and the construction method of the random forest model, a container loading and unloading order prediction model is obtained.
[0034] Furthermore, the loss function of the container loading and unloading prediction model is obtained according to the loading and unloading order of the containers in the validation set, including the specific method of:
[0035] Through the container loading and unloading sequence prediction model, the loading and unloading sequence prediction value of the containers in the verification set is obtained;
[0036] The containers in the validation set that have different loading and unloading priority indexes from other containers are recorded as non-similar containers;
[0037] The number of non-similar containers in the validation set whose loading and unloading order values are the same as the loading and unloading order prediction values is obtained, which is recorded as the second data of the validation set; the containers with the same loading and unloading priority index in the validation set are put into a combination to obtain several combinations; for any combination, the loading and unloading order value set and the loading and unloading order prediction value set of the containers in the combination are obtained, and the number of loading and unloading order values in the loading and unloading order value set in the combination that are the same as the loading and unloading order prediction value in the loading and unloading order prediction value set is obtained, which is recorded as the first data of the combination, and the sum of the first data of all combinations is recorded as the third data of the validation set;
[0038] According to the second and third data of the validation set and the number of containers in the validation set, a loss function of the container loading and unloading order prediction model is constructed.
[0039] Furthermore, the loss function of constructing the container loading and unloading sequence prediction model includes the following specific methods:
[0040]
[0041] In the formula, represents the loss function of the container loading and unloading sequence prediction model, represents the number of containers in the verification set, Represents the third data of the validation set, Represents the second data of the validation set.
[0042] The beneficial effects of the technical solution of the present invention are as follows: the present invention obtains the loading and unloading order of containers through machine learning. When calculating the loading and unloading difficulty index of containers, the weight, volume and cargo loaded in the containers are combined with the number of container categories in the batch to which each container belongs, so that the loading and unloading difficulty index of containers reflects the overall loading and unloading difficulty of all containers in the batch to which the containers belong; when obtaining the transport urgency index of containers, the distance from the port to the destination, the remaining transport time of the containers, the time from the port to the destination of the containers under normal circumstances, and the weather factors on the way from the port to the destination of the containers are combined, so that the transport urgency index of the same container under different weather conditions is different; when obtaining the loading and unloading priority index of each container, not only the loading and unloading difficulty index and the transport urgency index of the containers are considered, but also the loading and unloading capacity of the ports are combined, so that when the loading and unloading capacity of the ports changes, the loading and unloading priority index of the containers also changes, thereby increasing the possibility that the containers arrive at the destination on time; after obtaining the container loading and unloading order prediction model, the prediction result of the model is verified according to the loading and unloading order value of the containers in the verification set, so that the final prediction model of the container loading and unloading order can more effectively improve the loading and unloading efficiency of the port containers while increasing the possibility that the containers arrive at the destination on time. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 The present invention is a flowchart of the steps of the container tracking data processing method based on machine learning. DETAILED DESCRIPTION
[0045] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the container tracking data processing method based on machine learning proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0046] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0047] The specific scheme of the container tracking data processing method based on machine learning provided by the present invention is described in detail below with reference to the accompanying drawings.
[0048] See also Figure 1 , which shows a flowchart of a method for processing container tracking data based on machine learning provided by an embodiment of the present invention, the method comprising the following steps:
[0049] Step S001: According to the port database, sample data of containers and sample data of ports are obtained, and several containers are divided into a training set and a verification set.
[0050] This embodiment analyzes historical container data to obtain a dispatching method for port containers and further obtains a loading and unloading sequence for containers, so it is necessary to obtain container data and port data.
[0051] Specifically, the size, weight, distance from the destination to the port, type, remaining transportation time, batch of the container, delay time before the container arrives at the port, time for the container to wait for loading and unloading at the port, time from the port to the destination of the container under normal circumstances, whether the cargo loaded in the container contains fragile goods, whether the cargo loaded in the container contains goods with corrosive characteristics, whether the cargo loaded in the container contains goods with special storage requirements, fragility index of fragile goods in the cargo loaded in the container, corrosion intensity of goods with corrosive characteristics in the cargo loaded in the container, storage conditions of goods with special storage requirements in the cargo loaded in the container, and possibility of bad weather on the way from the port to the destination of the container are obtained from the port database. If the container does not contain fragile goods, the fragility index of fragile goods in the cargo loaded in the container is 0; if the container does not contain goods with corrosive characteristics, the corrosion intensity of goods with corrosive characteristics in the cargo loaded in the container is 0; if the container does not contain goods with special storage requirements, there are no storage conditions for goods with special storage requirements in the cargo loaded in the container. It is particularly noted that when obtaining the storage conditions of goods with special storage requirements in the cargo loaded in the container, the data of this dimension is standardized, and the possibility of bad weather on the way from the port to the container destination is directly obtained and standardized based on the weather forecast, which is not the focus of this embodiment and will not be repeated in this embodiment; then the data of several dimensions of each container are obtained and used as the sample data of each container. The sample data of each container includes data of multiple dimensions. The containers are evenly divided into training sets and validation sets.
[0052] Furthermore, from the port database, the availability of port loading and unloading equipment at the current time, the density of container in the port yard, and the number of containers before the current time are obtained. The average loading and unloading time of the port containers in the day is calculated to obtain the sample data of the port. The sample data of the port includes the availability of the port loading and unloading equipment, the loading and unloading density of the port yard containers and the average loading and unloading time of the port containers. The collection time preset in this embodiment is , this is used as an example for description, and other values may be set in other implementation modes.
[0053] At this point, we have obtained sample data of containers and sample data of ports, and divided the containers into a validation set and a training set.
[0054] Step S002: Obtain the loading and unloading difficulty index of each container based on the data of several dimensions in the sample data of each container.
[0055] It should be noted that the purpose of scheduling and sorting containers is to improve the loading and unloading efficiency of containers as much as possible. And because loading and unloading difficult containers not only takes a long time, but also puts a lot of pressure on loading and unloading equipment and workers, when the workers and loading and unloading equipment have loaded and unloaded a batch of difficult containers, the workers' efficiency in loading and unloading containers will decrease within a certain period of time. Therefore, before sorting the containers, the loading and unloading difficulty index of each container is calculated.
[0056] It should be further explained that when loading and unloading containers, the difficulty of loading and unloading containers is related to the weight and size of the containers. Therefore, the loading and unloading difficulty index of each container is calculated based on the weight and size of each container. In addition, containers loaded with fragile, perishable or special storage requirements have higher loading and unloading requirements, making the loading and unloading difficulty of containers loaded with fragile, perishable or special storage requirements greater. Therefore, the loading and unloading difficulty index of each container is calculated based on the goods loaded in each container.
[0057] It should be further explained that when loading and unloading containers, a batch of containers is loaded and unloaded at the same time. Since different types of containers may require different loading and unloading equipment and technologies, the types of containers contained in a batch of containers are related to the overall loading time of all containers in the batch of containers. Therefore, the loading and unloading difficulty index of each container in the batch of containers is calculated based on the types of containers contained in the batch of containers. So far, the loading and unloading difficulty index of each container is calculated based on the number of container types in the batch of containers, the size and weight of the containers, the type of goods stored in the containers, and the difficulty of storing the goods.
[0058] Specifically, according to the number of container types in a batch of any container, the size and weight of the container, the type of goods stored in the container, and the difficulty of storing the goods, the specific calculation formula for calculating the loading and unloading difficulty index of each container is as follows:
[0059]
[0060] In the formula, Indicates The loading and unloading difficulty index of each container, Indicates The number of container types in the batch of containers, Indicates The weight of the container, Indicates The volume of a container, Indicates The judgment coefficient of the container cargo type is When the cargo in a container contains fragile items , when fragile items are not included , when When the cargo in a container contains cargo with corrosive characteristics , does not contain goods with corrosive characteristics , when When a container contains goods with special storage requirements , does not include goods with special storage requirements ; Indicates The fragility index of the fragile items in the container, Indicates The corrosion intensity of the cargo with corrosion characteristics in the cargo loaded in the container, Indicates Storage conditions for goods with special storage requirements in each container; Represents a linear normalization function, and the normalized object is all containers .
[0061] It should be noted that The larger the The more container types a batch contains, the more important it is for the The greater the probability that different types of loading and unloading machines will be needed when loading and unloading containers in the batch of containers, the greater the probability that different types of loading and unloading machines will be needed. The greater the loading and unloading difficulty index of a container; The larger the The greater the weight of the container, the greater the The greater the loading and unloading difficulty index of a container; The larger the The larger the volume of the container, the more The greater the loading and unloading difficulty index of a container; The larger the value, the The stricter the loading and unloading requirements of the goods in the container, the more stringent the requirements are. The greater the loading and unloading difficulty index of a container.
[0062] At this point, the loading and unloading difficulty index of each container is obtained.
[0063] Step S003: Obtain the transport urgency index of each container based on the data of multiple dimensions in the sample data of each container.
[0064] It should be noted that the scheduling of containers is not only to improve the efficiency of container loading and unloading, but also to ensure that the containers can arrive at the destination on time. Therefore, the transportation urgency index of each container is calculated.
[0065] It should be further explained that the transport urgency index of each container is calculated in order to ensure that the container arrives at the destination within the specified time. Therefore, the distance from the port to the container destination, the time from the port to the container destination under normal circumstances, and the remaining transport time of the container are used as a parameter for calculating the transport urgency index of the container. Due to the weather conditions on the way from the container to the destination during the transportation of the container, the transport time of the container from the port to the destination may change. Therefore, the possibility of bad weather on the way from the container to the destination is used as a parameter for calculating the transport urgency index of the container. And the longer the delay time of a container before arriving at the port, the greater the possibility that the remaining transport time of the container is short. Therefore, the possibility of bad weather on the way from the container to the destination is used as a parameter for calculating the transport urgency index of the container. The longer the time a container waits for loading and unloading at the port, the fewer containers arrive at the port before this container, so the waiting time for loading and unloading of the container at the port is used as a parameter for calculating the transport urgency index of each container.
[0066] Specifically, the specific calculation method for obtaining the transport urgency index of each container is as follows:
[0067]
[0068] In the formula, Indicates The transport urgency index of containers, Indicates The distance from the container destination to the port, In normal circumstances, the distance from the port to Time to destination of container, Indicates The remaining transportation time for each container, Indicates Containers are waiting for loading and unloading time at the port. Indicates Delay time before a container arrives at the port, From the port to The probability of bad weather en route to the container destination, is an exponential function with a natural constant as base, Represents a linear normalization function, and the normalized object is all containers .
[0069] It should be noted that The larger the value, the closer the distance from the port to the The longer it takes for a container to reach its destination, the The more containers need to be loaded and unloaded as soon as possible; The larger the value, the If the number of containers that arrived at the port before the first container is small, the first container should be Containers are loaded and unloaded, i.e. The greater the transport urgency index of a container; The larger the value, the The longer the delay before a container arrives at the port, the The shorter the remaining transportation time of a container, the greater the probability that The greater the transport urgency index of a container; The larger the value, the The greater the probability that a container will not arrive at the destination on time, the greater the probability that the The greater the transport urgency index of a container; The larger the value, the closer the distance from the port to the The greater the probability of bad weather on the way to the container destination, the greater the probability of bad weather on the way to the container destination. The more likely it is that the time it takes to transport a container from the port to the destination will be longer, that is, The greater the transport urgency index of the container.
[0070] At this point, the transportation urgency index of each container is obtained.
[0071] Step S004: Obtain the port loading and unloading capacity based on the sample data of the port.
[0072] It should be noted that the purpose of scheduling and sorting containers is to improve the efficiency of container loading and unloading and to enable the containers to reach the destination within the specified time. Therefore, the container loading and unloading priority index is obtained according to the container transportation urgency index and loading and unloading difficulty index.
[0073] It should be further explained that, since the port loading and unloading capacity is different at different times, in order to obtain the container loading and unloading priority index based on the container transportation urgency index and the loading and unloading difficulty index, it is necessary to assign different weights to the container transportation urgency index according to the port loading and unloading capacity. Therefore, the port loading and unloading capacity is calculated.
[0074] It should be further explained that when calculating the port loading and unloading capacity, the availability of port loading and unloading equipment and the average loading and unloading time of port containers directly reflect the port loading and unloading capacity. Therefore, the availability of port loading and unloading equipment and the average loading and unloading time of port containers are used as two parameters for calculating the port loading and unloading capacity. Since the number of containers arriving at the port at each time will not be significantly different from the number of containers arriving at the port at other times, the density of port yard containers indirectly reflects the port loading and unloading capacity. Therefore, the density of port yard containers is used as a parameter for calculating the port loading and unloading capacity. The port loading and unloading capacity is calculated based on the availability of port loading and unloading equipment, the average loading and unloading time of port containers, and the density of port yard containers.
[0075] Specifically, the calculation formula for port loading and unloading capacity is as follows:
[0076]
[0077] In the formula, Indicates the port's loading and unloading capacity. represents the container density of the port yard, To prevent the first hyperparameter from having a denominator of 0, the first hyperparameter preset in this embodiment is , which is described as an example, and other values may be set in other implementation modes; Indicates the availability of port loading and unloading equipment, represents the average loading and unloading time of containers at the port, represents a sigmoid function, which is used for normalization processing in this embodiment.
[0078] It should be noted that The larger the value, the greater the availability of port loading and unloading equipment, which further indicates that the port's loading and unloading capacity is stronger; The smaller the value, the smaller the density of containers in the port yard, which indirectly reflects the faster the speed of loading and unloading containers at the port, that is, the stronger the port's loading and unloading capacity; The smaller the value, the shorter the average loading and unloading time of the port's containers, which further indicates that the port's loading and unloading capacity is stronger.
[0079] At this point, the port's loading and unloading capacity is obtained.
[0080] Step S005: Obtain the loading and unloading priority index of each container according to the port loading and unloading capacity, the loading and unloading difficulty index of each container and the transport urgency index; obtain the loading and unloading order of the containers in the verification set according to the loading and unloading priority index of each container in the verification set.
[0081] It should be noted that the purpose of scheduling the port containers and obtaining the loading and unloading order of the containers is to improve the loading and unloading efficiency of the containers and enable the containers to reach the destination within the specified time. And because the port loading and unloading capacity is different at different times, the loading and unloading priority index of the container is obtained according to the port loading and unloading capacity, the loading and unloading difficulty index of each container and the transportation urgency index; and the loading and unloading order of the container is obtained according to the loading and unloading priority index of the container.
[0082] It should be further explained that, since the container loading and unloading difficulty index does not change with the change of the port loading and unloading capacity, the port loading and unloading capacity is not used as the weight of the container loading and unloading difficulty index. Since the port loading and unloading capacity will affect the loading and unloading time of the container, and thus affect whether the container can arrive at the destination on time. Therefore, the weight of the container's transportation urgency index is adjusted by the port loading and unloading capacity, so that when the port's loading and unloading capacity is weak, the weight of the container's transportation urgency index is increased. According to the port loading and unloading capacity, the loading and unloading difficulty index and the transportation urgency index of each container, the container loading and unloading priority index is obtained.
[0083] Specifically, the specific calculation formula for the loading and unloading priority index of each container is as follows:
[0084]
[0085] In the formula, Indicates The loading and unloading priority index of each container, Indicates The loading and unloading difficulty index of each container, Indicates The transport urgency index of containers, Indicates the port's loading and unloading capacity. Indicates the second hyperparameter to prevent the denominator from being 0. The second hyperparameter preset in this embodiment , which is described as an example, and other values may be set in other implementation modes; is an exponential function with a natural constant as the base. The model shows an inverse proportional relationship. As the input of the model, the implementer can set the inverse proportional function according to the actual situation. Represents the normalization function, and its normalization object is all containers .
[0086] It should be noted that The larger the value of is, the weaker the port's loading and unloading capacity is. The transport urgency index of the container The greater the impact of the loading and unloading priority index of each container; The larger the value, the The more likely it is that a container will not arrive at its destination on time, the The more containers, the higher the priority for loading and unloading; The larger the value of When loading and unloading a container, The greater the pressure on the loading and unloading equipment and workers, the more pressure the workers will have to bear after loading and unloading the first container. The efficiency of loading and unloading containers becomes lower after the number of containers is reached. The fewer containers there are, the less priority they need to be loaded and unloaded.
[0087] At this point, the loading and unloading priority index of each container is obtained.
[0088] It should be further explained that since the container with a larger loading and unloading priority index needs more urgent loading and unloading, the loading and unloading order of the containers is obtained according to the loading and unloading priority index of each container.
[0089] Specifically, several containers with the same loading and unloading priority index in the verification set are randomly sorted to obtain the container sequence corresponding to the loading and unloading priority index, and then the order value of each container in the verification set in the corresponding container sequence is obtained; if there is no container with the same loading and unloading priority index in the verification set, the order value of the container in the corresponding container sequence in the verification set is 0. The sum of the number of containers with a loading and unloading priority index greater than any container loading and unloading priority index in the verification set plus 1 and the order value of the container in the corresponding container sequence in the verification set is recorded as the loading and unloading order value of the container in the verification set.
[0090] At this point, the loading and unloading order of the containers in the verification set is obtained.
[0091] Step S006: Use the random forest model to obtain a container loading and unloading order prediction model; obtain the loss function of the container loading and unloading prediction model according to the loading and unloading order of the containers in the validation set, and then obtain the final container loading and unloading order prediction model.
[0092] Specifically, the container loading and unloading order prediction model is obtained by using the sample data of the containers in the training set and the existing random forest model construction method. The construction method of the random forest model is a well-known technology and will not be described in detail in this embodiment.
[0093] Furthermore, the loading and unloading order prediction model of the container is used to obtain the loading and unloading order prediction value of the container in the validation set. The containers in the validation set that have different loading and unloading priority indexes from other containers are recorded as non-similar containers; the number of non-similar containers in the validation set whose loading and unloading order value is the same as the loading and unloading order prediction value is obtained, which is recorded as the second data of the validation set. The containers with the same loading and unloading priority index in the validation set are put into a combination to obtain several combinations; for any combination, the loading and unloading order value set and the loading and unloading order prediction value set of the containers in the combination are obtained, and the loading and unloading order value in the loading and unloading order value set in the combination is obtained. The number of loading and unloading order values that are the same as the numerical value of the loading and unloading order prediction value in the loading and unloading order prediction value set is recorded as the first data of the combination, and the sum of the first data of all combinations is recorded as the third data of the validation set.
[0094] According to the second and third data of the validation set and the number of containers in the validation set, the specific calculation formula of the loss function of the container loading and unloading order prediction model is as follows:
[0095]
[0096] In the formula, represents the loss function of the container loading and unloading sequence prediction model, represents the number of containers in the verification set, Represents the third data of the validation set, Represents the second data of the validation set.
[0097] It should be noted that The larger the value of , the more containers in the validation set have the same loading and unloading order value as the predicted value, which means the more accurate the container loading and unloading order prediction model is.
[0098] Further preset loss function threshold ,if , the prediction performance of the current model is poor, the parameters of the model are adjusted and optimized until the model loss function requirements are met, and the model that meets the model loss function requirements is recorded as the final prediction model of the container loading and unloading order. The specific adjustment and optimization process is the existing technology and will not be repeated in this embodiment; if , it is considered that the prediction performance of the current model is good, and the current model is recorded as the final prediction model for container loading and unloading sequence. The loss function threshold preset in this embodiment is , this is used as an example for description, and other values may be set in other implementation modes.
[0099] The final prediction model of container loading and unloading sequence is used to schedule containers.
[0100] At this point, this embodiment is completed.
[0101] To sum up, in the embodiments of the present invention, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A container tracking data processing method based on machine learning, characterized in that: The method comprises the following steps: According to the port database, sample data of containers and sample data of ports are obtained, and a number of containers are divided into a training set and a validation set; the sample data of containers includes data of a number of different dimensions, and the sample data of ports includes data of a number of different dimensions; According to the data of several dimensions in the sample data of each container, the loading and unloading difficulty index of each container is obtained; According to the data of multiple dimensions in the sample data of each container, the transportation urgency index of each container is obtained; According to the sample data of the port, the port loading and unloading capacity is obtained; According to the port loading and unloading capacity, the loading and unloading difficulty index of each container and the transportation urgency index, the loading and unloading priority index of each container is obtained; according to the loading and unloading priority index of each container in the verification set, the loading and unloading order of the containers in the verification set is obtained; A random forest model is used to obtain a container loading and unloading order prediction model. According to the loading and unloading order of the containers in the validation set, the loss function of the container loading and unloading prediction model is obtained, and then the final container loading and unloading order prediction model is obtained. The method of obtaining sample data of containers and sample data of ports according to the port database and dividing several containers into training sets and verification sets includes: Obtain the size, weight, distance from the destination to the port, type, remaining transportation time of the containers in the port, the batch to which the containers belong, the delay time before the containers arrive at the port, the time the containers wait for loading and unloading at the port, the time from the port to the destination of the containers under normal circumstances, whether the cargo loaded in the containers contains fragile goods, whether the cargo loaded in the containers contains goods with corrosive characteristics, whether the cargo loaded in the containers contains goods with special storage requirements, the fragility index of fragile goods in the cargo loaded in the containers, the corrosion intensity of goods with corrosive characteristics in the cargo loaded in the containers, the storage conditions of goods with special storage requirements in the cargo loaded in the containers, and the possibility of bad weather on the way from the port to the destination of the containers; obtain data of several dimensions of each container and use them as sample data of each container; Obtain the availability of port loading and unloading equipment at the current time, the container density of the port yard, and the The average loading and unloading time of the port containers in the day was calculated to obtain the sample data of the port; Indicates the preset collection duration; Divide the containers evenly into training sets and validation sets; The specific method of obtaining the loading and unloading difficulty index of each container based on the data of several dimensions in the sample data of each container is as follows: In the formula, Indicates The loading and unloading difficulty index of each container, Indicates The number of container types in the batch of containers, Indicates The weight of the container, Indicates The volume of a container, Indicates The judgment coefficient of the container cargo type is When the cargo in a container contains fragile items , when fragile items are not included , when When the cargo in a container contains cargo with corrosive characteristics , does not contain goods with corrosive characteristics , when When a container contains goods with special storage requirements , does not include goods with special storage requirements ; Indicates The fragility index of the fragile items in the container, Indicates The corrosion intensity of the cargo with corrosion characteristics in the cargo loaded in the container, Indicates Storage conditions for goods with special storage requirements in each container; Represents the normalization function.
2. The method for processing container tracking data based on machine learning according to claim 1, characterized in that: The method of obtaining the transport urgency index of each container according to the data of multiple dimensions in the sample data of each container includes: In the formula, Indicates The transport urgency index of containers, Indicates The distance from the container destination to the port, In normal circumstances, the distance from the port to Time to destination of container, Indicates The remaining transportation time for each container, Indicates Containers are waiting for loading and unloading time at the port. Indicates Delay time before a container arrives at the port, From the port to The probability of bad weather en route to the container destination, is an exponential function with a natural constant as base, Represents the normalization function.
3. The container tracking data processing method based on machine learning according to claim 1 is characterized in that: The specific method for obtaining the port loading and unloading capacity based on the sample data of the port is as follows: In the formula, Indicates the port's loading and unloading capacity. represents the container density of the port yard, To prevent the first hyperparameter from having a denominator of 0, Indicates the availability of port loading and unloading equipment, represents the average loading and unloading time of containers at the port, Represents the sigmoid function.
4. The container tracking data processing method based on machine learning according to claim 1 is characterized in that: The specific method of obtaining the loading and unloading priority index of each container according to the port loading and unloading capacity, the loading and unloading difficulty index of each container and the transportation urgency index includes: In the formula, Indicates The loading and unloading priority index of each container, Indicates The loading and unloading difficulty index of each container, Indicates The transport urgency index of containers, Indicates the port's loading and unloading capacity. represents the second hyperparameter to prevent the denominator from being zero, is an exponential function with a natural constant as base, Represents the normalization function.
5. The container tracking data processing method based on machine learning according to claim 1 is characterized in that: The method of obtaining the loading and unloading order of the containers in the verification set according to the loading and unloading priority index of each container in the verification set includes: Randomly sort several containers with the same loading and unloading priority index in the validation set to obtain the corresponding container sequence of the loading and unloading priority index, and then obtain the order value of each container in the validation set in the corresponding container sequence; if there is no container with the same loading and unloading priority index in the validation set, the order value of the container in the corresponding container sequence in the validation set is 0; The sum of the number of containers in the verification set whose loading and unloading priority index is greater than the loading and unloading priority index of any container plus 1 and the order value of the container in the corresponding container sequence in the verification set is recorded as the loading and unloading order value of the container in the verification set.
6. The method for processing container tracking data based on machine learning according to claim 1, characterized in that: The random forest model is used to obtain a container loading and unloading sequence prediction model, including the following specific methods: Using the sample data of containers in the training set and the construction method of the random forest model, a container loading and unloading order prediction model is obtained.
7. The method for processing container tracking data based on machine learning according to claim 1, characterized in that: The loss function of the container loading and unloading prediction model is obtained according to the loading and unloading order of the containers in the validation set, and the specific method includes: Through the container loading and unloading sequence prediction model, the loading and unloading sequence prediction value of the containers in the verification set is obtained; The containers in the validation set that have different loading and unloading priority indexes from other containers are recorded as non-similar containers; The number of non-similar containers whose loading and unloading order values are the same as the loading and unloading order prediction values in the validation set is obtained, which is recorded as the second data of the validation set; the containers with the same loading and unloading priority index in the validation set are put into a combination to obtain several combinations; for any combination, the loading and unloading order value set and the loading and unloading order prediction value set of the containers in the combination are obtained, and the number of loading and unloading order values in the loading and unloading order value set in the combination that are the same as the loading and unloading order prediction value in the loading and unloading order prediction value set is obtained, which is recorded as the first data of the combination, and the sum of the first data of all combinations is recorded as the third data of the validation set; According to the second and third data of the validation set and the number of containers in the validation set, a loss function of the container loading and unloading order prediction model is constructed.
8. The method for processing container tracking data based on machine learning according to claim 7, characterized in that: The loss function of the container loading and unloading sequence prediction model is constructed, and the specific method includes: In the formula, represents the loss function of the container loading and unloading sequence prediction model, represents the number of containers in the verification set, Represents the third data of the validation set, Represents the second data of the validation set.
Citation Information
Patent Citations
Container stockpiling planning device, container stockpiling planning system, and container stockpiling planning method
CN116157344A
Intelligent loading and unloading distribution system for port containers
CN117709820A