CN109829025B - Line correction method and device, electronic device and storage medium - Google Patents

Line correction method and device, electronic device and storage medium Download PDF

Info

Publication number
CN109829025B
CN109829025B CN201910059409.3A CN201910059409A CN109829025B CN 109829025 B CN109829025 B CN 109829025B CN 201910059409 A CN201910059409 A CN 201910059409A CN 109829025 B CN109829025 B CN 109829025B
Authority
CN
China
Prior art keywords
line
target
starting point
end point
correction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910059409.3A
Other languages
Chinese (zh)
Other versions
CN109829025A (en
Inventor
张中华
王雄健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Shulian Technology Co ltd
Original Assignee
Zhejiang Shulian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Shulian Technology Co ltd filed Critical Zhejiang Shulian Technology Co ltd
Priority to CN201910059409.3A priority Critical patent/CN109829025B/en
Publication of CN109829025A publication Critical patent/CN109829025A/en
Application granted granted Critical
Publication of CN109829025B publication Critical patent/CN109829025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a line correction method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a target starting point and a target end point of a line to be corrected, and coding regions of all levels recorded in the target starting point and the target end point according to a preset coding rule to obtain a target character string corresponding to the line to be corrected; searching a correction line matched with the target character string in a correction line set, wherein the starting point and the end point of each line in the correction line set are completely recorded with regions of all levels and are encoded according to the preset encoding rule to obtain a corresponding line character string; and correcting the target starting point and the target end point according to the searched correction line.

Description

Line correction method and device, electronic device and storage medium
Technical Field
The present application relates to the field of line coding, and in particular, to a line correction method and apparatus, an electronic device, and a storage medium.
Background
In the logistics industry, a line is a very important attribute, and the price, the time efficiency and other parameters of the line are usually calculated according to the addresses of a sending place and a receiving place of an order. It can be seen that the operation of the logistics industry is highly dependent on the expression of addresses. However, in actual practice, the personnel involved in the logistics order may adopt shorthand in filling out the address, or miss parts of the area, for convenience or for negligence. For example, the tympany district of Nanjing city, Jiangsu province is often abbreviated as tympany district of Nanjing city, even directly.
Disclosure of Invention
In view of the above, the present application provides a line correction method and apparatus, an electronic device, and a computer-readable storage medium.
In order to achieve the above purpose, the present application provides the following technical solutions:
according to a first aspect of the present application, there is provided a line correction method including:
acquiring a target starting point and a target end point of a line to be corrected, and coding regions of all levels recorded in the target starting point and the target end point according to a preset coding rule to obtain a target character string corresponding to the line to be corrected;
searching a correction line matched with the target character string in a correction line set, wherein the starting point and the end point of each line in the correction line set are completely recorded with regions of all levels and are encoded according to the preset encoding rule to obtain a corresponding line character string;
and correcting the target starting point and the target end point according to the searched correction line.
Optionally, the preset encoding rule includes:
converting the region recorded at the starting point of any line into a starting point character according to a preset coding format, and converting the region recorded at the end point into an end point character; wherein, the range of the region under the same level is in negative correlation with the character value corresponding to the region;
respectively merging the parts of the same level in the starting point character and the end point character to generate a sub-character string;
and combining the generated sub-character strings in order of the levels from high to low and generating a line character string corresponding to any one line.
Alternatively to this, the first and second parts may,
the encoding of the regions of each level recorded in the target starting point and the target ending point according to a preset encoding rule includes: when the levels of the target areas recorded in the target starting point and the target end point are incomplete, the complementing levels of the areas are higher than those of the target areas, and the complemented target areas are coded according to a preset coding rule; wherein, for a region lower in level than the target region, a character corresponding to the region is assigned a value of 0;
the searching for the correction line matched with the target character string in the correction line set comprises: and searching the line character string with the minimum difference value with the target character string in the correction line set, and taking the line corresponding to the searched line character string as the correction line.
Optionally, the preset encoding format includes any one of: national standard regional code format, postal code format; the levels of the region include at least two of: province, city, district/county, county/town, village/community.
Optionally, the correcting the target starting point and the target ending point according to the searched correction line includes:
replacing the target starting point with a starting point of the corrected line, and replacing the target end point with an end point of the corrected line.
Optionally, a corresponding logistics carrier is configured for each link in the corrected link set, and a carrier range of any logistics carrier includes a link corresponding to any logistics carrier; the method further comprises the following steps:
determining a logistics carrier corresponding to the correction route;
and allocating the logistics order corresponding to the line to be corrected to the determined logistics carriers.
According to a second aspect of the present application, there is provided a line correction apparatus including:
the device comprises an encoding unit, a correction unit and a control unit, wherein the encoding unit is used for acquiring a target starting point and a target end point of a line to be corrected, and encoding regions of all levels recorded in the target starting point and the target end point according to a preset encoding rule so as to obtain a target character string corresponding to the line to be corrected;
the searching unit is used for searching a correction line matched with the target character string in a correction line set, and all levels of regions are completely recorded at the starting point and the end point of each line in the correction line set and are encoded according to the preset encoding rule to obtain the corresponding line character string;
and the correction unit is used for correcting the target starting point and the target end point according to the searched correction line.
Optionally, the preset encoding rule includes:
converting the region recorded at the starting point of any line into a starting point character according to a preset coding format, and converting the region recorded at the end point into an end point character; wherein, the range of the region under the same level is in negative correlation with the character value corresponding to the region;
respectively merging the parts of the same level in the starting point character and the end point character to generate a sub-character string;
and combining the generated sub-character strings in order of the levels from high to low and generating a line character string corresponding to any one line.
Alternatively to this, the first and second parts may,
the encoding unit is specifically configured to: when the levels of the target areas recorded in the target starting point and the target end point are incomplete, the complementing levels of the areas are higher than those of the target areas, and the complemented target areas are coded according to a preset coding rule; wherein, for a region lower in level than the target region, a character corresponding to the region is assigned a value of 0;
the search unit is specifically configured to: and searching the line character string with the minimum difference value with the target character string in the correction line set, and taking the line corresponding to the searched line character string as the correction line.
Optionally, the preset encoding format includes any one of: national standard regional code format, postal code format; the levels of the region include at least two of: province, city, district/county, county/town, village/community.
Optionally, the correction unit is specifically configured to:
replacing the target starting point with a starting point of the corrected line, and replacing the target end point with an end point of the corrected line.
Optionally, a corresponding logistics carrier is configured for each link in the corrected link set, and a carrier range of any logistics carrier includes a link corresponding to any logistics carrier; the device further comprises:
a determination unit that determines a logistics carrier corresponding to the correction route;
and the dispatching unit is used for distributing the logistics order corresponding to the line to be corrected to the determined logistics carriers.
According to a third aspect of the present application, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method as in any of the above embodiments by executing the executable instructions.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method as in any one of the above-mentioned embodiments.
According to the technical scheme, the lines in which all levels of areas are completely recorded are coded according to the preset coding rule to obtain the corrected line set, and when the levels of the areas recorded by the current lines are incomplete, the lines can be coded according to the preset coding rule, so that the lines can be corrected by using the corrected line set, and then the accurate address of the line or the line closest to the line can be obtained.
Drawings
Fig. 1 is a flowchart illustrating a line correction method according to an exemplary embodiment of the present application.
Fig. 2 is a flow chart illustrating another line calibration method according to an exemplary embodiment of the present application.
Fig. 3 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
Fig. 4 is a block diagram of a line correction apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is a flowchart illustrating a line correction method according to an exemplary embodiment of the present application. As shown in fig. 1, the method applied to the server may include the following steps:
step 102, obtaining a target starting point and a target end point of a line to be corrected, and coding regions of each level recorded in the target starting point and the target end point according to a preset coding rule to obtain a target character string corresponding to the line to be corrected.
In this embodiment, the preset encoding rule may include: converting the region recorded at the starting point of any line into a starting point character according to a preset coding format, and converting the region recorded at the end point into an end point character; wherein, the range of the region under the same level is in negative correlation with the character value corresponding to the region; respectively merging the parts of the same level in the starting point character and the end point character to generate a sub-character string; and combining the generated sub-character strings in order of the levels from high to low and generating a line character string corresponding to any one line.
Based on the encoding rule, a correction line set can be configured in advance for correcting the line to be corrected. The lines with all levels of regions recorded completely can be selected in advance to be coded to obtain the corrected line set. Taking the three-level address as an example, the complete record of the lines of all the levels of the area may be: jiangsu area in Nanjing of Jiangsu → Hangzhou area in Hangzhou of Zhejiang province. The line "Nanjing city → Hangzhou city" is an incomplete line in the recording area due to the lack of provincial and regional areas.
In this embodiment, when the user fills in the route of the logistics, the area of the route record may not be complete. In other words, the line is the line to be corrected, and the level of the area recorded by the target start point and the target end point of the line to be corrected may not be complete. Then, the line to be corrected can be corrected according to the lines recorded in the correction line set. As an exemplary embodiment, when encoding regions of each level recorded in the target start point and the target end point according to a preset encoding rule, if the level of the target region recorded in the target start point and the target end point is incomplete, regions of a level higher than that of the target region may be complemented, and then the complemented target region is encoded according to the preset encoding rule; wherein, for a region having a lower level than the target region, a character corresponding to the region is assigned a value of 0. For example, if the target starting point is Nanjing and the corresponding level is city level, then for the level higher than the city level (i.e., provincial level), the corresponding provincial level can be definitely obtained as Jiangsu province directly according to Nanjing, which is a city region, and the target starting point is complemented as "Jiangsu province Nanjing city". Further, taking the national standard regional code as an example, the code corresponding to "south Beijing City of Jiangsu province" is "3201". And for the level lower than the target area (namely, the area level), the completion can be realized by adopting a 0 complementing mode. In the above example, the code corresponding to "Nanjing City of Jiangsu province" may be supplemented to "320100". The encoding method for the target end point is similar to the encoding method for the target start point, and is not described herein again. After the target starting point and the target end point are encoded, corresponding line character strings (namely target character strings) are generated according to the preset encoding rule.
After the corrected line set and the target character string corresponding to the line to be corrected are generated according to the coding mode, because the range of the region under the same level is in negative correlation with the character value corresponding to the region (namely, the region with the larger range under the same level is smaller after being coded), and the region with the level lower than the target region adopts a '0 complementing' mode, the corrected line matched with the target character string can be searched in the corrected line set by the following modes: and searching the line character string with the minimum difference value with the target character string in the correction line set, and taking the line corresponding to the searched line character string as the correction line.
In this embodiment, the preset encoding format may include any one of: national standard regional code format, postal code format; the level of the region may include at least two of: province, city, district/county, county/town, village/community.
And step 104, searching a correction line matched with the target character string in a correction line set, wherein the starting point and the end point of each line in the correction line set are completely recorded with regions of all levels, and are encoded according to the preset encoding rule to obtain the corresponding line character string.
And 106, correcting the target starting point and the target end point according to the searched correction line.
In this embodiment, the target starting point may be replaced with a starting point of the correction line, and the target end point may be replaced with an end point of the correction line.
In this embodiment, based on the generated corrected route set, a corresponding logistics carrier may be configured for each route in the corrected route set. Wherein the carrier scope of any logistics carrier comprises a route corresponding to the any logistics carrier. Alternatively, when generating the corrected route set, a corresponding route character string is generated as the corrected route set according to routes included in the support carrier range supported by each logistics carrier. Then, a logistics carrier corresponding to the corrected route may be determined, and a logistics order corresponding to the route to be corrected may be assigned to the determined logistics carrier. By the mode of distributing the logistics orders, even if the level of the circuit area filled by the user is incomplete, the fact that the carrier range supported by the logistics carriers distributed to the circuit comprises the circuit can be guaranteed, and therefore the logistics orders of the circuit can be carried out smoothly.
The line correction scheme of the present application comprises the following stages: 1) generating a correction line set; 2) and correcting the line to be corrected. For ease of understanding, the above stages are described in detail below with reference to examples and figures, respectively.
1. Generating a set of corrected lines
Take the address coding specification with the preset coding format of 3 levels (provincial level, city level, district level) as an example. Assuming that the selected route completely recording the regions of all levels includes:
1) a drumbeat area (320106) of Nanjing city of Jiangsu province → West lake area (330106) of Hangzhou city of Zhejiang province;
2) jiangsu province, Nanjing City prefecture (320101) → Zhejiang province, Hangzhou city, West lake region (330106);
3) a drumbeat area (320106) of Nanjing city of Jiangsu province → prefecture area (330101) of Hangzhou city of Zhejiang province;
4) jiangsu province, Nanjing City prefecture (320101) → Zhejiang province, Hangzhou city prefecture (330101).
Therefore, the scope of the Nanjing City district includes a Drum district, and the code '01' of the Nanjing City district is smaller than the code '06' of the drum district; similarly, the range of the Hangzhou city district comprises the West lake region, and the code ' 01 ' of the Hangzhou city district is less than the code 06 ' of the West lake region. And merging parts with the same level in the starting point address and the end point address based on the code of the selected line, and merging the address codes according to the level from high to low to obtain the final line character string. In the above example, the following 4 line codes are generated by merging in the order of "province, city, district":
1)323301010606 (Baotai district of Nanjing city of Jiangsu province → West lake district of Hangzhou city of Zhejiang province);
2)323301010106 (prefecture of Nanjing city of Jiangsu province → West lake region of Hangzhou city of Zhejiang province);
3)323301010601 (Baoguan district in Nanjing, Jiangsu, province → Hangzhou, Zhejiang, province);
4)323301010101 (prefecture of Nanjing city of Jiangsu province → Hangzhou city of Zhejiang province).
It should be noted that the lines recorded in the calibration line set can be flexibly selected according to actual situations, and the present application does not limit this. For example, when generating a corrected route set, a corresponding route string may be generated as the corrected route set according to routes included in the scope of support supported by each logistics carrier.
2. Correcting line to be corrected
Referring to fig. 2, fig. 2 is a flowchart illustrating another line calibration method according to an exemplary embodiment of the present application. As shown in fig. 2, the method applied to the server may include the following steps:
step 202, obtaining a target starting point and a target end point of the line to be corrected. 3
And step 204, completing the high-level area.
In step 206, the low level region is complemented by 0.
In step 208, a target string is generated.
In this embodiment, the user may fill in a route that needs to be dispatched at the client (in this case, the route is a route to be corrected), and send the route to the server through the client, so that the server assigns an appropriate logistics carrier to the route to carry a logistics order corresponding to the route. And after receiving the line filled by the user, the server completes the line if the line is incomplete.
For example, assume that the user fills in the circuit "Nanjing → Hangzhou". As can be seen, the user has only filled in addresses at the city level, but not at the provincial and regional levels. Where province (relative to city) is a high-level region and district (relative to city) is a low-level region. Then, aiming at high-level regions, since the city-level regions are definitely filled in Nanjing and Hangzhou, the starting point "Nanjing" can be complemented as "Jiangsu Nanjing", and the corresponding address is coded as "3201"; the 'Hangzhou' at the end point is supplemented as 'Zhejiang Hangzhou', and the corresponding address is coded as '3301'.
Further, since the user does not fill in the district level, it is necessary to "complement 0" the district level in the start point and the end point. Specifically, the address code of the start point is complemented to "320100", and the address code of the end point is complemented to "330100". Then merging and generating the final target character string according to the sequence of' province, city and city district
“323301010000”。
In step 210, the calibration route is searched in the calibration route set.
In the present embodiment, as an example, the line character string with the smallest difference from the target character string can be searched in the corrected line set, and the line corresponding to the searched line character string is used as the corrected line. For example, all the route character strings recorded in the corrected route set can be traversed, and the route character string with the minimum difference value with the target character string can be found by means of character string comparison.
For example, the route string having the smallest difference from the target string "323301010000" is "323301010101", and the route corresponding to the route string is the prefecture of south jing city of jiangsu prefecture → hound city of zhejiang. Therefore, the user-filled route "Nanjing → Hangzhou" can be corrected to "the prefecture of Nanjing City in Jiangsu province → the prefecture of Hangzhou City in Zhejiang province".
At step 212, the logistics carrier corresponding to the corrected route is determined.
Step 214, the logistics order is assigned to the logistics carrier.
In this embodiment, based on the generated corrected route set, a corresponding logistics carrier may be configured for each route in the corrected route set. Wherein, the carrying range of any physical distribution carrier comprises a route corresponding to the physical distribution carrier. For example, a logistics carrier as shown in table 1 may be configured for the above-described correction route set:
line Logistics carrier
Drum tower of Nanjing city of Jiangsu provinceDistrict → West lake region of Hangzhou city of Zhejiang province Carrier a
Prefecture of Nanjing city of Jiangsu province → West lake region of Hangzhou city of Zhejiang province Carrier b
Jiangsu province, Nanjing city, Drum building district → Zhejiang province, Hangzhou city, prefecture Carrier c
The prefecture of Nanjing City of Jiangsu province → Hangzhou City of Zhejiang province Carrier d
TABLE 1
Taking carrier a as an example, the carrier range supported by carrier a includes the route "drumbeat area of Nanjing city of Jiangsu province → West lake area of Hangzhou city of Zhejiang province"; in other words, the carrier a can carry the logistics order from the building region of Nanjing city, Jiangsu province to the West lake region of Hangzhou city, Zhejiang province, thereby ensuring that the logistics order is smoothly carried out.
As an example of the step 210, after the route filled by the user is corrected to "the prefecture of south jing city of jiangsu → the prefecture of hangzhou city of zhejiang, the corresponding carrier is determined to be the carrier d, and then the logistics order to be dispatched by the user can be distributed to the carrier d. Therefore, by the mode of distributing the logistics orders, the route closest to the route filled by the user can be found out under the condition that the route region level filled by the user is incomplete, and the condition that the carrying range supported by the designated logistics carrier comprises the route filled by the user is ensured, so that the logistics orders are ensured to be carried out smoothly.
According to the technical scheme, the lines in which all levels of areas are completely recorded are coded according to the preset coding rule to obtain the corrected line set, and when the levels of the areas recorded by the current lines are incomplete, the lines can be coded according to the preset coding rule, so that the lines can be corrected by using the corrected line set, and then the accurate address of the line or the line closest to the line can be obtained.
Fig. 3 shows a schematic block diagram of a master-based-side electronic device according to an exemplary embodiment of the present application. Referring to fig. 3, at the hardware level, the electronic device includes a processor 302, an internal bus 304, a network interface 303, a memory 308, and a non-volatile storage 310, but may also include hardware required for other services. The processor 302 reads a corresponding computer program from the non-volatile memory 310 into the memory 308 and then runs the computer program to form a line calibration apparatus on a logical level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Referring to fig. 4, in a software implementation, the circuit calibration apparatus may include:
the encoding unit 41 is configured to acquire a target starting point and a target ending point of a line to be corrected, and encode regions of each level recorded in the target starting point and the target ending point according to a preset encoding rule to obtain a target character string corresponding to the line to be corrected;
the searching unit 42 is configured to search a corrected line matched with the target character string in a corrected line set, where all levels of regions are completely recorded at a starting point and an end point of each line in the corrected line set, and are encoded according to the preset encoding rule to obtain a corresponding line character string;
and a correcting unit 43 for correcting the target starting point and the target ending point according to the searched correction line.
Optionally, the preset encoding rule includes:
converting the region recorded at the starting point of any line into a starting point character according to a preset coding format, and converting the region recorded at the end point into an end point character; wherein, the range of the region under the same level is in negative correlation with the character value corresponding to the region;
respectively merging the parts of the same level in the starting point character and the end point character to generate a sub-character string;
and combining the generated sub-character strings in order of the levels from high to low and generating a line character string corresponding to any one line.
Alternatively to this, the first and second parts may,
the encoding unit 41 is specifically configured to: when the levels of the target areas recorded in the target starting point and the target end point are incomplete, the complementing levels of the areas are higher than those of the target areas, and the complemented target areas are coded according to a preset coding rule; wherein, for a region lower in level than the target region, a character corresponding to the region is assigned a value of 0;
the search unit 42 is specifically configured to: and searching the line character string with the minimum difference value with the target character string in the correction line set, and taking the line corresponding to the searched line character string as the correction line.
Optionally, the preset encoding format includes any one of: national standard regional code format, postal code format; the levels of the region include at least two of: province, city, district/county, county/town, village/community.
Optionally, the correcting unit 43 is specifically configured to:
replacing the target starting point with a starting point of the corrected line, and replacing the target end point with an end point of the corrected line.
Optionally, a corresponding logistics carrier is configured for each link in the corrected link set, and a carrier range of any logistics carrier includes a link corresponding to any logistics carrier; the device further comprises:
a determination unit 44 that determines a logistics carrier corresponding to the correction route;
and an order unit 45 for allocating the logistics order corresponding to the line to be corrected to the determined logistics carriers.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium, e.g. a memory, comprising instructions executable by a processor of a line correction apparatus to implement a method as described in any of the above embodiments, such as the method may comprise: acquiring a target starting point and a target end point of a line to be corrected, and coding regions of all levels recorded in the target starting point and the target end point according to a preset coding rule to obtain a target character string corresponding to the line to be corrected; searching a correction line matched with the target character string in a correction line set, wherein the starting point and the end point of each line in the correction line set are completely recorded with regions of all levels and are encoded according to the preset encoding rule to obtain a corresponding line character string; and correcting the target starting point and the target end point according to the searched correction line.
The non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc., which is not limited in this application.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A method of line correction, comprising:
the method comprises the steps of obtaining a target starting point and a target end point of a line to be corrected, and coding regions of all levels recorded in the target starting point and the target end point according to a preset coding rule, wherein the coding method comprises the following steps: when the levels of the target areas recorded in the target starting point and the target end point are incomplete, the complementing levels of the areas are higher than that of the target areas, and the complemented target areas are coded according to a preset coding rule to obtain a target character string corresponding to the line to be corrected; wherein, for a region lower in level than the target region, a character corresponding to the region is assigned a value of 0; the preset encoding rule comprises: converting the region recorded at the starting point of any line into a starting point character according to a preset coding format, and converting the region recorded at the end point into an end point character; wherein, the range of the region under the same level is in negative correlation with the character value corresponding to the region; respectively merging the parts of the same level in the starting point character and the end point character to generate a sub-character string; combining the generated sub-character strings in sequence from high to low according to the levels and generating a line character string corresponding to any one line;
searching a correction line matched with the target character string in a correction line set, wherein the method comprises the following steps: searching a line character string with the minimum difference value with the target character string in the correction line set, and taking a line corresponding to the searched line character string as the correction line; the starting point and the end point of each line in the corrected line set are completely recorded with regions of all levels, and are encoded according to the preset encoding rule to obtain corresponding line character strings;
correcting the target starting point and the target end point according to the searched correction line, determining a logistics carrier corresponding to the correction line, and distributing a logistics order corresponding to the line to be corrected to the determined logistics carrier; wherein, corresponding physical distribution carriers are configured for each line in the correction line set, and the carrier scope of any physical distribution carrier comprises the line corresponding to the physical distribution carrier.
2. The method of claim 1, wherein the predetermined encoding format comprises any one of: national standard regional code format, postal code format; the levels of the region include at least two of: province, city, district/county, county/town, village/community.
3. The method according to claim 1, wherein the correcting the target starting point and the target ending point according to the searched correction line comprises:
replacing the target starting point with a starting point of the corrected line, and replacing the target end point with an end point of the corrected line.
4. A line correction apparatus, comprising:
the coding unit is used for acquiring a target starting point and a target end point of a line to be corrected and coding regions of all levels recorded in the target starting point and the target end point according to a preset coding rule, and comprises the following steps: when the levels of the target areas recorded in the target starting point and the target end point are incomplete, the complementing levels of the areas are higher than that of the target areas, and the complemented target areas are coded according to a preset coding rule to obtain a target character string corresponding to the line to be corrected; wherein, for a region lower in level than the target region, a character corresponding to the region is assigned a value of 0; the preset encoding rule comprises: converting the region recorded at the starting point of any line into a starting point character according to a preset coding format, and converting the region recorded at the end point into an end point character; wherein, the range of the region under the same level is in negative correlation with the character value corresponding to the region; respectively merging the parts of the same level in the starting point character and the end point character to generate a sub-character string; combining the generated sub-character strings in sequence from high to low according to the levels and generating a line character string corresponding to any one line;
the searching unit searches a correction line matched with the target character string in a correction line set, and comprises the following steps: searching a line character string with the minimum difference value with the target character string in the correction line set, and taking a line corresponding to the searched line character string as the correction line; the starting point and the end point of each line in the corrected line set are completely recorded with regions of all levels, and are encoded according to the preset encoding rule to obtain corresponding line character strings;
the correction unit corrects the target starting point and the target end point according to the searched correction line;
a determination unit that determines a logistics carrier corresponding to the correction route;
the order sending unit is used for distributing the logistics orders corresponding to the lines to be corrected to the determined logistics carriers; wherein, corresponding physical distribution carriers are configured for each line in the correction line set, and the carrier scope of any physical distribution carrier comprises the line corresponding to the physical distribution carrier.
5. The apparatus of claim 4, wherein the predetermined encoding format comprises any one of: national standard regional code format, postal code format; the levels of the region include at least two of: province, city, district/county, county/town, village/community.
6. The apparatus according to claim 4, wherein the correction unit is specifically configured to:
replacing the target starting point with a starting point of the corrected line, and replacing the target end point with an end point of the corrected line.
7. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1-3 by executing the executable instructions.
8. A computer-readable storage medium having stored thereon computer instructions, which, when executed by a processor, carry out the steps of the method according to any one of claims 1-3.
CN201910059409.3A 2019-01-22 2019-01-22 Line correction method and device, electronic device and storage medium Active CN109829025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910059409.3A CN109829025B (en) 2019-01-22 2019-01-22 Line correction method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910059409.3A CN109829025B (en) 2019-01-22 2019-01-22 Line correction method and device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN109829025A CN109829025A (en) 2019-05-31
CN109829025B true CN109829025B (en) 2020-10-09

Family

ID=66860426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910059409.3A Active CN109829025B (en) 2019-01-22 2019-01-22 Line correction method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN109829025B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932822B (en) * 2019-12-02 2022-06-17 泰康保险集团股份有限公司 Data encoding method, data decoding method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104635A (en) * 2009-12-17 2011-06-22 阿里巴巴集团控股有限公司 Method and device for updating Internet protocol (IP) address base
CN102307263A (en) * 2011-09-16 2012-01-04 汉王科技股份有限公司 Mobile terminal device mail box address input method and mobile terminal device
CN105761032A (en) * 2015-12-25 2016-07-13 芜湖众创物流投资中心(有限合伙) Large-scale vehicle-goods real-time intelligent matching system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033460A (en) * 2015-03-19 2016-10-19 阿里巴巴集团控股有限公司 Address data processing method and apparatus
CN104866546A (en) * 2015-05-08 2015-08-26 裴克铭管理咨询(上海)有限公司 Addresses matching fuzzy index and corresponding matching method and chain-type supplement means
CN105260872A (en) * 2015-10-21 2016-01-20 南通亚邦网络科技有限公司 Method and apparatus for processing online logistics transaction data
CN106096024A (en) * 2016-06-24 2016-11-09 北京京东尚科信息技术有限公司 The appraisal procedure of address similarity and apparatus for evaluating
CN107689025B (en) * 2016-08-04 2021-08-06 菜鸟智能物流控股有限公司 Method and device for logistics data processing, logistics information pushing and displaying

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104635A (en) * 2009-12-17 2011-06-22 阿里巴巴集团控股有限公司 Method and device for updating Internet protocol (IP) address base
CN102307263A (en) * 2011-09-16 2012-01-04 汉王科技股份有限公司 Mobile terminal device mail box address input method and mobile terminal device
CN105761032A (en) * 2015-12-25 2016-07-13 芜湖众创物流投资中心(有限合伙) Large-scale vehicle-goods real-time intelligent matching system

Also Published As

Publication number Publication date
CN109829025A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN110502599B (en) Map data query method and device and computer readable storage medium
CN105808609B (en) Method and equipment for judging data redundancy of information points
US11101818B2 (en) Method and device for storing time series data with adaptive length encoding
CN105335310A (en) Interface defining method, and data transmission method and apparatus
CN111814664B (en) Method, device, computer equipment and storage medium for identifying labels in drawing
CN107341070A (en) A kind of random write method and system based on correcting and eleting codes
US20170339252A1 (en) Generating a response to a client device in an internet of things domain
WO2016044176A1 (en) Data processing method and apparatus in service-oriented architecture system, and the service-oriented architecture system
CN109829025B (en) Line correction method and device, electronic device and storage medium
CN104639550A (en) User identification method and equipment
CN106648839A (en) Method and device for processing data
US10229142B2 (en) Method and system for handling binary large objects
CN110852098B (en) Data correction method, electronic equipment and storage medium
CN109800005A (en) A kind of hot update method of client and device
CN110852620B (en) Logistics order processing method and device, electronic equipment and storage medium
CN110377681B (en) Data query method and device, readable storage medium and electronic equipment
CN111444163A (en) Method and device for map data management and electronic map rollback
CN106569986B (en) Character string replacing method and device
CN105224305A (en) Function call path decoding method, Apparatus and system
CN109672608B (en) Method for transmitting messages according to time
CN111221517A (en) Model creating method and device, computer equipment and readable storage medium
CN105989445A (en) Rule management method and system
CN113934736A (en) Enterprise identification method, device and storage medium
CN112801748A (en) Distribution path data obtaining method and device and electronic equipment
CN112445800A (en) Method and system for generating data serial number and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant