Platform track pushing failure retry method, device and equipment and storage medium

By introducing a progressive delay retry mechanism into the platform trajectory push system, the problem of high push failure rate is solved, the maintainability and user satisfaction of the system are improved, and a higher push success rate and system stability are achieved.

CN118642877APending Publication Date: 2024-09-13SHANGHAI DONGPU INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410682152.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

When the existing platform trajectory push system faces operating environment anomalies and service anomalies, the push failure rate is high, resulting in system crash or performance degradation, which reduces system maintainability and user satisfaction.

Method used

Adopt a progressive delay retry mechanism to pull logistics track data from the queue to be processed. If the push fails, it will be stored in the retry queue. Progressive delay push will be performed within the preset number of retries until the maximum number of retries is reached. Push back to the pending queue, and record the number of pushbacks. When the threshold is exceeded, the data is marked as error and removed from the queue.

Benefits of technology

Significantly improves the push success rate, reduces the risk of system crashes caused by too many push requests, and improves system maintainability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118642877A
    Figure CN118642877A
Patent Text Reader

Abstract

The invention relates to the technical field of information processing, in particular to a platform track pushing failure retry method, device and equipment and a storage medium, and the method comprises the steps: checking a pushing result of logistics track data, storing the logistics track data into a retry queue when the pushing result is that the pushing is unsuccessful, and carrying out the retry of the logistics track data. The logistics track data in the retry queue is subjected to progressive delay pushing in the preset retry number range, so that the risk that the target system crashes or the performance is reduced due to excessive and frequent pushing requests is reduced; the logistics track data is pushed back to the to-be-processed queue again, the pushing success rate is greatly improved, the pushing-back times of pushing the logistics track data back to the to-be-processed queue are recorded, when the pushing-back times reach the preset threshold value, the logistics track data are marked as wrong data, the wrong data are moved out of the to-be-processed queue, the maintainability of the system is improved, and the system reliability is improved. The user experience is improved; and the user satisfaction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a platform track push failure retry method, device, equipment and storage medium. Background Art

[0002] The platform track push system is designed to push the logistics tracks of the e-commerce platforms such as Pinduoduo, Taobao, Douyin, JD.com, Kuaishou, etc. in real time, guarantee the logistics index and related business capabilities, etc., support the real-time subscription of orders on the platform side, platform standard format packaging, logistics track query, recipient identity verification, express interception and other business scenarios, and have the capabilities of real-time order-preserving push, market statistics, traceability log, abnormal warning, supplementary push, etc. However, the data push end may have an abnormal operating environment, resulting in a push failure. The data push end operating environment abnormalities include network jitter, host resolution failure, network connection timeout, etc., or the data receiving end may have a service abnormality, resulting in a push timeout failure. The receiving end service abnormalities include application release, application node unavailability, gateway abnormalities, etc., and too many push requests will cause the target system to crash or cause performance degradation, reducing the maintainability of the system, and then causing the logistics track push to fail, the push success rate is low, resulting in loss of data and merchant penalties, reducing the platform index score, and reducing user satisfaction. Summary of the invention

[0003] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a platform track push failure retry method, device, equipment and storage medium that greatly improves the push success rate, reduces the risk of target system crash or performance degradation due to too many push requests, improves the maintainability of the system, improves user experience and improves user satisfaction.

[0004] The first aspect of the present invention provides a platform trajectory push failure retry method, comprising: pulling logistics trajectory data from a queue to be processed and pushing the logistics trajectory data; checking the push result of the logistics trajectory data, and determining whether the push result is a successful push; if not, storing the logistics trajectory data in a retry queue, and performing a progressive delayed push of the logistics trajectory data in the retry queue within a preset retry number range; when the retry number reaches a maximum value and the data push still fails, pushing the logistics trajectory data back to the queue to be processed, and recording the number of pushes of the logistics trajectory data back to the queue to be processed; when the push back number reaches a preset threshold, marking the logistics trajectory data as error data, and removing the error data from the queue to be processed.

[0005] Optionally, in a first implementation method of the first aspect of the present invention, pulling the logistics trajectory data from the queue to be processed and pushing the logistics trajectory data includes: sorting the queue to be processed according to the data storage time, and determining the single batch processing number of the data push; pulling the logistics trajectory data corresponding to the single batch processing number from the front end of the queue order of the queue to be processed; judging whether the target format of the logistics trajectory data is correct; if so, pushing the logistics trajectory data.

[0006] Optionally, in a second implementation method of the first aspect of the present invention, checking the push result of the logistics trajectory data and judging whether the push result is successfully pushed includes: creating a push listener, and using the push listener to listen to the push feedback information of the logistics trajectory data; when the push listener listens to the push feedback information, obtaining the push feedback information; parsing the push feedback information to obtain the push result; and judging whether the push result is successfully pushed.

[0007] Optionally, in a third implementation method of the first aspect of the present invention, if not, the logistics trajectory data is stored in a retry queue, and the logistics trajectory data in the retry queue is pushed with progressive delay within a preset retry number range, including: if not, the logistics trajectory data corresponding to the push result is stored in a retry queue; the queue attributes of the retry queue are set, and the queue attributes include a retry interval duration and a retry number threshold; based on an exponential backoff algorithm and the queue attributes, the logistics trajectory data in the retry queue is pushed with progressive delay.

[0008] Optionally, in a fourth implementation method of the first aspect of the present invention, when the number of retries reaches a maximum value and the data push still fails, the logistics trajectory data is pushed back to the queue to be processed, and the number of times the logistics trajectory data is pushed back to the queue to be processed is recorded, including: when the number of retries reaches a maximum value and the data push still fails, the logistics trajectory data is moved out of the retry queue; the logistics trajectory data is pushed back to the queue to be processed from the end of the queue sequence; and the number of times the logistics trajectory data is pushed back to the queue to be processed is recorded.

[0009] Optionally, in a fifth implementation method of the first aspect of the present invention, when the number of push backs reaches a preset threshold, the logistics trajectory data is marked as error data, and the error data is moved out of the queue to be processed, including: when the number of push backs reaches a preset push back threshold, the logistics trajectory data is marked as error data; the error data is moved out of the queue to be processed; notification information is generated based on the error data, and the notification information is sent to the management terminal.

[0010] Optionally, in a sixth implementation method of the first aspect of the present invention, when the number of push backs reaches a preset threshold, the logistics trajectory data is marked as error data and removed from the queue to be processed, and it also includes: storing the error data in a buffer queue, checking the error data in the buffer queue to obtain a check result; judging whether the check result is an error; if so, generating error information according to the error data corresponding to the check result, and analyzing the error information to obtain analysis result information; monitoring the execution of the logistics trajectory data corresponding to the error information, and recording detailed log information of the execution; merging the analysis result information and the detailed log information to obtain merged information, and uploading the merged information to the blockchain.

[0011] The second aspect of the present invention provides a platform trajectory push failure retry device, including: a pull push module, used to pull logistics trajectory data from a queue to be processed and push the logistics trajectory data; a check and judgment module, used to check the push result of the logistics trajectory data, and judge whether the push result is a successful push; a storage push module, used to store the logistics trajectory data in a retry queue if not, and perform progressive delayed push of the logistics trajectory data in the retry queue within a preset retry number range; a push back recording module, used to push the logistics trajectory data back to the queue to be processed when the retry number reaches a maximum value and the data push still fails, and record the number of pushes of the logistics trajectory data back to the queue to be processed; a mark removal module, used to mark the logistics trajectory data as error data when the push back number reaches a preset threshold, and remove the error data from the queue to be processed.

[0012] Optionally, in a first implementation method of the second aspect of the present invention, the pull and push module includes: a sorting determination unit, used to sort the queue to be processed according to the data storage time, and determine the single batch processing number of the data push; a pulling unit, used to pull the logistics trajectory data corresponding to the single batch processing number starting from the front end of the queue order of the queue to be processed; a first judgment unit, used to judge whether the target format of the logistics trajectory data is correct; and a first pushing unit, used to push the logistics trajectory data if so.

[0013] Optionally, in a second implementation method of the second aspect of the present invention, the inspection and judgment module includes: creating a monitoring unit, used to create a push listener, and using the push listener to monitor the push feedback information of the logistics trajectory data; an acquisition unit, used to acquire the push feedback information when the push listener listens to the push feedback information; a parsing unit, used to parse the push feedback information to obtain a push result; and a second judgment unit, used to judge whether the push result is a successful push.

[0014] Optionally, in a third implementation method of the second aspect of the present invention, the storage and push module includes: a storage unit, used to store the logistics trajectory data corresponding to the push result into a retry queue if not; a setting unit, used to set the queue attributes of the retry queue, the queue attributes including the retry interval duration and the retry number threshold; a second push unit, used to perform progressive delayed push of the logistics trajectory data in the retry queue based on an exponential backoff algorithm and the queue attributes.

[0015] Optionally, in a fourth implementation method of the second aspect of the present invention, the push back recording module includes: a first removal unit, used to move the logistics trajectory data out of the retry queue when the number of retries reaches a maximum value and the data push still fails; a push back unit, used to push the logistics trajectory data back to the queue to be processed from the end of the queue sequence; and a recording unit, used to record the number of push backs of the logistics trajectory data to the queue to be processed.

[0016] Optionally, in a fifth implementation of the second aspect of the present invention, the mark removal module includes: a marking unit, used to mark the logistics trajectory data as error data when the number of push backs reaches a preset push back threshold; a second removal unit, used to move the error data out of the queue to be processed; and a generation and sending unit, used to generate notification information based on the error data, and send the notification information to a management terminal.

[0017] Optionally, in a sixth implementation method of the second aspect of the present invention, it also includes: a storage verification module, which is used to store the error data into a buffer queue, verify the error data in the buffer queue, and obtain a verification result; a judgment module, which is used to judge whether the verification result is an error; a generation analysis module, which is used to generate error information according to the error data corresponding to the verification result, and analyze the error information to obtain analysis result information; a monitoring and recording module, which is used to monitor the execution status of the logistics trajectory data corresponding to the error information, and record detailed log information of the execution status; a merge upload module, which is used to merge the analysis result information and the detailed log information to obtain merged information, and upload the merged information to the blockchain.

[0018] The third aspect of the present invention provides a platform trajectory push failure retry device, the platform trajectory push failure retry device comprising: a memory and at least one processor, the memory storing instructions; at least one of the processors calls the instructions in the memory to enable the platform trajectory push failure retry device to execute each step of the platform trajectory push failure retry method described in any one of the above items.

[0019] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, and when the instructions are executed by a processor, the steps of any of the above-mentioned platform trajectory push failure retry methods are implemented.

[0020] In the technical solution of the present invention, by checking the push result of the logistics trajectory data, when the push result is unsuccessful, the logistics trajectory data is stored in a retry queue, and the logistics trajectory data in the retry queue is pushed with progressive delay within a preset retry number range, thereby reducing the risk of target system crash or performance degradation due to excessive and frequent push requests. When the number of retries reaches the maximum value and the data push still fails, the logistics trajectory data is pushed back to the pending queue, which greatly improves the push success rate, and records the number of times the logistics trajectory data is pushed back to the pending queue. When the number of pushes reaches a preset threshold, the logistics trajectory data is marked as erroneous data, and the erroneous data is removed from the pending queue, thereby improving the maintainability of the system, improving the user experience, and improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A first flow chart of a platform track push failure retry method provided by an embodiment of the present invention;

[0022] Figure 2 A second flow chart of the platform track push failure retry method provided by an embodiment of the present invention;

[0023] Figure 3 A third flow chart of the platform track push failure retry method provided by an embodiment of the present invention;

[0024] Figure 4 A fourth flow chart of the platform track push failure retry method provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of a structure of a platform trajectory push failure retry device provided by an embodiment of the present invention;

[0026] Figure 6 Another structural schematic diagram of a platform trajectory push failure retry device provided by an embodiment of the present invention;

[0027] Figure 7 A schematic diagram of the structure of a platform trajectory push failure retry device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The present invention provides a platform trajectory push failure retry method, device, equipment and storage medium, which greatly improves the push success rate, reduces the risk of target system crash or performance degradation due to too many push requests, improves the maintainability of the system, enhances user experience and improves user satisfaction.

[0029] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the platform track push failure retry method in an embodiment of the present invention includes:

[0031] 101. Pull the logistics track data from the queue to be processed and push the logistics track data;

[0032] In this embodiment, the system pulls logistics trajectory data from the queue to be processed periodically or as needed. Once connected to the queue to be processed, the system will take out the logistics trajectory data from the queue and cache it in the system memory or temporary storage, waiting for subsequent processing. During the pulling process, taking into account possible abnormal situations, such as the queue being empty or the connection being interrupted, the corresponding exception handling mechanism is used to deal with these situations to ensure the stability and reliability of the system, and determine the push target of the logistics trajectory data, which may be other systems, applications, or external services. The logistics trajectory data to be pushed is packaged and encoded, and the packaged data is pushed to the target system through a network communication protocol (such as HTTP, MQTT, etc.). The push is performed asynchronously to avoid the push process blocking other system operations. After the push is completed, the system may receive a push result returned by the target system, including whether the push is successful, the push status code, and other information.

[0033] 102. Check the push result of the logistics track data and determine whether the push result is successful;

[0034] In this embodiment, a certain period of time is waited to ensure that the push operation is completed, and then the push result information is obtained from the result returned by the push operation, and the result returned by the push operation is parsed. Information related to the push result is extracted according to the specific push protocol or return format. For example, if it is an HTTP protocol, whether the push is successful can be determined based on the status code, and whether the push status is success or failure can be determined based on the push result information obtained by parsing.

[0035] 103. If not, the logistics track data is stored in a retry queue, and the logistics track data in the retry queue is pushed with progressive delay within a preset retry number range;

[0036] In this embodiment, if the push result is an unsuccessful push, the logistics trajectory data that failed to be pushed will be stored in a retry queue so that it can be re-pushed later. The retry number range and the progressive delay push strategy are preset, including parameters such as the maximum number of retries, the initial delay time, and the retry interval increasing factor. For example, the maximum number of retries can be set to 10 times, the initial delay time to 30 seconds, and the retry interval increasing factor to 2, indicating that the interval time of each retry will increase exponentially. Within the preset retry number range, the logistics trajectory data in the retry queue is pushed with a progressive delay. First, the delay time of the first retry is determined according to parameters such as the initial delay time, and the push is retried after waiting for a certain period of time. If the push is successful, the retry is stopped. If the push fails, the delay time is gradually increased according to the retry interval increasing factor, and the next retry push is performed until the maximum number of retries is reached or the push is successful.

[0037] 104. When the number of retries reaches the maximum value and the data push still fails, the logistics track data is pushed back to the queue to be processed, and the number of times the logistics track data is pushed back to the queue to be processed is recorded;

[0038] In this embodiment, during the progressive delay retry push process, if the number of retries reaches the preset maximum value and the logistics trajectory data still cannot be successfully pushed, it means that the push operation has tried all available retries, and the logistics trajectory data that failed to be pushed is pushed back to the pending queue for subsequent reprocessing or re-pushing. This requires ensuring that the re-pushed data can be correctly inserted into the appropriate position of the pending queue so that it can be processed again in a timely manner later. When the logistics trajectory data is pushed back to the pending queue, the number of pushes needs to be recorded. This can be done by adding a field to the data record to record the number of pushes back, or by saving the push back number information in a special record. This can facilitate subsequent statistics and analysis of the number of pushes back, as well as monitoring of data processing.

[0039] 105. When the number of push-backs reaches a preset threshold, the logistics track data is marked as erroneous data and removed from the queue to be processed;

[0040] In this embodiment, in the process of pushing back to the queue to be processed, it is necessary to monitor the number of push-backs for each logistics trajectory data. For each logistics trajectory data, when the number of push-backs reaches a preset threshold, the corresponding processing mechanism needs to be triggered. The preset threshold can be configured in the system settings, and is usually set by the system administrator or developer according to actual conditions. Once the number of push-backs reaches the preset threshold, it means that the logistics trajectory data still cannot be successfully processed after multiple retries. At this time, the logistics trajectory data needs to be marked as error data for further processing or exclusion. The marking method can be to add an error identification field in the data record and set it to the corresponding error state. After being marked as error data, the logistics trajectory data needs to be removed from the queue to be processed to avoid affecting the subsequent data processing process.

[0041] In an embodiment of the present invention, by checking the push result of the logistics trajectory data, when the push result is unsuccessful, the logistics trajectory data is stored in a retry queue, and the logistics trajectory data in the retry queue is pushed with progressive delay within a preset retry number range, thereby reducing the risk of target system crash or performance degradation due to excessive and frequent push requests. When the number of retries reaches the maximum value and the data push still fails, the logistics trajectory data is pushed back to the pending queue, which greatly improves the push success rate, and records the number of times the logistics trajectory data is pushed back to the pending queue. When the number of pushes reaches a preset threshold, the logistics trajectory data is marked as error data, and the error data is removed from the pending queue, thereby improving the maintainability of the system, improving the user experience, and improving user satisfaction.

[0042] See also Figure 2 , a second embodiment of the platform track push failure retry method in an embodiment of the present invention includes:

[0043] 201. Sort the queue to be processed according to the data storage time, and determine the number of single batches of data push processing;

[0044] In this embodiment, first, the data in the queue uses a timestamp field to record the storage time, and the data in the queue to be processed is sorted according to the storage time, and the amount of data taken out from the queue to be processed each time is determined, that is, the number of single batch processing. This number can be adjusted according to the system requirements and performance to achieve optimal processing efficiency and resource utilization.

[0045] 202. Pulling logistics track data corresponding to the number of single batch processing from the front of the queue to be processed;

[0046] In this embodiment, data is pulled from the front of the queue to be processed, which means that the data that enters the queue first is given priority, that is, the first-in-first-out (FIFO) principle. In this way, it can be ensured that the data is processed in time according to the order of entering the queue, and the amount of data pulled from the queue to be processed each time, that is, the single batch processing number, is determined. Starting from the front of the queue order, the logistics trajectory data corresponding to the single batch processing number are pulled in sequence. According to the determined single batch processing number, the queue to be processed is traversed in a loop, and the data is taken out in sequence until the single batch processing number is reached or all the data in the queue is taken out.

[0047] 203. Determine whether the target format of the logistics trajectory data is correct;

[0048] In this embodiment, first, the target format specification of the logistics trajectory data is clearly defined, and each field is verified to ensure that it complies with the target format specification. For example, it is checked whether the field exists, whether the data type is correct (such as string, integer, date and time, etc.), whether the data length meets the requirements, etc. It is also necessary to verify whether the data is complete, that is, whether each necessary field has a value to ensure the integrity and accuracy of the data. If the source format of the logistics trajectory data does not match the target format, data format conversion is required.

[0049] 204. If yes, push the logistics track data;

[0050] In this embodiment, if the target format of the logistics track data is correct, the logistics track data is pushed.

[0051] 205. Create a push listener, and use the push listener to monitor the push feedback information of the logistics track data;

[0052] In this embodiment, a suitable push listener is selected and registered in the system to ensure that it can receive push feedback information and determine the events that need to be monitored, including push success, push failure, push timeout, etc.

[0053] 206. When the push listener listens to the push feedback information, the push feedback information is obtained;

[0054] In this embodiment, the push listener is configured to continuously listen to a channel or port for push feedback information. Once the push listener listens to push feedback information, the push feedback information is acquired.

[0055] 207. Analyze the push feedback information to obtain the push result;

[0056] In this embodiment, once the push feedback information is obtained, it is necessary to parse the event type, such as push success, push failure, etc., which is identified by the identifier, status code or other metadata in the feedback information. According to the identified push feedback event type, relevant data is extracted from the feedback information. For example, in the case of push failure, it may be necessary to extract the failure reason, failure time and other information to obtain the push result.

[0057] 208. Determine whether the push result is a successful push;

[0058] In this embodiment, relevant data about the push result is obtained, and the push success mark is determined according to the design and agreement of the push system. The parsed push feedback information is checked to see whether there is a success mark. If the push feedback information contains a success mark, then the push result can be confirmed to be successful. If the push feedback information does not contain a success mark, or there is a push failure mark, then the push result is not successful.

[0059] 209. If not, the logistics track data corresponding to the push result is stored in the retry queue;

[0060] In this embodiment, if the push result is unsuccessful, the logistics track data corresponding to the push result is obtained, and the obtained logistics track data is stored in the retry queue.

[0061] 210. Set the queue attributes of the retry queue, including the retry interval and the retry threshold;

[0062] In this embodiment, the queue properties of the retry queue are set. The retry interval refers to the time interval between each push retry, which is used to control the frequency of retries. The retry interval of each push retry gradually increases to balance the retry frequency and system load. The retry number threshold refers to the maximum number of retries allowed. After reaching the threshold, the push retry is stopped. Setting the retry number threshold can avoid unlimited retries, thereby protecting the security of the system and data.

[0063] 211. Based on the exponential backoff algorithm and queue attributes, the logistics trajectory data in the retry queue is pushed with progressive delay;

[0064] In this embodiment, the exponential backoff algorithm is an algorithm commonly used in network communication and retry mechanisms, and is used to dynamically adjust the retry interval after a retry failure. The basic principle of the algorithm is that after each retry failure, the retry interval is multiplied by a fixed multiple (usually 2) to increase the retry interval exponentially. This can give the system and service a certain cooling time after a retry failure, while avoiding too frequent retries. When performing progressive delay push, the initial retry interval and the retry limit can be determined in combination with the retry interval duration and the retry count threshold in the queue attributes. First, the retry interval duration set as the initial The retry interval is set, and the number of retries is initialized to 0. Each time a push is retried, if the push fails, the retry interval is increased exponentially according to the exponential backoff algorithm, and the number of retries is increased by 1. When the number of retries reaches the set retry threshold, further retries are stopped, and the push failure information is recorded, waiting for subsequent processing. During the process of progressive delayed push, the retry interval will gradually increase, thereby giving the system and service more cooling time after a retry fails, avoiding too frequent retries. This progressive delayed push method can effectively reduce system load and network traffic, while improving the push success rate and data transmission stability.

[0065] In the embodiment of the present invention, it is ensured that the data in the queue to be processed is processed in chronological order, the time sequence of the data is guaranteed, and the single batch processing number is controlled by pulling a specified amount of data for processing, avoiding the situation where too much data is processed at one time and causing the system to be overloaded, ensuring that the pushed logistics trajectory data meets the target format requirements, improving the accuracy and reliability of data push, ensuring that only data with correct format is pushed, avoiding the occurrence of pushing erroneous data, using a push listener to monitor push feedback information in real time, and obtaining push results in time, thereby improving the real-time and controllability of the push process, and timely analyzing and judging the push results, so that the success or failure of the push can be quickly responded to and processed, thereby improving the efficiency and accuracy of the push, and establishing a complete retry mechanism, gradually delaying and retrying the data that failed to be pushed, and combining with the exponential backoff algorithm, improving the push success rate, and ensuring the reliability and integrity of the data.

[0066] See also Figure 3 , a third embodiment of the platform track push failure retry method in the embodiment of the present invention includes:

[0067] 301. When the number of retries reaches the maximum value and data push still fails, the logistics track data is removed from the retry queue;

[0068] In this embodiment, in the set retry queue, each data item has a maximum retry threshold. When the retry count of a data item reaches this threshold, it means that the system has attempted the maximum number of retries but still cannot successfully push the data item. Once the retry count of a data item reaches the maximum value and still cannot be successfully pushed, the system needs to process the data push failure. During the processing of the data push failure, the data item needs to be removed from the retry queue to avoid continuing invalid retry operations.

[0069] 302. Push the logistics track data from the end of the queue sequence back to the queue to be processed;

[0070] In this embodiment, first, the system needs to identify the logistics trajectory data items that need to be re-pushed. These data items are data that have undergone a certain number of retries but have not been successfully pushed, and determine the conditions for re-pushing, such as the number of retries has not reached the maximum value, the status of the data item allows re-pushing, etc., and push the logistics trajectory data back to the queue to be processed from the end of the queue order.

[0071] 303. Record the number of times the logistics track data is pushed back to the queue to be processed;

[0072] In this embodiment, first, the system needs to add an attribute to each logistics trajectory data item to record the number of times it is pushed back to the pending queue. Whenever the logistics trajectory data item is pushed back to the pending queue, the system needs to update the number of push backs for the data item. Specifically, the push back number is increased by one to reflect that the data item has undergone a push back operation. The system needs to record the changes in the push back number after each push back operation. This can be by recording the increase in the push back number in the system log, or by recording the change history of the push back number in the data item attributes.

[0073] 304. When the number of pushbacks reaches a preset pushback threshold, the logistics track data is marked as erroneous data;

[0074] In this embodiment, the number of push-backs for each logistics trajectory data item is monitored in real time by periodically scanning the data items in the queue to be processed and checking whether the number of push-backs reaches a preset push-back threshold. A preset push-back threshold is set in the system, and an upper limit on the number of push-backs is set to determine when the logistics trajectory data is marked as erroneous data to prevent data items from being pushed back indefinitely. Whenever the system detects that the number of push-backs for a logistics trajectory data item reaches or exceeds the preset push-back threshold, the corresponding processing flow is triggered. When the number of push-backs reaches the preset push-back threshold, the system marks the logistics trajectory data item as erroneous data.

[0075] 305. Remove the error data from the queue to be processed;

[0076] In this embodiment, once the logistics trajectory data is marked as erroneous data, the erroneous data is moved out of the queue to be processed. After being moved out of the queue to be processed, the system needs to update the status of the erroneous data to reflect its current processing status, specifically updating the status field of the data item to "processed" or a similar status identifier.

[0077] 306. Generate notification information according to the error data, and send the notification information to the management terminal;

[0078] In this embodiment, it is identified which logistics trajectory data are marked as erroneous data. Once the erroneous data is identified, the system needs to generate corresponding notification information based on this data. After generating the notification information, the system may need to format it to ensure that it complies with the format requirements accepted by the management terminal. After completing the generation and formatting of the notification information, the system sends it to the management terminal.

[0079] In the embodiment of the present invention, it is ensured that when the number of retries reaches the maximum value and the data push continues to fail, the logistics trajectory data is promptly removed from the retry queue to avoid invalid repeated pushes, save system resources, and push the logistics trajectory data back to the end of the queue to be processed. The integrity and reliability of data processing are improved through the reprocessing mechanism. The number of times the logistics trajectory data is pushed back to the queue to be processed is recorded, which helps to track the processing history of the data and facilitates subsequent data analysis and troubleshooting. When the number of pushes back reaches a preset push back threshold, the logistics trajectory data is marked as erroneous data, and the problematic data is clearly identified to facilitate subsequent processing and analysis. The erroneous data is removed from the queue to be processed to avoid the erroneous data from continuing to affect the normal processing flow, ensure the accuracy and timeliness of data processing, generate notification information and send it to the management terminal, report data processing anomalies in a timely manner, help management personnel to understand the system status in a timely manner, facilitate rapid adoption of corresponding measures, and improve the stability and robustness of the system. By monitoring and processing the number of retries and erroneous data, system failures and delays caused by data anomalies are effectively reduced, ensuring the normal operation of the system.

[0080] See also Figure 4 , a fourth embodiment of the platform track push failure retry method in the embodiment of the present invention includes:

[0081] 401. Storing the error data in a buffer queue, inspecting the error data in the buffer queue, and obtaining an inspection result;

[0082] In this embodiment, the identified erroneous data is stored in a specific buffer queue. Once the erroneous data is stored in the buffer queue, the system will check the data in the queue. After checking the erroneous data, the system will generate corresponding results based on the test results, which include identifying which data has passed the test and which data has not passed the test, and may be accompanied by information about the reason for the test failure. The generated test results need to be stored for subsequent use, which involves saving the test results to a database, log file or other persistent storage medium for subsequent query and analysis.

[0083] 402. Determine whether the test result is an error;

[0084] In this embodiment, the inspection result obtained by inspecting the erroneous data previously is obtained, and the system determines whether there is an error based on the inspection result.

[0085] 403. If yes, generate error information according to the error data corresponding to the test result, and analyze the error information to obtain analysis result information;

[0086] In this embodiment, if the system determines that the test result indicates an error, the system will generate corresponding error information based on the error data identified in the test result, and analyze the error information. After analyzing the error information, the system will obtain corresponding analysis result information.

[0087] 404. Monitor the execution status of the logistics track data corresponding to the error information and record detailed log information of the execution status;

[0088] In this embodiment, it is necessary to set monitoring rules to determine which logistics trajectory data to monitor. The system will continuously monitor the execution of the set logistics trajectory data, including the source of the data, processing process, transmission path, etc. During the monitoring process, the system will record detailed log information. The recorded log information can be used to analyze the causes and impacts of abnormal situations.

[0089] 405. Merge the analysis result information and the detailed log information to obtain merged information, and upload the merged information to the blockchain;

[0090] In this embodiment, the previously generated analysis result information and detailed log information are prepared and merged. The key information of the two can be integrated into one data structure. For example, the analysis result can be used as the main information, and the detailed log information can be used as additional information, or other methods can be used to associate the two with each other. Before merging the information, it is necessary to ensure that the data formats of the analysis result information and the detailed log information are compatible and meet the standard format requirements for uploading to the blockchain. If data conversion or formatting is not required, in order to ensure the security and integrity of the information, the merged information can be encrypted and digitally signed, and the merged information can be uploaded to the blockchain using the corresponding blockchain platform or tool. It is confirmed that the merged information has been successfully uploaded to the blockchain, and the corresponding transaction hash or block hash is obtained as a confirmation mark. After uploading to the blockchain, the uploaded information can be verified through the verification mechanism provided by the blockchain network.

[0091] In the embodiment of the present invention, the error data is stored in a buffer queue, which can effectively separate the abnormal data from the normal data, facilitate subsequent processing, check the error data, and determine whether the test result is an error. This step helps to accurately locate and identify the error data and process it in a timely manner. Error information is generated according to the test result, and the error information is analyzed to obtain analysis result information, which helps to deeply understand the cause and scope of the error, monitor the execution of the logistics trajectory data corresponding to the error information, and record detailed log information, which helps to track the processing process of the error data and the system operation status in real time, merge the analysis result information and the detailed log information, and upload the merged information to the blockchain. This approach can ensure the integrity and immutability of the data, improve the security and credibility of the data, and the entire process records the abnormal data, error information, analysis results and log information on the blockchain, ensuring the traceability and transparency of the data, and facilitating subsequent auditing and supervision.

[0092] The above describes the platform track push failure retry method in the embodiment of the present invention. The following describes the platform track push failure retry device in the embodiment of the present invention. Figure 5 , an embodiment of the platform trajectory push failure retry device in an embodiment of the present invention includes:

[0093] The pull and push module 501 is used to pull the logistics track data from the queue to be processed and push the logistics track data;

[0094] The checking and judging module 502 is used to check the push result of the logistics track data and judge whether the push result is successful;

[0095] The storage push module 503 is used to store the logistics track data in the retry queue if no, and push the logistics track data in the retry queue with progressive delay within the preset retry number range;

[0096] The push-back recording module 504 is used to push the logistics track data back to the queue to be processed when the number of retries reaches the maximum value and the data push still fails, and record the number of push-back times of the logistics track data being pushed back to the queue to be processed;

[0097] The mark removal module 505 is used to mark the logistics track data as erroneous data and remove the erroneous data from the queue to be processed when the number of push-backs reaches a preset threshold.

[0098] In this embodiment, by checking the push result of the logistics trajectory data, when the push result is unsuccessful, the logistics trajectory data is stored in the retry queue, and the logistics trajectory data in the retry queue is pushed with progressive delay within the preset retry number range, thereby reducing the risk of target system crash or performance degradation due to excessive and frequent push requests. When the number of retries reaches the maximum value and the data push still fails, the logistics trajectory data is pushed back to the pending queue, which greatly improves the push success rate, and records the number of times the logistics trajectory data is pushed back to the pending queue. When the number of pushes reaches the preset threshold, the logistics trajectory data is marked as error data, and the error data is removed from the pending queue, thereby improving the maintainability of the system, improving the user experience, and improving user satisfaction.

[0099] See also Figure 6 Another embodiment of the platform trajectory push failure retry device in the embodiment of the present invention includes:

[0100] The pull and push module 501 is used to pull the logistics track data from the queue to be processed and push the logistics track data;

[0101] The checking and judging module 502 is used to check the push result of the logistics track data and judge whether the push result is successful;

[0102] The storage push module 503 is used to store the logistics track data in the retry queue if no, and push the logistics track data in the retry queue with progressive delay within the preset retry number range;

[0103] The push-back recording module 504 is used to push the logistics track data back to the queue to be processed when the number of retries reaches the maximum value and the data push still fails, and record the number of push-back times of the logistics track data being pushed back to the queue to be processed;

[0104] The marking removal module 505 is used to mark the logistics track data as erroneous data and remove the erroneous data from the queue to be processed when the number of push-backs reaches a preset threshold;

[0105] In this embodiment, the pull and push module 501 includes: a sorting determination unit 5011, which is used to sort the queue to be processed according to the data storage time, and determine the single batch processing number of the data push; a pulling unit 5012, which is used to pull the logistics trajectory data corresponding to the single batch processing number from the front end of the queue sequence of the queue to be processed; a first judgment unit 5013, which is used to judge whether the target format of the logistics trajectory data is correct; and a first pushing unit 5014, which is used to push the logistics trajectory data if so.

[0106] In this embodiment, the inspection and judgment module 502 includes: a monitoring unit 5021 for creating a push listener, and using the push listener to monitor the push feedback information of the logistics trajectory data; an acquisition unit 5022 for acquiring the push feedback information when the push listener monitors the push feedback information; a parsing unit 5023 for parsing the push feedback information to obtain the push result; and a second judgment unit 5024 for judging whether the push result is a successful push.

[0107] In this embodiment, the storage push module 503 includes: a storage unit 5031, which is used to store the logistics trajectory data corresponding to the push result into the retry queue if not; a setting unit 5032, which is used to set the queue properties of the retry queue, and the queue properties include the retry interval duration and the retry number threshold; a second push unit 5033, which is used to perform progressive delayed push of the logistics trajectory data in the retry queue based on the exponential backoff algorithm and the queue properties.

[0108] In this embodiment, the push-back recording module 504 includes: a first removal unit 5041, which is used to move the logistics trajectory data out of the retry queue when the number of retries reaches the maximum value and the data push still fails; a push-back unit 5042, which is used to push the logistics trajectory data back to the queue to be processed from the end of the queue sequence; and a recording unit 5043, which is used to record the number of push-back times of the logistics trajectory data back to the queue to be processed.

[0109] In this embodiment, the mark removal module 505 includes: a marking unit 5051, which is used to mark the logistics trajectory data as error data when the number of push-backs reaches a preset push-back threshold; a second removal unit 5052, which is used to move the error data out of the queue to be processed; and a generation and sending unit 5053, which is used to generate notification information based on the error data and send the notification information to the management terminal.

[0110] In this embodiment, it also includes: a storage verification module 506, which is used to store the error data into a buffer queue, verify the error data in the buffer queue, and obtain a verification result; a judgment module 507, which is used to judge whether the verification result is an error; a generation analysis module 508, which is used to generate error information according to the error data corresponding to the verification result, and analyze the error information to obtain analysis result information; a monitoring and recording module 509, which is used to monitor the execution status of the logistics trajectory data corresponding to the error information, and record detailed log information of the execution status; a merge upload module 510, which is used to merge the analysis result information and the detailed log information to obtain merged information, and upload the merged information to the blockchain.

[0111] above Figure 5 and Figure 6 The platform trajectory push failure retry device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The platform trajectory push failure retry device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0112] Figure 7 1 is a schematic diagram of the structure of a platform track push failure retry device provided by an embodiment of the present invention. The platform track push failure retry device 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 633 or data 632. Among them, the memory 620 and the storage medium 630 can be short-term storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the platform track push failure retry device 600. Furthermore, the processor 610 can be configured to communicate with the storage medium 630, and execute a series of instruction operations in the storage medium 630 on the platform track push failure retry device 600 to implement the steps of the platform track push failure retry method provided in the above-mentioned method embodiments.

[0113] The platform track push failure retry device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating systems 631, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 7The illustrated platform trajectory push failure retry device structure does not constitute a limitation on the platform trajectory push failure retry device, and may include more or fewer components than illustrated, or a combination of certain components, or a different arrangement of components.

[0114] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the platform trajectory push failure retry method.

[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0117] Finally, it should be noted that the above description is only a preferred example of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A platform track push failure retry method, It is characterized in that include: Pulling logistics track data from the queue to be processed, and pushing the logistics track data; Check the push result of the logistics track data, and determine whether the push result is successfully pushed; If not, the logistics track data is stored in a retry queue, and the logistics track data in the retry queue is pushed with progressive delay within a preset retry number range; When the number of retries reaches the maximum value and the data push still fails, the logistics track data is pushed back to the queue to be processed, and the number of times the logistics track data is pushed back to the queue to be processed is recorded; When the number of push-backs reaches a preset threshold, the logistics trajectory data is marked as erroneous data and the erroneous data is removed from the queue to be processed.

2. The platform track push failure retry method according to claim 1, It is characterized in that Pulling the logistics track data from the queue to be processed and pushing the logistics track data includes: Sort the queue to be processed according to the data storage time, and determine the number of single batches of data push; Pulling a quantity of logistics trajectory data corresponding to the number of single batch processing from the front end of the queue to be processed; Determining whether the target format of the logistics trajectory data is correct; If so, the logistics track data is pushed.

3. The platform track push failure retry method according to claim 1, It is characterized in that The checking the push result of the logistics track data and determining whether the push result is successfully pushed includes: Create a push listener, and use the push listener to monitor the push feedback information of the logistics track data; When the push listener listens to the push feedback information, the push feedback information is obtained; Parsing the push feedback information to obtain a push result; Determine whether the push result is a successful push.

4. The platform track push failure retry method according to claim 1, It is characterized in that If not, the logistics track data is stored in a retry queue, and the logistics track data in the retry queue is pushed with progressive delay within a preset retry number range, including: If not, the logistics track data corresponding to the push result is stored in a retry queue; Set queue attributes of the retry queue, wherein the queue attributes include a retry interval and a retry count threshold; The logistics trajectory data in the retry queue is pushed with progressive delay based on an exponential backoff algorithm and the queue attributes.

5. The platform track push failure retry method according to claim 1, It is characterized in that When the number of retries reaches the maximum value and the data push still fails, the logistics track data is pushed back to the queue to be processed, and the number of times the logistics track data is pushed back to the queue to be processed is recorded, including: When the number of retries reaches the maximum value and the data push still fails, the logistics track data is removed from the retry queue; Pushing the logistics track data back to the queue to be processed from the last end of the queue sequence; Record the number of times the logistics trajectory data is pushed back to the queue to be processed.

6. The platform track push failure retry method according to claim 1, It is characterized in that When the number of push-backs reaches a preset threshold, marking the logistics track data as erroneous data and removing the erroneous data from the queue to be processed includes: When the number of pushbacks reaches a preset pushback threshold, the logistics trajectory data is marked as erroneous data; Moving the erroneous data out of the queue to be processed; Notification information is generated according to the error data, and the notification information is sent to a management terminal.

7. The platform track push failure retry method according to claim 1, It is characterized in that When the number of push-backs reaches a preset threshold, the logistics track data is marked as erroneous data and removed from the queue to be processed, and further includes: The error data is stored in a buffer queue, and the error data in the buffer queue is tested to obtain a test result; Determine whether the test result is an error; If yes, generating error information according to the error data corresponding to the inspection result, and analyzing the error information to obtain analysis result information; Monitor the execution status of the logistics track data corresponding to the error information, and record detailed log information of the execution status; The analysis result information and the detailed log information are merged to obtain merged information, and the merged information is uploaded to the blockchain.

8. A platform track push failure retry device, It is characterized in that include: A pull and push module is used to pull logistics track data from the queue to be processed and push the logistics track data; A checking and judging module is used to check the push result of the logistics track data and judge whether the push result is successfully pushed; A storage push module is used to store the logistics track data in a retry queue if no, and perform progressive delayed push of the logistics track data in the retry queue within a preset retry number range; A push-back recording module is used to push the logistics track data back to the queue to be processed when the number of retries reaches the maximum value and the data push still fails, and record the number of push-backs of the logistics track data back to the queue to be processed; The marking and removing module is used to mark the logistics trajectory data as erroneous data and remove the erroneous data from the queue to be processed when the number of push-backs reaches a preset threshold.

9. A platform track push failure retry device, It is characterized in that The platform track push failure retry device comprises: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors calls the instructions in the memory to enable the platform trajectory push failure retry device to perform each step of the platform trajectory push failure retry method as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, It is characterized in that When the instructions are executed by the processor, the steps of the platform trajectory push failure retry method as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Metadata request retry method and device, computer equipment, medium and product

    CN119583653A