Address matching model training method, collection address determination method and related equipment
By training the deep neural network model, using historical collection data to determine the accurate collection address, the problem of users' difficulty in describing the collection point address is solved, and the convenience of express collection services and the improvement of logistics distribution efficiency is achieved.
Patent Information
- Application Number
- CN202011373599.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-11-30
AI Technical Summary
When users use express delivery and collection services, it is difficult for them to accurately describe the collection point address, resulting in poor express delivery and collection service experience and affecting logistics and distribution efficiency.
By training the deep neural network model, the target receiving address and the address entering the same receiving point are used as positive samples by using historical collection data, and the addresses entering different receiving points are used as negative samples, to maximize the distance difference between the two , generate an address matching model to determine the accurate collection address.
You can enjoy express delivery and collection services without knowing the specific address of the collection point, improving user experience and improving logistics and distribution efficiency.
Smart Images

Figure CN112465036B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics technology, and in particular to a training method for an address matching model, a method for determining a collection address, and related equipment. Background Art
[0002] With the development of online shopping, express delivery collection services have gradually emerged to solve the problem of users being inconvenient to receive express delivery. Express delivery collection services allow users to store express parcels at collection points and wait until convenient to pick up the parcels, thus improving the convenience of users to pick up the parcels.
[0003] However, since many users do not know the exact address of the collection point, the experience of using the express collection service is not good. Specifically, there are two main express collection scenarios:
[0004] One is that when users apply for express delivery collection when placing an order, they are required to enter the exact collection address or select from a series of collection addresses provided by the system. However, even if users know that there is a collection point near their home / company, it is difficult for them to accurately describe the specific address of the collection point, which affects the normal use of the express delivery collection service.
[0005] The other situation is that when the courier discovers that there is no one to receive the package at the delivery address, he will then communicate with the user to confirm where the package is stored. At this time, on the one hand, as mentioned above, the user is very likely not to know the specific address of the collection point. On the other hand, it also disturbs the user's normal life and work, affects the user experience, and will greatly affect the efficiency of logistics delivery.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] In view of this, the present invention provides an address matching model training method, a collection address determination method and related equipment, which can determine the accurate collection address according to the address matching model, improve the user's express collection experience, and improve logistics distribution efficiency.
[0008] One aspect of the present invention provides a method for training an address matching model, comprising: obtaining recipient addresses that have historically entered collection points; classifying the recipient addresses to form multiple groups of sample data, each group of the sample data including a target sample address, a positive sample address that entered the same collection point as the target sample address, and a negative sample address that entered a different collection point from the target sample address; training a deep neural network model based on each group of the sample data, the deep neural network model maximizing the difference between a first distance of the target sample address relative to the negative sample address and a second distance of the target sample address relative to the positive sample address; and optimizing the deep neural network model to generate an address matching model.
[0009] In some embodiments, in each set of the sample data, the target sample address is randomly selected from the recipient address, and the negative sample address and the target sample address belong to the same delivery area and have different terminal address information.
[0010] In some embodiments, based on the fact that the courier information carried by the negative sample address is the same as the courier information carried by the target sample address, it is determined that the negative sample address and the target sample address belong to the same delivery area; and the terminal address information is community information or street information.
[0011] In some embodiments, the deep neural network model includes a self-attention network and a triplet loss function, and training a deep neural network model based on each group of the sample data includes: extracting feature vectors of the target sample address, the positive sample address, and the negative sample address through the self-attention network; increasing the first distance and reducing the second distance through the triplet loss function, and making the difference greater than a minimum threshold.
[0012] In some embodiments, optimizing the deep neural network model includes reducing the loss value of the triplet loss function by a gradient descent method.
[0013] In some embodiments, after forming multiple groups of sample data, it also includes vectorizing each group of the sample data; when training a deep neural network model based on each group of the sample data, the sample data after vectorization processing is input into the deep neural network model.
[0014] In some embodiments, the vectorization processing of each group of the sample data includes: preprocessing the target sample address, the positive sample address and the negative sample address to generate address texts in preset formats respectively; constructing a data dictionary to convert the words in each of the address texts into a digital sequence; converting the numbers corresponding to each word in the digital sequence into a vector, and splicing the converted vectors in the order of the words in each of the address texts to generate vector matrices corresponding to the target sample address, the positive sample address and the negative sample address respectively.
[0015] Another aspect of the present invention provides a method for determining a collection address, comprising: receiving a collection request based on a current receiving address; preprocessing the current receiving address, inputting an address matching model generated by training using the training method described in any of the above embodiments, obtaining a matching receiving address that is closest to the current receiving address among the receiving addresses that have historically entered the collection point; and determining the collection point of the matching receiving address as the collection address of the current receiving address.
[0016] In some embodiments, after determining the collection address as the agent collection address of the current receiving address, it also includes: obtaining the current location address of the user terminal that issues the collection request; based on a map service, obtaining a pickup route from the current location address, through the agent collection address, to the current receiving address, and sending it to the user terminal.
[0017] In some embodiments, after obtaining the pickup route, it also includes: determining whether the pickup route overlaps with the historical track of the user terminal from the current address to the current receiving address; if not, sending the historical track and the location information of the collection address relative to the historical track to the user terminal.
[0018] Another aspect of the present invention provides a training device for an address matching model, comprising: a sample collection module, configured to obtain recipient addresses that have historically entered collection points; a sample processing module, configured to classify the recipient addresses to form multiple groups of sample data, each group of the sample data including a target sample address, a positive sample address that entered the same collection point as the target sample address, and a negative sample address that entered a different collection point from the target sample address; a model training module, configured to train a deep neural network model based on each group of the sample data, the deep neural network model maximizes the difference between a first distance of the target sample address relative to the negative sample address and a second distance of the target sample address relative to the positive sample address; and a model optimization module, configured to optimize the deep neural network model to generate an address matching model.
[0019] Another aspect of the present invention provides a device for determining a collection address, comprising: a collection request response module, configured to receive a collection request based on a current receiving address; a matching address calculation module, configured to pre-process the current receiving address, input an address matching model generated by training using the training method described in any of the above embodiments, and obtain a matching receiving address that is closest to the current receiving address among the receiving addresses that have historically entered the collection point; and a collection address determination module, configured to determine the collection point of the matching receiving address as the collection address of the current receiving address.
[0020] Another aspect of the present invention provides an electronic device, comprising: a processor; a memory storing executable instructions; wherein, when the executable instructions are executed by the processor, the training method of the address matching model as described in any of the above embodiments is implemented, and / or the method for determining a collection address as described in any of the above embodiments is implemented.
[0021] Another aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed, implements the training method of the address matching model as described in any of the above embodiments, and / or implements the method for determining a collection address as described in any of the above embodiments.
[0022] The beneficial effects of the present invention compared with the prior art include at least:
[0023] Based on historical collection data, the recipient addresses that enter the same collection point as the target recipient address are used as positive samples, and the recipient addresses that enter different collection points are used as negative samples. The deep neural network model is trained to enable the deep neural network model to learn the association between the target recipient address and the positive samples and the difference between the target recipient address and the negative samples, maximize the difference between the distances between the target sample address and the positive and negative samples, and optimize the address matching model.
[0024] Therefore, by using the trained address matching model, it is possible to calculate the matching address information that is closest to and has entered the collection point based on the user's receiving address. The collection point based on the matching address information can automatically determine the accurate collection information of the user's receiving address. The user does not need to know the specific address of the collection point to enjoy the express collection service, which improves the user's experience and improves logistics distribution efficiency.
[0025] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0027] Figure 1 A schematic diagram showing the steps of a method for training an address matching model in an embodiment of the present invention;
[0028] Figure 2 A schematic diagram showing a module of a training device for an address matching model according to an embodiment of the present invention;
[0029] Figure 3 A schematic diagram showing the steps of a method for determining a collection address in one embodiment of the present invention;
[0030] Figure 4 A schematic diagram showing the steps of a method for determining a collection address in another embodiment of the present invention;
[0031] Figure 5 A schematic diagram showing a scenario in which the historical track and the location information of the collection address relative to the historical track are pushed to the user terminal in an embodiment of the present invention;
[0032] Figure 6 A schematic diagram of a module of a device for determining a collection address according to an embodiment of the present invention is shown;
[0033] Figure 7 A schematic diagram showing the structure of an electronic device in an embodiment of the present invention; and
[0034] Figure 8 A schematic diagram showing the structure of a computer-readable storage medium in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to make the present invention comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art.
[0036] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0037] The step numbers in the following embodiments are only used to indicate different execution contents and do not strictly limit the execution order between the steps. The words "first", "second" and similar words used in the specific description do not indicate any order, quantity or importance, but are only used to distinguish different components. It should be noted that the features in the embodiments of the present invention and different embodiments can be combined with each other without conflict.
[0038] Figure 1 The main steps of the training method of the address matching model in the embodiment are shown, referring to Figure 1 As shown, the training method of the address matching model in this embodiment includes: in step S110, obtaining the receiving addresses that have historically entered the collection points; in step S120, classifying the receiving addresses to form multiple groups of sample data, each group of sample data includes a target sample address, a positive sample address that entered the same collection point as the target sample address, and a negative sample address that entered a different collection point from the target sample address; in step S130, training a deep neural network model based on each group of sample data, the deep neural network model maximizes the difference between the first distance of the target sample address relative to the negative sample address and the second distance of the target sample address relative to the positive sample address; and in step S140, optimizing the deep neural network model to generate an address matching model.
[0039] The above-mentioned training method is based on historical collection data. The receiving addresses that enter the same collection point as the target receiving address are used as positive samples, and the receiving addresses that enter different collection points are used as negative samples. The deep neural network model is trained to enable the deep neural network model to learn the association between the target receiving address and the positive samples and the difference between the target receiving address and the negative samples, maximize the difference in the distance between the target sample address and the positive and negative samples, and optimize to form an address matching model; thus, by using the address matching model generated by training, in actual application scenarios, it is possible to calculate the matching address information that is closest to and has entered the collection point based on the user's receiving address. The collection point based on the matching address information can automatically determine the accurate collection information of the user's receiving address. The user does not need to know the specific address of the collection point to enjoy the express collection service, thereby improving the user's experience and improving the efficiency of logistics distribution.
[0040] The following describes in detail the various steps of the training method for the address matching model with reference to specific examples.
[0041] In step S110, the historical entry into the collection point is reflected in the logistics record as the signing address is inconsistent with the receiving address, and the signing address is the address of the collection point. Specifically, in logistics distribution activities, the receiving address refers to the address filled in by the user on the express delivery slip; if the express package is stored at the collection point and signed for by the collection point instead of the user, the actual signing address is displayed as the address of the collection point instead of the receiving address. Therefore, from all historical distribution data of the e-commerce platform / logistics platform, relevant historical collection data in which the signing address is inconsistent with the receiving address and the signing address is the address of the collection point can be obtained, and the receiving addresses of the historical entry into the collection point can be extracted as sample data.
[0042] In addition, in order to ensure sufficient sample data and solve the problem of uneven data distribution, oversampling is used to expand the data to obtain sufficient and evenly distributed sample data.
[0043] In step S120, the collected sample data is processed and classified into multiple groups of sample data including target sample addresses, positive sample addresses, and negative sample addresses. When forming each group of sample data, the target sample address is first determined, and then a recipient address that enters the same collection point as the target recipient address is determined as a positive sample address, and a recipient address that enters a different collection point from the target recipient address is determined as a negative sample address.
[0044] In one embodiment, when determining the negative sample address based on the target delivery address, the delivery addresses of different communities or streets delivered by the same courier are used as adversarial samples, i.e., negative sample addresses, to improve the distinction between the negative sample addresses and the target sample addresses / positive sample addresses in the same group of sample data.
[0045] Specifically, in each set of sample data, the target sample address is randomly selected from the recipient address, and the negative sample address and the target sample address belong to the same delivery area and have different terminal address information. Among them, according to the courier information carried by the negative sample address and the courier information carried by the target sample address are the same, it is determined that the negative sample address and the target sample address belong to the same delivery area; and the terminal address information is the community information or street information.
[0046] Furthermore, after forming multiple groups of sample data, each group of sample data is also vectorized; when subsequently training the deep neural network model, the vectorized sample data is used as input data to train the deep neural network model.
[0047] In one embodiment, the process of vectorizing each set of sample data specifically includes: first, preprocessing the target sample address, positive sample address and negative sample address, including preprocessing operations such as padding, truncation and error correction, to generate three address texts in preset formats corresponding to the target sample address, positive sample address and negative sample address. Next, construct a data dictionary, generate indexes according to the order of the data dictionary, convert the words in the three address texts into numbers respectively, and complete the conversion of the text sequence to the digital sequence. When converting the address text into a digital sequence, the text-to-digital conversion can be performed on each word in the address text in units of words; or, the address text can be first segmented, and then the text-to-digital conversion can be performed on each word in the address text in units of words; then the converted numbers are spliced in the order of the words / words in the address text to generate a digital sequence. Finally, the numbers corresponding to each word / word in the digital sequence are converted into vectors, for example, each word / word is mapped to a 200-dimensional vector, and the converted vectors are spliced in the order of the words in the address text to generate vector matrices corresponding to the target sample address, positive sample address and negative sample address respectively.
[0048] In step S130, a deep neural network model is trained based on each group of sample data. The deep neural network model can learn the association between the target receiving address and the positive sample address and the difference between the target receiving address and the negative sample address in each group of sample data, maximize the difference in the distance between the target sample address and the positive and negative sample addresses, respectively, so that the trained address matching model can accurately express the association between the target sample address and the positive sample address, thereby calculating the matching address information that is closest to and has entered the collection point based on the user's receiving address.
[0049] In one embodiment, the deep neural network model is constructed based on the self-attention network and the triplet loss function. The process of training the deep neural network model based on each set of sample data specifically includes: extracting the feature vectors of the target sample address, the positive sample address and the negative sample address through the self-attention network; increasing the first distance between the target sample address and the negative sample address, reducing the second distance between the target sample address and the positive sample address through the triplet loss function, and making the difference between the first distance and the second distance greater than a minimum threshold. That is, the deep neural network model makes the first distance between the target sample address and the negative sample address as large as possible, and the second distance between the target sample address and the positive sample address as small as possible through learning, and makes a minimum interval between the first distance and the second distance.
[0050] In step S140, the deep neural network model is optimized, specifically by reducing the loss value of the triplet loss function through the gradient descent method to improve the accuracy of the deep neural network model in vectorizing the target sample address, positive sample address and negative sample address.
[0051] Based on the above description of the training method of the address matching model, in a specific training example, a set of sample data includes: Anchor (anchor example, i.e., target sample address): 15th Floor, Jinhongqiao International Center, Changning District, Shanghai, Positive (positive example, i.e., positive sample address): 15th Floor, No. 233, Loushanguan Road, Changning District, Shanghai, and Negative (negative example, i.e., negative sample address): No. 12, Loushanguan Road, Changning District, Shanghai, where Anchor is a recipient address randomly selected from historical collection data that has entered a collection point, Positive is a recipient address that entered the same collection point as Anchor, Negative is a recipient address that entered a different collection point from Anchor, and Negative preferably points to a different community or street delivered by the same courier as Anchor. During training, the three recipient addresses of Anchor, Positive and Negative are used as a set of training samples and input into the deep neural network model, so that the deep neural network model learns the difference between the three and obtains the vectorized representation of the three recipient addresses.
[0052] Through training with multiple groups of training samples and after optimization, the address matching model finally generated can vectorize the user's receiving address in actual application scenarios, and calculate the similarity between the vectorized receiving address and the receiving addresses that have entered the collection points in the past, so as to find the matching address information with the shortest distance to the user's receiving address and that has entered the collection point; the collection point based on the matching address information output by the address matching model can determine the accurate collection information of the user's receiving address, so that the user can enjoy the express collection service without knowing the specific address of the collection point, thereby improving the user experience and improving the efficiency of logistics distribution.
[0053] An embodiment of the present invention further provides a training device for an address matching model, which can be used to implement the training method for the address matching model described in the above embodiment. Figure 2 The main modules of the training device of the address matching model are shown, referring to Figure 2As shown, the training device 200 of the address matching model in this embodiment includes: a sample collection module 210, configured to obtain the receiving addresses that have historically entered the collection point; a sample processing module 220, configured to classify the receiving addresses to form multiple groups of sample data, each group of sample data includes a target sample address, a positive sample address that enters the same collection point as the target sample address, and a negative sample address that enters a different collection point from the target sample address; a model training module 230, configured to train a deep neural network model based on each group of sample data, the deep neural network model maximizes the difference between a first distance of the target sample address relative to the negative sample address and a second distance of the target sample address relative to the positive sample address; and a model optimization module 240, configured to optimize the deep neural network model to generate an address matching model.
[0054] Furthermore, the address matching model training device 200 may also include modules for implementing other process steps of any of the above-mentioned address matching model training method embodiments. The specific principles of each module can refer to the description of the above-mentioned training method embodiments and will not be repeated here.
[0055] As described above, the address matching model generated by training in this embodiment can accurately vectorize the user's receiving address in actual application, and perform similarity calculation based on the vectorized receiving address and the receiving addresses that have entered the collection points in the past, and find the matching address information that is closest to the user's receiving address and has entered the collection point; thereby, the collection point based on the matching address information output by the address matching model automatically determines the accurate collection information of the user's receiving address, so that the user can enjoy the express collection service without knowing the specific address of the collection point, thereby improving the user's usage experience and improving the efficiency of logistics distribution.
[0056] An embodiment of the present invention also provides a method for determining a collection address, which applies the address matching model generated by the training method embodiment to an actual collection address determination scenario, and determines an accurate collection address based on the user's receiving address.
[0057] Figure 3 The main steps of the method for determining the collection address in the embodiment are shown, referring to Figure 3 As shown, the method for determining the collection address in this embodiment includes: in step S310, receiving a collection request based on a current receiving address; in step S320, pre-processing the current receiving address, inputting the address matching model generated by the training of the above-mentioned training method embodiment, and obtaining a matching receiving address that is closest to the current receiving address among the receiving addresses that have historically entered the collection point; and in step S330, determining the collection point of the matching receiving address as the collection address of the current receiving address.
[0058] In step S310, the collection request can be initiated by the user end triggering the collection item on the order page when placing an order or during the delivery of a package. The collection request carries the current delivery address, so that a reasonable and accurate delivery address can be determined based on the current delivery address.
[0059] In step S320, the current recipient address is preprocessed, including preprocessing operations such as padding and error correction, and the current recipient address is vectorized to generate a vector matrix that can be input into the address matching model for operation. The address matching model extracts feature vectors from the self-attention network layer and calculates similarity at the triplet-loss loss function layer, and selects a matching recipient address that is closest to the current recipient address from the recipient addresses that have entered the collection point in the past.
[0060] In step S330, the collection address of the current collection address is determined according to the matching recipient address output by the address matching model, so that the user can enjoy the express collection service without knowing the specific address of the collection point, thereby improving the user experience and improving the efficiency of logistics distribution.
[0061] Furthermore, considering that the user is not clear about the specific address of the collection point, even if he knows the collection address of the collection point, he still cannot know the specific route to the collection address to pick up the package. Therefore, after determining the collection address based on the current collection address, the route information from his current address to the collection address to pick up the package and finally to the current collection address can be further pushed to the user, so as to facilitate the user to pick up the package and improve the collection service experience.
[0062] Specifically, refer to Figure 4 As shown, in one embodiment, after determining the collection address, the following further includes: step S440, obtaining the current address of the user terminal that issued the collection request; and step S450, based on the map service, obtaining a pickup route from the current address, through the collection address, to the current receiving address, and sending it to the user terminal. Thus, the user can conveniently go from the current address to the collection address to pick up the express package according to the received pickup route, and finally return to the current receiving address.
[0063] Furthermore, if the pickup route pushed to the user is different from the user's usual route, it may cause inconvenience to the user. Therefore, in one embodiment, it is also determined whether the pickup route is consistent with the user's usual route. If it is not consistent, the location information of the collection address relative to the user's usual route is further pushed to the user, so that the user can independently choose the appropriate pickup method based on the pushed information, thereby increasing the flexibility of pickup.
[0064] Specific reference Figure 4As shown, after obtaining the pickup route, the following further includes: step S460, determining whether the pickup route overlaps with the historical track of the user terminal from the current address to the current receiving address; the historical track of the user terminal from the current address to the current receiving address is usually the user's common route, such as the route the user takes from the company to go home. Step S470, if the pickup route does not overlap with the historical track, it indicates that the pickup route is different from the user's common route, so the historical track and the location information of the collection address relative to the historical track are also sent to the user terminal, so that the user can independently select a suitable pickup method based on the pushed information.
[0065] Figure 5 The scenario of pushing the historical track and the location information of the collection address relative to the historical track to the user terminal in the embodiment is shown, referring to Figure 5 As shown, it is found through calculation that the pickup route P2 from the current address 510 of the user terminal to the current receiving address 520 via the collection address 530 does not overlap with the historical track P1 from the current address 510 to the current receiving address 520 of the user terminal, that is, the collection address 530 is not on the historical track P1. At this time, in addition to pushing the pickup route P2 to the user terminal, the historical track P1 and the location information of the collection address 530 relative to the historical track P1 are also pushed. The user can perform relevant trigger operations, such as double-clicking the pickup route P2 to view the specific driving navigation information / public transportation information of the pickup route P2, or double-clicking the collection address 530 to view the specific driving navigation information / public transportation information between the collection address 530 and the current receiving address 520, so as to enable the user to independently select a suitable pickup method according to the pushed information.
[0066] Therefore, the above-mentioned collection address determination method can automatically determine a reasonable and accurate collection address based on the user's current receiving address through the trained collection address matching model, so that the user can enjoy the express collection service without knowing the specific address of the collection point, and can further push route information related to the collection address to the user to facilitate the user to pick up the item and improve the user experience.
[0067] An embodiment of the present invention further provides a collection address determination device, which can be used to implement the collection address determination method described in any of the above embodiments. Figure 6 The main modules of the device for determining the collection address in the embodiment are shown, referring to Figure 6As shown, the collection address determination device 600 in this embodiment includes: a collection request response module 610, configured to receive a collection request based on a current recipient address; a matching address calculation module 620, configured to pre-process the current recipient address, input a trained address matching model, and obtain a matching recipient address that is closest to the current recipient address among the recipient addresses that have historically entered the collection point; and a collection address determination module 630, configured to determine the collection point of the matching recipient address as the collection address of the current recipient address.
[0068] Furthermore, the collection address determination device 600 may also include modules for implementing other process steps of any of the above-mentioned collection address determination method embodiments. The specific principles of each module can refer to the description of the above-mentioned collection address determination method embodiments, and will not be repeated here.
[0069] As described above, the collection address device of this embodiment can automatically determine a reasonable and accurate collection address based on the user's current receiving address through a trained collection address matching model, so that the user can enjoy the express collection service without knowing the specific address of the collection point, and can further push route information related to the collection address to the user to facilitate the user to pick up the item and improve the user experience.
[0070] An embodiment of the present invention also provides an electronic device, including a processor and a memory, wherein executable instructions are stored in the memory, and when the executable instructions are executed by the processor, the address matching model training method and / or the collection address determination method described in any of the above embodiments are implemented.
[0071] As described above, the electronic device of the present invention can train a deep neural network model based on historical collection data, taking the recipient address that enters the same collection point as the target recipient address as a positive sample and the recipient address that enters a different collection point as a negative sample, so that the deep neural network model can learn the association between the target recipient address and the positive sample and the difference between the target recipient address and the negative sample, maximize the difference in the distance between the target sample address and the positive and negative samples, respectively, and optimize the address matching model; and, using the address matching model generated by training, in actual application scenarios, it is possible to calculate the matching address information that is closest to and has entered the collection point based on the user's recipient address, thereby automatically determining the accurate collection information of the user's recipient address based on the collection point of the matching address information, so that the user can enjoy the express collection service without knowing the specific address of the collection point, thereby improving the user's usage experience and improving the logistics distribution efficiency.
[0072] Figure 7 is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. It should be understood that: Figure 7The modules are only schematically shown, and these modules may be virtual software modules or actual hardware modules. The combination and splitting of these modules and the addition of other modules are all within the protection scope of the present invention.
[0073] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 include but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different platform components (including the storage unit 720 and the processing unit 710), a display unit 740, etc.
[0074] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps of the address matching model training method and / or the collection address determination method described in any of the above embodiments. For example, the processing unit 710 can perform the following steps: Figure 1 , Figure 3 and Figure 4 Steps shown.
[0075] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 7201 and / or a cache storage unit 7202 , and may further include a read-only storage unit (ROM) 7203 .
[0076] The storage unit 720 may also include a program / utility 7204 having one or more program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0077] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0078] The electronic device 700 can also communicate with one or more external devices 800, which can be one or more of a keyboard, a pointing device, a Bluetooth device, etc. These external devices 800 enable the user to communicate interactively with the electronic device 700. The electronic device 700 can also communicate with one or more other computing devices, and the computer device shown includes a router and a modem. This communication can be performed through an input / output (I / O) interface 750. In addition, the electronic device 700 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 760. The network adapter 760 can communicate with other modules of the electronic device 700 through a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0079] The embodiment of the present invention further provides a computer-readable storage medium for storing a program, which, when executed, implements the training method of the address matching model and / or the method for determining the collection address described in any of the above embodiments. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the training method of the address matching model and / or the method for determining the collection address described in any of the above embodiments.
[0080] As described above, the computer-readable storage medium of the present invention can train a deep neural network model based on historical collection data, taking the recipient address that enters the same collection point as the target recipient address as a positive sample and the recipient address that enters a different collection point as a negative sample, so that the deep neural network model can learn the association between the target recipient address and the positive sample and the difference between the target recipient address and the negative sample, maximize the difference in the distance between the target sample address and the positive and negative samples, respectively, and optimize the address matching model; and, using the address matching model generated by training, in actual application scenarios, it is possible to calculate the matching address information that is closest to and has entered the collection point based on the user's recipient address, thereby automatically determining the accurate collection information of the user's recipient address based on the collection point of the matching address information, so that the user can enjoy the express collection service without knowing the specific address of the collection point, thereby improving the user's user experience and improving the logistics distribution efficiency.
[0081] Figure 8 Schematic diagram of the structure of the computer-readable storage medium of the present invention. Figure 8As shown, a program product 900 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0082] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The 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 readable storage media include, but are not limited to: an electrical connection with one or more wires, a portable 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.
[0083] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0084] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as through the Internet using an Internet service provider.
[0085] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for determining a collection address, characterized in that: include: Receiving a collection request based on a current delivery address; Preprocess the current receiving address, input the trained address matching model, and obtain a matching receiving address that is closest to the current receiving address among the receiving addresses that have entered the agency collection point in the past; Wherein, the training process of the address matching model includes: obtaining the receiving addresses that have entered the collection point in the past; classifying the receiving addresses to form multiple groups of sample data, each group of the sample data includes a target sample address, a positive sample address that enters the same collection point as the target sample address, and a negative sample address that enters a different collection point from the target sample address; wherein, in each group of the sample data, the target sample address is randomly selected from the receiving addresses, the negative sample address and the target sample address belong to the same distribution area and have different terminal address information, and the terminal address information is community information or street information; based on each group of the sample data, a deep neural network model is trained, and the deep neural network model maximizes the difference between the first distance of the target sample address relative to the negative sample address and the second distance of the target sample address relative to the positive sample address; optimizing the deep neural network model to generate the address matching model; Determine the collection point of the matching receiving address as the collection address of the current receiving address; Obtaining the current address of the user terminal that issues the collection request; Based on a map service, obtaining a pickup route from the current address via the agency address to the current receiving address; Determine whether the pickup route overlaps with the historical track of the user terminal from the current address to the current receiving address; If yes, sending the pickup route to the user terminal; If not, the pickup route, the historical track, and the location information of the collection address relative to the historical track are sent to the user terminal.
2. The method for determining a collection address according to claim 1, wherein: According to the fact that the courier information carried by the negative sample address is the same as the courier information carried by the target sample address, it is determined that the negative sample address and the target sample address belong to the same delivery area.
3. The method for determining a collection address according to claim 1, wherein: The deep neural network model includes a self-attention network and a triplet loss function, and the training of a deep neural network model based on each group of sample data includes: Extracting feature vectors of the target sample address, the positive sample address, and the negative sample address through the self-attention network; The first distance is increased and the second distance is decreased by the triplet loss function, and the difference is made greater than a minimum threshold.
4. The method for determining a collection address according to claim 3, wherein: The optimizing the deep neural network model comprises: By using the gradient descent method, the loss value of the triple loss function is reduced.
5. The method for determining a collection address according to claim 1, wherein: After forming the multiple groups of sample data, the process further includes performing vectorization processing on each group of the sample data; When a deep neural network model is trained based on each group of the sample data, the sample data after vectorization processing is input into the deep neural network model.
6. The method for determining a collection address according to claim 5, wherein: The vectorization processing of each group of sample data includes: Preprocessing the target sample address, the positive sample address and the negative sample address to generate address texts in preset formats respectively; Constructing a data dictionary to convert each word in the address text into a digital sequence; The numbers corresponding to each word in the digital sequence are converted into vectors, and the converted vectors are concatenated according to the word order of each address text to generate vector matrices corresponding to the target sample address, the positive sample address and the negative sample address respectively.
7. A device for determining a collection address, characterized in that: include: A collection request response module, configured to receive a collection request based on a current recipient address; A matching address calculation module is configured to pre-process the current receiving address, input an address matching model trained and generated by an address matching model training device, and obtain a matching receiving address that is closest to the current receiving address among the receiving addresses that have historically entered the agency collection point; Wherein, the training device of the address matching model includes: a sample collection module, configured to obtain the receiving addresses that have entered the collection point in the past; a sample processing module, configured to classify the receiving addresses to form multiple groups of sample data, each group of the sample data includes a target sample address, a positive sample address that enters the same collection point as the target sample address, and a negative sample address that enters a different collection point from the target sample address; wherein, in each group of the sample data, the target sample address is randomly selected from the receiving addresses, the negative sample address and the target sample address belong to the same distribution area and have different terminal address information, and the terminal address information is community information or street information; a model training module, configured to train a deep neural network model based on each group of the sample data, the deep neural network model maximizes the difference between the first distance of the target sample address relative to the negative sample address and the second distance of the target sample address relative to the positive sample address; a model optimization module, configured to optimize the deep neural network model to generate the address matching model; A collection address determination module, configured to determine the collection point of the matching collection address as the collection address of the current collection address; The device for determining the collection address further includes a module for implementing the following steps: Determine the collection point of the matching receiving address as the collection address of the current receiving address; Obtaining the current address of the user terminal that issues the collection request; Based on a map service, obtaining a pickup route from the current address via the agency address to the current receiving address; Determine whether the pickup route overlaps with the historical track of the user terminal from the current address to the current receiving address; If yes, sending the pickup route to the user terminal; If not, the pickup route, the historical track, and the location information of the collection address relative to the historical track are sent to the user terminal.
8. An electronic device, characterized in that: include: A processor; a memory storing executable instructions; Wherein, when the executable instruction is executed by the processor, the method for determining the collection address as described in any one of claims 1-6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the method for determining a collection address according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
An entity linking method based on deep learning
CN108959270A
Method and apparatus for determining address information and computer readable storage medium
CN109359186A
Logistics transportation process monitoring method and system
CN109829677A
Address checking method and device, electronic device and storage medium
CN110619497A
Model training method and device in logistics sorting scene and electronic equipment
CN110874702A
