Cargo state change determination method and apparatus, server, and readable storage medium

By judging the similarity of cargo status images before and after transportation, and using a convolutional neural network with an attention mechanism, the problem of difficulty in monitoring changes in cargo status during logistics transportation is solved, achieving low-cost and efficient cargo status monitoring and accountability.

CN116205833BActive Publication Date: 2026-06-16SF TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SF TECH CO LTD
Filing Date
2021-11-29
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

During the logistics and transportation process, it is difficult to monitor changes in the status of goods at low cost and in an efficient manner, which makes it impossible to effectively identify damage or loss during transportation and to determine responsibility.

Method used

By acquiring images of the cargo's status before and after transportation, preprocessing them to generate dual-channel grayscale image data, using a convolutional neural network with an embedded attention mechanism to calculate image similarity, and setting a similarity threshold to judge changes in the cargo's status and generate alarm information.

Benefits of technology

It enables low-cost and efficient assessment of changes in cargo status, improves the accuracy and efficiency of liability assessment, and reduces damage and loss during transportation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116205833B_ABST
    Figure CN116205833B_ABST
Patent Text Reader

Abstract

The application provides a cargo state change determination method and device, a server and a readable storage medium. The method comprises the following steps: acquiring a first cargo state image before transportation and a second cargo state image after transportation of cargo of a to-be-detected vehicle; preprocessing the first cargo state image and the second cargo state image to obtain double-channel gray image data; determining the similarity of the double-channel gray image data; and determining whether the cargo state changes based on the similarity. According to the application, the similarity of two cargo state images before and after transportation is determined, so that the cargo state change before and after transportation can be determined at low cost and high efficiency, and the judgment accuracy and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of logistics and transportation technology, specifically to a method, apparatus, server, and readable storage medium for determining changes in the status of goods. Background Technology

[0002] With the rapid development of e-commerce, the requirements for the logistics and transportation industry are also getting higher and higher. Due to the long transportation distance, express parcels are prone to damage or loss during transportation.

[0003] Once goods are loaded into the truck, it is difficult to observe changes in the goods during transportation. During transportation, due to improper driving behavior by the driver or poor road conditions, goods may collide or tip over inside the truck, causing serious damage to the goods, but it is impossible to determine liability.

[0004] Therefore, how to determine changes in cargo status in a low-cost and efficient manner is a technical problem that urgently needs to be solved in the field of logistics and transportation technology. Summary of the Invention

[0005] This application provides a method, apparatus, server, and readable storage medium for determining changes in the state of goods, aiming to solve the problem of how to determine changes in the state of goods in a low-cost and efficient manner.

[0006] On the one hand, this application provides a method for determining changes in the state of goods, the method comprising:

[0007] Acquire the first cargo status image of the vehicle to be inspected before transportation and the second cargo status image after transportation;

[0008] The first cargo status image and the second cargo status image are preprocessed to obtain dual-channel grayscale image data;

[0009] Determine the similarity of the dual-channel grayscale image data;

[0010] Based on the similarity, it is determined whether the status of the goods has changed.

[0011] In one possible implementation of this application, determining the similarity of the dual-channel grayscale image data includes:

[0012] Extract image input features from the dual-channel grayscale image data;

[0013] Based on the image input features, the similarity of the dual-channel grayscale image data is determined.

[0014] In one possible implementation of this application, determining the similarity of the dual-channel grayscale image data based on the image input features includes:

[0015] The image input features are calculated using a pre-set convolutional neural network with an embedded attention mechanism to obtain network output data;

[0016] The network output data is input into a preset loss function to generate the similarity of the dual-channel grayscale image data.

[0017] In one possible implementation of this application, before calculating the image input features using a pre-set convolutional neural network embedded with an attention mechanism to obtain network output data, the method further includes:

[0018] Channel attention and spatial attention modules are added to the residual blocks used for feature extraction in the convolutional neural network to construct the pre-configured convolutional neural network with embedded attention mechanisms.

[0019] In one possible implementation of this application, the preprocessing of the first cargo status image and the second cargo status image to obtain a dual-channel grayscale image includes:

[0020] The first cargo status image is converted into a single-channel grayscale image data of the first channel.

[0021] The second cargo status image is converted into a single-channel second-channel grayscale image data;

[0022] The grayscale image data of the first channel and the grayscale image data of the second channel are fused to obtain dual-channel grayscale image data.

[0023] In one possible implementation of this application, determining whether the cargo status has changed based on the similarity includes:

[0024] Compare the similarity score with a preset similarity threshold;

[0025] If the similarity is greater than the preset similarity threshold, then it is determined that the status of the goods has not changed;

[0026] If the similarity is less than the preset similarity threshold, then it is determined that the status of the goods has changed.

[0027] In one possible implementation of this application, after determining that the cargo status has changed if the similarity is less than the preset similarity threshold, the method further includes:

[0028] Generate alert information indicating changes in cargo status;

[0029] The alarm information is sent to the user terminal to alert that the cargo status of the vehicle to be inspected has changed.

[0030] On the other hand, this application provides a cargo status change determination device, the device comprising:

[0031] The first acquisition unit is used to acquire a first cargo status image of the vehicle to be inspected before transportation and a second cargo status image after transportation.

[0032] The first preprocessing unit is used to preprocess the first cargo status image and the second cargo status image to obtain dual-channel grayscale image data.

[0033] The first determining unit is used to determine the similarity of the dual-channel grayscale image data;

[0034] The second determining unit is used to determine whether the status of the goods has changed based on the similarity.

[0035] In one possible implementation of this application, the first determining unit specifically includes:

[0036] The first extraction unit is used to extract image input features from the dual-channel grayscale image data;

[0037] The third determining unit is used to determine the similarity of the dual-channel grayscale image data based on the image input features.

[0038] In one possible implementation of this application, the third determining unit is specifically used for:

[0039] The image input features are calculated using a pre-set convolutional neural network with an embedded attention mechanism to obtain network output data;

[0040] The network output data is input into a preset loss function to generate the similarity of the dual-channel grayscale image data.

[0041] In one possible implementation of this application, before calculating the image input features using a pre-set convolutional neural network embedded with an attention mechanism to obtain network output data, the device is further configured to:

[0042] Channel attention and spatial attention modules are added to the residual blocks used for feature extraction in the convolutional neural network to construct the pre-configured convolutional neural network with embedded attention mechanisms.

[0043] In one possible implementation of this application, the first preprocessing unit is specifically used for:

[0044] The first cargo status image is converted into a single-channel grayscale image data of the first channel.

[0045] The second cargo status image is converted into a single-channel second-channel grayscale image data;

[0046] The grayscale image data of the first channel and the grayscale image data of the second channel are fused to obtain dual-channel grayscale image data.

[0047] In one possible implementation of this application, the second determining unit is specifically used for:

[0048] Compare the similarity score with a preset similarity threshold;

[0049] If the similarity is greater than the preset similarity threshold, then it is determined that the status of the goods has not changed;

[0050] If the similarity is less than the preset similarity threshold, then it is determined that the status of the goods has changed.

[0051] In one possible implementation of this application, after determining that the cargo status has changed if the similarity is less than the preset similarity threshold, the device is further configured to:

[0052] Generate alert information indicating changes in cargo status;

[0053] The alarm information is sent to the user terminal to alert that the cargo status of the vehicle to be inspected has changed.

[0054] On the other hand, this application also provides a server, the server comprising:

[0055] One or more processors;

[0056] Memory; and

[0057] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the cargo status change determination method.

[0058] On the other hand, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to execute the steps in the method for determining changes in the state of goods.

[0059] This application provides a method for determining changes in the state of goods, including acquiring a first image of the goods' state before transportation and a second image of the goods' state after transportation for a vehicle to be inspected; preprocessing the first and second images to obtain dual-channel grayscale image data; determining the similarity between the dual-channel grayscale image data; and determining whether the state of the goods has changed based on the similarity. Compared with existing technologies, this application's embodiment, by judging the similarity between two images of the goods' state before and after transportation, can determine whether a change in the state of goods has occurred before and after transportation in a low-cost and efficient manner, improving the accuracy and efficiency of the judgment. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a schematic diagram of a scenario for a cargo status change determination system provided in an embodiment of this application;

[0062] Figure 2 This is a schematic flowchart of an embodiment of the method for determining changes in the state of goods provided in this application.

[0063] Figure 3 This is a schematic flowchart of an embodiment of step 202 provided in this application;

[0064] Figure 4 This is a schematic flowchart of an embodiment of step 203 provided in this application;

[0065] Figure 5 This is a schematic flowchart of an embodiment of step 402 provided in this application;

[0066] Figure 6 This is a schematic flowchart of an embodiment of step 204 provided in this application;

[0067] Figure 7 This is a schematic flowchart of another embodiment of the cargo status change determination method provided in this application;

[0068] Figure 8 This is a schematic diagram of an embodiment of the cargo status change determination device provided in this application.

[0069] Figure 9 This is a schematic diagram of the structure of one embodiment of the server provided in this application;

[0070] Figure 10 This is a schematic diagram of an embodiment of a convolutional neural network with an embedded attention mechanism provided in this application.

[0071] Figure 11 This is a schematic diagram of an embodiment of the attention mechanism network provided in this application. Detailed Implementation

[0072] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0073] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0074] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0075] This application provides a method, apparatus, server, and readable storage medium for determining changes in the status of goods, which will be described in detail below.

[0076] like Figure 1 As shown, Figure 1 This is a schematic diagram of a scenario for a cargo status change determination system provided in this application embodiment. The cargo status change determination system may include multiple terminals 100 and a server 200, which are network-connected. The server 200 integrates a cargo status change determination device, such as... Figure 1 In the server, terminal 100 can access server 200.

[0077] In this embodiment, the server 200 is mainly used to acquire a first cargo status image of the vehicle to be detected before transportation and a second cargo status image after transportation; preprocess the first cargo status image and the second cargo status image to obtain dual-channel grayscale image data; determine the similarity of the dual-channel grayscale image data; and determine whether the cargo status has changed based on the similarity.

[0078] In this embodiment, the server 200 can be a standalone server, a server network, or a server cluster. For example, the server 200 described in this embodiment includes, but is not limited to, a computer, a network terminal, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing. In this embodiment, communication between the server and the terminal can be achieved through any communication method, including but not limited to, mobile communication based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communication based on the TCP / IP Protocol Suite (TCP / IP) and User Datagram Protocol (UDP).

[0079] It is understood that the terminal 100 used in this application embodiment can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a terminal may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display. Specifically, the terminal 100 may be a desktop terminal or a mobile terminal, and the terminal 100 may also be one of a mobile phone, tablet computer, laptop computer, etc.

[0080] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include more than one application scenario. Figure 1 The number of more or fewer terminals, or server network connections shown, for example Figure 1 Only one server and two terminals are shown in the diagram. It is understood that this cargo status change determination system may also include one or more other servers, and / or one or more terminals connected to the server network, which is not limited here.

[0081] In addition, such as Figure 1 As shown, the cargo status change determination system may also include a memory 300 for storing data, such as cargo status images and cargo status change determination data, for example, cargo status change determination data during the operation of the cargo status change determination system.

[0082] It should be noted that, Figure 1 The schematic diagram of the cargo status change determination system shown is merely an example. The cargo status change determination system and scenario described in this application embodiment are for the purpose of more clearly illustrating the technical solutions of this application embodiment and do not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of the cargo status change determination system and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.

[0083] Next, we will introduce the method for determining changes in the state of goods provided in the embodiments of this application.

[0084] In the embodiment of the method for determining the change of the goods state in this application, the device for determining the change of the goods state is used as the execution subject. For the sake of simplicity and convenience of description, the execution subject will be omitted in the subsequent method embodiments. The device for determining the change of the goods state is applied to the server. The method includes: obtaining the first goods state image of the goods of the vehicle to be detected before transportation and the second goods state image after transportation; preprocessing the first goods state image and the second goods state image to obtain dual-channel grayscale image data; determining the similarity of the dual-channel grayscale image data; and determining whether the goods state has changed based on the similarity.

[0085] Please refer to Figures 2 to 11 , Figure 2 FIG. is a schematic flowchart of an embodiment of the method for determining the change of the goods state provided in the embodiment of this application. The method for determining the change of the goods state includes steps 201 to step 204:

[0086] 201. Obtain the first goods state image of the goods of the vehicle to be detected before transportation and the second goods state image after transportation.

[0087] The first goods state image before transportation refers to the goods state image in the carriage of the logistics vehicle after loading the goods and before departure. The second goods state image after transportation refers to the goods state image in the carriage of the logistics vehicle after arriving at the destination.

[0088] Specifically, the goods state image in the carriage can be captured by a capturing device. Further, the captured goods state image can be uploaded to a specified server, and the server can directly capture it for obtaining. Since the quantity processed every day may be relatively large, to avoid problems, when uploading the goods state image, the name of the image can be edited. Its name can be edited according to the license plate of the logistics vehicle + departure time. For example, E AXXXXX - 2020 / 08 / 12.

[0089] 202. Preprocess the first goods state image and the second goods state image to obtain dual-channel grayscale image data.

[0090] The dual-channel grayscale image data refers to grayscale image data of two channels. The preprocessing of the first goods state image and the second goods state image can be to first convert the first goods state image and the second goods state image into corresponding single-channel grayscale image data. For example, the three color components corresponding to each pixel in the image are weighted and summed using the weighted average method to obtain the grayscale value of the pixel. Then, the corresponding single-channel grayscale image data are merged to generate a dual-channel grayscale image data. For its specific implementation manner, please refer to the following embodiments and will not be elaborated here.

[0091] 203. Determine the similarity of the dual-channel grayscale image data.

[0092] In logistics scenarios, once goods are loaded into a vehicle, it's difficult to observe changes during transportation. Furthermore, improper driving behavior and poor road conditions can cause goods to collide and tip over within the vehicle, resulting in serious damage that is difficult to assess liability for. This embodiment uses images of the cargo compartment before sealing (before transportation) and after unsealing (after transportation) to identify changes in the cargo during transport, thus monitoring its condition. The similarity of the dual-channel grayscale image data refers to the similarity between the images of the cargo compartment before sealing (before transportation) and after unsealing (after transportation). For details on how to determine the similarity of the dual-channel grayscale image data, please refer to the following embodiment, which will not be elaborated here.

[0093] 204. Based on similarity, determine whether the status of the goods has changed.

[0094] This application provides a method for determining changes in the state of goods, including acquiring a first image of the goods' state before transportation and a second image of the goods' state after transportation for a vehicle to be inspected; preprocessing the first and second images to obtain dual-channel grayscale image data; determining the similarity between the dual-channel grayscale image data; and determining whether the state of the goods has changed based on the similarity. Compared with existing technologies, this application's embodiment, by judging the similarity between two images of the goods' state before and after transportation, can determine whether a change in the state of goods has occurred before and after transportation in a low-cost and efficient manner, improving the accuracy and efficiency of the judgment.

[0095] In the embodiments of this application, please refer to Figure 3 Step 202: Preprocess the first cargo status image and the second cargo status image to obtain a dual-channel grayscale image, specifically including steps 301 to 303:

[0096] 301. Convert the first cargo status image into a single-channel grayscale image data.

[0097] 302. Convert the second cargo status image into a single-channel second-channel grayscale image data.

[0098] 303. The first channel grayscale image data and the second channel grayscale image data are fused together to obtain dual-channel grayscale image data.

[0099] In steps 301 to 303, the first channel grayscale image data and the second channel grayscale image data are fused (or merged) into a dual-channel grayscale image data, and the first channel grayscale image data and the second channel grayscale image data are respectively regarded as the data of two channels of the image.

[0100] For example, the grayscale image data of the first channel can be identified as a two-dimensional single-channel matrix K1,a y,x The grayscale value of the pixel at position (y, x) is shown below:

[0101]

[0102] In this embodiment, matrices K1 and K2 are merged to generate a two-channel grayscale image, which can be represented as a two-dimensional two-channel matrix K3:

[0103]

[0104] In the embodiments of this application, please refer to Figure 4 Step 203: Determine the similarity of the dual-channel grayscale image data, specifically including steps 401 and 402:

[0105] 401. Extract image input features from dual-channel grayscale image data.

[0106] The image input features can include the channel number feature and size feature of the dual-channel grayscale image data. For example, the channel number feature and size feature of the two single-channel grayscale image data mentioned in the previous embodiment are (1,512,512). Therefore, these two channel number features and size features (1,512,512) can be combined into (2,512,512), where 2 is the number of channels and the two 512 refer to the width and height of the image, respectively.

[0107] 402. Determine the similarity of dual-channel grayscale image data based on image input features.

[0108] For details on how to determine the similarity of dual-channel grayscale image data based on image input features, please refer to the following embodiments, without specifying parameters.

[0109] In the embodiments of this application, please refer to Figure 5 Step 402: Based on the image input features, determine the similarity of the dual-channel grayscale image data, specifically including steps 501 and 502:

[0110] 501. The image input features are calculated using a pre-configured convolutional neural network with an embedded attention mechanism to obtain the network output data.

[0111] Specifically, the backbone network in the convolutional neural network uses the ResNet-50 network. In the ResNet-50 network, after each block, a mechanism is added to simultaneously perform average pooling and max pooling on the input h*w*c feature F, generating a 1*1*c feature map (where h is the height, w is the width, and c is the number of channels). This map is then connected to two fully connected layers (adding more non-linear operations to better fit the complex correlations between channels). The two generated 1*1*c features are added together and then multiplied by the original input feature to obtain a new feature F. 1 Based on this, the newly generated feature F1 is subjected to global max pooling and global average pooling again (compared to pooling the width and height of the feature in the previous step, this step mainly focuses on pooling along the channel dimension). The h*w*c feature map becomes h*w*1 after pooling. The two generated features are concatenated to obtain a feature map of size h*w*2, which is then convolved with a 3*3 convolution kernel to obtain a new weighted feature, which is then compared with F1. 1 Multiplication yields the final feature F 11 By learning the parameters and loss, it can focus more on the different parts of the two images. Then, the new feature F... 11 The input is then passed to the next layer of ResNet-50 for further processing; subsequent operations will not be described in detail.

[0112] In the embodiments of this application, please refer to Figure 10 and Figure 11 Before calculating the image input features through a pre-set convolutional neural network with an embedded attention mechanism to obtain the network output data, the method further includes: adding channel attention and spatial attention modules to the residual blocks used for feature extraction in the convolutional neural network to construct a pre-set convolutional neural network with an embedded attention mechanism.

[0113] 502. Input the network output data into the preset loss function to generate the similarity of the dual-channel grayscale image data.

[0114] Its preset loss function is:

[0115]

[0116] in, It is the output of the i-th pair of training images in the network, y i The value can be either -1 or 1, where 1 is for similar images and -1 is for dissimilar images. This is a regularization term.

[0117] In this embodiment, the loss function can also be called the evaluation function. It is used to evaluate the degree of inconsistency (or consistency) between the first cargo state image before transportation and the second cargo state image after transportation. It is also the objective function for optimization in neural networks. The process of training or optimizing neural networks is the process of minimizing the loss function. The smaller the loss function, the higher the similarity between the reconstructed image and the original image.

[0118] In this embodiment, a feature map is typically processed through convolution and pooling to obtain a new feature map, which is then input into the next layer to continue feature extraction. In this process, it is generally believed that different channels and each position of each channel are equally important. However, when judging image similarity, it is desirable to focus on the differences between the two images. Therefore, this application adds an attention mechanism to the original basic network, setting different weights for different channels and different positions of each channel, so that the network pays more attention to the different parts of the two images, thereby improving detection efficiency and accuracy.

[0119] In the embodiments of this application, please refer to Figure 6 Step 204: Based on similarity, determine whether the status of the goods has changed, specifically including steps 601 to 603:

[0120] 601. Compare the similarity with the preset similarity threshold.

[0121] The preset similarity threshold can be set to 0 or adjusted according to actual needs; there are no restrictions on this.

[0122] 602. If the similarity is greater than the preset similarity threshold, it is determined that the status of the goods has not changed.

[0123] 603. If the similarity is less than the preset similarity threshold, it is determined that the status of the goods has changed.

[0124] In steps 602 and 603, the similarity between the first cargo state image before transportation and the second cargo state image after transportation can be determined based on the relationship between the similarity and a preset similarity threshold. Furthermore, if the first cargo state image before transportation and the second cargo state image after transportation are similar, it indicates that the cargo state inside the carriage has not changed or has changed little; if the first cargo state image before transportation and the second cargo state image after transportation are not similar, it indicates that the cargo state inside the carriage has changed, and has changed significantly.

[0125] For example, if the preset similarity threshold is 0, and the calculated similarity is 1, which is greater than the preset similarity threshold, then the first cargo state image before transportation and the second cargo state image after transportation are considered similar, indicating that the cargo state inside the carriage has not changed or has changed little. If the calculated similarity is -1, which is less than the preset similarity threshold, then the first cargo state image before transportation and the second cargo state image after transportation are considered dissimilar, indicating that the cargo state inside the carriage has changed or has changed significantly.

[0126] In this embodiment, by comparing the relationship between similarity and a preset similarity threshold, it is determined whether the status of the goods has changed, thereby improving the efficiency of monitoring and judging whether the status of the goods has changed.

[0127] In the embodiments of this application, please refer to Figure 7 After step 603, where the similarity is less than a preset similarity threshold, and it is determined that the status of the goods has changed, the method further includes steps 701 and 702:

[0128] 701. Generate alarm information when the status of goods changes.

[0129] In this embodiment, when the similarity is less than a preset similarity threshold, and it is determined that the status of the goods has changed, an alarm message indicating that the status of the goods has changed is generated. Specifically, the alarm message may include the vehicle license plate, departure time, and the change in the status of the goods.

[0130] 702. Send alarm information to the user terminal to alert that the cargo status of the vehicle to be inspected has changed.

[0131] In this embodiment, when the cargo status change determination device detects that the first cargo status image before transportation and the second cargo status image after transportation are not similar, it generates an alarm message indicating that the cargo status has changed in real time and sends the alarm message to the user terminal to warn that the cargo status of the vehicle to be inspected has changed. This can effectively provide alarm feedback to the staff, avoid situations where liability cannot be determined due to subsequent changes, reduce unnecessary compensation, and save costs.

[0132] To better implement the cargo state change determination method in the embodiments of this application, based on the cargo state change determination method, the embodiments of this application also provide a cargo state change determination device, such as... Figure 8 As shown, the cargo status change determination device 800 includes a first acquisition unit 801, a first preprocessing unit 802, a first determination unit 803, and a second determination unit 804.

[0133] The first acquisition unit 801 is used to acquire a first cargo status image of the vehicle to be inspected before transportation and a second cargo status image after transportation.

[0134] The first preprocessing unit 802 is used to preprocess the first cargo status image and the second cargo status image to obtain dual-channel grayscale image data.

[0135] The first determining unit 803 is used to determine the similarity of dual-channel grayscale image data.

[0136] The second determining unit 804 is used to determine whether the status of the goods has changed based on similarity.

[0137] In this embodiment of the application, the first determining unit 803 specifically includes:

[0138] The first extraction unit is used to extract image input features from dual-channel grayscale image data.

[0139] The third determining unit is used to determine the similarity of dual-channel grayscale image data based on image input features.

[0140] In this embodiment of the application, the third determining unit is specifically used for:

[0141] Image input features are calculated using a pre-configured convolutional neural network with an embedded attention mechanism to obtain network output data.

[0142] The network output data is input into a preset loss function to generate the similarity of dual-channel grayscale image data.

[0143] In this embodiment of the application, before calculating the image input features using a pre-set convolutional neural network embedded with an attention mechanism to obtain the network output data, the device is further configured to:

[0144] Channel attention and spatial attention modules are added to the residual blocks used for feature extraction in convolutional neural networks to construct pre-configured convolutional neural networks with embedded attention mechanisms.

[0145] In this embodiment of the application, the first preprocessing unit 802 is specifically used for:

[0146] The first cargo status image is converted into a single-channel grayscale image data.

[0147] The second cargo status image is converted into a single-channel second-channel grayscale image data.

[0148] The grayscale image data of the first channel and the grayscale image data of the second channel are fused to obtain dual-channel grayscale image data.

[0149] In this embodiment of the application, the second determining unit 804 is specifically used for:

[0150] Compare the similarity to a preset similarity threshold.

[0151] If the similarity is greater than the preset similarity threshold, it is determined that the status of the goods has not changed.

[0152] If the similarity is less than the preset similarity threshold, it is determined that the status of the goods has changed.

[0153] In this embodiment of the application, after determining that the status of the goods has changed if the similarity is less than a preset similarity threshold, the device is further configured to:

[0154] Generate alert information when the status of goods changes.

[0155] An alarm message is sent to the user terminal to alert them that the cargo status of the vehicle to be inspected has changed.

[0156] This application provides a cargo status change determination device 800, including a first acquisition device for acquiring a first cargo status image of a vehicle to be inspected before transportation and a second cargo status image of a vehicle after transportation; a first preprocessing unit 802 for preprocessing the first and second cargo status images to obtain dual-channel grayscale image data; a first determination unit 803 for determining the similarity of the dual-channel grayscale image data; and a second determination unit 804 for determining whether the cargo status has changed based on the similarity. Compared with the prior art, this application embodiment judges the similarity between two cargo status images before and after transportation, thereby achieving low-cost and efficient determination of whether the cargo status has changed before and after transportation, improving the accuracy and efficiency of judgment.

[0157] In addition to the methods and apparatus for determining changes in cargo status described above, this application also provides a server that integrates any of the cargo status change determination apparatuses provided in this application. The server includes:

[0158] One or more processors;

[0159] Memory; and

[0160] One or more applications, wherein the applications are stored in memory and configured to be operated by a processor using any of the methods in any of the embodiments of the above-described cargo status change determination method.

[0161] This application also provides a server that integrates any of the cargo status change determination devices provided in this application. See also... Figure 9 , Figure 9 This is a schematic diagram of the structure of one embodiment of the server provided in this application.

[0162] like Figure 9As shown, it illustrates the structural schematic diagram of the cargo state change determination device designed according to an embodiment of this application. Specifically:

[0163] The cargo status change determination device may include components such as a processor 901 with one or more processing cores, a storage unit 902 with one or more computer-readable storage media, a power supply 903, and an input unit 904. Those skilled in the art will understand that... Figure 9 The structure of the cargo condition change determination device shown does not constitute a limitation on the cargo condition change determination device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0164] The processor 901 is the control center of the cargo status change determination device. It connects various parts of the device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the storage unit 902, and by calling data stored in the storage unit 902, thereby providing overall monitoring of the cargo status change determination device. Optionally, the processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 901.

[0165] Storage unit 902 can be used to store software programs and modules. Processor 901 executes various functional applications and data processing by running the software programs and modules stored in storage unit 902. Storage unit 902 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created by determining the use of the device based on changes in the cargo status. In addition, storage unit 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, storage unit 902 may also include a memory controller to provide processor 901 with access to storage unit 902.

[0166] The cargo status change determination device also includes a power supply 903 that supplies power to various components. Preferably, the power supply 903 can be logically connected to the processor 901 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 903 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0167] The cargo status change determination device may also include an input unit 904, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0168] Although not shown, the cargo status change determination device may also include a display unit, etc., which will not be described in detail here. Specifically, in the embodiments of this application, the processor 901 in the cargo status change determination device loads the executable files corresponding to the processes of one or more application programs into the storage unit 902 according to the following instructions, and the processor 901 runs the application programs stored in the storage unit 902 to realize various functions, as follows:

[0169] Acquire a first cargo status image of the vehicle to be inspected before transportation and a second cargo status image after transportation; preprocess the first and second cargo status images to obtain dual-channel grayscale image data; determine the similarity of the dual-channel grayscale image data; and determine whether the cargo status has changed based on the similarity.

[0170] This application provides a method for determining changes in the state of goods, including acquiring a first image of the goods' state before transportation and a second image of the goods' state after transportation for a vehicle to be inspected; preprocessing the first and second images to obtain dual-channel grayscale image data; determining the similarity between the dual-channel grayscale image data; and determining whether the state of the goods has changed based on the similarity. Compared with existing technologies, this application's embodiment, by judging the similarity between two images of the goods' state before and after transportation, can determine whether a change in the state of goods has occurred before and after transportation in a low-cost and efficient manner, improving the accuracy and efficiency of the judgment.

[0171] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. The computer-readable storage medium stores multiple instructions, which can be loaded by a processor to execute steps in any of the cargo state change determination methods provided in embodiments of this application. For example, the instructions may execute the following steps:

[0172] Acquire a first cargo status image of the vehicle to be inspected before transportation and a second cargo status image after transportation; preprocess the first and second cargo status images to obtain dual-channel grayscale image data; determine the similarity of the dual-channel grayscale image data; and determine whether the cargo status has changed based on the similarity.

[0173] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0174] The foregoing has provided a detailed description of a method, apparatus, server, and readable storage medium for determining changes in the state of goods according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for determining changes in the state of goods, characterized in that, The method includes: Acquire the first cargo status image of the vehicle to be inspected before transportation and the second cargo status image after transportation; The first cargo status image and the second cargo status image are preprocessed to obtain dual-channel grayscale image data; Determine the similarity of the dual-channel grayscale image data; Based on the similarity, determine whether the status of the goods has changed; Determining the similarity of the dual-channel grayscale image data includes: Extract image input features from the dual-channel grayscale image data; The image input features are calculated using a pre-set convolutional neural network with an embedded attention mechanism to obtain network output data; The network output data is input into a preset loss function to generate the similarity of the dual-channel grayscale image data; The preset loss function is: ; in, It is the output of the i-th pair of training images of the network. The value can be either -1 or 1, where 1 represents similar images and -1 represents dissimilar images. This is a regularization term.

2. The method for determining changes in the state of goods according to claim 1, characterized in that, Before calculating the image input features using a pre-configured convolutional neural network embedded with an attention mechanism to obtain network output data, the method further includes: Channel attention and spatial attention modules are added to the residual blocks used for feature extraction in the convolutional neural network to construct the pre-configured convolutional neural network with embedded attention mechanisms.

3. The method for determining changes in the state of goods according to claim 1, characterized in that, The preprocessing of the first cargo status image and the second cargo status image to obtain a dual-channel grayscale image includes: The first cargo status image is converted into a single-channel grayscale image data of the first channel. The second cargo status image is converted into a single-channel second-channel grayscale image data; The grayscale image data of the first channel and the grayscale image data of the second channel are fused to obtain dual-channel grayscale image data.

4. The method for determining changes in the state of goods according to claim 1, characterized in that, The step of determining whether the status of the goods has changed based on the similarity includes: Compare the similarity score with a preset similarity threshold; If the similarity is greater than the preset similarity threshold, then it is determined that the status of the goods has not changed; If the similarity is less than the preset similarity threshold, then it is determined that the status of the goods has changed.

5. The method for determining changes in the state of goods according to claim 4, characterized in that, After determining that the cargo status has changed if the similarity is less than the preset similarity threshold, the method further includes: Generate alert information indicating changes in cargo status; The alarm information is sent to the user terminal to alert that the cargo status of the vehicle to be inspected has changed.

6. A device for determining changes in the state of goods, characterized in that, The device includes: The first acquisition unit is used to acquire a first cargo status image of the vehicle to be inspected before transportation and a second cargo status image after transportation. The first preprocessing unit is used to preprocess the first cargo status image and the second cargo status image to obtain dual-channel grayscale image data. The first determining unit is used to determine the similarity of the dual-channel grayscale image data, including: The first extraction unit is used to extract image input features from the dual-channel grayscale image data; The third determining unit is used to determine the similarity of the dual-channel grayscale image data based on the image input features, specifically for: The image input features are calculated using a pre-set convolutional neural network with an embedded attention mechanism to obtain network output data; The network output data is input into a preset loss function to generate the similarity of the dual-channel grayscale image data; the preset loss function is: ; in, It is the output of the i-th pair of training images of the network. The value can be either -1 or 1, where 1 represents similar images and -1 represents dissimilar images. It is a regular term; The second determining unit is used to determine whether the status of the goods has changed based on the similarity.

7. A server, characterized in that, The server includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the cargo status change determination method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the steps in the cargo state change determination method according to any one of claims 1 to 5.