Algorithm and logistics inquiry system to improve accuracy of identifying similar logistics numbers
By analyzing the number segment information of logistics numbers and calculating the matching accuracy of regular expressions, combining rules and algorithm methods, the problem of low accuracy of logistics number identification is solved, and high accuracy automatic identification of logistics channels and automatic tracking of emails is realized, which improves logistics query efficiency and system maintenance costs.
Patent Information
- Application Number
- JP2024558070
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-01-12
- Filing Date
- 2024-01-12
- Publication Date
- 2025-04-30
- Estimated Expiration
- 2044-01-12
AI Technical Summary
The prior art has low recognition accuracy when identifying and tracking similar logistics numbers, resulting in users needing to manually specify logistics channels, increasing operation time and complexity, especially in international logistics and multi-lingual environments.
By analyzing the number of pieces of information of logistics numbers, calculating the matching accuracy of regular expressions, combining rules and algorithm methods, improving the accuracy of automatic identification of logistics channels, and automatically tracking logistics numbers through email.
It improves the identification accuracy of logistics channels, reduces the demand for manual designation by users, improves the query efficiency of international logistics numbers, reduces software maintenance costs, and improves calculation speed and accuracy.
Smart Images

Figure 2025513759000001_ABST
Abstract
Description
[Technical field]
[0001] The present application relates to the field of computers, and in particular to an algorithm and a logistics inquiry system for improving the accuracy of identifying similar logistics numbers, as well as a method and system for inquiring logistics numbers by email. [Background technology]
[0002] In the current global integrated logistics inquiry platform (also known as the "logistics inquiry system"), due to the lack of constrained standards in the logistics industry, each logistics channel (also known as the "logistics operator") has its own automatic logistics number generation method and rules. For logistics numbers without unified constraints and standards, in the integrated logistics inquiry system, the more logistics channels are supported, the higher the probability of similar logistics numbers (meaning logistics numbers with the same or very similar rules and difficult to understand by the naked eye) colliding during inquiry, which causes the logistics channel to be unable to be automatically identified, reducing the efficiency of users' inquiry of logistics numbers and affecting the user's experience of the logistics inquiry system.
[0003] The current common method is to set up regular matching rules for logistics numbers according to different logistics channels, and distinguish some logistics numbers according to the rules, but for similar logistics numbers with very close rules, it is difficult to further improve the identification accuracy of logistics channels based on regular matching, and even if the identification of logistics channels is realized based on regular matching, the arrangement of the rules is very complicated, so it is inconvenient to maintain and use. In the related technology of logistics inquiry system, for similar logistics numbers that cannot be identified, it is common for users to manually specify the corresponding logistics channels, and this operation method costs users a lot of time, and for international logistics channels that adopt other languages, it brings great troubles and troubles to users' logistics number inquiry work.
[0004] In addition, in the field of e-commerce, where the frequency of inquiries about logistics numbers is very high, after the goods purchased on each e-commerce platform are shipped, the purchaser usually receives a shipping email from the merchant. The shipping email is mainly used to notify the purchaser that the ordered goods have been shipped, and to provide the shipped logistics number or an inquiry link for the logistics number.
[0005] If a buyer wants to continuously check and track the logistics number, the current common method is to copy the logistics number in the shipping email when the buyer receives it and paste it into the logistics inquiry platform for checking and tracking. This method of checking the logistics number is inefficient for buyers who purchase products frequently (such as dedicated purchasing staff), and takes time and effort. Moreover, if an abnormality occurs in the logistics process, the buyer cannot timely grasp the logistics process and intervene, which may result in unnecessary losses.
[0006] Other technical problems related to the present application will be further described later. The above content is only intended to assist the understanding of the aspects of the present application, and does not represent that all of the above content is prior art. Summary of the Invention [Problem to be solved by the invention]
[0007] The main purpose of this application is to provide an algorithm and a logistics inquiry system for improving the identification accuracy of similar logistics numbers, so as to improve the identification accuracy of logistics channels when similar logistics numbers are inquired by the logistics inquiry system, and to improve the efficiency of inquiring international logistics numbers. In addition, this application also provides a method for inquiring logistics numbers by email and a corresponding logistics inquiry system, which realizes automatic inquiry of the logistics trajectory of the logistics number in the email of a user (i.e., a purchaser) by forwarding email and analyzing and identifying the content of the email, that is, the logistics inquiry system automatically analyzes and identifies the logistics number in the email of a user (purchaser), further queries and tracks the logistics trajectory based on the obtained logistics number, and feeds back the logistics inquiry result to the purchaser by email, thereby achieving the purpose that the purchaser automatically obtains the inquiry result of the logistics number. [Means for solving the problem]
[0008] An algorithm for improving the accuracy of identifying similar logistics numbers used to identify logistics channels in a logistics inquiry system of the present application, comprising:
[0009] Step S1: obtain a distribution number, calculate the length of the distribution number, and screen the distribution channels having the same distribution number length from a rule library according to the length of the distribution number, record all the distribution channels having the same length, and calculate the number N of the distribution channels;
[0010] Step S2 of performing initial identification of the distribution number based on the value of N, the initial identification of the distribution number includes: when N=1, the only distribution channel is the identification result of the distribution number; and when N≧2, step S3 is performed;
[0011] A step S3 of calculating a matching accuracy of the distribution number,
[0012] Step S31: Dividing the distribution number into a constant part and a variable part in a regular expression based on the number segment information of each distribution channel, and taking the part of the distribution number that has the same content and position as the number segment information as the constant part of the regular expression, and taking the other part as the variable part of the regular expression;
[0013] Step S32: Calculate the length ratio of the constant part in the regular expression corresponding to each logistics channel in all rules, and set the length ratio as the matching accuracy value of the logistics channel rule corresponding to the logistics number;
[0014] Step S33 of sorting the matching accuracy value of each logistics channel rule in order of height;
[0015] Step S3 including a step S34 of extracting a logistics channel corresponding to the rule with the highest matching accuracy value;
[0016] and a step S4 of determining the logistics channel with the highest matching accuracy value as the identification result of the logistics number.
[0017] Other features and technical effects of the present application will be described and illustrated in the later part of the specification. The idea of solving the technical problem of the present application and the design proposal of the related product are as follows:
[0018] For example, for two logistics channels with rules that have similar logistics numbers, the logistics number of logistics channel A is 226590455432, and the logistics number of logistics channel B is 123456784312, both of which are 12-digit full digital logistics numbers and are similar logistics numbers. The usual way to arrange the rules is to arrange them as d\{12} and d\{12} respectively according to regular expressions, thus making it impossible to distinguish the attribution of the two logistics numbers, and making it impossible to select and identify the more likely logistics channel based on the priority. In this case, the usual logistics inquiry system realizes the matching between the logistics number and the logistics channel by reminding the user to manually specify the corresponding logistics channel.
[0019] The applicant, by analyzing a large number of similar logistics numbers and logistics channels, found that many logistics channels have the concept of number segments. For example, the 3rd to 6th digits in the logistics number of logistics channel A have a fixed string of 6590, that is, logistics channel A has a number segment, and the content of the number segment is 6590 characters, the position of the number segment is the 3rd to 6th digits, and the length of the number segment is 4 digits. Therefore, the regular expression of logistics channel A can be arranged accordingly to \d{2}(6590)\d{6}. The logistics number of logistics channel B does not have a fixed string, and the regular expression of logistics channel B is still \d{12}, and when matching in this way, the two logistics channels are still matched and cannot be further distinguished. Therefore, the applicant proposes a concept of calculating the matching accuracy of the regular expression, and adopts the method of "rule + algorithm" to further identify the logistics channel of the logistics number.
[0020] When calculating the matching accuracy of the regular expression, the logistics number is divided into a constant part and a variable part in the regular expression based on the number segment of the logistics channel, and the number segment is taken as the constant part. Using this, the length ratio of the constant part in the regular expression corresponding to the logistics channel that matches in all rules is calculated, and the length ratio is taken as the matching accuracy value of the logistics number in the corresponding logistics channel rule. If the inquiry system has only two 12-digit logistics channels, logistics channel A and logistics channel B, when inquiring about logistics number 226590455432, for logistics channel A, the number segment information is 6590 in the 3rd to 6th digits, which is 4 digits long, the length of the logistics number is 12 digits, and its matching accuracy value is 4 digits / 12 digits = 33.3%. However, for logistics channel B, since there is no fixed string, the length of the constant part is 0 digits, and its matching accuracy value is 0 digits / 12 digits = 0.0%. Based on the new rules, the logistics channel with the highest matching accuracy value is automatically selected as the logistics channel to be identified, and logistics channel A is the identification result for the logistics number.
[0021] Such logistics number matching accuracy calculation uses a method of combining rules and algorithms, avoiding the use of complex rules to identify the attribution of similar logistics numbers, and facilitating software programming and maintenance. When querying similar logistics numbers during query, the user does not need to manually specify the logistics channel, improving the automatic identification ability of logistics numbers and the efficiency of querying international logistics numbers, and has the advantages of high identification accuracy, accurate, fast, efficient and convenient query, etc. In addition, compared with ordinary AI (artificial intelligence) learning systems, the calculation is more accurate, the calculation speed is faster, the algorithm language is simpler, and the corresponding software programming and maintenance costs are lower.
[0022] Accordingly, the present application further provides a logistics inquiry system, which includes a logistics number acquisition module, a rule library, a logistics number library, a logistics channel library, an integrated calculation module, and an inquiry result display module, and the integrated calculation module executes the operation instructions included in the algorithm to improve the identification accuracy of similar logistics numbers. Other embodiments and technical effects will be described later.
[0023] In addition, the present application further provides a method for querying a logistics number by email and a corresponding logistics inquiry system, which is used to automatically query the logistics number in a user email by a logistics inquiry system. The method for querying a logistics number by email includes:
[0024] Step Q1 of acquiring a user mailbox's inquiry authority in a logistics inquiry system;
[0025] Step Q2: setting an automatic email forwarding rule for a user mailbox and automatically forwarding a shipping email that requires a logistics number inquiry to a system mailbox designated by the logistics inquiry system, the user mailbox being an electronic mail box where a user receives shipping emails;
[0026] Step Q3, in which the logistics inquiry system checks the system mailbox and receives the shipping email automatically forwarded from the user mailbox;
[0027] Step Q4 of scanning the contents of the shipping email and identifying the logistics number in the shipping email;
[0028] Step Q5, the logistics inquiry system adds the identified logistics number to a tracking list corresponding to the user mailbox;
[0029] The logistics inquiry system automatically inquires about the logistics number in the tracking list, and judges whether the logistics progress information inquired twice before and after based on the logistics number has been updated. If the later inquired logistics progress information does not match the previously inquired result, the later inquired logistics progress information is sent to the user mailbox via the system mailbox in step Q6.
[0030] This method of analyzing the logistics number based on the email information and automatically tracking the logistics can realize the automatic inquiry of the logistics number, and every time the logistics progress is updated, the user can receive the corresponding logistics notification email in a timely manner, and thus obtain the logistics process information in a timely manner. When an abnormality occurs in the logistics process, the user can timely grasp the logistics process and perform intervention processing to avoid unnecessary losses. In addition, with only one setting, the logistics numbers of all subsequent purchases and shipments can be automatically tracked without manual processing, greatly improving the efficiency of the inquiry of the logistics number.
[0031] Other embodiments and technical advantages are discussed below.
[0032] In addition, general users who are not involved in the electronic commerce field can also realize automatic inquiry of the logistics number in their own mailbox by inquiring the logistics number via email.
[0033] In addition, the present application further provides a server, including a memory in which the logistics inquiry system in the present application is stored, and a processor capable of executing operation instructions and corresponding algorithms of the logistics inquiry system.
[0034] Furthermore, the present application further provides a computer device including a memory in which the logistics inquiry system in the present application is stored, and a processor capable of executing operation instructions and corresponding algorithms of the logistics inquiry system.
[0035] In this application, a "regular expression" is a "rule expression", which may be abbreviated as "regular" or "rule", and is a logical expression for manipulating strings; a logistics number generally refers to various cargo transport numbers such as logistics numbers for large items and delivery numbers for small items; in related embodiments, a logistics number may not only be composed of numbers, but also of characters such as numbers and letters; in order to simplify and unify related expressions, the absence of number segment information in a logistics channel is expressed as the number segment information of the logistics channel being empty, so that all logistics channels have corresponding number segment information; the length of each number segment information or string is an integer, representing the number of character digits; and the number segment information may be abbreviated as number segment.
[0036] The drawings are used for a further understanding of the present application and do not constitute limitations to the present application, and the contents shown in the drawings may be real data of the embodiments and belong to the protection scope of the present application. [Brief description of the drawings]
[0037] [Figure 1] FIG. 1 is a schematic diagram of an algorithm flow for improving the accuracy of identifying similar logistics numbers in one embodiment of the present application. [Diagram 2] FIG. 1 is a schematic diagram of an algorithm flow of number segment information of a logistics number in one embodiment of the present application. [Diagram 3] 1 is a schematic diagram of the architecture of a logistics inquiry system in one embodiment of the present application. [Figure 4] 1 is a schematic flow diagram of a method for querying a logistics number by email in an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0038] In order to clarify the objectives, aspects and advantages of the present application, the following detailed description of the present application will be given in conjunction with the drawings using specific embodiments. It should be understood that the specific embodiments described herein are only used to interpret the present application and are not used to limit the present application.
[0039] Referring to FIG. 1, the present application presents an algorithm for improving the identification accuracy of similar logistics numbers used to identify logistics channels in a logistics inquiry system, the method comprising:
[0040] Step S1: obtain a distribution number, calculate the length of the distribution number, and screen the distribution channels having the same distribution number length from the rule library of the distribution inquiry system according to the length of the distribution number, record all the distribution channels having the same length, and calculate the number N of the distribution channels;
[0041] Step S2 of performing initial identification of the distribution number based on the value of N, the initial identification of the distribution number includes: when N=1, the only distribution channel is the identification result of the distribution number; when the distribution channel is identified, the identification calculation of the distribution number is completed; and when N≧2, step S3 is performed;
[0042] A step S3 of calculating a matching accuracy of the distribution number,
[0043] Step S31: Dividing the distribution number into a constant part and a variable part in a regular expression based on the number segment information of each distribution channel, and taking the part of the distribution number that has the same content and position as the number segment information as the constant part of the regular expression, and taking the other part as the variable part of the regular expression;
[0044] Step S32: Calculate the length ratio of the constant part in the regular expression corresponding to each logistics channel in all rules, and set the length ratio as the matching accuracy value of the logistics channel rule corresponding to the logistics number;
[0045] Step S33 of sorting the matching accuracy value of each logistics channel rule in order of height;
[0046] Step S3 including a step S34 of extracting a logistics channel corresponding to the rule with the highest matching accuracy value;
[0047] The step S4 includes determining the distribution channel with the highest matching accuracy value as the identification result of the distribution number.
[0048] The matching accuracy calculation of such logistics numbers employs a method that combines rules and algorithms, thereby avoiding the use of complex rules to identify the attribution of similar logistics numbers.
[0049] In order for the logistics inquiry system to support the inquiry of multiple logistics channels, in the actual application scenario, it is necessary to support more than 1000 international logistics channels in the world, and the volume of calculation is huge.Before performing step S1, first store the information data of each logistics channel in the rule library, the information data of the logistics channel includes one or more of the following: the name of the logistics channel, the country mark, the length of the logistics number and the number segment information, the number segment information includes the number segment content, the number segment position and the number segment length, each logistics channel has its corresponding number segment information, if each logistics number of a logistics channel does not include a string with the same content and the same position, the number segment information of the logistics channel is empty, and accordingly, the number segment content of the logistics channel is empty, the number segment position is empty, and the number segment length is 0, if each logistics number of a logistics channel includes a string with the same content and the same position, the string is taken as the number segment information of the logistics channel, and the content of the string, the position in the logistics number and the length of the character are respectively taken as the number segment content, the number segment position and the number segment length of the number segment information.
[0050] For example, for logistics channel B whose logistics number is 123456784312, since there is no fixed string, the number segment information of logistics channel B is empty, and accordingly, the number segment content of logistics channel B is empty, the number segment position is empty, the number segment length is 0 digits, and the length of its constant part is also 0 digits.
[0051] In one embodiment, for step S3, before performing step S31, further screen N logistics channels with the same length, analyze the number segment information of the N logistics channels, and if the number segment information of a logistics channel is not empty, perform the operation of step S31 for the logistics channel, but if the number segment information of a logistics channel is empty, abandon the matching accuracy calculation for the logistics channel, and do not select the logistics channel as the identification target of the logistics number. Or, if the number segment information of a logistics channel is empty, directly set the matching accuracy corresponding to the logistics channel to 0, and directly start the calculation from step S33 in step S3. For the logistics channel with empty number segment information, the length of the corresponding constant part is 0, and the corresponding matching accuracy value is also 0, so it is impossible to become the highest matching accuracy value, and early abandonment of the matching accuracy calculation for the logistics channel with empty number segment information does not affect the result of the matching accuracy calculation, and can also simplify the calculation volume and increase the calculation speed.
[0052] In one embodiment, if multiple matching accuracy values that are all the maximum appear in step S33, the system will terminate further matching accuracy calculation, and will display a message that the logistics channel cannot be identified, and will prompt the user to manually specify a logistics channel. For example, when calculating matching accuracy, if five logistics channels A, B, C, D, and E all have the same logistics number length, and their matching accuracy values are 40.0%, 40.0%, 30.0%, 20.0%, and 20.0%, respectively, then the matching accuracy values of logistics channel A and logistics channel B are all the maximum matching accuracy values, and it is difficult to determine the real logistics channel. Although the probability of such a scenario occurring is very low, the system will terminate calculation, display a message that the logistics channel cannot be automatically identified, and will prompt the user to manually specify a logistics channel, so that the system can further identify the logistics number based on the logistics channel information specified by the user, and collect more identification feature information related to the logistics channel.
[0053] Referring to Figure 2, the present application further provides a method for calculating number segment information, wherein the logistics inquiry system further includes a logistics number library in which the queried past logistics numbers are stored, and calculates number segment information of related logistics channels based on the past logistics numbers, and includes steps P1 to P5 as described below.
[0054] Step P1 selects a logistics channel that needs to calculate the number segment information, sets a calling rule for the past logistics number, and calls up the corresponding number M of past logistics numbers of the logistics channel from the logistics number library based on the calling rule. For example, calling up all past logistics numbers in the recent T period, calling up all past logistics numbers in the period T1 to T2, or calling up M past logistics numbers that have been recently queried. The larger the M value, the more accurate the analysis. Generally, only when M reaches 100 does it have high analytical value. In step P1, if the number of past logistics numbers that can be called up from the logistics number library based on the calling rule is smaller than M, the M value is automatically adjusted to the number of past logistics numbers that can be called up from the logistics number library based on the calling rule, and the user is presented with the fact that the M value has been corrected, ensuring that the value is taken accurately.
[0055] Step P2 sets the magnitude of the preset similarity value Y, where Y ≤ 100%. The preset similarity value Y is used as the reference value for the similarity degree K. The larger the Y value, the higher the similarity degree of the character strings in the plurality of logistics numbers. When Y = 100%, it indicates that the same character string is included in all of the logistics numbers to be collated. It is set to Y = 100%, and its application scenario mainly targets newly introduced logistics channels, and the number of its past logistics orders is small. In related embodiments, 80% ≤ Y ≤ 100%, which is suitable for most application scenarios. The magnitude of the Y value is related to the M value. In one embodiment, Y may automatically take a value based on different interval ranges where the M value is located. The smaller the M value, the larger the Y value. For example, when the M value is in the interval [1 - 100], Y = 100%; when the M value is in the interval [100 - 1000], Y = 99%; when the M value is in the interval [1000 - 10000], Y = 95%; when M > 10000, Y = 90%. By flexibly adjusting the magnitude of Y based on the range of the M value, the calculation accuracy can be improved, and based on each interval range, it is also possible to further verify the identification accuracy at each stage from introducing the logistics channel into the rule library to batch query.
[0056] In step P3, for the M logistics numbers, the corresponding character strings are sequentially cut off with the shortest length L, and the position of each cut is increased by one digit compared to the previous cut. The cutting starts from the first character of each logistics number, and the length and position of the character strings cut in the same lot are the same. Each time a character string is cut, the number of the same character strings in it is counted. The ratio of the number of the same character strings to M is the similarity degree K of the cut character string. The similarity degree is judged. When K ≥ Y, it is judged that the cut character string is a temporary number segment, and the cutting stops. When K < Y, it is judged that the cut character string is a non - temporary number segment, and the cutting of the next - digit character string is performed. The operations of cutting the character string and judging the similarity degree are repeated, and the cutting stops only when K ≥ Y or all digits of the logistics number have been cut.
[0057] The shortest truncation length L can be one digit or two digits, and 1 ≤ L < the length of the logistics number. For example, in Scene A, four logistics numbers of Logistics Channel A (only a small quantity is called for the sake of simplicity of expression) are called from the logistics number library. At this time, M = 4. The four logistics numbers are respectively: A1 is 226590455432, A2 is 356590545271, A3 is 356590635384, and A4 is 476590725596. It is set so that the preset similarity value Y = 100% and the shortest truncation length L = two digits. Therefore, in step P3, when truncating A1 - A4 numbers for the first time, the 1st to 2nd digit strings of each logistics number are truncated respectively, and the strings 22, 35, 35, 47 are obtained. At this time, there are two same strings 35, and K = 2 / 4 = 50% is calculated. As can be seen from this, the result of this truncation is K < Y, and it is determined that the truncated string is a non - temporary number segment, and the truncation of the next digit, that is, the 2nd to 3rd digit, is to be performed. The truncation of the 2nd to 3rd digit obtains the strings 26, 56, 56, 76. Similarly, K = 50% is calculated, and K < Y, so it is necessary to perform the truncation of the next digit, that is, the 3rd to 4th digit. The truncation of the 3rd to 4th digit obtains the strings 65, 65, 65, 65, and K = 100%, K = Y. At this time, the string 65 is a temporary number segment, and the truncation can be stopped. If the result of each truncation is K < Y, when truncating up to the 11th to 12th digit (the last digit), the truncation is stopped.
[0058] Step P4 performs a preliminary identification of the number segment information. If no temporary number segment was obtained in Step P3, it is determined that the number segment information of the logistics channel is empty, and the calculation of the number segment information of the logistics channel is terminated. However, if a temporary number segment was obtained in Step P3, Step P5 is executed. For example, in the aforementioned Scene A, a temporary number segment 65 was obtained, but the actual number segment is 6590, and it is necessary to further truncate and identify the logistics number. After obtaining the temporary number segment, the position of the temporary number segment can be known accordingly. At this time, as described in Step P5, only the logistics number needs to be truncated by length, thereby reducing the calculation volume and improving the calculation efficiency.
[0059] Step P5 truncates the character strings of the M logistics numbers at the position of the temporary number segment. The length of each truncation increases by 1 digit compared to the length of the previous truncation. The length of the first truncation is L + 1 digits. The lengths of the character strings truncated in the same lot are the same. Each time a character string is truncated, the number of the same character strings in it is counted. The ratio of the number of the same character strings to M is the similarity K of the truncated character string. A similarity judgment is made. If K ≥ Y, it is determined that the truncated character string is a temporary number segment, and the next truncation is performed. However, if K < Y, it is determined that the truncated character string is a non-temporary number segment, the truncation is stopped, and the longest temporary number segment is determined as the number segment information.
[0060] For example, in the aforementioned Scene A, a temporary number segment 65 is obtained. The temporary number segment is located at the 3rd to 4th digits. Here, for the first time, the character string at the 3rd to 5th digits is truncated, and the length of the truncation is L + 1 = 3 digits. At this time, according to the calculation, it can be seen that the character string 659 at the 3rd to 5th digits is still the temporary number segment. The next truncation is performed on the 3rd to 6th digits. The character string 6590 obtained by truncating the 3rd to 6th digits is still the temporary number segment. The next truncation is performed on the 3rd to 7th digits. At this time, different numbers 65904, 65905, 65906, 65907 are obtained. K = 0%, K < Y. It is determined that the truncated character string is a non-temporary number segment, and the truncation is stopped. Moreover, the longest temporary number segment 6590 obtained by truncating before is determined as the number segment information.
[0061] If there is an error in the past logistics numbers in the logistics number library, for example, if a small number of past logistics numbers do not match the actual logistics channels, it will affect the calculation accuracy of the number segment information of the corresponding logistics channel. Therefore, in this application, the concept of preset similarity value is introduced to avoid the influence on the calculation accuracy of the number segment of the logistics channel caused by some small-probability errors. For example, when calculating the number segment information of logistics channel A, 1000 past logistics numbers of logistics channel A are called from the logistics number library. Among them, 999 logistics numbers have the same character string "6590" at the 3rd to 6th digits, and only 1 logistics number does not have this character string at the same position. Therefore, there is a high possibility that an abnormality has occurred in this logistics number. At this time, for the truncated character string "6590", its similarity K = 99.9%, and the preset similarity value Y is 95.0%. Since the similarity 99.9% of the truncated character string is greater than the preset similarity value 95.0%, it is determined at this time that the logistics channel has number segment information.
[0062] The temporary number segment is a part or all of the characters of the number segment information. When calculating the number segment information, the temporary number segment is first calculated based on the shortest cut length L, and then the complete number segment information is calculated based on the position of the temporary number segment. Such an algorithm is simple and can reduce the number of times of cutting the string and judging the similarity, thereby improving the calculation efficiency.
[0063] In one embodiment, the logistics inquiry system further includes a logistics number acquisition module, which collects logistics number information that needs to be inquired, and when inquiring about a logistics number, a user can manually specify a logistics channel recorded in the rule library through the logistics number acquisition module.
[0064] In addition, when a user specifies a logistics channel to inquire about a logistics number, verify the validity of the number segment information. When a user specifies a logistics channel to inquire about a logistics number, determine whether the logistics number and the number segment information of the logistics channel are consistent; if they are consistent, determine that the number segment information of the logistics channel is valid, and use the number segment information for the next logistics number inquiry; if they are not consistent, further determine whether normal inquiry information is fed back for the logistics number in the inquiry platform of the specified logistics channel; if the fed back inquiry information is normal, mark the number segment information as normal, and notify the relevant maintenance personnel of the software system for further processing. If the fed back inquiry information is not normal or there is no inquiry feedback, the logistics number is deemed abnormal, and the user is reminded that the logistics number cannot be identified. Through continuous identification and calibration of the validity of the number segment information, it is avoided that the logistics channel updates the logistics number rules or the original number segment information is incorrectly identified, and the number segment information is kept up to date and valid.
[0065] In one embodiment, the logistics inquiry system further includes a logistics channel library in which the name and number segment information of each logistics channel are stored, and the content of the number segment information in the logistics channel library can be manually input or modified. For some logistics channels that are familiar with the logistics number rules, system maintenance personnel can directly manually input or modify the number segment information and its related content according to the logistics number rules, which avoids the system from calculating unnecessary number segment information, and improves the convenience of system maintenance.
[0066] Referring to FIG. 3, in a related embodiment, the logistics inquiry system includes the logistics number acquisition module, the rule library, the logistics number library, the logistics channel library, and the comprehensive calculation module as well as the inquiry result display module described above, and the comprehensive calculation module executes the operation instructions included in the algorithm for improving the identification accuracy of similar logistics numbers in the present application.
[0067] In the logistics number library, the stored past logistics numbers that have been queried are further classified and marked according to the logistics numbers designated by the user and the logistics numbers not designated by the user, and the logistics numbers designated by the user are marked with the corresponding designated logistics channel information. In step P1, if M is smaller than a certain amount (for example, M≦100), all M logistics channels are obtained from the logistics numbers designated by the user. The logistics numbers, field information, and corresponding logistics channel information of the logistics numbers designated by the user have higher accuracy, and can increase the magnitude of the similarity K when the obtained M value is very small, thus increasing the success rate of the calculation of the field information, which is very suitable for calculating number segment information in the scenario of introducing a new logistics channel into the logistics inquiry system.
[0068] When the logistics number acquisition module collects logistics number information that needs to be inquired, it selectively filters the input pending inquiry information, deletes other characters except for alphabets, numbers, and horizontal bars from the pending inquiry information, and leaves a character string with a number of characters of more than 5 digits and less than 50 digits as the pending inquiry logistics number.
[0069] After identifying the corresponding logistics channel based on the acquired logistics number, the logistics inquiry system further judges whether the logistics channel is an air logistics channel or a non-air logistics channel. If the logistics channel is an air logistics channel, the inquiry result display module outputs the relevant flight information and logistics process information according to the air channel display interface, but if the logistics channel is a non-air logistics channel, the inquiry result display module outputs the relevant logistics process information according to the normal channel display interface. For example, the air channel display interface includes eight cargo status display columns, including "all", "booking", "cargo receipt", "in transit", "arrival at destination", "receipt notice", "received", and "cannot be inquired". The normal channel display interface includes ten cargo status display columns, including "all", "cannot be inquired", "message received", "in transit", "pending arrival", "in delivery", "delivery failure", "delivered", "possible abnormality", and "transport time too long". In the two display interfaces, each cargo status display column displays the corresponding logistics process information, and the "all" cargo status display column displays summary information of other cargo status display columns. The query result display module outputs corresponding logistics process information according to the display interfaces of different logistics channel types, so that the matching between the scene and logistics information is stronger and the user experience is improved.
[0070] 4, the present application further provides a method for querying a logistics number by email and a corresponding logistics inquiry system, which is used for automatically querying a logistics number in a user email by a logistics inquiry system. The method for querying a logistics number by email includes the following steps:
[0071] Step Q1: obtain the inquiry authority of a user mailbox in the logistics inquiry system. For example, a user registers an account of the logistics inquiry system through a mailbox, thereby obtaining the inquiry authority of the user mailbox in the logistics inquiry system.
[0072] Step Q2 sets an automatic email forwarding rule for the user mailbox, and automatically forwards the shipping email that needs to be inquired about the logistics number to the system mailbox specified by the logistics inquiry system. That is, the system mailbox is also a mailbox linked to the logistics inquiry system, and by setting the system mailbox at one end of the logistics inquiry system, it becomes easy to receive and manage emails from different users or different mailbox types at once. The user mailbox is an electronic mail box where the user receives the shipping email.
[0073] In another embodiment, the user may manually forward the email containing the logistics number to the system mailbox, and obtain the logistics number query result through steps Q3 to Q6. This applies to tracking temporary logistics numbers, avoiding the need to set up automatic forwarding rules for shipping emails that are not frequently used, and improving the convenience of tracking logistics numbers. The logistics query system is applicable to both shipping emails that are manually forwarded from the user mailbox and shipping emails that are automatically forwarded.
[0074] In step Q3, the logistics inquiry system checks the system mailbox and receives the shipping email automatically forwarded from the user mailbox. As for the frequency of checking the system mailbox, the system mailbox may be checked in real time or periodically, for example, the system email may be automatically checked every two hours to get the latest logistics track.
[0075] Step Q4 scans the contents of the shipping email and identifies the logistics number in the shipping email.
[0076] In step Q5, the logistics inquiry system adds the identified logistics number to a tracking list corresponding to the user mailbox.
[0077] In step Q6, the logistics inquiry system automatically queries the logistics number in the tracking list to obtain logistics information in a timely manner, for example, queries the logistics number every hour or every half hour, and determines whether the logistics progress information queried twice before and after based on the logistics number has been updated. If the later queried logistics progress information does not match the previously queried result, it indicates that the logistics progress has been updated, and sends the later queried logistics progress information to the user mailbox via the system mailbox.
[0078] If the later queried logistics progress information matches the previous queried result, it indicates that the logistics progress has not been updated, and there is no need to notify the user by email in this case. Furthermore, when a certain logistics number is queried for the first time, the queried logistics information is sent directly to the user mailbox via the system mailbox without comparing the two previous and previous query results. This automatic tracking query method can realize that every time the logistics progress of a logistics number is updated, the user can receive the corresponding logistics notification email in a timely manner. When an abnormality occurs in the logistics process, the user can timely grasp the logistics process and intervene to avoid unnecessary losses.
[0079] Regarding step Q1, the acquisition method of the user mailbox inquiry authority is that the user registers an account for the logistics inquiry system through the mailbox, and the mailbox registered by the user can be used as the user mailbox. If the user mailbox and the mailbox registered by the user do not match, the user mailbox is bound to the logistics inquiry system through the registered account for the logistics inquiry system. With the same registered account, the logistics inquiry system can be bound to one or more user mailboxes, which makes it easy for the user to switch or add receiving mailboxes, and can be suitable for various application scenarios.
[0080] Regarding step Q2, when setting up an automatic email forwarding rule in the background of the user mailbox, the inbox of the user mailbox is filtered and only emails from a specific email box in the inbox (e.g., Amazon's shipping notification mailbox or other email box where the user receives shipping emails) are forwarded to the system mailbox, thereby avoiding forwarding the user's privacy emails to the system mailbox.
[0081] The operation process of step Q4 includes scanning the content in the shipping email, analyzing the content of the shipping email, and determining whether the shipping email contains an approximate logistics number, where the approximate logistics number is a string having a number of characters greater than 5 digits and less than 50 digits, and the string does not contain characters other than letters, numbers, and horizontal bars.
[0082] If the shipping email does not contain an approximate logistics number, it is determined that the shipping email does not contain a logistics number, and the logistics number in the shipping email is identified as being null, at this time, the execution of steps Q5 and Q6 is terminated, and the logistics number in the shipping email is notified to the user that it is abnormal.If the shipping email contains one or more approximate logistics numbers, the approximate logistics number may be a logistics number or may be a phone number, and the approximate logistics number is identified according to the character content at the front of the approximate logistics number.
[0083] In shipping emails, the probability that telephone numbers and logistics numbers appear at the same time is high, and the length and content of the characters in both are very similar, making them easy to confuse. Therefore, by setting up a logistics character library and a telephone character library, it is possible to further identify similar logistics numbers, quickly find logistics numbers, and improve the accuracy of identifying logistics numbers.
[0084] In one embodiment, the logistics inquiry system includes a logistics character library and a telephone character library. In order to accurately screen and identify the contents of the mail, the logistics character library is preset with logistics terms such as "logistics number", "courier number", "delivery number", and "courier" in different languages, and the telephone character library is preset with telephone terms such as "telephone", "mobile phone", and "home phone" in different languages. In another embodiment, the logistics inquiry system identifies the language type (e.g., Chinese or English) of the characters of the shipping mail, and when identifying the approximate logistics number, selects a term (including logistics term or telephone term) that is the same as the character language type of the shipping mail from the character library (including the logistics character library or the telephone character library) to perform the identification, and avoids identifying a term that is different from the language type, thereby improving the efficiency of character identification.
[0085] When identifying an approximate logistics number according to the content of the characters at the front of the approximate logistics number, the identification method is as follows: if the text of the first paragraph of the approximate logistics number contains any one of the logistics terms in the logistics character library, the approximate logistics number is identified as a logistics number, and if the text of the first paragraph of the approximate logistics number contains any one of the telephone terms in the telephone character library, the approximate logistics number is a telephone number and the approximate logistics number is identified as a non-logistics number.
[0086] In addition, if the text of the first paragraph of the similar logistics number does not include any logistics term in the logistics character library or any telephone term in the telephone character library, the similar logistics number is temporarily identified as a temporary logistics number. Since the logistics inquiry system can automatically identify the logistics channel corresponding to the logistics number, the temporary logistics number is queried in the logistics inquiry system, and it can be determined whether the temporary logistics number is a logistics number through the inquiry result of the logistics inquiry system. If the logistics inquiry system queries a normal logistics record based on the temporary logistics number, it determines that the temporary logistics number is a logistics number, but if the logistics information queried by the logistics inquiry system based on the temporary logistics number is abnormal, it determines that the temporary logistics number is a telephone number. If all the similar logistics numbers or the temporary logistics numbers are identified as telephone numbers, it notifies the user that the information of the logistics number of the shipping mail is abnormal and the inquiry result cannot be obtained.
[0087] If the first paragraph of text of an approximate logistics number contains both a logistics term in the logistics character library and a telephone term in the telephone character library, the approximate logistics number is temporarily identified as a temporary logistics number, and whether the temporary logistics number is a logistics number is determined according to the query result of the logistics query system.
[0088] In this application, when identifying characters at the front of an approximate logistics number, a paragraph of text at the front of the approximate logistics number is in a broad sense and may be understood as half a sentence, a sentence or multiple sentences at the front of the approximate logistics number awaiting identification.
[0089] In one embodiment, when a certain similar distribution number is identified as a distribution number, other adjacent similar distribution numbers following the distribution number are also identified as distribution numbers, and adjacent similar distribution numbers mean that the strings corresponding to adjacent similar distribution numbers contain only a delimiter. The delimiter may be a commonly seen string delimiter such as a space symbol, a t symbol, a comma, a semicolon, an echo symbol, a comma + echo symbol, or a semicolon + echo symbol.
[0090] In a related application scenario, when a user sets the automatic email forwarding rule for his / her mailbox, other emails than the shipping email may be forwarded to the system mailbox due to operation errors or other abnormalities, so the system mailbox further identifies the shipping email after receiving the shipping email forwarded from the user mailbox to improve the accuracy of email forwarding. If the shipping email does not contain a similar logistics number, the execution of steps Q5 and Q6 is terminated, and a suggestion email is sent by the system mailbox to the user mailbox, to notify the user that the logistics number in the shipping email is abnormal, and to suggest the user to recheck the automatic email forwarding rule for the user mailbox.
[0091] In one embodiment, if the logistics progress information of a logistics number is found to be the last stage of logistics information, the logistics number is removed from the tracking list. For example, if the last stage of logistics information is that the user has already received the logistics number and does not need to continue tracking the logistics number, the logistics number can be removed from the tracking list.
[0092] In one embodiment, if the logistics progress information of a logistics number is found to have not been updated for a certain period of time, the logistics number is removed from the tracking list, and the system mailbox is used to inform the user that the logistics number is abnormal. For example, for a normal logistics parcel with a half-month logistics expiration date, if the updated and changed logistics information has not been inquired for more than three months, this indicates that the logistics parcel is likely to stop or end logistics for some reason, so the logistics number can be removed from the tracking list, and the user can be informed that the logistics number is abnormal.
[0093] In one embodiment, system emails may be customized in style and may include logos, content templates, product recommendations, and other features to enhance the user experience.
[0094] In one embodiment, when the system mail sends a mail to a user mailbox, the mail content includes a logistics number, and an indication of "query from mail" is annotated in the mail content. The mail content includes the mail subject and the mail body content.
[0095] The logistics inquiry system of the present application executes the method of inquiring about a logistics number by email described in the preceding paragraph, and its operation process includes: (1) the logistics inquiry system receives a shipping email forwarded from the user mailbox through the system mailbox; (2) the logistics inquiry system checks the system mailbox, receives the shipping email automatically forwarded from the user mailbox, and scans the contents of the shipping email to identify the logistics number in the shipping email; (3) the logistics inquiry system adds the identified logistics number to a tracking list corresponding to the user mailbox; and (4) the logistics inquiry system automatically queries the logistics number in the tracking list, and determines whether the logistics progress information queried twice before and after has been updated based on the logistics number; if the later queried logistics progress information does not match the previously queried result, the logistics progress information queried later is sent to the user mailbox via the system mailbox.
[0096] In another embodiment, the logistics inquiry system of the present application, in addition to being able to execute the method of querying logistics numbers by email described above, can also execute the algorithm described above for improving the accuracy of identifying similar logistics numbers, thereby improving the overall performance of the system.
[0097] The above is merely a preferred embodiment of the present application, which does not limit the patent scope of the present application. Any equivalent transformation made using the contents of the specification and drawings of the present application under the concept of the invention of the present application, or direct / indirect application in other related technical fields, is within the patent protection scope of the present application.
Claims
1. An algorithm for improving the accuracy of identifying similar logistics numbers used to identify logistics channels in a logistics inquiry system, comprising: Step S1: obtain a distribution number, calculate the length of the distribution number, and screen distribution channels having the same distribution number length from a rule library according to the length of the distribution number, record all the distribution channels having the same length, and calculate the number N of the distribution channels; Step S2 of performing initial identification of the distribution number based on the value of N, the initial identification of the distribution number including: when N=1, the only distribution channel is the identification result of the distribution number; and when N≧2, executing step S3; A step S3 of calculating the matching accuracy of the distribution number, The matching accuracy calculation is Step S31: dividing the distribution number into a constant part and a variable part in a regular expression based on the number segment information of each distribution channel, and setting the part of the distribution number having the same content and position as the number segment information as the constant part of the regular expression, and setting the other part as the variable part of the regular expression; Step S32: Calculate a length ratio of the length of the constant part in the regular expression corresponding to each logistics channel in all rules, and set the length ratio as a matching accuracy value of the logistics number in the corresponding logistics channel rule; Step S33: sorting the matching accuracy values of the logistics channel rules in order of their height; and a step S34 of extracting a logistics channel corresponding to the rule with the highest matching accuracy value. Step S3, and a step S4 of determining the logistics channel with the highest matching accuracy value as the identification result of the logistics number.
2. Before executing step S1, first, information data of each logistics channel is stored in the rule library, The information data of the logistics channel includes the name of the logistics channel, the length of the logistics number, and number segment information; The number segment information includes number segment content, number segment position and number segment length; Each logistics channel has corresponding number segment information; If each distribution number of a distribution channel does not contain a character string with the same content and the same position, the number segment information of the distribution channel is empty, and accordingly, the number segment content of the distribution channel is empty, the number segment position is empty, and the number segment length is 0; An algorithm for improving the accuracy of identifying similar logistics numbers as described in claim 1, characterized in that when each logistics number of a certain logistics channel contains a character string with the same content and the same position, the character string is regarded as the number segment information of the logistics channel, and the content of the character string, its position in the logistics number and the information of the character length are respectively regarded as the number segment content, number segment position and number segment length of the number segment information.
3. In step S3, before performing step S31, screen N logistics channels having the same length and analyze the number segment information of the N logistics channels; If the number segment information of a certain distribution channel is not empty, perform the operation of step S31 for the distribution channel; The algorithm for improving the identification accuracy of similar logistics numbers as described in claim 2, characterized in that if the number segment information of a certain logistics channel is empty, the matching accuracy calculation for the logistics channel is abandoned, and the logistics channel is not considered as an identification target for the logistics number.
4. The algorithm for improving the identification accuracy of similar logistics numbers as described in claim 2, characterized in that in step S33, if multiple matching accuracy values that are all maximum appear, further matching accuracy calculation is terminated, and a message is displayed indicating that the logistics channel cannot be identified, and the user is prompted to manually specify the logistics channel.
5. The logistics inquiry system further includes a logistics number library in which the inquired past logistics numbers are stored, and calculates number segment information of a related logistics channel based on the past logistics numbers; Step P1: selecting a logistics channel that needs to calculate number segment information, setting a calling rule for past logistics numbers, and calling a corresponding number M of past logistics numbers of the logistics channel from the logistics number library according to the calling rule; Step P2, setting a magnitude of a preset similarity value Y, where Y≦100%; a step P3 in which the M distribution numbers are cut out in order with the shortest length L, the position of each cut is increased by one digit from the position of the previous cut, the cut out starts from the first character of each distribution number, the length and position of the cut out character strings in the same lot are the same, each time a character string is cut out, the number of identical character strings among them is counted, the ratio of the number of identical character strings to M is the similarity K of the cut out character strings, a similarity judgment is made, if K≧Y, the cut out character string is judged to be a temporary number segment and the cut out is stopped, but if K<Y, the cut out character string is judged to be a non-temporary number segment and the next character string is cut out, the operation of cutting out character strings and judging the similarity is repeated, and the cut out is stopped only when K≧Y or all digits of the distribution number have been cut out; Step P4 of performing initial identification of number segment information. If no temporary number segment is obtained in step P3, the number segment information of the logistics channel is determined to be empty, and the calculation of the number segment information of the logistics channel is terminated. However, if a temporary number segment is obtained in step P3, step P4 of performing step P5; the M logistics number character strings are cut at the temporary number segment position, the length of each cut is increased by one digit from the length of the previous cut, the length of the first cut is L+1 digit, the length of the cut strings in the same lot is the same, each time a character string is cut, the number of identical character strings in the cut string is counted, and the ratio of the number of identical character strings to M is the similarity K of the cut strings; a similarity judgment is made; if K≧Y, the cut string is judged to be a temporary number segment, and the next cut is made; if K<Y, the cut string is judged to be a non-temporary number segment, the cut is stopped, and the longest temporary number segment is determined to be the number segment information.
6. In step P1, if the number of past logistics numbers that can be retrieved from the logistics number library based on the recall rule is smaller than M, the M value is automatically adjusted to the number of past logistics numbers that can be retrieved from the logistics number library based on the recall rule, and the user is informed that the M value has been corrected; And / or, the algorithm for improving the accuracy of identifying similar logistics numbers as described in claim 5, characterized in that Y is automatically determined based on the different interval ranges in which the M value is located, and the smaller the M value, the larger the Y value.
7. The logistics inquiry system further includes a logistics number acquisition module, which acquires logistics number information that needs to be inquired by the logistics number acquisition module, and when a logistics number is inquired by a user, the logistics channel recorded in the rule library can be manually specified by the logistics number acquisition module; The algorithm for improving the identification accuracy of similar logistics numbers as described in claim 1, characterized in that, when a user specifies a logistics channel to query a logistics number, it is determined whether the logistics number and the number segment information of the logistics channel are consistent; if they are consistent, it is determined that the number segment information of the logistics channel is valid, and the number segment information is used for the next logistics number query; if they are not consistent, it is further determined whether normal query information is fed back for the logistics number in the query platform of the specified logistics channel; if the fed back query information is normal, the number segment information is marked as normal.
8. The algorithm for improving the identification accuracy of similar logistics numbers as described in claim 1, characterized in that the logistics inquiry system further includes a logistics channel library in which the name and number segment information of each logistics channel is stored, and the number segment information in the logistics channel library can be manually input or modified.
9. A logistics inquiry system, comprising: A logistics inquiry system comprising a logistics number acquisition module, a rule library, a logistics number library, a logistics channel library, an integrated calculation module, and an inquiry result display module, wherein the integrated calculation module executes operation instructions included in an algorithm for improving the identification accuracy of similar logistics numbers as described in any one of claims 1 to 8.
10. When the logistics number acquisition module collects logistics number information that needs to be inquired, it selectively filters the input pending inquiry information, deletes other characters except for alphabets, numbers, and horizontal bars from the pending inquiry information, and leaves a character string with a number of characters of more than 5 digits and less than 50 digits as the pending inquiry logistics number; And / or, the logistics inquiry system identifies the corresponding logistics channel according to the acquired logistics number, and then further determines whether the logistics channel is an air logistics channel or a non-air logistics channel; If the logistics channel is an air logistics channel, the query result display module outputs relevant flight information and logistics process information according to an air channel display interface; The logistics inquiry system of claim 9, wherein if the logistics channel is a non-air logistics channel, the inquiry result display module outputs related logistics process information according to a normal channel display interface.
Citation Information
Patent Citations
Method and system for mediating inquiry
JP2004046692A
Method and system for acquiring logistics information for international transport
JP2019516203A
Method and system for monitoring shipments in a supply and / or logistics chain
US20160217399A1