Address processing method, value distribution method, device, equipment, medium and product
The node compression tree is generated through prefix tree and single-character node compression technology, which solves the efficiency and accuracy of logistics address resolution in massive situations, and achieves fast and accurate address resolution.
Patent Information
- Application Number
- CN202411409555.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2024-12-20
AI Technical Summary
The existing logistics address resolution method has the problem of slow and unstable request speed under massive addresses, resulting in slow processing speed and incomplete resolution results.
The prefix tree and single-character node compression technology are used to generate node compression trees and perform tree structure verification to ensure the accuracy and efficiency of address resolution.
Through the storage and verification of node compression trees, fast and accurate address resolution is achieved, solving the problems of slow request speed and incomplete resolution of map interfaces, and improving the efficiency and accuracy of logistics address processing.
Smart Images

Figure CN119167920A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to an address processing method, a value distribution method, an apparatus, a device, a medium, and a product. Background Art
[0002] At present, in the field of logistics, effective analysis of logistics addresses can not only speed up the logistics processing process, but also provide more accurate delivery channels for value distribution (for example, advertising). For the analysis of logistics addresses, the usual method is to request the map interface to input each logistics address information to obtain structured address information.
[0003] However, the inventors have found that when the above method is used to perform address resolution, the following technical problems often occur:
[0004] The map interface request speed is slow and unstable. In the case of massive logistics addresses, it leads to slow processing speed and incomplete addresses after parsing.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose address processing methods, value distribution methods, devices, equipment, media and products to solve the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide an address processing method, including: obtaining a first target address set; generating a prefix tree corresponding to the first target address set; performing single-character node compression on nodes in the prefix tree to generate a node compression tree; performing tree structure verification on the node compression tree to generate a verification result; in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct, storing the node compression tree.
[0009] Optionally, the above-mentioned single-character node compression of the nodes in the above-mentioned prefix tree to generate a node compression tree includes: determining each node in the above-mentioned prefix tree; for each node, executing a first generation step: determining at least one current node from the above-mentioned each node; determining a single-character node from the above-mentioned at least one current node to obtain at least one single-character node; adjusting the corresponding nodes in the prefix tree according to the above-mentioned at least one single-character node to generate an adjusted prefix tree; removing the above-mentioned at least one current node from the above-mentioned each node to obtain each node after removal; in response to determining that each node after removal is empty, determining the adjusted prefix tree as the above-mentioned node compression tree.
[0010] Optionally, the method further includes: in response to determining that each node after the removal is not empty, taking each node after the removal as each node and the adjusted prefix tree as the prefix tree, and continuing to execute the first generation step.
[0011] Optionally, the above-mentioned adjusting the corresponding nodes in the prefix tree according to the at least one single-character node to generate an adjusted prefix tree includes: for each single-character node among the at least one single-character node, executing a second generation step: adding the character corresponding to the single-character node to each node in the next node set to obtain the added next node set, wherein the next node set is each next node corresponding to the single-character node in the prefix tree; in response to determining that the single-character node has a previous node, deleting the single-character node in the prefix tree, and connecting the previous node to each node in the added node set to generate an adjusted prefix tree.
[0012] Optionally, the above-mentioned tree structure verification is performed on the above-mentioned node compression tree to generate a verification result, including: obtaining a second target address set and a corresponding address label set; determining, based on the above-mentioned node compression tree, a partitioned address label corresponding to each second target address in the above-mentioned second target address set to obtain a partitioned address label set; generating at least one verification indicator information based on the above-mentioned address label set and the above-mentioned partitioned address label set; generating the above-mentioned verification result based on the above-mentioned at least one verification indicator information.
[0013] Optionally, the above-mentioned storage of the node compression tree includes: extracting the node paths corresponding to each node level in the node compression tree as node path addresses to obtain a node path address set; and storing the node path address set in a target data table.
[0014] In a second aspect, some embodiments of the present disclosure provide an address processing device, comprising: an acquisition unit, configured to acquire a first target address set; a generation unit, configured to generate a prefix tree corresponding to the first target address set; a node compression unit, configured to perform single-character node compression on nodes in the prefix tree to generate a node compression tree; a verification unit, configured to perform tree structure verification on the node compression tree to generate a verification result; and a storage unit, configured to store the node compression tree in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct.
[0015] Optionally, the node compression unit can be configured to determine each node in the above-mentioned prefix tree; for each node, perform a first generation step: determine at least one current node from the above-mentioned nodes; determine a single-character node from the above-mentioned at least one current node to obtain at least one single-character node; according to the above-mentioned at least one single-character node, adjust the corresponding node in the prefix tree to generate an adjusted prefix tree; remove the above-mentioned at least one current node from the above-mentioned nodes to obtain each node after removal; in response to determining that each node after removal is empty, determine the adjusted prefix tree as the above-mentioned node compression tree.
[0016] Optionally, the node compression unit may be configured to, in response to determining that the nodes after the removal are not empty, take the nodes after the removal as the nodes and the adjusted prefix tree as the prefix tree, and continue to execute the first generation step.
[0017] Optionally, the node compression unit can be configured to perform a second generation step for each single-character node of the at least one single-character node: adding the character corresponding to the single-character node to each node in the next node set to obtain the added next node set, wherein the next node set is each next node corresponding to the single-character node in the prefix tree; in response to determining that there is a previous node for the single-character node, deleting the single-character node in the prefix tree, and connecting the previous node to each node in the added node set to generate an adjusted prefix tree.
[0018] Optionally, the verification unit can be configured to obtain a second target address set and a corresponding address label set; determine the partitioned address label corresponding to each second target address in the second target address set according to the above-mentioned node compression tree to obtain the partitioned address label set; generate at least one verification indicator information according to the above-mentioned address label set and the above-mentioned partitioned address label set; and generate the above-mentioned verification result according to the above-mentioned at least one verification indicator information.
[0019] Optionally, the node compression unit may be configured to extract the node paths corresponding to each node level in the node compression tree as node path addresses to obtain a node path address set; and store the node path address set in a target data table.
[0020] In a third aspect, some embodiments of the present disclosure provide a value distribution method, including: in response to receiving address resolution information for a target delivery address, executing a divided address label of the target delivery address based on a node compression tree, wherein the node compression tree is generated based on an address processing method; determining the value distribution information corresponding to the divided address label; and adding the value distribution information to a package corresponding to the target delivery address.
[0021] Optionally, the above method also includes: in response to receiving value distribution information for the target area, obtaining a target data table of the storage node path address set; obtaining an address corresponding to the above target area from the above target data table as a third target address to obtain a third target address set; and executing a value distribution operation for the above third target address set.
[0022] In a fourth aspect, some embodiments of the present disclosure provide a value distribution device, comprising: an execution unit, configured to, in response to receiving address resolution information for a target delivery address, execute a divided address label of the above-mentioned target delivery address based on a node compression tree, wherein the above-mentioned node compression tree is generated based on an address processing method; a determination unit, configured to determine the value distribution information corresponding to the above-mentioned divided address label; and an adding unit, configured to add the above-mentioned value distribution information to a package corresponding to the above-mentioned target delivery address.
[0023] Optionally, the device also includes: in response to receiving value distribution information for the target area, obtaining a target data table storing a node path address set; obtaining an address corresponding to the target area from the above target data table as a third target address to obtain a third target address set; and executing a value distribution operation for the above third target address set.
[0024] In a fifth aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the implementation methods in the first and third aspects.
[0025] In a sixth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any one of the implementation modes of the first aspect and the third aspect is implemented.
[0026] In a seventh aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the above-mentioned first aspect when executed by a processor.
[0027] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the address processing method of some embodiments of the present disclosure, the stored node compression tree can be used to quickly and accurately parse the address to generate structured address information, which is convenient for confirming the specific location of the address. Specifically, the reason for the inaccuracy of the relevant address parsing is that the map interface request speed is slow and unstable, which leads to slow processing speed and incomplete addresses after parsing in the context of massive logistics addresses. Based on this, the address processing method of some embodiments of the present disclosure first obtains the first target address set as an address data set for the generation of subsequent node compression numbers. Then, a prefix tree corresponding to the above-mentioned first target address set is generated to preliminarily express the association relationship between each address character. Then, the nodes in the above-mentioned prefix tree are compressed into single-character nodes to generate a node compression tree to more accurately generate the association relationship between the address characters, so as to achieve more accurate aggregation of the address text, so as to facilitate the subsequent stable and efficient parsing of the address. Furthermore, by performing a tree structure check on the above-mentioned node compression tree, a check result is generated to determine whether the corresponding characters of each node and the structure between each node are accurate. Finally, in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct, the node compression tree is stored for subsequent address resolution. In summary, through single-character street compression and tree structure verification, a node compression number with a correct tree structure can be accurately generated to facilitate subsequent accurate address resolution. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0029] Figure 1 is a schematic diagram of an application scenario of the address processing method according to some embodiments of the present disclosure;
[0030] Figure 2 is a flow chart of some embodiments of the address processing method according to the present disclosure;
[0031] Figure 3 is a flowchart of single-character compression processing in some embodiments of the address processing method according to the present disclosure;
[0032] Figure 4are flowcharts of other embodiments of the address processing method according to the present disclosure;
[0033] Figure 5 is a flow chart of some embodiments of the value distribution method according to the present disclosure;
[0034] Figure 6 is a schematic diagram of the structure of some embodiments of the address processing device according to the present disclosure;
[0035] Figure 7 is a schematic diagram of the structure of some embodiments of the value distribution device according to the present disclosure;
[0036] Figure 8 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0037] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0038] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0039] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0040] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0042] With regard to the collection, storage, and use of user personal information (for example, delivery addresses) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0043] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0044] Figure 1 It is a schematic diagram of an application scenario of the address processing method according to some embodiments of the present disclosure.
[0045] exist Figure 1 In the application scenario, first, the electronic device 101 can obtain the first target address set 102. Then, the electronic device 101 can generate a prefix tree 103 corresponding to the first target address set 102. Next, the electronic device 101 can perform single-character node compression on the nodes in the prefix tree 103 to generate a node compression tree 104. Furthermore, the electronic device 101 can perform a tree structure check on the node compression tree 104 to generate a check result. Finally, in response to determining that the check result indicates that the corresponding tree structure of the node compression tree 104 is correct, the electronic device 101 can store the node compression tree 104.
[0046] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0047] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0048] Continue to refer Figure 2 , shows a process 200 of some embodiments of the address processing method according to the present disclosure. The address processing method comprises the following steps:
[0049] Step 201, obtaining a first target address set.
[0050] In some embodiments, the execution subject of the above-mentioned address processing method (for example Figure 1 The electronic device 101 shown) can obtain the first target address set through a wired connection or a wireless connection. Among them, the first target address set can be an address set for subsequent prefix tree generation. In practice, the address set can be an address set in various fields. For example, the address in the address set can be a logistics address, a takeaway address, or an email address. Among them, the first target address set can be a massive address set.
[0051] Step 202: Generate a prefix tree corresponding to the first target address set.
[0052] In some embodiments, the execution entity may generate a prefix tree corresponding to the first target address set. In practice, a node in the prefix tree may include at least one attribute value. For example, at least one attribute value may include: a list of child nodes, an identifier indicating whether it is a leaf node, and the number of nodes of all leaf nodes belonging to the node.
[0053] As an example, first, create a multi-branch tree node in memory, which includes 3 attribute values: a list of child nodes, whether it is a leaf node identifier, and the number of all leaf nodes belonging to the node. Then, traverse the massive amount of harvested address data and insert each piece of data information into the tree node established in the second step: create an empty tree and initialize a root node that does not contain any characters. For each string to be inserted, start from the root node and check each character one by one: if the current character does not exist in the child nodes of the current node, create a new child node and add the character to the child nodes of the current node; if the current character exists in the child nodes of the current node, continue to move down to the child node and check the next character. Repeat the above insertion process until all strings to be inserted are inserted into the prefix tree. For each inserted string, set the leaf node mark on the node corresponding to the last character of the string to indicate that the node is the end node of a string. Repeat the above steps until all strings are inserted and the end nodes are marked.
[0054] Step 203: perform single-character node compression on the nodes in the prefix tree to generate a node compression tree.
[0055] In some embodiments, the execution entity may perform single-character node compression on the nodes in the prefix tree to generate a node compression tree.
[0056] As an example, the execution subject may use a preset single-character combination table to perform single-character node compression on the nodes in the prefix tree to generate a node compression tree, wherein the single-character combination table represents information on supported combinations of each single character.
[0057] In some optional implementations of some embodiments, the above-mentioned single-character node compression of the nodes in the above-mentioned prefix tree to generate a node compression tree may include the following steps:
[0058] The first step is to determine each node in the prefix tree, wherein each node is each node included in the prefix tree.
[0059] The second step is to execute the first generation step for each node:
[0060] Sub-step 1: Determine at least one current node from the above-mentioned respective nodes. Among them, the current node can be the node to be processed currently. In practice, the at least one current node can be the respective nodes at the same level.
[0061] Sub-step 2: Determine single-character nodes from the above-mentioned at least one current node to obtain at least one single-character node. Among them, the single-character node can be a node that includes only one character. For example, see Figure 3 , which shows a schematic diagram of the single-character node. The at least one single-character node can include: the node corresponding to the character "北", the node corresponding to the character "京", and the node corresponding to the character "市".
[0062] Sub-step 3: Adjust the corresponding nodes in the prefix tree according to the above-mentioned at least one single-character node to generate an adjusted prefix tree.
[0063] As an example, the above-mentioned execution subject can utilize a pre-set single-character combination table to adjust the corresponding nodes in the prefix tree according to the above-mentioned at least one single-character node to generate an adjusted prefix tree.
[0064] Sub-step 4: Remove the above-mentioned at least one current node from the above-mentioned respective nodes to obtain the respective nodes after removal.
[0065] Sub-step 5: In response to determining that the above-mentioned respective nodes after removal are empty, determine the adjusted prefix tree as the above-mentioned node compression tree.
[0066] Optionally, the step further includes:
[0067] In response to determining that the above-mentioned respective nodes after removal are not empty, the above-mentioned execution subject can use the above-mentioned respective nodes after removal as the respective nodes and the above-mentioned adjusted prefix tree as the prefix tree, and continue to execute the above-mentioned first generation step.
[0068] In some optional implementation manners of some embodiments, the adjusting the corresponding nodes in the prefix tree according to the above-mentioned at least one single-character node to generate an adjusted prefix tree includes:
[0069] For each single-character node in the above-mentioned at least one single-character node, execute a second generation step:
[0070] Sub-step 1: Add the characters corresponding to the single-character nodes to each node in the next node set to obtain the next node set after addition. Wherein, the next node set is each next node corresponding to the single-character node in the prefix tree. For example, for the node corresponding to the single-character node "Jing", the corresponding next node is the node corresponding to "Shi". Connect the node corresponding to "Jing" with the node corresponding to "Shi" to obtain the node corresponding to "Jing Shi".
[0071] Sub-step 2: In response to determining that there is a previous node for the single-character node, delete the single-character node in the prefix tree, and connect the previous node with each node in the added node set to generate an adjusted prefix tree.
[0072] As an example, see Figure 3 , the execution entity can delete the node corresponding to "Jing" and connect the node corresponding to the character "Bei" with the node corresponding to "Jing Shi".
[0073] Step 204: Perform a tree structure check on the node compression tree to generate a check result.
[0074] In some embodiments, the execution entity can perform a tree structure check on the node compression tree to generate a check result. Wherein, the check result can indicate whether there is a problem with the tree structure corresponding to the node compression tree. In practice, the check result can include: information indicating that the tree structure corresponding to the node compression tree is correct, and information indicating that the tree structure corresponding to the node compression tree is incorrect.
[0075] As an example, first, the execution entity can perform a character authenticity check on each node in the node compression tree to determine the first authenticity check information. Then, in response to determining that the first authenticity check information indicates that the characters corresponding to each node are real, determine the authenticity of the address corresponding to each node path in the node compression tree to generate the second authenticity check information as the check result.
[0076] Step 205: In response to determining that the check result indicates that the tree structure corresponding to the node compression tree is correct, store the node compression tree.
[0077] In some embodiments, in response to determining that the check result indicates that the tree structure corresponding to the node compression tree is correct, the execution entity can store the node compression tree.
[0078] In some optional implementation manners of some embodiments, the storing of the node compression tree may include the following steps:
[0079] The first step is to extract the node paths corresponding to each node level in the node compression tree as the node path address to obtain a node path address set, wherein the node path address in the node path address set may be the path address of each node in each node level connected in series.
[0080] The second step is to store the above node path address set in the target data table.
[0081] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the address processing method of some embodiments of the present disclosure, the stored node compression tree can be used to quickly and accurately parse the address to generate structured address information, which is convenient for confirming the specific location of the address. Specifically, the reason for the inaccuracy of the relevant address parsing is that the map interface request speed is slow and unstable, which leads to slow processing speed and incomplete addresses after parsing in the context of massive logistics addresses. Based on this, the address processing method of some embodiments of the present disclosure first obtains the first target address set as an address data set for the generation of subsequent node compression numbers. Then, a prefix tree corresponding to the above-mentioned first target address set is generated to preliminarily express the association relationship between each address character. Then, the nodes in the above-mentioned prefix tree are compressed into single-character nodes to generate a node compression tree to more accurately generate the association relationship between the address characters, so as to achieve more accurate aggregation of the address text, so as to facilitate the subsequent stable and efficient parsing of the address. Furthermore, by performing a tree structure check on the above-mentioned node compression tree, a check result is generated to determine whether the corresponding characters of each node and the structure between each node are accurate. Finally, in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct, the node compression tree is stored for subsequent address resolution. In summary, through single-character street compression and tree structure verification, a node compression number with a correct tree structure can be accurately generated to facilitate subsequent accurate address resolution.
[0082] Further references Figure 4 , shows a process 400 of another embodiment of the address processing method according to the present disclosure. The address processing method comprises the following steps:
[0083] Step 401, obtaining a first target address set.
[0084] Step 402: Generate a prefix tree corresponding to the first target address set.
[0085] Step 403: perform single-character node compression on the nodes in the prefix tree to generate a node compression tree.
[0086] Step 404: Obtain a second target address set and a corresponding address label set.
[0087] In some embodiments, an execution entity (e.g. Figure 1 The electronic device 101 shown in the figure can obtain a second target address set and a corresponding address label set. The second target address set can be a massive address set that is different from the corresponding addresses of the first target address set. There is a one-to-one correspondence between the address labels in the address label set and the second target addresses in the second target address set. The address label can be the real address resolution information corresponding to the second target address. That is, the address label can be the real character nodes of the second target address.
[0088] Step 405: Determine the partitioned address label corresponding to each second target address in the second target address set according to the node compression tree to obtain a partitioned address label set.
[0089] In some embodiments, the execution subject may determine the partitioned address label corresponding to each second target address in the second target address set according to the node compression tree to obtain a partitioned address label set. The partitioned address label set may be the character nodes after the corresponding second target address is partitioned according to the partitioning method of each character node in the node compression tree.
[0090] Step 406: Generate at least one verification indicator information according to the address label set and the divided address label set.
[0091] In some embodiments, the execution subject may generate at least one verification indicator information according to the address tag set and the divided address tag set. There is a one-to-one correspondence between at least one verification indicator information and a verification indicator in at least one verification indicator. That is, the verification indicator information is the indicator content of the corresponding verification indicator. In practice, the at least one verification indicator may include: precision indicator and recall indicator.
[0092] As an example, the execution subject may generate at least one verification indicator information according to the address tag set and the divided address tag set by using the calculation logic corresponding to the precision indicator and the calculation logic corresponding to the recall indicator.
[0093] Step 407: Generate the verification result according to the at least one verification indicator information.
[0094] In some embodiments, the execution entity may generate the verification result based on the at least one verification indicator information.
[0095] As an example, in response to determining that each of the at least one verification indicator information satisfies the corresponding indicator value requirement, information is generated indicating that the corresponding tree structure of the node compression tree is correct. In response to determining that each of the at least one verification indicator information does not satisfy the corresponding indicator value requirement, information is generated indicating that the corresponding tree structure of the node compression tree is incorrect.
[0096] Step 408, in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct, the node compression tree is stored.
[0097] In some embodiments, the specific implementation of steps 401-403 and 408 and the technical effects thereof can be referred to in Figure 2 The steps 201-203 and 205 in the corresponding embodiment are not described in detail here.
[0098] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 The process 400 of the address processing method in some corresponding embodiments can realize accurate verification of the corresponding tree structure of the node compression tree under at least one verification indicator through the second target address set and the corresponding address label set, thereby ensuring the accuracy of the division of each node in the node compression tree.
[0099] Continue to refer Figure 5 , shows a process 500 of some embodiments of the value distribution method according to the present disclosure. The value distribution method comprises the following steps:
[0100] Step 501, in response to receiving address resolution information for a target delivery address, generating a partitioned address label corresponding to the target delivery address based on a node compression tree.
[0101] In some embodiments, in response to receiving address resolution information for a target delivery address, the execution subject (e.g., an electronic device) of the above-mentioned value distribution method may perform the division of address labels of the above-mentioned target delivery address based on a node compression tree. The target delivery address may be a delivery address to be subjected to address resolution. For example, the target delivery address may be an address to be subjected to express delivery address resolution. The address resolution information may be information characterizing address resolution. In practice, the address resolution information may be an address resolution request.
[0102] Step 502, determining the value distribution information corresponding to the above-mentioned divided address labels.
[0103] In some embodiments, the execution subject may determine the value distribution information corresponding to the divided address label. The value distribution information may be information that can realize value distribution. For example, the value distribution information may be a package advertisement.
[0104] Step 503: Add the above value distribution information to the package corresponding to the above target delivery address.
[0105] In some embodiments, the execution entity may add the value distribution information to the package corresponding to the target delivery address.
[0106] As an example, the execution entity may attach the value distribution information to the package corresponding to the target delivery address.
[0107] In some optional implementations of some embodiments, after step 503, the steps further include:
[0108] In the first step, in response to receiving the value distribution information for the target area, the execution subject may obtain the target data table of the storage node path address set. The target area may be an area to be processed for value distribution. That is, the target area may be an area to be advertised. The value distribution information may be a value distribution request. In practice, the value distribution information may be an advertising request.
[0109] In the second step, the execution subject may obtain the address corresponding to the target area from the target data table as the third target address to obtain a third target address set, wherein the address corresponding to the target area may be the address belonging to the target area.
[0110] In the third step, the execution entity may execute a value distribution operation for the third target address set.
[0111] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the value distribution method of some embodiments of the present disclosure, the node compression tree can be used to accurately resolve the address of the target delivery address, so as to accurately generate the division address label. On the basis of the accurate division address label, the value can be accurately distributed.
[0112] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an address processing device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the address processing device can be specifically applied to various electronic devices.
[0113] like Figure 6As shown, an address processing device 600 includes: an acquisition unit 601, a generation unit 602, a node compression unit 603, a verification unit 604 and a storage unit 605. The acquisition unit 601 is configured to acquire a first target address set; the generation unit 602 is configured to generate a prefix tree corresponding to the first target address set; the node compression unit 603 is configured to perform single-character node compression on the nodes in the prefix tree to generate a node compression tree; the verification unit 604 is configured to perform tree structure verification on the node compression tree to generate a verification result; the storage unit 605 is configured to store the node compression tree in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct.
[0114] In some optional implementations of some embodiments, the node compression unit 603 can be further configured to: determine each node in the above-mentioned prefix tree; for each node, perform a first generation step: determine at least one current node from the above-mentioned nodes; determine a single-character node from the above-mentioned at least one current node to obtain at least one single-character node; according to the above-mentioned at least one single-character node, adjust the corresponding nodes in the prefix tree to generate an adjusted prefix tree; remove the above-mentioned at least one current node from the above-mentioned nodes to obtain each node after removal; in response to determining that each node after removal is empty, determine the adjusted prefix tree as the above-mentioned node compression tree.
[0115] In some optional implementations of some embodiments, the node compression unit 603 may be further configured to: in response to determining that the nodes after the removal are not empty, use the nodes after the removal as nodes and the adjusted prefix tree as a prefix tree, and continue to execute the first generation step.
[0116] In some optional implementations of some embodiments, the node compression unit 603 may be further configured to: for each single-character node of the at least one single-character node, execute a second generation step: add the character corresponding to the single-character node to each node in the next node set to obtain the next node set after addition, wherein the next node set is each next node corresponding to the single-character node in the prefix tree; in response to determining that the single-character node has a previous node, delete the single-character node in the prefix tree, and connect the previous node to each node in the added node set to generate an adjusted prefix tree.
[0117] In some optional implementations of some embodiments, the verification unit 604 can be further configured to: obtain a second target address set and a corresponding address label set; determine the partitioned address label corresponding to each second target address in the second target address set according to the above-mentioned node compression tree, and obtain the partitioned address label set; generate at least one verification indicator information according to the above-mentioned address label set and the above-mentioned partitioned address label set; and generate the above-mentioned verification result according to the above-mentioned at least one verification indicator information.
[0118] In some optional implementations of some embodiments, the storage unit 605 may be further configured to: extract the node paths corresponding to each node level in the above-mentioned node compression tree as node path addresses, and obtain a node path address set; and store the above-mentioned node path address set in the target data table.
[0119] It is understandable that the units described in the address processing device 600 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the address processing device 600 and the units included therein, and will not be described in detail here.
[0120] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a value distribution device. These device embodiments are similar to Figure 4 Corresponding to the method embodiments shown, the value distribution device can be specifically applied to various electronic devices.
[0121] like Figure 7 As shown, a value distribution device 700 includes: an execution unit 701, a determination unit 702 and an adding unit 703. The execution unit 701 is configured to, in response to receiving address resolution information for a target delivery address, execute the segmentation address label of the target delivery address based on a node compression tree, wherein the node compression tree is generated based on an address processing method; the determination unit 702 is configured to determine the value distribution information corresponding to the segmentation address label; and the adding unit 703 is configured to add the value distribution information to the package corresponding to the target delivery address.
[0122] In some optional implementations of some embodiments, the value distribution device 700 also includes: in response to receiving value distribution information for a target area, obtaining a target data table storing a node path address set; obtaining an address corresponding to the target area from the above target data table as a third target address to obtain a third target address set; and performing a value distribution operation for the above third target address set.
[0123] It is understood that the units described in the value distribution device 700 are similar to those described in the reference Figure 4 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the value distribution device 700 and the units included therein, and will not be described in detail here.
[0124] Reference below Figure 8 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the electronic device 101)800. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0125] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory 802 or a program loaded from a storage device 808 into a random access memory 803. Various programs and data required for the operation of the electronic device 800 are also stored in the random access memory 803. The processing device 801, the read-only memory 802, and the random access memory 803 are connected to each other via a bus 804. An input / output interface 805 is also connected to the bus 804.
[0126] Typically, the following devices may be connected to the input / output interface 805: an input device 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 8 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0127] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a read-only memory 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0128] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0129] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0130] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the first target address set; generates a prefix tree corresponding to the first target address set; performs single-character node compression on the nodes in the prefix tree to generate a node compression tree; performs tree structure verification on the node compression tree to generate a verification result; in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct, the node compression tree is stored. In response to receiving the address resolution information for the target delivery address, based on the node compression tree, a partitioned address label corresponding to the target delivery address is generated, wherein the node compression tree is generated based on the address processing method to determine the value distribution information corresponding to the partitioned address label; and the value distribution information is added to the package corresponding to the target delivery address.
[0131] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0132] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0133] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor includes an acquisition unit, a generation unit, a node compression unit, a verification unit and a storage unit. The names of these units do not constitute a limitation on the unit itself in some cases, for example, the acquisition unit may also be described as a "unit for acquiring a first target address set".
[0134] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0135] Some embodiments of the present disclosure also provide a computer program product, including a computer program, which implements any of the above-mentioned address processing methods or value distribution methods when executed by a processor.
[0136] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. An address processing method, comprising: Obtaining a first target address set; Generate a prefix tree corresponding to the first target address set; Performing single-character node compression on the nodes in the prefix tree to generate a node compression tree; Performing tree structure verification on the node compression tree to generate a verification result; In response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct, the node compression tree is stored.
2. The method according to claim 1, wherein: The step of compressing the nodes in the prefix tree by single-character nodes to generate a node compression tree comprises: Determine each node in the prefix tree; For each node, perform the first generation step: Determine at least one current node from the nodes; Determine a single-character node from the at least one current node to obtain at least one single-character node; According to the at least one single-character node, adjusting a corresponding node in the prefix tree to generate an adjusted prefix tree; Removing the at least one current node from each of the nodes to obtain each node after the removal; In response to determining that each node is empty after the removal, an adjusted prefix tree is determined as the node compression tree.
3. The method according to claim 2, wherein: The method further comprises: In response to determining that the removed nodes are not empty, the removed nodes are used as nodes, and the adjusted prefix tree is used as a prefix tree, and the first generating step is continued.
4. The method according to claim 2, wherein: The step of adjusting the corresponding node in the prefix tree according to the at least one single-character node to generate an adjusted prefix tree comprises: For each single-character node in the at least one single-character node, performing a second generating step: Add the character corresponding to the single-character node to each node in the next node set to obtain the added next node set, wherein the next node set is each next node corresponding to the single-character node in the prefix tree; In response to determining that the single-character node has a previous node, the single-character node in the prefix tree is deleted, and the previous node is connected to each node in the added node set to generate an adjusted prefix tree.
5. The method according to claim 1, wherein: The performing tree structure verification on the node compression tree to generate a verification result includes: Obtaining a second target address set and a corresponding address label set; Determine, according to the node compression tree, a partitioned address label corresponding to each second target address in the second target address set to obtain a partitioned address label set; generating at least one verification indicator information according to the address label set and the divided address label set; The verification result is generated according to the at least one verification indicator information.
6. The method according to claim 1, wherein: The storing of the node compression tree comprises: Extracting the node paths corresponding to each node level in the node compression tree as node path addresses, and obtaining a node path address set; The node path address set is stored in the target data table.
7. A value distribution method, comprising: In response to receiving the address resolution information for the target delivery address, generating a partitioned address label corresponding to the target delivery address based on a node compression tree, wherein the node compression tree is generated based on the method of any one of claims 1 to 6; Determine the value distribution information corresponding to the divided address labels; The value distribution information is added to the package corresponding to the target delivery address.
8. The method according to claim 7, wherein: The method further comprises: In response to receiving the value distribution information for the target region, obtaining a target data table storing a set of node path addresses; Acquire an address corresponding to the target area from the target data table as a third target address, and obtain a third target address set; Execute a value distribution operation for the third target address set.
9. An address processing device, comprising: an acquisition unit, configured to acquire a first target address set; A generating unit, configured to generate a prefix tree corresponding to the first target address set; A node compression unit, configured to perform single-character node compression on the nodes in the prefix tree to generate a node compression tree; A verification unit, configured to perform a tree structure verification on the node compression tree to generate a verification result; The storage unit is configured to store the node compression tree in response to determining that the verification result indicates that the tree structure corresponding to the node compression tree is correct.
10. A value distribution device, comprising: an execution unit, configured to, in response to receiving address resolution information for a target delivery address, execute the partitioning address label of the target delivery address based on a node compression tree, wherein the node compression tree is generated based on the method according to any one of claims 1 to 6; a determining unit, configured to determine value distribution information corresponding to the divided address label; The adding unit is configured to add the value distribution information to the package corresponding to the target delivery address.
11. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
12. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
13. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
