Logistics address processing method, system and equipment based on Huffman coding and medium

By performing word segmentation processing on logistics address information and generating Hoffman code for storage, the problem of low efficiency in logistics address storage space in the prior art is solved, and efficient compression of address data and effective utilization of space resources are achieved.

CN119806381APending Publication Date: 2025-04-11SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311316287.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-11
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, the storage method of logistics addresses results in a longer length of address strings, occupying a large storage space, and making it difficult to efficiently utilize space resources.

Method used

The logistics address processing method based on Hoffman encoding is adopted, and the logistics address information is segmented, and the Hoffman encoding is generated, and combined into a second Hoffman encoding for storage.

Benefits of technology

The address components are represented by fewer bits through Hoffman encoding, which realizes compression of address data, reduces the space required to store address data, saves space storage resources, and improves space resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806381A_ABST
    Figure CN119806381A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a logistics address processing method, system and device based on Huffman coding and a medium, and the method comprises the steps: carrying out the word segmentation of logistics address information, and obtaining a plurality of address character strings; generating a first Huffman code of each address character string according to the path of each address character string in the Huffman tree; combining the first Huffman code of each address character string to obtain a second Huffman code of the logistics address information; and storing the second Huffman code as an address code of the logistics address information. According to the logistics address processing method based on Huffman coding provided by the invention, the logistics address information is converted into Huffman coding to be stored, so that address components can be expressed with fewer bits through the Huffman coding, the compression of address data is realized, the space required for storing the address data is reduced, and the storage efficiency of the address data is improved. Space storage resources are saved, and the space resource utilization rate is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a logistics address processing method, system, device and medium based on Huffman coding. Background Art

[0002] In the existing address representation and storage methods, a complete address string is often used to represent an address data, and the address data includes information such as province, city, district, street, etc. For example, the address data of "XX City XX District XX Road XX No. XX" is directly stored in plain text. Since the entire complete address data is stored, the address string length in the existing address storage method is relatively long in the system, and a large storage space is required in the database. Summary of the invention

[0003] The embodiments of the present application provide a logistics address processing method, system, device and medium based on Huffman coding, which can improve the utilization rate of space resources.

[0004] In a first aspect, an embodiment of the present application provides a logistics address processing method based on Huffman coding, comprising:

[0005] Perform word segmentation on the logistics address information to obtain multiple address character strings;

[0006] Generate a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree;

[0007] Combining the first Huffman code of each of the address strings to obtain the second Huffman code of the logistics address information;

[0008] The second Huffman code is used as the address code of the logistics address information for storage.

[0009] In a second aspect, an embodiment of the present application provides a logistics address processing system based on Huffman coding, including:

[0010] A word segmentation processing module is used to perform word segmentation processing on the logistics address information to obtain multiple address character strings;

[0011] A code generation module, used for generating a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree;

[0012] A coding combination module, used for combining the first Huffman coding of each of the address strings to obtain the second Huffman coding of the logistics address information;

[0013] The address code storage module is used to store the second Huffman code as the address code of the logistics address information.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute any one of the logistics address processing methods based on Huffman coding provided in the embodiments of the present application.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute any one of the logistics address processing methods based on Huffman coding provided in the embodiments of the present application.

[0016] In a fifth aspect, an embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements any one of the logistics address processing methods based on Huffman coding provided in the embodiments of the present application.

[0017] By adopting the solution of the embodiment of the present application, the logistics address information is converted into Huffman coding for storage. Therefore, the address components can be represented by fewer bits through Huffman coding, thereby compressing the address data, reducing the space required to store the address data, saving space storage resources, and improving space resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 It is a flow chart of a logistics address processing method based on Huffman coding provided in an embodiment of the present application;

[0020] Figure 2 is a schematic diagram of a Huffman tree provided in an embodiment of the present application;

[0021] Figure 3 It is a traversal flow chart of Huffman coding provided in the embodiment of the present application;

[0022] Figure 4 It is a structural diagram of a logistics address processing system based on Huffman coding provided in an embodiment of the present application;

[0023] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "first" and "second" is two or more, unless otherwise clearly and specifically defined.

[0025] The embodiment of the present application provides a logistics address processing method, system, device and medium based on Hoffman coding. Specifically, the embodiment of the present application will be described from the perspective of a logistics address processing system based on Hoffman coding, and the logistics address processing system based on Hoffman coding can be specifically integrated in an electronic device, that is, the logistics address processing method based on Hoffman coding in the embodiment of the present application can be executed by an electronic device. Optionally, the electronic device includes a terminal device. The terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (Personal Computer, PC) and other devices. Optionally, the electronic device includes a server, which can be an independent server or a server network or server cluster composed of servers, which includes but is not limited to a computer, a network host, a single network server, a network server set or a cloud server composed of servers. Among them, the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing).

[0026] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown in the drawings.

[0027] The following is a detailed description with reference to the accompanying drawings. The embodiment of the present application is described by taking the address processing system as an example. Figure 1 , Figure 1 It is a flow chart of the logistics address processing method based on Huffman coding provided in the embodiment of the present application.

[0028] The specific process of the logistics address processing method based on Huffman coding provided in the embodiment of the present application can be as follows: Step 101 to Step 104, including:

[0029] Step 101, performing word segmentation processing on the logistics address information to obtain multiple address character strings;

[0030] It should be noted that when the logistics address information needs to be converted into Huffman code, the user needs to send the logistics address information to the address processing system through the terminal device, where the logistics address information can be address information recording the user's shipping address and the user's receiving address.

[0031] Optionally, after receiving the logistics address information, the address processing system performs word segmentation processing on the logistics address information to obtain multiple address character strings. In one embodiment, the historical logistics address information of the historical orders can be used to perform word segmentation processing on the current logistics address information. Optionally, the logistics address information is segmented according to the level of the zoning unit to obtain the address character strings of multiple zoning units, such as segmenting the address information of the logistics address information "XX City XX District XX Road No. XX" into the address character string of "XX City", the address character string of "XX District", the address character string of "XX Road" and the address character string of "XX No.".

[0032] Step 102, generating a first Huffman code for each of the address strings according to the path of each of the address strings in the Huffman tree;

[0033] It should be noted that before generating Huffman codes, a Huffman tree needs to be constructed. The Huffman tree is constructed based on the sample strings obtained after splitting the historical logistics address information and the frequency of occurrence of each sample string.

[0034] Optionally, the address processing system takes each address string as a leaf node, traverses a pre-built Huffman tree, and obtains a path of each address string in the Huffman tree.

[0035] Optionally, the address processing system generates a first Huffman code for each address string according to the path of each address string in the Huffman tree.

[0036] Step 103, combining the first Huffman codes of each of the address strings to obtain the second Huffman code of the logistics address information;

[0037] Optionally, the address processing system determines the level of the division unit of each address string, and combines the first Huffman code of each address string in descending order of the level of the division unit to obtain the second Huffman code of the logistics address information.

[0038] It should be noted that the levels of the zoning units may include first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units, and the levels of the first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units are in descending order. In one embodiment, the first-level zoning units may include provincial zoning units, autonomous region zoning units and municipal zoning units; the second-level zoning units may include prefecture-level city zoning units, district zoning units and autonomous prefecture zoning units; the third-level zoning units may include county zoning units, autonomous county zoning units, banner zoning units, autonomous banner zoning units and municipal district zoning units; the fourth-level zoning units may include township zoning units, town zoning units, street zoning units, ethnic township zoning units and sumu zoning units; the fifth-level zoning units may include alleys, roads and communities.

[0039] Step 104: Use the second Huffman code as the address code of the logistics address information for storage.

[0040] Optionally, the address processing system determines the second Huffman code as the final Huffman code of the logistics address information, and stores the second Huffman code as the address code of the logistics address information.

[0041] By adopting the scheme of the embodiment of the present application, the logistics address information is converted into Huffman coding for storage, so the address components can be represented by fewer bits through Huffman coding, thereby achieving compression of the address data, reducing the space required for storing the address data, saving space storage resources, and improving the utilization rate of space resources. At the same time, by adopting the scheme of the embodiment of the present application, the logistics address information is converted into Huffman coding, and the logistics address information does not need to be represented in plain text, which reduces the transmission and storage of sensitive information and privacy information, reduces the risk of leakage of privacy information and sensitive information, enhances data security, and improves privacy security. At the same time, Huffman coding takes up less storage space, reduces the data transmission size and data transmission volume, reduces the data transmission cost, and improves the transmission efficiency and transmission speed of data transmission.

[0042] Optionally, after generating the first Huffman code of each address string, the first Huffman code of each address string needs to be compressed.

[0043] Optionally, the specific process of compressing the first Huffman code of each address string includes:

[0044] Convert the first Huffman code of each of the address strings into an identification value of an integer value type;

[0045] Associatively mapping each of the address strings and their identification values ​​to obtain an association mapping result;

[0046] The association mapping result is updated to the original association data table to generate a target association data table.

[0047] Specifically, the address processing system converts the first Huffman code of each address string into an identification value of an integer value type (int type), and uses the identification value as the unique ID (Identity document) of the address string. Optionally, the address processing system associates and maps each address string and its identification value to obtain an association mapping result.

[0048] In one embodiment, the Huffman code is a binary code, and the integer value is a decimal value. The Huffman code of the address string 1 is 00000100, and the Huffman code of the address string 2 is 10001001. Therefore, the Huffman code is converted into an identification value of an integer value type, and the identification value of the address string 1 is (00000100). 10 =4, the identification value of address string 1 is (10001001) 10 =137, therefore, the association mapping result is: {address string 1, 4}, {address string 2, 137}.

[0049] Optionally, the address processing system updates the association mapping result to the original association data table to generate a target association data table, that is, supplements the association mapping result to the original association data table, expands the association mapping result in the original association data table, and obtains the target association data table.

[0050] It should be noted that the numerals, English commas and most English characters of the identification value in the embodiment of the present application are usually represented by ASCII encoding, and each character occupies 1 byte (8 bits). Therefore, numerals, English commas and most English characters all occupy 1 byte in a computer. However, Chinese characters are usually represented by Unicode encoding, and a commonly used encoding scheme is UTF-8. In UTF-8 encoding, each Chinese character usually occupies 3 bytes, and some special Chinese characters may occupy 4 bytes, so the identification value of the embodiment of the present application reduces storage space.

[0051] By adopting the scheme of the embodiment of the present application, the Huffman code is converted into an identification value of an integer value type. The identification value of the integer value type occupies less storage space, reduces the data transmission size and data transmission volume, reduces the data transmission cost, and improves the transmission efficiency and transmission speed of the data transmission.

[0052] Optionally, the specific process of restoring address information based on the character string includes:

[0053] Obtaining the character string to be queried according to the address data query request initiated by the terminal device;

[0054] Acquire address information to be restored according to the character string to be queried and the target associated data table;

[0055] The address information to be restored is restored in the order of the primary zoning unit, the secondary zoning unit, the tertiary zoning unit, the quaternary zoning unit and the quintuple zoning unit to obtain the target address information.

[0056] Specifically, when it is necessary to restore the original address information based on the character string, the user can initiate a request to the address processing system through the terminal device by sending an address data query request carrying the character string to be queried. Optionally, the address processing system responds to the address data query request of the terminal device, and parses the address data query request to obtain the character string to be queried carried in the address data query request.

[0057] Optionally, the address processing system performs matching in the target association data table according to each identification value in the character string to be queried, and obtains the address information to be restored of each identification value in the character string to be queried.

[0058] Optionally, the address processing system restores the address information to be restored in the order of the first-level zoning unit, the second-level zoning unit, the third-level zoning unit, the fourth-level zoning unit and the fifth-level zoning unit to obtain the target address information. Therefore, in one embodiment, the string to be queried is "No. 1.25.85.1", and the target association data table is {(Province A, 1), (City B, 25), (Street C, 85), (District D, 10)}, so the target address information is No. 1, Street C, City B, Province A.

[0059] By adopting the scheme of the embodiment of the present application, in the process of address query, the target address information is obtained by matching the identification value in the target association data table. Therefore, by adopting the scheme of the embodiment of the present application, a simple integer index can be used in the data table to perform address query and analysis, which improves the processing speed and query efficiency of address data and facilitates the management and use of address information. At the same time, by matching the identification value to the data table, the original logistics address information can be restored to ensure the integrity and accuracy of the data.

[0060] Optionally, the logistics address information is segmented to obtain multiple address strings, including:

[0061] The logistics address information is input into a word segmentation model to obtain a plurality of address character strings output by the word segmentation model; the word segmentation model is trained based on historical logistics address information and sample character strings after being split according to zoning units; the zoning units include first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units.

[0062] It should be noted that before the logistics address information is segmented, a segmentation model needs to be constructed. Optionally, the specific construction process of the segmentation model is as follows: the address processing system obtains the historical logistics address information, and splits the historical logistics address information according to the division units to obtain the sample character string, wherein the division units include the first-level division units, the second-level division units, the third-level division units, the fourth-level division units and the fifth-level division units. The division units have been described in detail in the above embodiment and will not be repeated here. Optionally, the address processing system performs corresponding training on the historical logistics address information and its sample character strings to obtain a segmentation model.

[0063] Optionally, the address processing system inputs the logistics address information into a word segmentation model to obtain multiple address character strings output by the word segmentation model.

[0064] By adopting the solution of the embodiment of the present application, the logistics address information is segmented by a segmentation model pre-constructed according to the historical logistics address information, so that the logistics address information can be accurately segmented.

[0065] Optionally, the specific steps of constructing the Huffman tree include:

[0066] Counting the occurrence frequency of each of the sample character strings, and using the occurrence frequency of each of the sample character strings as a weight value of each of the sample character strings;

[0067] Taking each of the sample character strings as a leaf node, obtaining an original leaf node set;

[0068] Merge the two first leaf nodes with the smallest weight values ​​in the original leaf node set as child nodes to obtain a first parent node;

[0069] The first parent node and the second leaf node with the smallest weight value in the remaining leaf nodes are merged as child nodes to obtain a second parent node, until a root node is obtained to construct the Huffman tree;

[0070] The remaining leaf node set is a set of remaining leaf nodes in the original leaf node set except the first leaf node.

[0071] Specifically, the address processing system counts the occurrence frequency of each sample character string, and uses the occurrence frequency of each sample character string as the weight value of each sample character string.

[0072] Optionally, the address processing system uses each sample character string as a leaf node to obtain an original leaf node set.

[0073] Optionally, the address processing system merges the two first leaf nodes with the smallest weight values ​​in the original leaf node set as child nodes to obtain the first parent node. Optionally, the address processing system merges the first parent node and the second leaf node with the smallest weight value in the remaining leaf node set as child nodes to obtain the second parent node, until a root node is obtained to construct a Huffman tree, wherein the remaining leaf node set is the set of the remaining leaf nodes in the original leaf node set except the first leaf node. It should be noted that in the Huffman tree, the weight value of the left branch tree is less than or equal to the weight value of the right branch tree.

[0074] In one embodiment, the sample character strings and their occurrence frequencies are: (A1 city, 3 times), (A2 city, 4 times), (B1 city, 5 times), (B2 city, 6 times), (B3 city, 7 times), therefore, the constructed Huffman tree reference Figure 2 , Figure 2 Schematic diagram of the Huffman tree provided in the examples of the present application.

[0075] By adopting the solution of the embodiment of the present application, a Huffman tree is constructed, so that the Huffman coding of address data with high frequency of occurrence is shorter, and the Huffman coding of address data with low frequency of occurrence is longer, thereby achieving efficient data compression, reducing the space required for storing address data, saving space storage resources, and improving space resource utilization.

[0076] Optionally, generating a first Huffman code for each address string according to a path of each address string in the Huffman tree includes:

[0077] Taking the root node of the Huffman tree as the path starting point and the leaf node where each of the address strings is located as the path ending point, determine the path of each of the address strings in the Huffman tree;

[0078] Traverse along the path of each address string in the Huffman tree and assign codes to generate a first Huffman code for each address string.

[0079] Specifically, the address processing system uses the root node of the Huffman tree as the path starting point, uses the leaf node where each address string is located as the path ending point, and determines the path of each address string in the Huffman tree.

[0080] Optionally, the address processing system traverses the path of each address string in the Huffman tree and assigns codes to generate the first Huffman code of each address string. Specifically, the system traverses the path of each address string in the Huffman tree and assigns code 0 to the left subtree path and code 1 to the right subtree path until the leaf node of each address string is reached, thereby generating the first Huffman code of each address string.

[0081] In one embodiment, referring to Figure 3 , Figure 3 It is a traversal flow chart of the Huffman code provided in the embodiment of the present application. Therefore, the Huffman code of the address string "A1 City" is 110, the Huffman code of the address string "A2 City" is 111, the Huffman code of the address string "B1 City" is 00, the Huffman code of the address string "B2 City" is 01, and the Huffman code of the address string "B3 City" is 10.

[0082] By adopting the solution of the embodiment of the present application, the logistics address information is converted into Huffman coding for storage. Therefore, the address components can be represented by fewer bits through Huffman coding, thereby compressing the address data, reducing the space required to store the address data, saving space storage resources, and improving space resource utilization.

[0083] The following is a description of the logistics address processing system based on Huffman coding provided in the embodiment of the present application. The logistics address processing system based on Huffman coding described below and the logistics address processing method based on Huffman coding described above can be referred to each other. Figure 4 As shown, Figure 4 : is a structural diagram of a logistics address processing system based on Huffman coding provided in an embodiment of the present application. The logistics address processing system based on Huffman coding may include:

[0084] The word segmentation processing module 401 is used to perform word segmentation processing on the logistics address information to obtain multiple address character strings;

[0085] A code generation module 402, configured to generate a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree;

[0086] A coding combination module 403, used for combining the first Huffman coding of each of the address strings to obtain the second Huffman coding of the logistics address information;

[0087] The address code storage module 404 is used to store the second Huffman code as the address code of the logistics address information.

[0088] By adopting the scheme of the embodiment of the present application, the logistics address information is converted into Huffman coding for storage, so the address components can be represented by fewer bits through Huffman coding, thereby achieving compression of the address data, reducing the space required for storing the address data, saving space storage resources, and improving the utilization rate of space resources. At the same time, by adopting the scheme of the embodiment of the present application, the logistics address information is converted into Huffman coding, and the logistics address information does not need to be represented in plain text, which reduces the transmission and storage of sensitive information and privacy information, reduces the risk of leakage of privacy information and sensitive information, enhances data security, and improves privacy security. At the same time, Huffman coding takes up less storage space, reduces the data transmission size and data transmission volume, reduces the data transmission cost, and improves the transmission efficiency and transmission speed of data transmission.

[0089] In an optional example, the logistics address processing system based on Huffman coding is also used for:

[0090] Convert the first Huffman code of each of the address strings into an identification value of an integer value type;

[0091] Associatively mapping each of the address strings and their identification values ​​to obtain an association mapping result;

[0092] The association mapping result is updated to the original association data table to generate a target association data table.

[0093] In an optional example, the logistics address processing system based on Huffman coding is also used for:

[0094] Obtaining the character string to be queried according to the address data query request initiated by the terminal device;

[0095] Acquire address information to be restored according to the character string to be queried and the target associated data table;

[0096] The address information to be restored is restored in the order of the primary zoning unit, the secondary zoning unit, the tertiary zoning unit, the quaternary zoning unit and the quintuple zoning unit to obtain the target address information.

[0097] In an optional example, the word segmentation processing module 401 is further used for:

[0098] The logistics address information is input into a word segmentation model to obtain a plurality of address character strings output by the word segmentation model; the word segmentation model is trained based on historical logistics address information and sample character strings after being split according to zoning units; the zoning units include first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units.

[0099] In an optional example, the logistics address processing system based on Huffman coding is also used for:

[0100] Counting the occurrence frequency of each of the sample character strings, and using the occurrence frequency of each of the sample character strings as a weight value of each of the sample character strings;

[0101] Taking each of the sample character strings as a leaf node, obtaining an original leaf node set;

[0102] Merge the two first leaf nodes with the smallest weight values ​​in the original leaf node set as child nodes to obtain a first parent node;

[0103] The first parent node and the second leaf node with the smallest weight value in the remaining leaf nodes are merged as child nodes to obtain a second parent node, until a root node is obtained to construct the Huffman tree;

[0104] The remaining leaf node set is a set of remaining leaf nodes in the original leaf node set except the first leaf node.

[0105] In an optional example, the code generation module 402 is further used to:

[0106] Taking the root node of the Huffman tree as the path starting point and the leaf node where each of the address strings is located as the path ending point, determine the path of each of the address strings in the Huffman tree;

[0107] Traverse along the path of each address string in the Huffman tree and assign codes to generate a first Huffman code for each address string.

[0108] In an optional example, the code generation module 402 is further used to:

[0109] Traverse the path of each address string in the Huffman tree, assign code 0 to the left subtree path, assign code 1 to the right subtree path, and generate the first Huffman code of each address string.

[0110] The specific embodiments of the logistics address processing system based on Huffman coding provided in this application are basically the same as the embodiments of the logistics address processing method based on Huffman coding, and will not be described in detail here.

[0111] Optional, such as Figure 5 As shown, Figure 5A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call a determination program in the memory 530 to execute the steps of the logistics address processing method based on Huffman coding, for example, including:

[0112] Perform word segmentation on the logistics address information to obtain multiple address character strings;

[0113] Generate a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree;

[0114] Combining the first Huffman code of each of the address strings to obtain the second Huffman code of the logistics address information;

[0115] The second Huffman code is used as the address code of the logistics address information for storage.

[0116] In an optional example, it also includes:

[0117] Convert the first Huffman code of each of the address strings into an identification value of an integer value type;

[0118] Associatively mapping each of the address strings and their identification values ​​to obtain an association mapping result;

[0119] The association mapping result is updated to the original association data table to generate a target association data table.

[0120] In an optional example, it also includes:

[0121] Obtaining the character string to be queried according to the address data query request initiated by the terminal device;

[0122] Acquire address information to be restored according to the character string to be queried and the target associated data table;

[0123] The address information to be restored is restored in the order of the primary zoning unit, the secondary zoning unit, the tertiary zoning unit, the quaternary zoning unit and the quintuple zoning unit to obtain the target address information.

[0124] In an optional example, the logistics address information is segmented to obtain multiple address character strings, including:

[0125] The logistics address information is input into a word segmentation model to obtain a plurality of address character strings output by the word segmentation model; the word segmentation model is trained based on historical logistics address information and sample character strings after being split according to zoning units; the zoning units include first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units.

[0126] In an optional example, the specific steps of constructing the Huffman tree include:

[0127] Counting the occurrence frequency of each of the sample character strings, and using the occurrence frequency of each of the sample character strings as a weight value of each of the sample character strings;

[0128] Taking each of the sample character strings as a leaf node, obtaining an original leaf node set;

[0129] Merge the two first leaf nodes with the smallest weight values ​​in the original leaf node set as child nodes to obtain a first parent node;

[0130] The first parent node and the second leaf node with the smallest weight value in the remaining leaf nodes are merged as child nodes to obtain a second parent node, until a root node is obtained to construct the Huffman tree;

[0131] The remaining leaf node set is a set of remaining leaf nodes in the original leaf node set except the first leaf node.

[0132] In an optional example, generating a first Huffman code of each address string according to a path of each address string in the Huffman tree includes:

[0133] Taking the root node of the Huffman tree as the path starting point and the leaf node where each of the address strings is located as the path ending point, determine the path of each of the address strings in the Huffman tree;

[0134] Traverse along the path of each address string in the Huffman tree and assign codes to generate a first Huffman code for each address string.

[0135] In an optional example, traversing the path of each address string in the Huffman tree and assigning codes to generate a first Huffman code for each address string includes:

[0136] Traverse the path of each address string in the Huffman tree, assign code 0 to the left subtree path, assign code 1 to the right subtree path, and generate the first Huffman code of each address string.

[0137] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a machine-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the determination machine software product is stored in a storage medium, including a number of instructions to enable a determination machine device (which can be a personal determination machine, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0138] On the other hand, an embodiment of the present application further provides a non-transitory determination machine-readable storage medium, the non-transitory determination machine-readable storage medium includes a determination machine program, the determination machine program can be stored on the non-transitory determination machine-readable storage medium, and when the determination machine program is executed by the processor, the determination machine can perform the steps of the logistics address processing method based on Huffman coding provided in the above embodiments, for example, including:

[0139] Perform word segmentation on the logistics address information to obtain multiple address character strings;

[0140] Generate a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree;

[0141] Combining the first Huffman code of each of the address strings to obtain the second Huffman code of the logistics address information;

[0142] The second Huffman code is used as the address code of the logistics address information for storage.

[0143] In an optional example, it also includes:

[0144] Convert the first Huffman code of each of the address strings into an identification value of an integer value type;

[0145] Associatively mapping each of the address strings and their identification values ​​to obtain an association mapping result;

[0146] The association mapping result is updated to the original association data table to generate a target association data table.

[0147] In an optional example, it also includes:

[0148] Obtaining the character string to be queried according to the address data query request initiated by the terminal device;

[0149] Acquire address information to be restored according to the character string to be queried and the target associated data table;

[0150] The address information to be restored is restored in the order of the primary zoning unit, the secondary zoning unit, the tertiary zoning unit, the quaternary zoning unit and the quintuple zoning unit to obtain the target address information.

[0151] In an optional example, the logistics address information is segmented to obtain multiple address character strings, including:

[0152] The logistics address information is input into a word segmentation model to obtain a plurality of address character strings output by the word segmentation model; the word segmentation model is trained based on historical logistics address information and sample character strings after being split according to zoning units; the zoning units include first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units.

[0153] In an optional example, the specific steps of constructing the Huffman tree include:

[0154] Counting the occurrence frequency of each of the sample character strings, and using the occurrence frequency of each of the sample character strings as a weight value of each of the sample character strings;

[0155] Taking each of the sample character strings as a leaf node, obtaining an original leaf node set;

[0156] Merge the two first leaf nodes with the smallest weight values ​​in the original leaf node set as child nodes to obtain a first parent node;

[0157] The first parent node and the second leaf node with the smallest weight value in the remaining leaf nodes are merged as child nodes to obtain a second parent node, until a root node is obtained to construct the Huffman tree;

[0158] The remaining leaf node set is a set of remaining leaf nodes in the original leaf node set except the first leaf node.

[0159] In an optional example, generating a first Huffman code of each address string according to a path of each address string in the Huffman tree includes:

[0160] Taking the root node of the Huffman tree as the path starting point and the leaf node where each of the address strings is located as the path ending point, determine the path of each of the address strings in the Huffman tree;

[0161] Traverse along the path of each address string in the Huffman tree and assign codes to generate a first Huffman code for each address string.

[0162] In an optional example, traversing the path of each address string in the Huffman tree and assigning codes to generate a first Huffman code for each address string includes:

[0163] Traverse the path of each address string in the Huffman tree, assign code 0 to the left subtree path, assign code 1 to the right subtree path, and generate the first Huffman code of each address string.

[0164] On the other hand, the embodiment of the present application further provides a computer product, the computer product includes a determination machine program, the determination machine program can be stored on the computer product, and when the determination machine program is executed by the processor, the determination machine can perform the steps of the logistics address processing method based on Huffman coding provided in the above embodiments, for example, including:

[0165] Perform word segmentation on the logistics address information to obtain multiple address character strings;

[0166] Generate a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree;

[0167] Combining the first Huffman code of each of the address strings to obtain the second Huffman code of the logistics address information;

[0168] The second Huffman code is used as the address code of the logistics address information for storage.

[0169] In an optional example, it also includes:

[0170] Convert the first Huffman code of each of the address strings into an identification value of an integer value type;

[0171] Associatively mapping each of the address strings and their identification values ​​to obtain an association mapping result;

[0172] The association mapping result is updated to the original association data table to generate a target association data table.

[0173] In an optional example, it also includes:

[0174] Obtaining the character string to be queried according to the address data query request initiated by the terminal device;

[0175] Acquire address information to be restored according to the character string to be queried and the target associated data table;

[0176] The address information to be restored is restored in the order of the primary zoning unit, the secondary zoning unit, the tertiary zoning unit, the quaternary zoning unit and the quintuple zoning unit to obtain the target address information.

[0177] In an optional example, the logistics address information is segmented to obtain multiple address character strings, including:

[0178] The logistics address information is input into a word segmentation model to obtain a plurality of address character strings output by the word segmentation model; the word segmentation model is trained based on historical logistics address information and sample character strings after being split according to zoning units; the zoning units include first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units.

[0179] In an optional example, the specific steps of constructing the Huffman tree include:

[0180] Counting the occurrence frequency of each of the sample character strings, and using the occurrence frequency of each of the sample character strings as a weight value of each of the sample character strings;

[0181] Taking each of the sample character strings as a leaf node, obtaining an original leaf node set;

[0182] Merge the two first leaf nodes with the smallest weight values ​​in the original leaf node set as child nodes to obtain a first parent node;

[0183] The first parent node and the second leaf node with the smallest weight value in the remaining leaf nodes are merged as child nodes to obtain a second parent node, until a root node is obtained to construct the Huffman tree;

[0184] The remaining leaf node set is a set of remaining leaf nodes in the original leaf node set except the first leaf node.

[0185] In an optional example, generating a first Huffman code of each address string according to a path of each address string in the Huffman tree includes:

[0186] Taking the root node of the Huffman tree as the path starting point and the leaf node where each of the address strings is located as the path ending point, determine the path of each of the address strings in the Huffman tree;

[0187] Traverse along the path of each address string in the Huffman tree and assign codes to generate a first Huffman code for each address string.

[0188] In an optional example, traversing the path of each address string in the Huffman tree and assigning codes to generate a first Huffman code for each address string includes:

[0189] Traverse the path of each address string in the Huffman tree, assign code 0 to the left subtree path, assign code 1 to the right subtree path, and generate the first Huffman code of each address string.

[0190] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0191] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the determination machine software product can be stored in a determination machine readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a determination machine device (which can be a personal determination machine, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0192] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A logistics address processing method based on Huffman coding, characterized in that: include: Perform word segmentation on the logistics address information to obtain multiple address character strings; Generate a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree; Combining the first Huffman code of each of the address strings to obtain the second Huffman code of the logistics address information; The second Huffman code is used as the address code of the logistics address information for storage.

2. The logistics address processing method based on Huffman coding according to claim 1 is characterized in that: The logistics address processing method based on Huffman coding also includes: Convert the first Huffman code of each of the address strings into an identification value of an integer value type; Associatively mapping each of the address strings and their identification values ​​to obtain an association mapping result; The association mapping result is updated to the original association data table to generate a target association data table.

3. The logistics address processing method based on Huffman coding according to claim 2 is characterized in that: The logistics address processing method based on Huffman coding also includes: Obtaining the character string to be queried according to the address data query request initiated by the terminal device; Acquire address information to be restored according to the character string to be queried and the target associated data table; The address information to be restored is restored in the order of the primary zoning unit, the secondary zoning unit, the tertiary zoning unit, the quaternary zoning unit and the quintuple zoning unit to obtain the target address information.

4. The logistics address processing method based on Huffman coding according to claim 1 is characterized in that: The logistics address information is segmented to obtain multiple address character strings, including: The logistics address information is input into a word segmentation model to obtain a plurality of address character strings output by the word segmentation model; the word segmentation model is trained based on historical logistics address information and sample character strings after being split according to zoning units; the zoning units include first-level zoning units, second-level zoning units, third-level zoning units, fourth-level zoning units and fifth-level zoning units.

5. The logistics address processing method based on Huffman coding according to claim 4 is characterized in that: The specific steps of constructing the Huffman tree include: Counting the occurrence frequency of each of the sample character strings, and using the occurrence frequency of each of the sample character strings as a weight value of each of the sample character strings; Taking each of the sample character strings as a leaf node, obtaining an original leaf node set; Merge the two first leaf nodes with the smallest weight values ​​in the original leaf node set as child nodes to obtain a first parent node; The first parent node and the second leaf node with the smallest weight value in the remaining leaf nodes are merged as child nodes to obtain a second parent node, until a root node is obtained to construct the Huffman tree; The remaining leaf node set is a set of remaining leaf nodes in the original leaf node set except the first leaf node.

6. The logistics address processing method based on Huffman coding according to any one of claims 1 to 5, characterized in that: Generating a first Huffman code of each address string according to a path of each address string in the Huffman tree includes: Taking the root node of the Huffman tree as the path starting point and the leaf node where each of the address strings is located as the path ending point, determine the path of each of the address strings in the Huffman tree; Traverse along the path of each address string in the Huffman tree and assign codes to generate a first Huffman code for each address string.

7. The logistics address processing method based on Huffman coding according to claim 6 is characterized in that: The traversing the path of the Huffman tree along each of the address strings and assigning codes to generate a first Huffman code of each of the address strings comprises: Traverse the path of each address string in the Huffman tree, assign code 0 to the left subtree path, assign code 1 to the right subtree path, and generate the first Huffman code of each address string.

8. A logistics address processing system based on Huffman coding, characterized in that: include: A word segmentation processing module is used to perform word segmentation processing on the logistics address information to obtain multiple address character strings; A code generation module, used for generating a first Huffman code for each of the address strings according to a path of each of the address strings in the Huffman tree; A coding combination module, used for combining the first Huffman coding of each of the address strings to obtain the second Huffman coding of the logistics address information; The address code storage module is used to store the second Huffman code as the address code of the logistics address information.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the logistics address processing method based on Huffman coding as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute the logistics address processing method based on Huffman coding as described in any one of claims 1 to 7.