Method, apparatus, device, and storage medium for generating end - of - delivery express codes
By preprocessing, vectorizing, classifying and compressing the express order data, and generating the express end code mapping set, the problem of low efficiency in calculating the express end code in the prior art is solved, and the effect of improving the computing efficiency is achieved.
Patent Information
- Application Number
- CN202111088051.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-09-16
AI Technical Summary
The prior art has low work efficiency when calculating express terminal codes, resulting in low efficiency during logistics and transportation.
By obtaining the express order data set, pre-processing and data cleaning, the processed express order data set is generated; then the data set is vectorized to generate the express order feature vector set; the feature vector set is classified and compressed to generate the express order end code mapping set; finally, the target express order end code is generated based on the express order data and end code mapping set to be queried.
By compressing multiple express order feature vector mapping sets, the calculation amount of the server to calculate the express terminal code is reduced and the computing efficiency is improved.
Smart Images

Figure CN113836263B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics transportation, and particularly to a method, device, equipment and storage medium for generating an end code of an express delivery. Background Art
[0002] With the development of the economy and e-commerce, the logistics industry has become an essential part of life. Due to the rapid development of the logistics industry, logistics transportation has been divided into many nodes. Among them, delivering goods to express cabinets and express stations has become the end node of logistics transportation. Express deliverymen can deliver goods according to the end code.
[0003] In the existing technology, the calculation of the end code of an express delivery is mainly based on the express address vector. However, due to the huge volume of logistics transportation, the calculation amount when calculating the end code of an express delivery is also large, resulting in low work efficiency in calculating the end code of an express delivery. Summary of the Invention
[0004] The present invention provides a method, device, equipment and storage medium for generating an end code of an express delivery, which is used to improve the work efficiency of calculating the end code of an express delivery.
[0005] In a first aspect of the present invention, a method for generating an end code of an express delivery is provided, including: obtaining an express order data set, and processing the express order data set to generate a processed express order data set; vectorizing the processed express order data set to generate an express order feature vector set; classifying the express order feature vector set to generate a plurality of express order feature vector mapping sets, and performing compression processing according to the plurality of express order feature vector mapping sets to generate an express order end code mapping set; obtaining the express order data to be queried, and generating a target express end code in combination with the express order end code mapping set, where the target express end code is used to indicate the express cabinet or express station to be delivered.
[0006] Optionally, in a first implementation manner of the first aspect of the present invention, the obtaining an express order data set and processing the express order data set to generate a processed express order data set includes: obtaining an express order data set, preprocessing the express order data set to generate a preprocessed express order data set; and performing data cleaning on the preprocessed express order data set to generate a processed express order data set.
[0007] Optionally, in the second implementation manner of the first aspect of the present invention, the processed express order data set is vectorized to generate an express order feature vector set, including: calling a preset word segmentation algorithm to segment each processed express order data in the processed express order data set to generate an express order data phrase corresponding to each processed express order data, obtaining an express order data phrase set; based on the preset vector model and the express order data phrase set, obtaining an express order word vector set and an n-gram express order word vector set, where n is a positive integer; calling a hash bucket to calculate the express order word vector set and the n-gram express order word vector set in the hidden layer of the vector model to generate an express order word vector set; based on the preset vector function, calculating the express order word vector set to generate an express order feature vector set.
[0008] Optionally, in the third implementation manner of the first aspect of the present invention, the express order feature vector set is classified to generate a plurality of express order feature vector mapping sets, and compression processing is performed according to the plurality of express order feature vector mapping sets to generate an express order end code mapping set, including: reading the express order end code corresponding to each express order feature vector in the express order feature vector set to obtain an express order end code set, and calling a preset random function to perform feature vector selection in the express order feature vector set based on the express order end code set to obtain a plurality of target express order feature vectors; calculating the similarity between each target express order feature vector and each other express order feature vector in the express order feature vector set to generate a feature vector similarity set corresponding to each target express feature vector, obtaining a plurality of feature vector similarity sets; determining the feature vector similarities greater than or equal to the similarity threshold in each feature vector similarity set as target feature similarities to obtain a target feature similarity set, and classifying and integrating the express order feature vectors corresponding to the target feature similarity set to generate an express order feature vector mapping set corresponding to each feature vector similarity set, obtaining a plurality of express order feature vector mapping sets, where the express order feature vector mapping set includes an express order feature vector end code set; performing compression calculation based on each express order feature vector mapping set in the plurality of express order feature vector mapping sets to generate an express order end code mapping set.
[0009] Optionally, in the fourth implementation manner of the first aspect of the present invention, the compression calculation is performed based on each express order feature vector mapping set in the multiple express order feature vector mapping sets, and the generation of the express order end code mapping set includes: calculating the mean value of each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate an express order vector mean value corresponding to each express order feature vector mapping set; extracting the target mapping end code for each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate a target mapping end code corresponding to each initial express order vector, where the target mapping end code is the express order feature vector end code corresponding to the mode in the express order feature vector end code set; adjusting based on each express order vector mean value and the corresponding target mapping end code to generate express order feature vector mean value adjustment data corresponding to each express order feature vector mapping set, and obtaining multiple express order feature vector mean value adjustment data; compressing the multiple express order feature vector mean value adjustment data and the corresponding express order feature vector end codes to generate an express order end code mapping set.
[0010] Optionally, in the fifth implementation manner of the first aspect of the present invention, the obtaining of the express order data to be queried and the generation of the target express end code in combination with the express order end code mapping set include: vectorizing the express order data to be queried to generate an express order data vector to be queried; calculating the similarity between the express order data vector to be queried and each express order feature vector mean value adjustment data in the express order end code mapping set respectively to generate multiple express order similarities to be queried; determining the express order similarity to be queried with the maximum value as the target express order similarity to be queried, and determining the express order feature vector mean value adjustment data corresponding to the target express order similarity to be queried as the target express order feature vector mean value adjustment data; querying the express order feature vector end code corresponding to the target express order feature vector mean value adjustment data based on the express order end code mapping set to obtain the target express end code, where the target express end code is used to indicate the express cabinet or the express station for delivery.
[0011] Optionally, in the sixth implementation manner of the first aspect of the present invention, after the obtaining of the express order data to be queried and the generation of the target express end code in combination with the express order end code mapping set, the method for generating the express end code further includes: transmitting the target express end code to the query terminal corresponding to the express order data to be queried.
[0012] In a second aspect of the present invention, there is provided a device for generating an end code of an express delivery, including: a data set acquisition module, configured to acquire an express delivery order data set, and process the express delivery order data set to generate a processed express delivery order data set; a vectorization module, configured to vectorize the processed express delivery order data set to generate an express delivery order feature vector set; an end code mapping set generation module, configured to classify the express delivery order feature vector set to generate a plurality of express delivery order feature vector mapping sets, and perform compression processing according to the plurality of express delivery order feature vector mapping sets to generate an express delivery order end code mapping set; a target express delivery end code generation module, configured to acquire the express delivery order data to be queried, and generate a target express delivery end code in combination with the express delivery order end code mapping set, where the target express delivery end code is used to indicate the express delivery cabinet or the express delivery station for delivery.
[0013] Optionally, in a first implementation manner of the second aspect of the present invention, the data set acquisition module may further specifically be configured to: acquire an express delivery order data set, and process the express delivery order data set to generate a processed express delivery order data set; vectorize the processed express delivery order data set to generate an express delivery order feature vector set; classify the express delivery order feature vector set to generate a plurality of express delivery order feature vector mapping sets, and perform compression processing according to the plurality of express delivery order feature vector mapping sets to generate an express delivery order end code mapping set; acquire the express delivery order data to be queried, and generate a target express delivery end code in combination with the express delivery order end code mapping set, where the target express delivery end code is used to indicate the express delivery cabinet or the express delivery station for delivery.
[0014] Optionally, in a second implementation manner of the second aspect of the present invention, the vectorization module may further specifically be configured to: call a preset word segmentation algorithm to perform word segmentation on each processed express delivery order data in the processed express delivery order data set to generate an express delivery order data phrase corresponding to each processed express delivery order data, and obtain an express delivery order data phrase set; based on a preset vector model and the express delivery order data phrase set, obtain an express delivery order word vector set and an N-gram express delivery order word vector set, where N is a positive integer; call a hash bucket to calculate the express delivery order word vector set and the N-gram express delivery order word vector set in the hidden layer of the vector model to generate an express delivery order word vector set; based on a preset vector function, calculate the express delivery order word vector set to generate an express delivery order feature vector set.
[0015] Optionally, in the third implementation manner of the second aspect of the present invention, the end code mapping set generation module includes: a reading unit, configured to read the end codes of each express order feature vector in the express order feature vector set to obtain an express order end code set, and call a preset random function to perform feature vector selection in the express order feature vector set based on the express order end code set to obtain a plurality of target express order feature vectors; a calculation unit, configured to calculate the similarity between each target express order feature vector and each other express order feature vector in the express order feature vector set, generate a feature vector similarity set corresponding to each target express feature vector, and obtain a plurality of feature vector similarity sets; a classification and integration unit, configured to determine the feature vector similarities greater than or equal to the similarity threshold in each feature vector similarity set as target feature similarities to obtain a target feature similarity set, and classify and integrate the express order feature vectors corresponding to the target feature similarity set to generate an express order feature vector mapping set corresponding to each feature vector similarity set, and obtain a plurality of express order feature vector mapping sets, where the express order feature vector mapping set includes an express order feature vector end code set; a compression unit, configured to perform compression calculation based on each express order feature vector mapping set in the plurality of express order feature vector mapping sets to generate an express order end code mapping set.
[0016] Optionally, in the fourth implementation manner of the second aspect of the present invention, the compression unit may specifically be configured to: calculate the mean value of each express order feature vector mapping set in the plurality of express order feature vector mapping sets to generate an express order vector mean value corresponding to each express order feature vector mapping set; extract the target mapping end code of each express order feature vector mapping set in the plurality of express order feature vector mapping sets to generate a target mapping end code corresponding to each initial express order vector, where the target mapping end code is the express order feature vector end code corresponding to the mode in the express order feature vector end code set; perform adjustment based on each express order vector mean value and the corresponding target mapping end code to generate express order feature vector mean value adjustment data corresponding to each express order feature vector mapping set, and obtain a plurality of express order feature vector mean value adjustment data; compress the plurality of express order feature vector mean value adjustment data and the corresponding express order feature vector end codes to generate an express order end code mapping set.
[0017] Optionally, in the fifth implementation manner of the second aspect of the present invention, the target express delivery terminal code generation module may specifically be further configured to: vectorize the express delivery order data to be queried to generate a vector of the express delivery order data to be queried; calculate the similarity between the vector of the express delivery order data to be queried and each express delivery order feature vector mean adjustment data in the express delivery order terminal code mapping set respectively to generate a plurality of similarities of the express delivery order to be queried; determine the similarity of the express delivery order to be queried with the maximum value as the target similarity of the express delivery order to be queried, and determine the express delivery order feature vector mean adjustment data corresponding to the target similarity of the express delivery order to be queried as the target express delivery order feature vector mean adjustment data; query the express delivery order feature vector terminal code corresponding to the target express delivery order feature vector mean adjustment data based on the express delivery order terminal code mapping set to obtain the target express delivery terminal code, where the target express delivery terminal code is used to indicate the express cabinet or the express delivery station for delivery.
[0018] Optionally, in the sixth implementation manner of the second aspect of the present invention, the device for generating the express delivery terminal code may further include: a transmission module, configured to transmit the target express delivery terminal code to the query terminal corresponding to the express delivery order data to be queried.
[0019] The third aspect of the present invention provides a device for generating an express delivery terminal code, including: a memory and at least one processor, where instructions are stored in the memory; the at least one processor calls the instructions in the memory to enable the device for generating the express delivery terminal code to execute the above-mentioned method for generating the express delivery terminal code.
[0020] The fourth aspect of the present invention provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is enabled to execute the above-mentioned method for generating the express delivery terminal code.
[0021] In the technical solution provided by the present invention, an express order data set is obtained, and the obtained express order data set is processed to generate a processed express order data set; the processed express order data set is vectorized to generate an express order feature vector set; the express order feature vector set is classified to generate a plurality of express order feature vector mapping sets, and compression processing is performed according to the plurality of express order feature vector mapping sets to generate an express order end code mapping set; the express order data to be queried is obtained, and a target express end code is generated in combination with the express order end code mapping set, where the target express end code is used to indicate the express cabinet or the express station for delivery. In the embodiment of the present invention, the express order feature vector set is classified to generate a plurality of express order feature vector mapping sets, and compression processing is performed on them to generate an express order end code mapping set. Finally, a target express end code is generated based on the express order data to be queried and the express order end code mapping set. After compressing the plurality of express order feature vector mapping sets, the calculation amount of the server when calculating the express end code is reduced, and the working efficiency of calculating the express end code is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 FIG. is a schematic diagram of an embodiment of a method for generating an express end code in an embodiment of the present invention;
[0023] Figure 2 FIG. is a schematic diagram of another embodiment of a method for generating an express end code in an embodiment of the present invention;
[0024] Figure 3 FIG. is a schematic diagram of an embodiment of a device for generating an express end code in an embodiment of the present invention;
[0025] Figure 4 FIG. is a schematic diagram of another embodiment of a device for generating an express end code in an embodiment of the present invention;
[0026] Figure 5 FIG. is a schematic diagram of an embodiment of a device for generating an express end code in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The embodiment of the present invention provides a method, device, equipment and storage medium for generating an express end code, which is used to improve the working efficiency of calculating the express end code.
[0028] In the description, claims and above-mentioned drawings of the present invention, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described here can be implemented in an order other than that shown or described here. In addition, the term "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0029] For ease of understanding, the specific process of the embodiments of the present invention will be described below. Please refer to Figure 1 , an embodiment of the method for generating an end-of-express delivery code in the embodiments of the present invention includes:
[0030] 101. Obtain an express delivery order data set, and process the express delivery order data set to generate a processed express delivery order data set;
[0031] The server obtains the express delivery order data set and processes the express delivery order data set to generate a processed express delivery order data set;
[0032] The express delivery order data set includes a plurality of express delivery order data. In this embodiment, the express delivery order data mainly uses express delivery address data and express delivery time data. To facilitate the calculation of data by this method, the server first processes the express delivery order data set, filters out some redundant data and invalid data, so as to obtain a processed express delivery order data set. In this embodiment, the express delivery order data filtered out includes express delivery order data corresponding to goods with failed shipments, express delivery order data corresponding to returned goods, express delivery order data corresponding to time-limited test goods, duplicate express delivery order data, etc.
[0033] It can be understood that the execution subject of the present invention can be a device for generating an end-of-express delivery code, or a terminal or a server. Specifically, it is not limited here. The embodiments of the present invention will be described by taking the server as the execution subject as an example.
[0034] 102. Vectorize the processed express delivery order data set to generate an express delivery order feature vector set;
[0035] The server vectorizes the processed express delivery order data set, thereby generating an express delivery order feature vector set.
[0036] Before calculating the processed express order dataset, the processed express order dataset is first vectorized. Each processed express order dataset that is character data is vectorized into a sequence in digital form, that is, an express order feature vector, so as to obtain an express order feature vector set. There are many ways of vectorization. In this embodiment, the forward maximum matching algorithm is mainly used to segment each processed express order data, and then vector conversion is performed on each obtained segmentation result group to generate an express order feature vector corresponding to each processed express order data.
[0037] 103. Classify the express order feature vector set to generate multiple express order feature vector mapping sets, and perform compression processing based on the multiple express order feature vector mapping sets to generate an express order end code mapping set;
[0038] The server classifies the express order feature vectors to generate multiple express order feature vector mapping sets, and performs compression processing based on these multiple express order feature vector mapping sets to generate an express order end code mapping set.
[0039] The end code of the express order can indicate the express cabinet or the express station corresponding to the delivery of the express order. Each express order feature vector has a corresponding end code. During the process of the server classifying the express order feature vector set, the end code corresponding to each express order feature vector is classified together to generate multiple express order feature vector mapping sets. In this embodiment, the basis for classification is the similarity value. The server divides the express order feature vector mapping sets with high similarity into one category based on the similarity value, so as to obtain multiple express order feature vector mapping sets. After obtaining multiple express order feature vector mapping sets, in order to save computing resources and computing time, the server performs compression processing based on the multiple express order feature vector mapping sets to generate an express order end code mapping set.
[0040] 104. Obtain the express order data to be queried, and generate a target express end code in combination with the express order end code mapping set. The target express end code is used to indicate the express cabinet or the express station for delivery.
[0041] The server obtains the express order data to be queried, and then performs matching in combination with the express order end code mapping set to generate a target express end code for indicating the express cabinet or the express station for delivery.
[0042] The server obtains the express order data to be queried, then vectorizes the express order data to be queried, calculates the similarity based on the vectorization result and the data in the express order end code mapping set, and determines the express order end code corresponding to the data with the maximum similarity as the target express end code. The target express end code is used to indicate the express cabinet or express station where the express goods corresponding to the express order data to be queried need to be delivered.
[0043] In the embodiment of the present invention, the express order feature vector set is classified to generate multiple express order feature vector mapping sets, and compression processing is performed on them to generate an express order end code mapping set. Finally, the target express end code is generated based on the express order data to be queried and the express order end code mapping set. After compressing multiple express order feature vector mapping sets, the calculation amount of the server when calculating the express end code is reduced, and the working efficiency of calculating the express end code is effectively improved.
[0044] Please refer to Figure 2 , another embodiment of the method for generating the express end code in the embodiment of the present invention includes:
[0045] 201. Obtain an express order data set, and process the express order data set to generate a processed express order data set;
[0046] The server obtains the express order data set, processes the express order data set, and generates a processed express order data set;
[0047] The express order data set includes multiple express order data. In this embodiment, the express order data mainly uses the express address data and the express time data. To facilitate the calculation of data by this method, the server first processes the express order data set, filters out some redundant data and invalid data, so as to obtain a processed express order data set. In this embodiment, the express order data filtered out includes the express order data corresponding to the goods with failed shipments, the express order data corresponding to the returned goods, the express order data corresponding to the goods for aging tests, the duplicate express order data, etc.
[0048] Specifically, the server obtains the express order data set, preprocesses the express order data set to generate a preprocessed express order data set; the server performs data cleaning on the preprocessed express order data set to generate a processed express order data set.
[0049] The server obtains the express order data set, and then preprocesses the express order data set in the express order data set. This step mainly filters the express order data that does not meet the requirements. In this embodiment, it mainly filters out the express order data corresponding to the goods with failed shipments, the express order data corresponding to the returned goods, and the express order data corresponding to the goods for timeliness testing, generating a preprocessed express order data set. The attributes of the above express order data are discriminated through the identifiers corresponding to the express order data. In other embodiments, the express order data corresponding to the excluded complaints, the express order data corresponding to the intercepted goods, the express order data corresponding to the goods with modified addresses, the express order data corresponding to the intercity links, the order data corresponding to the same-city waybills, and the express order data corresponding to the mobile couriers can also be filtered out. After obtaining the preprocessed express order data set, data cleaning is performed on the preprocessed express order data set. First, the rows with null values in the preprocessed express order data set are deleted, generating a preliminarily cleaned express order data set. Then, the preliminarily cleaned express order data set is sorted in the order from the latest to the earliest moment, and the duplicate data in the preliminarily cleaned express order data set is deleted. The data with an earlier moment in the duplicate data is deleted, thus obtaining the processed express order data set.
[0050] 202. Vectorize the processed express order data set to generate an express order feature vector set;
[0051] The server vectorizes the processed express order data set, thereby generating an express order feature vector set.
[0052] Before calculating the processed express order data set, first perform vectorization processing on the processed express order data set. Vectorize each processed express order data set with character data into a sequence in digital form, that is, an express order feature vector, thereby obtaining an express order feature vector set. There are many ways of vectorization. In this embodiment, mainly the forward maximum matching algorithm is used to segment each processed express order data, and then vector conversion is performed on each obtained segmentation result group to generate an express order feature vector corresponding to each processed express order data.
[0053] Specifically, the server calls a pre-set word segmentation algorithm to segment each processed express order data in the processed express order dataset, generating express order data word groups corresponding to each processed express order data, and obtaining an express order data word group set; the server, based on the pre-set vector model and the express order data word group set, obtains an express order word vector set and an N-gram express order word vector set, where N is a positive integer; the server calls a hash bucket to calculate the express order word vector set and the N-gram express order word vector set in the hidden layer of the vector model, generating an express order word vector set; the server, based on the pre-set vector function, calculates the express order word vector set to generate an express order feature vector set.
[0054] First, the server calls a pre-set word segmentation algorithm to segment each processed express order data. In this embodiment, the pre-set word segmentation algorithm is the forward maximum matching algorithm, generating express order data word groups corresponding to each processed express order data, and obtaining an express order data word group set; then, each express order data word group in the express order data word group set is input into the input layer of the pre-set vector model for convolution, generating an express order word vector and an N-gram express order word vector. The express order word vector is in the following form:
[0055]
[0056] The express order word vector set is composed of multiple express order word vectors. The N-gram express order word vector is in the following form:
[0057]
[0058] The N-gram express order word vector set is composed of multiple N-gram express order word vectors. The server then calls a hash bucket to calculate the above two types of word vectors in the hidden layer of the vector model, generating an express order word vector. The calculation process is as follows:
[0059]
[0060] The express order word vector set is composed of multiple express order word vectors. It should be noted that since the N-gram express order word vector is larger than the express order word vector, the server cannot fully store all N-gram express order word vectors. Therefore, the server uses a hash bucket to hash the N-gram express order word vectors corresponding to the express order word vectors into a bucket, and the N-gram express order word vectors hashed into a bucket share an express order word vector.
[0061] The server then calls the pre-set vector function to calculate the express order word vector set, generating an express order feature vector set. The vector function is:
[0062]
[0063] Among them, h is the express order feature vector, and x i is the express order word vector, C is the number of phrases corresponding to x i , and W is the weight matrix from the input layer to the hidden layer. Through this calculation method, each set of express order word vectors is calculated to obtain a set of express order feature vectors.
[0064] 203. Classify the set of express order feature vectors to generate multiple sets of express order feature vector mappings, and perform compression processing based on the multiple sets of express order feature vector mappings to generate a set of express order end code mappings;
[0065] The server classifies the express order feature vectors to generate multiple sets of express order feature vector mappings, and performs compression processing based on these multiple sets of express order feature vector mappings to generate a set of express order end code mappings.
[0066] The end code of the express order can indicate the express cabinet or express station corresponding to the delivery of the express order. Each express order feature vector has a corresponding end code. During the process of the server classifying the set of express order feature vectors, the end codes corresponding to each express order feature vector are classified together to generate multiple sets of express order feature vector mappings. In this embodiment, the basis for classification processing is the similarity value. The server divides the sets of express order feature vectors with high similarity into one category based on the similarity value, thereby obtaining multiple sets of express order feature vector mappings. After obtaining multiple sets of express order feature vector mappings, in order to save computing resources and computing time, the server performs compression processing based on the multiple sets of express order feature vector mappings to generate a set of express order end code mappings.
[0067] Specifically, the server reads the express order end codes corresponding to each express order feature vector in the express order feature vector set to obtain an express order end code set, and calls a preset random function to select feature vectors in the express order feature vector set based on the express order end code set, obtaining multiple target express order feature vectors; the server calculates the similarity between each target express order feature vector and each other express order feature vector in the express order feature vector set, generates a feature vector similarity set corresponding to each target express feature vector, and obtains multiple feature vector similarity sets; the server determines the feature vector similarities greater than or equal to the similarity threshold in each feature vector similarity set as target feature similarities, obtains a target feature similarity set, and classifies and integrates the express order feature vectors corresponding to the target feature similarity set to generate an express order feature vector mapping set corresponding to each feature vector similarity set, obtaining multiple express order feature vector mapping sets, where the express order feature vector mapping set includes an express order feature vector end code set; the server performs compression calculation based on each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate an express order end code mapping set.
[0068] Each express order feature vector in the express order feature vector set includes a corresponding express order end code. The server reads the end code set corresponding to the express order feature vector set to generate an express order end code set, and then calls a preset random function to select multiple target express order feature vectors in the express order feature vector set based on the express order end code set, where the express order end codes corresponding to each target express order feature vector are not the same. For example, the express order feature vector set is A1, A2, A3, A4, A5, A6, A7, and A8, and the corresponding express order end code set is 11223344. The server calls a preset random function to determine multiple target order feature vectors as A1(A2), A3(A4), A5(A6), and A7(A8) in A1, A2, A3, A4, A5, A6, A7, and A8 based on the express order end code set of 11223344, that is, randomly select one of the express order feature vectors with the same express order end code as the target order feature vector. Then the server calculates the similarity between the target order feature vector and each other express order feature vector in the express order feature vector set to obtain a feature vector similarity set corresponding to each target order feature vector, and then retains the express order feature vectors in the feature vector similarity set that are greater than or equal to the similarity threshold to obtain an express order feature vector mapping set corresponding to each target order feature vector, where the similarity threshold is 0.95. In this way, multiple express order feature vector mapping sets are obtained. Then, compression calculation is performed on the multiple express order feature vector mapping sets to generate an express order end code mapping set.
[0069] The server performs compression calculations on each set of express order feature vector mappings in a set of multiple express order feature vector mappings, and generates an express order end code mapping set, including:
[0070] The server first calculates the mean value of each set of express order feature vector mappings in the set of multiple express order feature vector mappings to generate an express order vector mean value corresponding to each set of express order feature vector mappings; then the server extracts the target mapping end code from each set of express order feature vector mappings in the set of multiple express order feature vector mappings to generate a target mapping end code corresponding to each initial express order vector, and the target mapping end code is the express order feature vector end code corresponding to the mode in the set of express order feature vector end codes; the server then makes adjustments based on each express order vector mean value and the corresponding target mapping end code to generate express order feature vector mean value adjustment data corresponding to each set of express order feature vector mappings, and obtains a set of multiple express order feature vector mean value adjustment data. This step can be understood as adjusting each express order feature vector in each set of express order feature vector mappings to the corresponding express order vector mean value; the server compresses the set of multiple express order feature vector mean value adjustment data and the corresponding express order feature vector end codes to generate an express order end code mapping set. This step can be understood as, after adjusting each express order feature vector, further adjusting its corresponding express order feature vector end code to the corresponding target mapping end code, and then the server only retains a set of express order feature vector mean value adjustment data and the corresponding express order feature vector end codes in each set of express order feature vector mappings, so as to obtain the express order end code mapping set.
[0071] 204. Obtain the express order data to be queried, and generate a target express end code in combination with the express order end code mapping set. The target express end code is used to indicate the express cabinet or express station for delivery.
[0072] The server obtains the express order data to be queried, and then performs matching in combination with the express order end code mapping set to generate a target express end code for indicating the express cabinet or express station for delivery.
[0073] The server obtains the express order data to be queried, then vectorizes the express order data to be queried, calculates the similarity between the vectorization processing result and the data in the express order end code mapping set, and determines the express order end code corresponding to the data with the maximum similarity as the target express end code. The target express end code is used to indicate the express cabinet or express station where the express goods corresponding to the express order data to be queried need to be delivered.
[0074] Specifically, the server vectorizes the to-be-query express order data according to the vectorization method in step 202 to generate a to-be-query express order data vector. Then, the server calculates the similarity between the to-be-query express order data vector and each express order feature vector mean adjustment data in the express order end code mapping set respectively to generate multiple to-be-query express order similarities. The server determines the maximum to-be-query express order similarity as the target to-be-query express order similarity, and determines the express order feature vector mean adjustment data corresponding to the target to-be-query express order similarity as the target express order feature vector mean adjustment data. The server queries the express order feature vector end code corresponding to the target express order feature vector mean adjustment data based on the express order end code mapping set to obtain the target express end code, and the target express end code is used to indicate the express cabinet or express station for delivery.
[0075] 205. Transmit the target express end code to the query terminal corresponding to the to-be-query express order data.
[0076] The server transmits the target express end code to the query terminal corresponding to the to-be-query express order data.
[0077] The query terminal corresponding to the to-be-query express order data is the query terminal corresponding to the express delivery person. After receiving the target express end code, the express delivery person performs express delivery according to the express cabinet or express station for delivery pointed to by the target express end code.
[0078] In the embodiment of the present invention, the express order feature vector set is classified to generate multiple express order feature vector mapping sets, and they are compressed to generate an express order end code mapping set. Finally, the target express end code is generated based on the to-be-query express order data and the express order end code mapping set. After compressing multiple express order feature vector mapping sets, the calculation amount when the server calculates the express end code is reduced, and the working efficiency of calculating the express end code is effectively improved.
[0079] The generation method of the express end code in the embodiment of the present invention is described above. Next, the generation device of the express end code in the embodiment of the present invention will be described. Please refer to Figure 3 , an embodiment of the generation device of the express end code in the embodiment of the present invention includes:
[0080] A data set acquisition module 301, configured to acquire an express order data set and process the express order data set to generate a processed express order data set;
[0081] A vectorization module 302, configured to vectorize the processed express order data set to generate an express order feature vector set;
[0082] The end - code mapping set generation module 303 is used to classify the express order feature vector set, generate multiple express order feature vector mapping sets, and perform compression processing based on the multiple express order feature vector mapping sets to generate an express order end - code mapping set;
[0083] The target express end - code generation module 304 is used to obtain the express order data to be queried, and generate a target express end - code in combination with the express order end - code mapping set, where the target express end - code is used to indicate the express cabinet or express station for delivery.
[0084] In the embodiment of the present invention, the express order feature vector set is classified to generate multiple express order feature vector mapping sets, and compression processing is performed on them to generate an express order end - code mapping set. Finally, a target express end - code is generated based on the express order data to be queried and the express order end - code mapping set. After compressing the multiple express order feature vector mapping sets, the computational amount of the server for calculating the express end - code is reduced, and the working efficiency of calculating the express end - code is effectively improved.
[0085] Please refer to Figure 4 , another embodiment of the express end - code generation device in the embodiment of the present invention includes:
[0086] The data set acquisition module 301 is used to acquire an express order data set, and process the express order data set to generate a processed express order data set;
[0087] The vectorization module 302 is used to vectorize the processed express order data set to generate an express order feature vector set;
[0088] The end - code mapping set generation module 303 is used to classify the express order feature vector set, generate multiple express order feature vector mapping sets, and perform compression processing based on the multiple express order feature vector mapping sets to generate an express order end - code mapping set;
[0089] The target express end - code generation module 304 is used to obtain the express order data to be queried, and generate a target express end - code in combination with the express order end - code mapping set, where the target express end - code is used to indicate the express cabinet or express station for delivery.
[0090] Optionally, the data set acquisition module 301 may specifically be used for:
[0091] Acquire an express order data set, and process the express order data set to generate a processed express order data set;
[0092] Vectorize the processed express order data set to generate an express order feature vector set;
[0093] Classify the express order feature vector set to generate multiple express order feature vector mapping sets, and perform compression processing based on the multiple express order feature vector mapping sets to generate an express order end code mapping set;
[0094] Obtain the express order data to be queried, and generate a target express order end code in combination with the express order end code mapping set.
[0095] Optionally, the vectorization module 302 can also be specifically used for:
[0096] Call a preset word segmentation algorithm to perform word segmentation on each processed express order data in the processed express order dataset, generate an express order data phrase group corresponding to each processed express order data, and obtain an express order data phrase group set;
[0097] Based on a preset vector model and the express order data phrase group set, obtain an express order word vector set and an N-gram express order word vector set, where N is a positive integer;
[0098] Call a hash bucket to calculate the express order word vector set and the N-gram express order word vector set in the hidden layer of the vector model to generate an express order word vector set;
[0099] Based on a preset vector function, calculate the express order word vector set to generate an express order feature vector set.
[0100] Optionally, the end code mapping set generation module 303 includes:
[0101] A reading unit 3031, configured to read the express order end code corresponding to each express order feature vector in the express order feature vector set, obtain an express order end code set, and call a preset random function to perform feature vector selection in the express order feature vector set based on the express order end code set to obtain multiple target express order feature vectors;
[0102] A calculation unit 3032, configured to calculate the similarity between each target express order feature vector and each other express order feature vector in the express order feature vector set, generate a feature vector similarity set corresponding to each target express feature vector, and obtain multiple feature vector similarity sets;
[0103] A classification and integration unit 3033 is configured to determine, as target feature similarities, the feature vector similarities in each feature vector similarity concentration that are greater than or equal to a similarity threshold, obtain a target feature similarity set, classify and integrate the express order feature vectors corresponding to the target feature similarity set, generate an express order feature vector mapping set corresponding to each feature vector similarity set, and obtain multiple express order feature vector mapping sets. The express order feature vector mapping set includes an express order feature vector end code set;
[0104] A compression unit 3034 is configured to perform compression calculation based on each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate an express order end code mapping set.
[0105] Optionally, the compression unit 3034 may specifically be configured to:
[0106] Calculate the mean value of each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate an express order vector mean value corresponding to each express order feature vector mapping set;
[0107] Extract the target mapped end code of each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate a target mapped end code corresponding to each initial express order vector. The target mapped end code is the express order feature vector end code corresponding to the mode in the express order feature vector end code set;
[0108] Adjust based on each express order vector mean value and the corresponding target mapped end code to generate express order feature vector mean value adjustment data corresponding to each express order feature vector mapping set, and obtain multiple express order feature vector mean value adjustment data;
[0109] Compress the multiple express order feature vector mean value adjustment data and the corresponding express order feature vector end codes to generate an express order end code mapping set.
[0110] Optionally, the target express end code generation module 304 may specifically be configured to:
[0111] Vectorize the express order data to be queried to generate an express order data vector to be queried;
[0112] Calculate the similarity between the express order data vector to be queried and each express order feature vector mean value adjustment data in the express order end code mapping set respectively to generate multiple express order similarities to be queried;
[0113] Determine the similarity of the express delivery order to be queried with the maximum value as the target similarity of the express delivery order to be queried, and determine the adjusted data of the mean of the express delivery order feature vectors corresponding to the target similarity of the express delivery order to be queried as the target adjusted data of the mean of the express delivery order feature vectors;
[0114] Query the end code of the express delivery order feature vector corresponding to the target adjusted data of the mean of the express delivery order feature vectors based on the express delivery order end code mapping set, and obtain the target express delivery end code, where the target express delivery end code is used to indicate the express delivery cabinet or the express delivery station for delivery.
[0115] Optionally, the generating device of the express delivery end code may further include:
[0116] A transmission module 305, configured to transmit the target express delivery end code to the query terminal corresponding to the express delivery order data to be queried.
[0117] In the embodiment of the present invention, the express delivery order feature vector set is classified to generate multiple express delivery order feature vector mapping sets, and compression processing is performed on them to generate an express delivery order end code mapping set. Finally, the target express delivery end code is generated based on the express delivery order data to be queried and the express delivery order end code mapping set. After compressing multiple express delivery order feature vector mapping sets, the calculation amount of the server when calculating the express delivery end code is reduced, and the working efficiency of calculating the express delivery end code is effectively improved.
[0118] Above Figure 3 And Figure 4 The generating device of the express delivery end code in the embodiment of the present invention is described in detail from the perspective of modular functional entities. Next, the generating device of the express delivery end code in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0119] Figure 5 FIG. is a schematic structural diagram of a generating device of an express delivery end code provided by an embodiment of the present invention. The generating device 500 of the express delivery end code may vary greatly due to configuration or performance, and may include one or more processors (central processing units, CPUs) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) for storing application programs 533 or data 532. Among them, the memory 520 and the storage media 530 may be transient storage or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the generating device 500 of the express delivery end code. Further, the processor 510 may be configured to communicate with the storage media 530 and execute a series of instruction operations in the storage media 530 on the generating device 500 of the express delivery end code.
[0120] The generation device 500 of the express terminal code may further include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art can understand that Figure 5 The structure of the generation device of the express terminal code shown does not constitute a limitation on the generation device of the express terminal code, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0121] The present invention also provides a generation device of an express terminal code. The computer device includes a memory and a processor. When computer-readable instructions stored in the memory are executed by the processor, the processor executes the steps of the generation method of the express terminal code in the above-mentioned embodiments.
[0122] The present invention also provides a computer-readable storage medium. The computer-readable storage medium can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer executes the steps of the generation method of the express terminal code.
[0123] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0124] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, an application service layer, etc.
[0125] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0126] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of various embodiments of the present invention.
Claims
1. A method for generating an end - code of an express delivery, characterized in that, The method for generating the end code of the express delivery includes: Obtain an express delivery order data set, and process the express delivery order data set to generate a processed express delivery order data set; Vectorize the processed express delivery order data set to generate an express delivery order feature vector set; Classify the express delivery order feature vector set to generate multiple express delivery order feature vector mapping sets, and perform compression processing based on the multiple express delivery order feature vector mapping sets to generate an express delivery order end code mapping set; Obtain the express delivery order data to be queried, and generate a target express delivery end code in combination with the express delivery order end code mapping set, where the target express delivery end code is used to indicate the express delivery cabinet or the express delivery station for delivery; The classifying the express delivery order feature vector set to generate multiple express delivery order feature vector mapping sets, and performing compression processing based on the multiple express delivery order feature vector mapping sets to generate an express delivery order end code mapping set includes: Read the express delivery order end code corresponding to each express delivery order feature vector in the express delivery order feature vector set to obtain an express delivery order end code set, and call a preset random function to select feature vectors in the express delivery order feature vector set based on the express delivery order end code set to obtain multiple target express delivery order feature vectors; Calculate the similarity between each target express delivery order feature vector and each other express delivery order feature vector in the express delivery order feature vector set to generate a feature vector similarity set corresponding to each target express delivery feature vector, and obtain multiple feature vector similarity sets; Determine the feature vector similarity greater than or equal to the similarity threshold in each feature vector similarity set as the target feature similarity to obtain a target feature similarity set, and classify and integrate the express delivery order feature vectors corresponding to the target feature similarity set to generate an express delivery order feature vector mapping set corresponding to each feature vector similarity set, and obtain multiple express delivery order feature vector mapping sets. The express delivery order feature vector mapping set includes an express delivery order feature vector end code set; Perform compression calculation based on each express delivery order feature vector mapping set in the multiple express delivery order feature vector mapping sets to generate an express delivery order end code mapping set.
2. The method for generating the express terminal code according to claim 1, wherein, The obtaining the express delivery order data set, and processing the express delivery order data set to generate a processed express delivery order data set includes: Obtain an express delivery order data set, preprocess the express delivery order data set to generate a preprocessed express delivery order data set; Perform data cleaning on the preprocessed express delivery order data set to generate a processed express delivery order data set.
3. The method for generating the express terminal code according to claim 1, wherein The vectorizing the processed express delivery order data set to generate an express delivery order feature vector set includes: Call a preset word segmentation algorithm to perform word segmentation on each processed express delivery order data in the processed express delivery order data set to generate an express delivery order data phrase corresponding to each processed express delivery order data, and obtain an express delivery order data phrase set; Based on a preset vector model and the express delivery order data phrase set, obtain an express delivery order word vector set and an N-gram express delivery order word vector set, where N is a positive integer; Call the hash bucket to calculate the express order word vector set and the n-gram express order word vector set in the hidden layer of the vector model, and generate an express order word vector set; Based on a preset vector function, calculate the express order word vector set to generate an express order feature vector set.
4. The method for generating the express terminal code according to claim 1, wherein, The compression calculation based on each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate an express order end code mapping set includes: Perform a mean calculation on each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate an express order vector mean corresponding to each express order feature vector mapping set; Extract the target mapping end code for each express order feature vector mapping set in the multiple express order feature vector mapping sets to generate a target mapping end code corresponding to each initial express order vector, where the target mapping end code is the express order feature vector end code corresponding to the mode in the express order feature vector end code set; Based on each express order vector mean and the corresponding target mapping end code, perform an adjustment to generate an express order feature vector mean adjustment data corresponding to each express order feature vector mapping set, and obtain multiple express order feature vector mean adjustment data; Compress the multiple express order feature vector mean adjustment data and the corresponding express order feature vector end codes to generate an express order end code mapping set.
5. The method for generating the end code of the express delivery according to claim 4, wherein The method for generating the target express end code by obtaining the express order data to be queried and combining the express order end code mapping set, where the target express end code is used to indicate the express cabinet or express station for delivery includes: Vectorize the express order data to be queried to generate an express order data vector to be queried; Calculate the similarity between the express order data vector to be queried and each express order feature vector mean adjustment data in the express order end code mapping set respectively to generate multiple express order data similarities to be queried; Determine the maximum express order data similarity to be queried as the target express order data similarity to be queried, and determine the express order feature vector mean adjustment data corresponding to the target express order data similarity to be queried as the target express order feature vector mean adjustment data; Query the express order feature vector end code corresponding to the target express order feature vector mean adjustment data based on the express order end code mapping set to obtain the target express end code, where the target express end code is used to indicate the express cabinet or express station for delivery.
6. The method for generating an end - code of an express delivery according to any one of claims 1 - 5, characterized in that, After obtaining the express order data to be queried, combining the express order end code mapping set to generate the target express end code, where the target express end code is used to indicate the express cabinet or express station for delivery, the method for generating the express end code further includes: Transmit the target express end code to the query terminal corresponding to the express order data to be queried.
7. An apparatus for generating an end code of an express delivery, characterized in that, The device for generating the express end code includes: A data set acquisition module, configured to acquire an express order data set and process the express order data set to generate a processed express order data set; A vectorization module, configured to vectorize the processed express order data set to generate an express order feature vector set; An end code mapping set generation module, configured to classify the express order feature vector set to generate a plurality of express order feature vector mapping sets, and perform compression processing according to the plurality of express order feature vector mapping sets to generate an express order end code mapping set; A target express end code generation module, configured to obtain the express order data to be queried, and generate a target express end code in combination with the express order end code mapping set, where the target express end code is used to indicate the express cabinet or the express station for delivery; The end code mapping set generation module includes: a reading unit, configured to read the express order end code corresponding to each express order feature vector in the express order feature vector set to obtain an express order end code set, and call a preset random function to perform feature vector selection in the express order feature vector set based on the express order end code set to obtain a plurality of target express order feature vectors; a calculation unit, configured to calculate the similarity between each target express order feature vector and each other express order feature vector in the express order feature vector set to generate a feature vector similarity set corresponding to each target express feature vector, and obtain a plurality of feature vector similarity sets; a classification and integration unit, configured to determine the feature vector similarity greater than or equal to the similarity threshold in each feature vector similarity set as the target feature similarity to obtain a target feature similarity set, and classify and integrate the express order feature vectors corresponding to the target feature similarity set to generate an express order feature vector mapping set corresponding to each feature vector similarity set, and obtain a plurality of express order feature vector mapping sets, where the express order feature vector mapping set includes an express order feature vector end code set; a compression unit, configured to perform compression calculation based on each express order feature vector mapping set in the plurality of express order feature vector mapping sets to generate an express order end code mapping set.
8. An apparatus for generating an end code of an express delivery, characterized in that, The device for generating the express end code includes: a memory and at least one processor, where instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the device for generating the express end code executes the method for generating the express end code according to any one of claims 1-6.
9. A computer-readable storage medium having instructions stored thereon, characterized in that, When the instructions are executed by the processor, the method for generating the express end code according to any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Express code generation method and device, equipment and storage medium
CN113191707A