Marine transportation logistics node monitoring method and device, storage medium and computer equipment
Through the monitoring method of maritime logistics nodes, the problem of untimely update of information in maritime business is solved, automatic monitoring and timely notification of maritime logistics nodes is realized, information transmission efficiency and decision-making efficiency are improved, and errors and delays caused by information lag are reduced.
Patent Information
- Application Number
- CN202411682433.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-04
AI Technical Summary
In maritime transportation business, untimely updates of information lead to missed port announcements, unavailable container loading according to time, cargo adjustments lead to cabinet dumping, and increased costs of lag containers and ports.
Provide a method for monitoring sea logistics nodes, which can obtain sea logistics order number, sea logistics node and node estimated time by responding to user's node reminder subscription request, and generate and send sea logistics node notification information to ensure that notifications are sent in a timely manner at key nodes.
By automatically obtaining and verifying maritime logistics order number and node information, and generating and sending node reminders, we ensure that notifications are sent in a timely manner at critical moments, reducing manual intervention, improving information transmission efficiency, and avoiding operational errors and delays caused by information lag.
Smart Images

Figure CN119558755A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of maritime logistics technology, and in particular to a maritime logistics node monitoring method, device, storage medium and computer equipment. Background Art
[0002] In the shipping business, time-sensitive links are crucial, especially the port opening and closing time and the sea-loading and stacking status announced by the port. If the container entry time is missed, the container may not be loaded on time; if the ship has left the port, cargo adjustments may result in the container being unloaded and not being reloaded, resulting in the phenomenon of container abandonment, which affects the timely delivery of goods and even incurs high costs. In addition, if the container is not picked up in time or the empty container is not returned in time after the ship arrives at the destination port, demurrage charges may also be incurred, which may be as high as hundreds of dollars per day. For perishable goods, long-term storage may result in losses.
[0003] To reduce these risks, shipping companies usually pay close attention to port announcements to ensure that containers enter on time, and keep in touch with shipping companies to understand the status of goods at the transit port. At the same time, they pick up and return containers in a timely manner to avoid demurrage charges. However, these measures rely on a lot of manpower, and frequent inquiries about the logistics status of containers have become tedious and error-prone tasks. Faced with a huge amount of containers and cargo, manual operations can easily lead to untimely information updates, affecting decision-making efficiency. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect of untimely information update in the prior art.
[0005] In a first aspect, the present application provides a method for monitoring a maritime logistics node, the method comprising:
[0006] In response to the user's node reminder subscription request, obtain subscription information from the node reminder subscription request, and obtain the user's notification receiving channel, the subscription information including the shipping logistics order number, shipping logistics node and node estimated time;
[0007] When the ocean logistics order number is verified, if it is determined that a node reminder notification needs to be sent based on the current time and the node estimated time, the ocean logistics node notification information is generated based on the ocean logistics order number, the ocean logistics node and the node estimated time;
[0008] If the number of notifications sent by the shipping logistics node is less than the preset threshold, the shipping logistics node notification information is sent through the notification receiving channel.
[0009] In one embodiment, the step of obtaining subscription information from a node reminder subscription request includes:
[0010] If the data of the node reminder subscription request is in JSON format, determine the subscription information identification field;
[0011] According to the data of the node reminder subscription request, the JsonPath parser is used to obtain the value corresponding to the subscription information identification field to obtain the subscription information.
[0012] In one embodiment, the step of using a JsonPath parser to obtain a value corresponding to a subscription information identification field according to data of a node reminder subscription request includes:
[0013] Initialize the JsonPath parser, clean the data of the node reminder subscription request, and store it in the initialized JsonPath parser;
[0014] A first expression of the subscription information identification field is constructed, and the first expression is calculated in the initialized JsonPath parser to obtain a value corresponding to the subscription information identification field in the cleaned data of the node reminder subscription request.
[0015] In one embodiment, the process of verifying the ocean freight logistics bill number includes:
[0016] When the length of the ocean logistics bill number is within the preset length range, and the character types of the ocean logistics bill number are only numbers and letters, determine whether the ocean logistics bill number is the container number in the ocean logistics;
[0017] If the shipping logistics bill number is the container number in the shipping logistics, the shipping logistics bill number verification passes when the shipping logistics bill number meets the international standards for container numbers;
[0018] If the ocean logistics bill number is not the container number in the ocean logistics, the ocean logistics bill number verification passes.
[0019] In one embodiment, the process of determining that a node reminder notification needs to be sent according to the current time and the node estimated time includes:
[0020] If the time difference between the current time and the node estimated time is within the preset time difference range, it is determined that a node reminder notification needs to be sent.
[0021] In one embodiment, if the time difference between the current time and the node estimated time is within a preset time difference range, the step of determining that a node reminder notification needs to be sent includes:
[0022] Constructing a second expression between the current time, the node estimated time and a preset time difference range;
[0023] The second expression is calculated using the SpEL parser to determine whether the time difference between the current time and the node's estimated time is within a preset time difference range;
[0024] If the value returned by the SpEL parser is true, it is determined that a node reminder notification needs to be sent.
[0025] In one embodiment, the step of generating shipping logistics node notification information based on the shipping logistics order number, the shipping logistics node and the node estimated time includes:
[0026] Obtain a notification information template, and determine a target template variable in the notification information template for representing shipping logistics information;
[0027] The shipping logistics order number, shipping logistics node and node estimated time are used as existing template variables, and the missing template variables are determined according to the difference between the target template variable and the existing template variable;
[0028] Get the information corresponding to the missing template variables from the node reminder subscription request;
[0029] Fill the shipping logistics order number, shipping logistics node and node estimated time, as well as the information corresponding to the missing template variables, into the corresponding positions in the notification information template to obtain the shipping logistics node notification information.
[0030] In a second aspect, the present application provides a maritime logistics node monitoring device, the device comprising:
[0031] A subscription information acquisition module is used to respond to a user's node reminder subscription request, obtain subscription information from the node reminder subscription request, and obtain the user's notification receiving channel. The subscription information includes the shipping logistics order number, shipping logistics node, and node estimated time;
[0032] A notification information generation module is used to generate shipping logistics node notification information based on the shipping logistics order number, shipping logistics node and node estimated time, if it is determined that a node reminder notification needs to be sent according to the current time and the node estimated time when the shipping logistics order number is verified;
[0033] The notification information sending module is used to send the shipping logistics node notification information through the notification receiving channel if the number of notification sending times of the shipping logistics node is less than a preset threshold.
[0034] In a third aspect, the present application provides a storage medium: the storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of any of the methods for monitoring a shipping logistics node in the above-mentioned embodiments.
[0035] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;
[0036] Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by one or more processors, the steps of the method for monitoring a shipping logistics node in any of the above-mentioned embodiments are performed.
[0037] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0038] In the method, device, storage medium and computer equipment for monitoring shipping logistics nodes provided in the present application, in response to the user's node reminder subscription request, the subscription information is obtained from the node reminder subscription request, and the notification receiving channel of the user is obtained, and the subscription information includes the shipping logistics order number, the shipping logistics node and the node estimated time; when the shipping logistics order number is verified, if it is determined that the node reminder notification needs to be sent according to the current time and the node estimated time, the shipping logistics node notification information is generated based on the shipping logistics order number, the shipping logistics node and the node estimated time; if the number of notifications sent by the shipping logistics node is less than the preset threshold, the shipping logistics node notification information is sent through the notification receiving channel. The method automatically obtains and verifies the shipping logistics order number and node information by responding to the node reminder subscription request, and generates and sends the node reminder notification. This process ensures that notifications are sent in time at key nodes, reduces manual intervention, improves information transmission efficiency, and avoids operational errors and delays caused by information lags. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 A schematic diagram of a flow chart of a method for monitoring a shipping logistics node provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the structure of a maritime logistics node monitoring device provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] The present application provides a method for monitoring a maritime logistics node. The following embodiments are described by taking the method applied to a video platform as an example. It can be understood that the video platform can be any device with data processing functions, including but not limited to a single server and a server cluster. Figure 1 As shown, the method may include the following steps:
[0045] S101: In response to a user's node reminder subscription request, obtaining subscription information from the node reminder subscription request, and obtaining the user's notification receiving channel, the subscription information including the shipping logistics order number, the shipping logistics node and the node estimated time.
[0046] Among them, the node reminder subscription request is a user's request to subscribe to the reminder notification of the logistics node. Subscription information refers to the relevant information provided by the user when subscribing to the reminder, including the shipping logistics order number, shipping logistics node and node estimated time. Among them, the shipping logistics order number is the number that uniquely identifies a sea freight shipment, and the shipping logistics node refers to the key steps or stages in the sea freight transportation process, such as loading and unloading, etc. The node estimated time is the time when the logistics node is expected to occur. The notification receiving channel refers to the method or platform for users to receive notifications, such as SMS, email, APP push, etc.
[0047] In this step, the corresponding subscription information can be extracted from the received user request, which contains data such as the shipping logistics order number, the node and its estimated time. By parsing the data fields in the request, this information can be stored in the memory or database. Next, the notification receiving preferences can be obtained from the user's account information. For example, the user has set the preferred notification method when registering or subscribing, and the channel through which the notification is sent can be determined based on these preferences.
[0048] It can be understood that by extracting the ocean logistics order number, node and estimated time from the request, it is possible to identify the specific logistics information that the user needs to pay attention to, ensuring the accuracy of subsequent notifications. Clear receiving channels can ensure that notifications are delivered in a timely manner in the most suitable way for users, avoiding delays caused by inappropriate channels or non-delivery of notifications.
[0049] S102: When the sea freight logistics order number is verified, if it is determined that a node reminder notification needs to be sent based on the current time and the node estimated time, the sea freight logistics node notification information is generated based on the sea freight logistics order number, the sea freight logistics node and the node estimated time.
[0050] Among them, the shipping logistics node notification information is a reminder notification generated according to the status of the shipping logistics node.
[0051] In this step, the ocean freight logistics order number is verified. Regular expressions or database queries can be used to ensure that the order number conforms to a specific format and that the corresponding record can be found in the database. For example, when the ocean freight logistics order number is received, a regular expression is used to check whether the order number format is valid, and then the database is queried to confirm whether the order number already exists.
[0052] Next, the current date and time are compared with the node estimated time. If the current time is close to or has reached the reminder condition of the node estimated time, such as 30 minutes in advance or the actual time has arrived, it is decided whether to generate a notification. When it is confirmed that a notification needs to be sent, the notification content is generated based on the ocean logistics order number, node name, estimated time and other information.
[0053] It can be understood that verifying the shipping logistics order number can ensure that the processed order number is legal, compliant and valid, prevent invalid notifications and erroneous operations caused by invalid or erroneous shipping logistics order numbers, and ensure the accuracy of information flow. By comparing the current time and the estimated time of the node, it can intelligently determine whether to send a notification, avoid reminders too early or too late, and avoid too many redundant notifications, while ensuring that users receive effective reminders at critical moments, improving efficiency and user experience.
[0054] S103: If the number of notifications sent by the shipping logistics node is less than a preset threshold, the shipping logistics node notification information is sent through the notification receiving channel.
[0055] In this step, the notification sending records stored in the database or memory are queried to check the number of times the notification of the shipping logistics node has been sent. If the number is less than the preset threshold, the operation of sending the notification continues. When it is confirmed that the notification needs to be sent, the generated notification content is sent to the specified receiving channel according to the corresponding sending channel selected by the user. For example, if the notification receiving channel set by the user is email, the shipping logistics node notification information is sent through the integrated email service. If the user selects SMS, the SMS service interface is called to send it.
[0056] It can be understood that by judging whether the number of notifications sent is less than the preset threshold, it is ensured that too many redundant notifications are not sent to the same node, thus preventing users from receiving repeated and irrelevant notifications, causing information overload or interfering with users' normal operations. At the same time, it is ensured that notifications are only sent when they are really needed, thereby improving the efficiency of notifications.
[0057] In the above embodiment, in response to the user's node reminder subscription request, the subscription information is obtained from the node reminder subscription request, and the user's notification receiving channel is obtained, and the subscription information includes the shipping logistics order number, the shipping logistics node and the node estimated time; when the shipping logistics order number is verified, if it is determined that the node reminder notification needs to be sent according to the current time and the node estimated time, the shipping logistics node notification information is generated based on the shipping logistics order number, the shipping logistics node and the node estimated time; if the number of notifications sent by the shipping logistics node is less than the preset threshold, the shipping logistics node notification information is sent through the notification receiving channel. This method automatically obtains and verifies the shipping logistics order number and node information by responding to the node reminder subscription request, and generates and sends the node reminder notification. This process ensures that notifications are sent in time at key nodes, improves the efficiency of information transmission, and avoids operational errors and delays caused by information lags.
[0058] In one embodiment, the step of obtaining subscription information from a node reminder subscription request includes:
[0059] If the data of the node reminder subscription request is in JSON format, determine the subscription information identification field;
[0060] According to the data of the node reminder subscription request, the JsonPath parser is used to obtain the value corresponding to the subscription information identification field to obtain the subscription information.
[0061] Among them, the data of the node reminder subscription request refers to the data sent by the user containing the subscription request information, which can be encoded in JSON format and contains the specific information of the subscription. JSON format is a lightweight data exchange format. The subscription information identification field refers to the field used to identify the subscription information in the JSON format data, such as "logistics order number" and "node name". The JsonPath parser is a tool or library used to extract specific values from JSON data, similar to the role of XPath in XML. JsonPath allows the use of path expressions to extract relevant data from JSON documents.
[0062] Specifically, first analyze the structure of the node reminder subscription request and identify the fields that are key information identifiers. You can determine which fields are subscription information identifier fields through preset rules or field names, such as `logisticsOrderNumber` and `node`. For example, assume that the received JSON request format is:
[0063]
[0064] Then you can use the field names `logisticsOrderNumber` and `node` to identify these fields as key fields for identifying subscription information.
[0065] After that, use the JsonPath parser to extract the values in the JSON. Construct the subscription information based on the field values extracted from the JSON data.
[0066] In this embodiment, by determining the identification field in the JSON data, key data can be accurately identified to ensure that the key information requested by the user is extracted, avoiding notification errors or data missing due to field errors or omissions. The JsonPath parser provides an efficient and flexible method to extract the required information from JSON data, improve the efficiency and accuracy of data extraction, and reduce complex data parsing logic.
[0067] In one embodiment, according to the data of the node reminder subscription request, the step of using the JsonPath parser to obtain the value corresponding to the subscription information identification field includes:
[0068] Initialize the JsonPath parser, clean the data of the node reminder subscription request, and store it in the initialized JsonPath parser;
[0069] A first expression of the subscription information identification field is constructed, and the first expression is calculated in the initialized JsonPath parser to obtain a value corresponding to the subscription information identification field in the cleaned data of the node reminder subscription request.
[0070] Among them, cleaning refers to preprocessing the data to remove irrelevant or incorrectly formatted data to ensure data quality and consistency. After cleaning, the data format will be unified and meet the requirements. The first expression refers to a path expression based on JsonPath, which is used to locate the value of the subscription information identification field in the JSON data.
[0071] Specifically, load and configure the JsonPath parser and initialize it through the library or tool. After that, clean the data of the node reminder subscription request, including removing invalid fields, fixing format errors, standardizing field values, etc. You can traverse the data and perform necessary formatting or filtering on each field. For example, if the received data contains irrelevant fields or malformed dates, the cleaning step will remove the irrelevant fields and correct the date format:
[0072]
[0073] The cleaned data will be loaded into the JsonPath parser, either by passing a JSON string to the parser or converting it into a structure suitable for parsing, such as a `Map` object in Java or a dictionary in Python. Construct a JsonPath path expression based on the data fields that need to be extracted. You can use a format similar to `$.logisticsOrderNumber`, which means to search for the `logisticsOrderNumber` field starting from the root node of the JSON object. Use the constructed path expression to query the cleaned JSON data and extract the corresponding field values. For example, execute a query through the JsonPath parser to extract the logistics order number: String logisticsOrderNumber = document.read("$.logisticsOrderNumber").
[0074] In this embodiment, the parser is initialized to parse and query JSON data. By initializing the JsonPath parser, the efficiency and accuracy of the parsing process can be ensured, and a reliable infrastructure can be provided to process data in various JSON formats. The purpose of cleaning data is to remove useless information, correct format errors, ensure that the structure of the data is consistent and meets expectations, thereby reducing errors, improving data quality, and avoiding potential errors or anomalies. The cleaned data is loaded into the parser, making subsequent data queries more efficient, fast and accurate. It is ensured that the cleaned data can be queried smoothly during the parsing stage. By constructing a path expression and clearly specifying the fields to be extracted, it is ensured that the required subscription information can be accurately located, rather than performing redundant searches from the entire JSON, reducing unnecessary calculations and resource consumption, and improving the efficiency of data extraction.
[0075] In one embodiment, the process of verifying the ocean freight logistics bill number includes:
[0076] When the length of the ocean logistics bill number is within the preset length range, and the character types of the ocean logistics bill number are only numbers and letters, determine whether the ocean logistics bill number is the container number in the ocean logistics;
[0077] If the shipping logistics bill number is the container number in the shipping logistics, the shipping logistics bill number verification passes when the shipping logistics bill number meets the international standards for container numbers;
[0078] If the ocean logistics bill number is not the container number in the ocean logistics, the ocean logistics bill number verification passes.
[0079] Among them, the container number refers to the unique number that identifies a container. The international standard refers to the standardized standard of container numbers, which is used to ensure the uniformity and global applicability of container numbers. The character type refers to the type represented by each character in the ocean logistics bill number, for example, letters (AZ) and numbers (0-9).
[0080] Specifically, it is necessary to check the format of the shipping logistics order number. First, check whether the order number contains only letters and numbers, and whether the length is within the preset range. If the shipping logistics order number meets the combination of letters and numbers and the length is correct, it is necessary to further check whether it meets the international standards for container numbers. For example, check whether there is a valid owner code (4 letters) and a check code (1 letter), etc. Once it is confirmed that the shipping logistics order number meets the international standards for container numbers, it can be verified. If the order number is not a container number, it means that it is just an ordinary order number. If the order number length and character type meet the requirements, the order number is an ordinary order number, and the verification is passed. It can be understood that if the character type or length does not meet the requirements, the verification fails, and there is no need to determine whether the order number is a container number. If the character type and length meet the requirements, and the order number is a container number, then when the order number does not meet the international standards, the verification fails, and relevant prompts can be generated, and node notification reminders are not executed.
[0081] In this embodiment, it is first determined whether the shipping logistics number conforms to the combination of letters and numbers, and whether the length is correct, to ensure that the input data conforms to the expected format, which helps to filter out invalid numbers and reduce unnecessary error checks. Further verification of whether the shipping logistics number conforms to the international standards for container numbers can avoid incorrect container numbers, ensure that the shipping logistics number can correctly reflect the actual situation of the container, conform to the specifications of international standards, reduce data format errors or inconsistencies, improve data quality, and reduce potential problems in the transportation and management process. In other words, the validity check of the shipping logistics number helps to reduce error processing caused by invalid data and improve the accuracy and efficiency of logistics management.
[0082] In one embodiment, the process of determining whether to send a node reminder notification based on the current time and the node estimated time includes:
[0083] If the time difference between the current time and the node estimated time is within the preset time difference range, it is determined that a node reminder notification needs to be sent.
[0084] Specifically, the current time can be obtained through the system clock, and then the node estimated time and the current time can be subtracted to determine the time difference. After the time difference is calculated, it is determined whether the difference is within the preset time difference range. If the time difference meets the conditions, that is, within the preset time difference range, the node reminder notification is prepared to be sent.
[0085] In this embodiment, the time difference between the current time and the estimated time of the node is obtained to evaluate whether the node is close to the scheduled event. By accurately calculating the time difference, it can be ensured that the reminder notification is sent at the right time, neither too early nor missing the critical time window, thereby improving the timeliness of the notification.
[0086] In one embodiment, if the time difference between the current time and the node estimated time is within a preset time difference range, the step of determining that a node reminder notification needs to be sent includes:
[0087] Constructing a second expression between the current time, the node estimated time and a preset time difference range;
[0088] The second expression is calculated using the SpEL parser to determine whether the time difference between the current time and the node's estimated time is within a preset time difference range;
[0089] If the value returned by the SpEL parser is true, it is determined that a node reminder notification needs to be sent.
[0090] The second expression refers to an expression used to calculate and determine whether the time difference between the current time and the node's estimated time is within a preset time difference range. Usually, the expression is implemented through a mathematical or logical formula, using the current time, the node's estimated time, and the preset time difference range for calculation. SpEL is an expression language provided by the Spring framework, which is used to dynamically calculate expressions in applications. The SpEL parser is used to dynamically calculate the second expression to determine whether the time difference is within a preset range. The true value usually refers to the Boolean value `true`. If the calculation result of the SpEL parser is `true`, it means that the condition is met.
[0091] Specifically, you first need to build an expression that can compare whether the difference between the current time and the node's estimated time is within the preset range, such as between(hours(#etaPld, now()), 0, 48). The SpEL parser can accept the expression and calculate it, passing the current time, node estimated time and other parameters into the SpEL parser, and judging whether the difference between the current time and the node's estimated time meets the business rules through calculation. The SpEL parser will return a Boolean value, indicating whether the time difference between the current time and the node's estimated time is within the preset range. If `true` is returned, the system determines that a node reminder notification needs to be sent.
[0092] In this embodiment, by constructing a second expression, the time difference between the current time and the estimated time of the node can be flexibly calculated, and it can be determined whether it meets the preset time difference range. If business requirements change, such as adjusting the time difference range, it can be achieved by modifying the expression without modifying the core code logic. The SpEL parser makes dynamic calculations possible. By parsing expressions and executing corresponding logic, it can determine whether a notification needs to be sent at runtime. Compared with hard-coded judgment logic, SpEL provides higher flexibility. Business logic can be adjusted by modifying expressions without modifying the code, thereby reducing maintenance costs and improving the configurability and scalability of the code. By judging the Boolean value returned by the SpEL parser, it can be decided whether to send a notification. This judgment is automated to ensure that the notification is sent accurately.
[0093] In one embodiment, the step of generating shipping logistics node notification information based on the shipping logistics order number, the shipping logistics node and the node estimated time includes:
[0094] Obtain a notification information template, and determine a target template variable in the notification information template for representing shipping logistics information;
[0095] The shipping logistics order number, shipping logistics node and node estimated time are used as existing template variables, and the missing template variables are determined according to the difference between the target template variable and the existing template variable;
[0096] Get the information corresponding to the missing template variables from the node reminder subscription request;
[0097] Fill the shipping logistics order number, shipping logistics node and node estimated time, as well as the information corresponding to the missing template variables, into the corresponding positions in the notification information template to obtain the shipping logistics node notification information.
[0098] Among them, the notification information template refers to a predefined message format, which includes placeholders, that is, template variables, which will be replaced by specific information when the notification is actually sent. Target template variables refer to placeholders or variables in the notification information template, which will be filled with specific values or texts in the final notification information. For example, a template may contain a target template variable such as `Logistics Order Number`, which is used to replace the actual shipping logistics order number when the notification is generated. Existing template variables refer to placeholders for corresponding information that already exist in the notification information template, such as a specific shipping logistics order number, node estimated time, etc. Missing template variables refer to variables that need to be filled in the notification information template but are not provided.
[0099] Specifically, the corresponding template can be loaded from a predefined template library. Parse all placeholders or variables from the notification information template. For example, if there are placeholders such as `logistics order number` and `node time` in the template, these need to be identified and stored as target template variables. By comparing the template variables that already have corresponding information in the template and the template variables that need to be filled with information, determine which target template variables have not yet provided the corresponding information. For example, the existing template variables include `logistics order number` and `node time`, while the target template variables may include `shipping company`, `route`, etc., then you need to compare and find the missing variables. According to the missing template variables, extract the corresponding data from the node reminder subscription request. Fill all the required data into the corresponding positions in the template to generate the final notification content.
[0100] In this embodiment, the predefined notification template is loaded to ensure that all notifications follow a unified format and structure. Templating can simplify the management and maintenance of notification content, ensure the consistency of different types of notifications, and facilitate updates and expansions. For example, if the notification content needs to be modified, only the template needs to be modified without modifying the business logic. Identifying the target variables in the template helps to clarify what information needs to be obtained. By comparing the differences between the target template variables and the existing variables, missing data can be automatically identified and filled in to avoid erroneous notifications or inaccurate information due to missing information. Obtaining missing information from the subscription request ensures that the notification content is complete, accurate, and reflects the needs of the user.
[0101] To facilitate understanding of the solution of the present application, specific examples are provided below for illustration.
[0102] The reminder will be sent 48 hours after the goods are about to arrive at the port. The etaPld field in the data indicates the estimated time of arrival at the destination port, and its JsonPath expression is $.etaPld. The rule "about to arrive at the port" can be understood as the time compared with the current time is within 0-48 hours, and its SpEL expression is between(hours(#etaPld, now()), 0, 48), so there is the following process:
[0103] 1. Read configuration information from the database, including JsonPath expression, SpEL expression, threshold, reminder text, reminder times, etc.;
[0104] 2. Initialize the parser object:
[0105] 2.1. Initialize the JsonPath parser and store the cleaned data as context information into the parser for preprocessing;
[0106] 2.2. Initialize the SpEL parser, with built-in common methods such as judging empty strings, getting the current time, and returning hours after time comparison;
[0107] 3. Perform JsonPath parsing:
[0108] 3.1. Calculate the value of $.etaPld expression through the parser;
[0109] 3.2. Store the obtained value in the context of the SpEL parser;
[0110] 4. Perform SpEL parsing:
[0111] 4.1. The parser calculates the value of the expression between(hours(#etaPld, now()), 0, 48) by combining the information in the context;
[0112] 4.2. Return the calculated value;
[0113] 5. If the previous step returns true, it is considered necessary to send a notification, otherwise it is not sent;
[0114] 6. Check whether the number of transmissions is greater than the configured threshold. If so, do not send the message.
[0115] 7. Assembly notification information: [arrival at port] - [shipping company code] - [order number], the goods will arrive at [destination port (destination port location)] in [estimated arrival time at destination port - current time] hours;
[0116] 8. The user receives a push message via APP or email.
[0117] The following is a description of the maritime logistics node monitoring device provided by the embodiment of the present application. The maritime logistics node monitoring device described below and the maritime logistics node monitoring method described above can be referred to in correspondence with each other. Figure 2 As shown, the present application provides a maritime logistics node monitoring device, the device comprising:
[0118] The subscription information acquisition module 201 is used to respond to the user's node reminder subscription request, obtain subscription information from the node reminder subscription request, and obtain the user's notification receiving channel, the subscription information includes the shipping logistics order number, the shipping logistics node and the node estimated time;
[0119] The notification information generating module 202 is used to generate the shipping logistics node notification information based on the shipping logistics order number, the shipping logistics node and the node estimated time, if it is determined that the node reminder notification needs to be sent according to the current time and the node estimated time when the shipping logistics order number is verified;
[0120] The notification information sending module 203 is used to send the shipping logistics node notification information through the notification receiving channel if the number of notification sending times of the shipping logistics node is less than a preset threshold.
[0121] In one embodiment, the subscription information acquisition module 201 includes:
[0122] An identification field determination unit, used to determine a subscription information identification field if the data of the node reminder subscription request is in JSON format;
[0123] The subscription information acquisition unit is used to obtain the value corresponding to the subscription information identification field using the JsonPath parser according to the data of the node reminder subscription request to obtain the subscription information.
[0124] In one embodiment, the subscription information acquisition unit includes:
[0125] The parser initialization subunit is used to initialize the JsonPath parser and clean the data of the node reminder subscription request and store it in the initialized JsonPath parser;
[0126] The field value acquisition subunit is used to construct a first expression of the subscription information identification field and calculate the first expression in the initialized JsonPath parser to obtain the value corresponding to the subscription information identification field in the cleaned node reminder subscription request data.
[0127] In one embodiment, the notification information generating module 202 includes:
[0128] A tracking number determination unit, used to determine whether the shipping logistics number is a container number in the shipping logistics when the length of the shipping logistics number is within a preset length range and the character types of the shipping logistics number are only numbers and letters;
[0129] The first order number verification unit, if the shipping logistics order number is the container number in the shipping logistics, then when the shipping logistics order number meets the international standard of the container number, the shipping logistics order number verification passes;
[0130] The second order number verification unit, if the ocean logistics order number is not the container number in the ocean logistics, the ocean logistics order number verification passes.
[0131] In one embodiment, the notification information generating module 202 includes:
[0132] The node reminder notification determination unit is used to determine that a node reminder notification needs to be sent if the time difference between the current time and the node estimated time is within a preset time difference range.
[0133] In one embodiment, the node reminder notification determination unit includes:
[0134] An expression building subunit, used to build a second expression between the current time, the node estimated time and a preset time difference range;
[0135] An expression calculation subunit, used to calculate a second expression using a SpEL parser to determine whether a time difference between a current time and an estimated time of a node is within a preset time difference range;
[0136] The node reminder notification determination subunit is used to determine the need to send a node reminder notification if the value returned by the SpEL parser is a true value.
[0137] In one embodiment, the notification information generating module 202 includes:
[0138] A notification information template acquisition unit, used to acquire a notification information template and determine a target template variable in the notification information template for representing shipping logistics information;
[0139] A missing template variable determination unit is used to use the shipping logistics order number, shipping logistics node and node estimated time as existing template variables, and determine the missing template variables according to the difference between the target template variable and the existing template variable;
[0140] A template variable information acquisition unit, used to acquire information corresponding to missing template variables from a node reminder subscription request;
[0141] The notification information generating unit is used to fill the corresponding positions in the notification information template with the shipping logistics order number, shipping logistics node and node estimated time, as well as the information corresponding to the missing template variables, to obtain the shipping logistics node notification information.
[0142] In one embodiment, the present application further provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method for monitoring a shipping logistics node as described in any one of the above embodiments.
[0143] In one embodiment, the present application further provides a computer device having computer-readable instructions stored therein, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method for monitoring a shipping logistics node as described in any one of the above embodiments.
[0144] Indicatively, Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 may be provided as a server. Figure 3The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301 for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the marine logistics node monitoring method of any of the above embodiments.
[0145] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0146] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0147] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, "one", "one", "said", "the" and "it" may also include plural forms, unless the context clearly indicates another way. A plurality refers to at least two cases, such as 2, 3, 5 or 8, etc. "And / or" includes any and all combinations of the relevant listed items.
[0148] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0149] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for monitoring maritime logistics nodes, characterized in that: The method comprises: In response to a user's node reminder subscription request, obtaining subscription information from the node reminder subscription request, and obtaining the user's notification receiving channel, the subscription information including the shipping logistics order number, the shipping logistics node, and the node estimated time; When the sea freight logistics order number is verified, if it is determined that a node reminder notification needs to be sent based on the current time and the node estimated time, sea freight logistics node notification information is generated based on the sea freight logistics order number, the sea freight logistics node and the node estimated time; If the number of notification transmissions of the shipping logistics node is less than a preset threshold, the shipping logistics node notification information is transmitted through the notification receiving channel.
2. The method for monitoring maritime logistics nodes according to claim 1, characterized in that: The step of obtaining subscription information from the node reminder subscription request includes: If the data of the node reminder subscription request is in JSON format, determining the subscription information identification field; According to the data of the node reminder subscription request, a JsonPath parser is used to obtain a value corresponding to the subscription information identification field to obtain the subscription information.
3. The method for monitoring maritime logistics nodes according to claim 2, characterized in that: The step of using a JsonPath parser to obtain a value corresponding to the subscription information identification field according to the data of the node reminder subscription request includes: Initialize the JsonPath parser, and after cleaning the data of the node reminder subscription request, store it in the initialized JsonPath parser; A first expression of the subscription information identification field is constructed, and the first expression is calculated in the initialized JsonPath parser to obtain a value corresponding to the subscription information identification field in the cleaned data of the node reminder subscription request.
4. The method for monitoring maritime logistics nodes according to claim 1, characterized in that: The process of verifying the ocean freight logistics order number includes: When the length of the ocean logistics bill number is within a preset length range, and the character types of the ocean logistics bill number are only numbers and letters, determine whether the ocean logistics bill number is a container number in ocean logistics; If the shipping logistics number is the container number in the shipping logistics, then when the shipping logistics number meets the international standard of the container number, the shipping logistics number passes the verification; If the ocean logistics bill number is not the container number in the ocean logistics, the ocean logistics bill number verification passes.
5. The method for monitoring maritime logistics nodes according to claim 1, characterized in that: The process of determining that a node reminder notification needs to be sent according to the current time and the node estimated time includes: If the time difference between the current time and the estimated time of the node is within a preset time difference range, it is determined that a node reminder notification needs to be sent.
6. The method for monitoring maritime logistics nodes according to claim 5, characterized in that: The step of determining that a node reminder notification needs to be sent if the time difference between the current time and the node estimated time is within a preset time difference range comprises: Constructing a second expression between the current time, the estimated time of the node and the preset time difference range; The second expression is calculated using a SpEL parser to determine whether the time difference between the current time and the estimated time of the node is within the preset time difference range; If the value returned by the SpEL parser is a true value, it is determined that a node reminder notification needs to be sent.
7. The method for monitoring a maritime logistics node according to any one of claims 1 to 6, characterized in that: The step of generating the shipping logistics node notification information based on the shipping logistics order number, the shipping logistics node and the node estimated time comprises: Obtaining a notification information template, and determining a target template variable in the notification information template for representing shipping logistics information; The ocean logistics order number, the ocean logistics node and the node estimated time are used as existing template variables, and the missing template variables are determined according to the difference between the target template variable and the existing template variable; Acquire information corresponding to the missing template variable from the node reminder subscription request; Fill the shipping logistics order number, the shipping logistics node and the estimated time of the node, as well as the information corresponding to the missing template variables, into the corresponding positions in the notification information template to obtain the shipping logistics node notification information.
8. A maritime logistics node monitoring device, characterized in that: The device comprises: A subscription information acquisition module, used to respond to a user's node reminder subscription request, obtain subscription information from the node reminder subscription request, and obtain the user's notification receiving channel, wherein the subscription information includes a shipping logistics order number, a shipping logistics node, and an estimated node time; A notification information generation module, for generating, when the shipping logistics order number is verified, shipping logistics node notification information based on the shipping logistics order number, the shipping logistics node and the estimated node time, if it is determined that a node reminder notification needs to be sent according to the current time and the estimated node time; The notification information sending module is used to send the notification information of the shipping logistics node through the notification receiving channel if the number of notification sending times of the shipping logistics node is less than a preset threshold.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method for monitoring a maritime logistics node as described in any one of claims 1 to 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, execute the steps of the method for monitoring a maritime logistics node as described in any one of claims 1 to 7.