CN113191707A - Express delivery code generation method, device, equipment and storage medium - Google Patents

Express delivery code generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113191707A
CN113191707A CN202110399814.7A CN202110399814A CN113191707A CN 113191707 A CN113191707 A CN 113191707A CN 202110399814 A CN202110399814 A CN 202110399814A CN 113191707 A CN113191707 A CN 113191707A
Authority
CN
China
Prior art keywords
express
target
address information
address
prediction probability
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110399814.7A
Other languages
Chinese (zh)
Inventor
杨周龙
王豹
李斯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongpu Software Co Ltd
Original Assignee
Dongpu Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongpu Software Co Ltd filed Critical Dongpu Software Co Ltd
Priority to CN202110399814.7A priority Critical patent/CN113191707A/en
Publication of CN113191707A publication Critical patent/CN113191707A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Business, Economics & Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Probability & Statistics with Applications (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Development Economics (AREA)
  • Biomedical Technology (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Molecular Biology (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Evolutionary Biology (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Biophysics (AREA)
  • Game Theory and Decision Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of logistics, and discloses an express code generation method, device, equipment and storage medium, which are used for improving the generation accuracy and efficiency of express codes. The express delivery code generation method comprises the following steps: acquiring an express code generation request, and extracting initial express address information from the express code generation request; carrying out data preprocessing on the initial express address information to obtain a target provincial address and target express address information; determining a target neural network classification model according to the target provincial address, and performing express coding prediction processing on target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value.

Description

Express delivery code generation method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of logistics, in particular to an express delivery code generation method, device, equipment and storage medium.
Background
Express codes generally refer to codes of distribution centers, distribution points, virtual waiters, express cabinets and the like, the industry generally adopts codes of one-segment codes, two-segment codes, three-segment codes and the like to express, and the express codes are important information carriers for express to flow in various areas and finally accurately reach customers.
In the prior art, it is a difficult problem in the industry to accurately calculate express codes in time according to express address information. The traditional method mainly comprises address keywords, address fences and the like. The address keyword method is easy to cause low recognition rate of express addresses due to incomplete statistics, low generation accuracy of express codes due to repeated building or road section names and the like, and low generation accuracy of the express codes and low recognition rate of the express addresses due to longitude and latitude drift, geographic environments and other factors of an address fence.
Disclosure of Invention
The invention provides an express code generation method, an express code generation device, express code generation equipment and a storage medium, which are used for generating target express code data through a target neural network classification model, and the express code generation accuracy and the express code generation efficiency are improved.
In order to achieve the above object, a first aspect of the present invention provides an express delivery code generating method, including: the method comprises the steps of obtaining an express code generation request, and extracting initial express address information from the express code generation request; carrying out data preprocessing on the initial express address information to obtain a target provincial address and target express address information; determining a target neural network classification model according to the target provincial address, and performing express coding prediction processing on the target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one to one; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value.
In a possible implementation manner, the obtaining an express delivery code generation request and extracting initial express delivery address information from the express delivery code generation request includes: receiving an express code generation request, and performing parameter analysis on the express code generation request to obtain an analysis result; verifying the parameter name and the parameter value of the analysis result to obtain a verification result; and when the verification result is that the verification is passed, reading the initial express address information from the analysis result.
In a possible implementation manner, the pre-processing the initial express address information to obtain a target provincial address and target express address information includes: deleting a space symbol from the initial express address information to obtain processed express address information, wherein the initial express address information comprises a target provincial address, a city address, a district-county address and a user actual receiving address; performing word segmentation processing on the processed express address information through a preset word segmentation tool to obtain a plurality of express address word segments; matching and analyzing the express delivery address participles according to a preset province dictionary to obtain the target province address; and segmenting the plurality of express addresses, deleting repeated words, obtaining a plurality of cleaned express addresses, and combining the plurality of cleaned express addresses into target express address information.
In a feasible implementation manner, the determining a target neural network classification model according to the target provincial address, and performing express coding prediction processing on the target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, where each prediction probability value corresponds to each express coded data one to one, includes: inquiring a preset model configuration table according to the target provincial address to obtain a target neural network classification model; transmitting the target express address information to the target neural network classification model, and performing fragment segmentation on the target express address information based on a preset N-gram window word-taking algorithm to obtain a plurality of phrase fragments, wherein the value range of N is greater than or equal to 2; respectively carrying out random initialization on the plurality of phrase segments to obtain a plurality of phrase vectors, wherein the vector dimension corresponding to each phrase vector is the dimension of a preset number, and the preset number is a positive integer; calculating an average word vector according to the plurality of phrase vectors, and determining a plurality of initial express codes corresponding to the average word vector through a full connection layer in the target neural network classification model; and performing express coding prediction processing on the average word vector and the initial express codes through a classifier in the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one.
In a possible embodiment, the obtaining a maximum predicted probability value from the plurality of predicted probability values to obtain a target predicted probability value, and determining target express delivery coded data according to the target predicted probability value includes: sequencing the prediction probability values according to the numerical value from large to small to obtain a plurality of sequenced probability values; screening a prediction probability value with the largest value from the plurality of sequenced probability values to obtain a target prediction probability value; and determining corresponding express coded data according to the target prediction probability value, and setting the express coded data corresponding to the target prediction probability value as target express coded data.
In a possible implementation manner, before the obtaining the express delivery code generation request and extracting the initial express delivery address information from the express delivery code generation request, the express delivery code generation method further includes: acquiring a plurality of signed express order data, wherein each signed express order data comprises province information, receiving address information, delivery code information of different types and signing time; respectively carrying out data cleaning processing on the plurality of signed express order data to obtain a plurality of express order sample data; dividing the sample data of the express orders according to a preset proportion and the provincial information to obtain a plurality of express order training sets and a plurality of express order testing sets, wherein each express order training set corresponds to each express order testing set one by one; performing model training and model testing on the initial neural network classification model based on each express order training set and each express order testing set to obtain a plurality of trained neural network classification models, wherein the plurality of trained neural network classification models comprise a target neural network classification model; and storing the trained neural network classification models into model files corresponding to the trained neural network classification models, and deploying the trained neural network classification models according to the model files corresponding to the trained neural network classification models.
In a feasible implementation manner, the performing data cleaning processing on the plurality of signed express order data to obtain a plurality of express order sample data includes: deleting space symbols and blank line symbols from the multiple signed express order data respectively to obtain multiple filtered express order data; carrying out character string splicing processing on different types of delivery code information in each piece of filtered express order data to obtain a target delivery code corresponding to each piece of filtered express order data; sorting the addressee information in the filtered express order data in a reverse order according to the sign-in time in the filtered express order data to obtain a plurality of sorted address information; deleting duplicate addresses from the plurality of sequenced address information to obtain a plurality of cleaned address data; respectively and sequentially performing word segmentation processing and repeated field deletion on the plurality of cleaned address data to obtain target address information corresponding to each piece of cleaned express order data; and combining the target delivery code corresponding to each piece of filtered express order data and the target address information corresponding to each piece of cleaned express order data to obtain a plurality of express order sample data.
A second aspect of the present invention provides an express delivery code generation apparatus, including: the system comprises an extraction module, a storage module and a processing module, wherein the extraction module is used for acquiring an express code generation request and extracting initial express address information from the express code generation request; the preprocessing module is used for preprocessing data of the initial express address information to obtain a target provincial address and target express address information; the prediction module is used for determining a target neural network classification model according to the target provincial address and performing express coding prediction processing on the target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one; and the determining module is used for acquiring the maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value and determining target express delivery coded data according to the target prediction probability value.
In a possible implementation manner, the extraction module is specifically configured to: receiving an express code generation request, and performing parameter analysis on the express code generation request to obtain an analysis result; verifying the parameter name and the parameter value of the analysis result to obtain a verification result; and when the verification result is that the verification is passed, reading the initial express address information from the analysis result.
In a possible embodiment, the preprocessing module is specifically configured to: deleting a space symbol from the initial express address information to obtain processed express address information, wherein the initial express address information comprises a target provincial address, a city address, a district-county address and a user actual receiving address; performing word segmentation processing on the processed express address information through a preset word segmentation tool to obtain a plurality of express address word segments; matching and analyzing the express delivery address participles according to a preset province dictionary to obtain the target province address; and segmenting the plurality of express addresses, deleting repeated words, obtaining a plurality of cleaned express addresses, and combining the plurality of cleaned express addresses into target express address information.
In a possible embodiment, the prediction module is specifically configured to: inquiring a preset model configuration table according to the target provincial address to obtain a target neural network classification model; transmitting the target express address information to the target neural network classification model, and performing fragment segmentation on the target express address information based on a preset N-gram window word-taking algorithm to obtain a plurality of phrase fragments, wherein the value range of N is greater than or equal to 2; respectively carrying out random initialization on the plurality of phrase segments to obtain a plurality of phrase vectors, wherein the vector dimension corresponding to each phrase vector is the dimension of a preset number, and the preset number is a positive integer; calculating an average word vector according to the plurality of phrase vectors, and determining a plurality of initial express codes corresponding to the average word vector through a full connection layer in the target neural network classification model; and performing express coding prediction processing on the average word vector and the initial express codes through a classifier in the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one.
In a possible implementation manner, the determining module is specifically configured to: sequencing the prediction probability values according to the numerical value from large to small to obtain a plurality of sequenced probability values; screening a prediction probability value with the largest value from the plurality of sequenced probability values to obtain a target prediction probability value; and determining corresponding express coded data according to the target prediction probability value, and setting the express coded data corresponding to the target prediction probability value as target express coded data.
In a possible implementation manner, the courier code generation apparatus further includes: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a plurality of signed express order data, and each signed express order data comprises province information, receiving address information, delivery code information of different types and signing time; the cleaning module is used for respectively cleaning the data of the plurality of signed express order data to obtain a plurality of express order sample data; the dividing module is used for dividing the sample data of the express orders according to a preset proportion and the province information to obtain a plurality of express order training sets and a plurality of express order testing sets, and the express order training sets correspond to the express order testing sets one by one; the training module is used for carrying out model training and model testing on the initial neural network classification model based on each express order training set and each express order testing set to obtain a plurality of trained neural network classification models, and the trained neural network classification models comprise a target neural network classification model; and the deployment module is used for storing the trained neural network classification models into model files corresponding to the trained neural network classification models and deploying the trained neural network classification models according to the model files corresponding to the trained neural network classification models.
In a possible embodiment, the cleaning module is specifically configured to: deleting space symbols and blank line symbols from the multiple signed express order data respectively to obtain multiple filtered express order data; carrying out character string splicing processing on different types of delivery code information in each piece of filtered express order data to obtain a target delivery code corresponding to each piece of filtered express order data; sorting the addressee information in the filtered express order data in a reverse order according to the sign-in time in the filtered express order data to obtain a plurality of sorted address information; deleting duplicate addresses from the plurality of sequenced address information to obtain a plurality of cleaned address data; respectively and sequentially performing word segmentation processing and repeated field deletion on the plurality of cleaned address data to obtain target address information corresponding to each piece of cleaned express order data; and combining the target delivery code corresponding to each piece of filtered express order data and the target address information corresponding to each piece of cleaned express order data to obtain a plurality of express order sample data.
A third aspect of the present invention provides an express delivery code generating apparatus, including: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor calls the instructions in the memory to cause the courier code generation device to execute the courier code generation method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the courier code generation method described above.
According to the technical scheme, an express code generation request is obtained, and initial express address information is extracted from the express code generation request; carrying out data preprocessing on the initial express address information to obtain a target provincial address and target express address information; determining a target neural network classification model according to the target provincial address, and performing express coding prediction processing on the target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one to one; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value. In the embodiment of the invention, a target neural network classification model is determined through a target provincial address, express coding prediction processing is carried out on target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coding data, and the identification rate of the express address is improved through the target neural network classification model; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value. The generation accuracy and the generation efficiency of the express delivery codes are improved.
Drawings
Fig. 1 is a schematic diagram of an embodiment of an express delivery code generation method in an embodiment of the present invention;
fig. 2 is a schematic diagram of another embodiment of an express delivery code generation method in the embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of an express delivery code generation device in the embodiment of the present invention;
fig. 4 is a schematic diagram of another embodiment of an express delivery code generation device in the embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of express delivery code generation equipment in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides an express code generation method, an express code generation device, express code generation equipment and a storage medium, which are used for generating target express code data through a target neural network classification model, and the express code generation accuracy and the express code generation efficiency are improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of an express delivery code generating method in the embodiment of the present invention includes:
101. and acquiring an express code generation request, and extracting initial express address information from the express code generation request.
The express delivery code generation request is used for requesting generation of codes (i.e., target express delivery code) of each preset distribution center, preset network points, each virtual salesman and each express cabinet, where the target express delivery code may be represented by a one-segment code, a two-segment code, a three-segment code or a four-segment code, or may be represented by other codes, and the specific details are not limited herein. The initial express address information is used for indicating the receiving address information of the target express, the receiving address information of the target express comprises a target provincial address, a city address, a district-county address and a user actual receiving address, and the target provincial address, the city address, the district-county address and the user actual receiving address are repeatedly combined.
Specifically, the server acquires an express code generation request, and the server decodes the express code generation request by using a uniform resource locator to obtain a decoded express code request; and the server analyzes the parameters of the decoded express delivery coding request to obtain initial express delivery address information. For example, the initial express address information may be "6 persons across from six high family homes in the flat-bridge area of Xinyang city, Henan province".
It is to be understood that the execution subject of the present invention may be an express code generation apparatus, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
102. And carrying out data preprocessing on the initial express address information to obtain a target provincial address and target express address information.
The target provincial address may be "Jilin", or "Jilin province", and is not limited herein. The target express delivery address information is used for indicating address character strings for combining the target provincial address, the city address, the district and county address and the user actual receiving address according to the sequence. Specifically, the server performs character cleaning on the initial express address information according to a preset regular expression, wherein the preset regular expression is used for deleting spaces, commas and/or other characters in the initial express address information; the method comprises the steps that a server obtains a preset address format rule and judges whether the data format of initial express address information accords with the preset address format rule or not; if the data format of the initial express address information does not accord with a preset address format rule, determining a target missing format corresponding to the initial express address information according to the preset address format rule, and filling the address information of the initial express address information according to the target missing format; the server performs semantic analysis on the initial express address information through a preset ending word segmentation tool and a preset Chinese word frequency analysis tool to obtain a plurality of express address word segmentation and word frequency statistical information, for example, the word frequency statistical information includes' words: henan province, frequency: 2 ", further comprising other information, which is not limited herein; the server extracts a target provincial address from the express address participles; the server divides words of the plurality of express addresses according to the word frequency statistical information and deletes repeated words to obtain a plurality of cleaned express addresses; and the server splices the plurality of cleaned express addresses into target express address information according to a preset address combination rule. For example, the target express address information is "6 places opposite to six high family homes in the level bridge area of Xinyang city in Henan province", and may also be "6 places opposite to six high family homes in the level bridge area of Xinyang city in Henan province", which is not limited herein.
103. And determining a target neural network classification model according to the target provincial address, and performing express coding prediction processing on target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one to one.
The target provincial address and the target neural network classification model have a one-to-one correspondence relationship, and the target neural network classification model is a model constructed by taking provinces (such as the provincial addresses including the target provincial addresses) as units so as to improve the classification effect. Specifically, the server searches a preset model configuration table according to the target provincial address to obtain the installation path information of the target model file, and loads the target neural network classification model according to the installation path information of the target model file; the server sets the target express address information as a model input parameter, inputs the model input parameter into the target neural network classification model, and sequentially performs segmentation, vectorization, vector average value processing and coding classification processing on the model input parameter through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one to one. For example, the server inputs target express address information "6 persons across from six high family homes in the flat bridge area of Xinyang city, Henan province" into the target neural network classification model C, and the output parameters of the target neural network classification model C obtained by the server include (0.90, three-segment code 1), (0.05, three-segment code 2), (0.02, three-segment code 3) and (0.001, three-segment code 4, that is, the data format of the output parameters is (each predicted probability value, each express coded data).
104. And obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value.
And the value range of each prediction probability value is greater than or equal to 0 and less than or equal to 1. Specifically, the server may use a preset sorting algorithm to sort the plurality of predicted probability values in an order from small to large to obtain a plurality of sorted probability values; and then, the server reads the prediction probability value with the maximum value from the sorted probability values to obtain a target prediction probability value, and sets the express coded data corresponding to the target prediction probability value as target express coded data.
It should be noted that the preset sorting algorithm may be a bubble sorting algorithm, a selection sorting algorithm, an insertion sorting algorithm, or a quick sorting algorithm, and may also be other sorting algorithms, which is not limited herein. The target express delivery coding data may be a three-segment code, a four-segment code, or other coding formats, and is not limited herein. For example, the server obtains a plurality of prediction probability values including 0.90, 0.05, 0.02 and 0.001, the server determines that the target prediction probability value is 0.90, and the server sets three sections of codes 1 corresponding to 0.90 as target express delivery coding data. In the model training stage of the target neural network classification model, the server continuously updates each phrase vector corresponding to the target express order training set (namely, the express order training set corresponding to the target neural network classification model) through gradient reduction of the loss function value, so that the prediction probability value corresponding to the final three-segment code (namely, the target express coding data) is large enough.
In the embodiment of the invention, a target neural network classification model is determined through a target provincial address, express coding prediction processing is carried out on target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coding data, and the identification rate of the express address is improved through the target neural network classification model; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value. The generation accuracy and the generation efficiency of the express delivery codes are improved.
Referring to fig. 2, another embodiment of the method for generating an express delivery code according to the embodiment of the present invention includes:
201. and acquiring an express code generation request, and extracting initial express address information from the express code generation request.
The initial express delivery address information comprises a target provincial address. Optionally, the server receives the express code generation request, and performs parameter analysis on the express code generation request to obtain an analysis result; the server verifies the parameter name and the parameter value of the analysis result to obtain a verification result, further, the server obtains a preset verification rule, verifies the parameter name and the parameter value of the analysis result according to the preset verification rule to obtain a verification result, judges whether the verification result is a preset value or not, and if the verification result is the preset value, the server determines that the verification result is that the verification is passed, wherein the preset value can be 1, can also be true logic, can also be other values or character strings, and is not limited in the specific place; and when the verification result is that the verification is passed, the server reads the initial express address information from the analysis result.
It should be noted that, before step 201, the server creates a target neural network classification model. Optionally, the server acquires a plurality of signed express order data, wherein each signed express order data comprises province information, addressee information, delivery code information of different types and signing time, further, the server acquires all signed order data of a certain express company in a preset time period from a preset data source, and eliminates complaint piece data, interception piece data, delivery failure piece data, return piece data, modified address piece data, timeliness test piece data, intercity communication piece data, same city face piece data and delivery data of mobile operators from all signed order data to obtain a plurality of signed express order data; the server respectively carries out data cleaning processing on the plurality of signed express order data to obtain a plurality of express order sample data; the method comprises the steps that a server divides a plurality of express order sample data according to a preset proportion and provincial information to obtain a plurality of express order training sets and a plurality of express order testing sets, wherein each express order training set corresponds to each express order testing set one by one, the preset proportion can be 6:4 or 9:1, and the method is not limited specifically; the server carries out model training and model testing on the initial neural network classification model based on each express order training set and each express order testing set to obtain a plurality of trained neural network classification models, wherein the plurality of trained neural network classification models comprise a target neural network classification model; and the server stores the trained neural network classification models into model files corresponding to the trained neural network classification models, and deploys the trained neural network classification models according to the model files corresponding to the trained neural network classification models. Further, the server extracts each province address from the province information, each province address comprises a target province address, the server obtains installation path information of each model file (namely, installation path information corresponding to each trained neural network classification model), and the server performs associated mapping on each province address and the path information of each model file and stores the mapping into a preset model configuration table.
It should be noted that the server can perform data cleaning processing on the multiple pieces of received express order data respectively to obtain multiple pieces of express order sample data. Optionally, the server deletes space symbols and blank line symbols from the multiple pieces of signed express order data to obtain multiple pieces of filtered express order data, so as to ensure that the multiple pieces of filtered express order data are not null; the server carries out character string splicing processing on different types of dispatch code information in each piece of filtered express order data to obtain a target dispatch code corresponding to each piece of filtered express order data, wherein the different types of dispatch code information can comprise two-segment code information and three-segment code information, and can also comprise two-segment code information and four-segment code information, the server combines the two-segment code information and the three-segment code information, or combines the two-segment code information and the four-segment code information to obtain a target dispatch code, and the target dispatch code can be a three-segment code or a four-segment code, and is not limited in the specific position; the server carries out reverse ordering on the addressee information in the filtered express order data according to the sign-in time in the filtered express order data (namely, according to the sequence from big to small of the sign-in time in the filtered express order data), and a plurality of ordered address information are obtained; the server deletes the duplicate address from the plurality of sequenced address information to obtain a plurality of cleaned address data; the server sequentially carries out word segmentation processing and repeated field deletion on the plurality of cleaned address data to obtain target address information corresponding to each piece of cleaned express order data; and the server combines the target delivery code corresponding to each piece of filtered express order data and the target address information corresponding to each piece of cleaned express order data to obtain a plurality of express order sample data.
Furthermore, the server stores the sample data of the express orders into a preset database in a read-write separation mode, and data read-write and storage efficiency is improved. The preset database may be a multi-bin hive, or may be a relational database mysql, which is not limited herein.
202. And carrying out data preprocessing on the initial express address information to obtain a target provincial address and target express address information.
It can be understood that the initial express delivery address information may further include a target provincial address, a city-level address, a district-level address, and an actual user receiving address, where the target provincial address, the city-level address, the district-level address, and the actual user receiving address are repeatedly combined. Therefore, the server needs to perform data preprocessing on the initial express address information. Optionally, the server deletes a space symbol from the initial express address information, where the initial express address information includes a target provincial address, a city address, a district-county address, and an actual user receiving address; the server performs word segmentation processing on the initial express address information through a preset word segmentation tool (for example, a Puku Pukuseg word segmentation tool) to obtain a plurality of express address word segments; the server performs matching analysis on the express address participles according to a preset province dictionary to obtain a target province address, wherein the preset province dictionary comprises a plurality of province names and a plurality of province codes, and each province name corresponds to each province code one to one, for example, the province code corresponding to the Heilongjiang province can be 230000; the server divides words of the plurality of express addresses, deletes repeated words, obtains a plurality of cleaned express addresses, and combines the plurality of cleaned express addresses into target express address information. For example, after the server performs data preprocessing on the initial express address information "6 persons across from six high family homes in the flat-bridge area of Xinyang city, Henan province", the target express address information obtained may be "Henan province _ Xinyang city _ flat-bridge area _ six high _ family homes _ across _6 persons.
203. And inquiring a preset model configuration table according to the target provincial address to obtain a target neural network classification model.
It is understood that different provinces correspond to different provincial addresses, which may be the same name as the provincial addresses. In this embodiment, the server pre-trains corresponding neural network classification models, i.e., each trained neural network classification model, including the target neural network classification model, for different provinces. Specifically, the server sets the target provincial address as a target key, retrieves a preset model configuration table according to the target key to obtain a retrieval result, sets the retrieval result as installation path information of the target model file when the retrieval result is not a null value, and acquires and loads the target neural network classification model according to the installation path information of the target model file. For example, when the target provincial address is north of the river, the server determines the target neural network classification model to be a, and when the target provincial address is south of the river, the server determines the target neural network classification model to be B.
204. And transmitting the target express address information to a target neural network classification model, and carrying out fragment segmentation on the target express address information based on a preset N-gram window word-taking algorithm to obtain a plurality of phrase fragments, wherein the value range of N is greater than or equal to 2.
The preset N-gram window word-taking algorithm (i.e., N-gram algorithm) is an algorithm based on a statistical language model. Specifically, the server sets the target express address information as a model input parameter and transmits the model input parameter to a target neural network classification model; the server performs sliding window operation with the size of N on the target express address information according to bytes through a preset N-element window word-taking algorithm to obtain a plurality of phrase fragments, wherein each phrase fragment is a byte fragment sequence with the length of N, and the value range of N is greater than or equal to 2. For example, the target express address information is "6 places opposite to the six high family homes in the flat bridge area of Xinyang city in Henan province", the server sets N equal to 2, and the server combines every two adjacent words in "6 places opposite to the six high family homes in the flat bridge area of Xinyang city in Henan province" into a group of words through a preset binary window word-taking algorithm (i.e., Bi-gram) to obtain 7 word group segments, i.e., "Xinyang city in Henan province", "Xinyang city flat bridge area", "flat bridge area six high", "six high family homes", "family homes opposite to the family homes", "opposite 6" and "6 places". Further, the server sets N equal to 3, and the server performs fragment segmentation on the 6 places opposite to the six high family homes in the level bridge area in Xinyang city of Henan province through a preset ternary window word-taking algorithm (namely, Tri-gram) to obtain 5 word group fragments, namely, the 5 word group fragments are obtained, the four high places in the level bridge area in Xinyang city of Henan province, the four high families in the level bridge area, the four high family homes opposite to the six family homes, and the 6 places opposite to the family homes. It is understood that the nth phrase segment is related to the N-1 words before the nth phrase segment and not related to other words.
205. Respectively carrying out random initialization on the plurality of phrase segments to obtain a plurality of phrase vectors, wherein the vector dimension corresponding to each phrase vector is the dimension of a preset number, and the preset number is a positive integer.
Specifically, the server performs vectorization processing on the plurality of phrase segments respectively through a preset bidirectional long-short term memory network Bi-LSTM (preset in a target neural network classification model), so as to obtain a plurality of phrase vectors, wherein the vector dimension corresponding to each phrase vector is a dimension of a preset number, and the preset number is a positive integer. For example, the server performs vectorization processing on 7 phrase segments "henan province Xinyang city", "Xinyang city flat bridge area", "flat bridge area six high", "six high family courtyard", "family courtyard opposite", "opposite 6", and "6 places", to obtain a phrase vector 1, a phrase vector 2, a phrase vector 3, a phrase vector 4, a phrase vector 5, a phrase vector 6, and a phrase vector 7, where vector dimensions respectively corresponding to the phrase vector 1, the phrase vector 2, the phrase vector 3, the phrase vector 4, the phrase vector 5, the phrase vector 6, and the phrase vector 7 are dimensions of a preset number, the preset number is a positive integer, and each phrase vector is a floating-point digital vector having the preset number.
It should be noted that the larger the vector dimension is, the higher the recognition rate and accuracy of the target neural network classification model for the target express address information are, but the larger the hard disk and memory resources occupied are. For example, the server may employ vector dimensions of 120, 100, 80, or 60. With the reduction of the vector dimension, the total model size, the recognition rate, the accuracy rate and the recognition rate-accuracy rate of the target neural network classification model are all reduced. Optionally, the server sets the vector dimension to 80, and the corresponding recognition rate is about 94% and the accuracy rate is about 96%.
206. And calculating an average word vector according to the plurality of phrase vectors, and determining a plurality of initial express codes corresponding to the average word vector through a full connection layer in the target neural network classification model.
Specifically, firstly, the server counts the number of a plurality of phrase vectors to obtain the total number of the vectors; the server accumulates a plurality of phrase vectors to obtain a vector value sum; the server divides the vector total number by the vector total number to obtain a plurality of phrase vectors, and calculates an average word vector, where a vector dimension corresponding to the average word vector is also a dimension of a preset number, for example, the average word vector is a vector having 80 floating-point numbers (i.e., 80 dimensions). That is, the plurality of phrase vectors are in a many-to-one relationship with the average word vector. And then, the server maps and connects the average word vector and a plurality of initial express codes through a full connection layer in the target neural network classification model, wherein the plurality of initial express codes are stored in a preset sample marking space corresponding to the target neural network classification model in advance. For example, the server performs mapping connection processing on the average word vector a and 3000 initial express codes.
207. And performing express coding prediction processing on the average word vector and the initial express codes through a classifier in the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one.
Specifically, the server takes a preset activation softmax function or a preset loss function as a classifier in the target neural network classification model, the server performs express coding prediction processing on the average word vector and the initial express codes through the classifier to obtain a plurality of prediction probability values and a plurality of express coded data, and each prediction probability value corresponds to each express coded data one to one. The preset activation softmax function may be a hierarchical softmax function (i.e., hierarchical softmax), and the preset loss function may be a negative sampling loss function (i.e., negative sampling loss). The target neural network classification model has already constructed the strong correlation between each address vector (such as average word vector) and each express coded data. When new express address information appears, the server obtains a plurality of prediction probability values and a plurality of express coding data through the operation of the target neural network classification model, and therefore the express coding prediction function is achieved. It is understood that the number of the plurality of predicted probability values and the corresponding number of the plurality of express coded data and the mapping number of the full connection layer are consistent, for example, 3000 predicted probability values and 3000 express coded data.
208. And obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value.
It can be understood that the server vectorizes the target express address information through the target neural network classification model, and then performs classification prediction processing through the classifier to obtain the target express coding data. Optionally, the server sorts the plurality of predicted probability values in an order from large to small to obtain a plurality of sorted probability values; the server screens the prediction probability value with the maximum value from the plurality of sequenced probability values to obtain a target prediction probability value; and the server determines corresponding express coded data according to the target prediction probability value, and sets the express coded data corresponding to the target prediction probability value as target express coded data. Further, the server defines a target array according to the plurality of prediction probability values; the server sets the value corresponding to the first element in the target array as an initial reference value, the server circularly traverses all the elements in the target array, and compares the value corresponding to each element in the target array with the initial reference value in sequence; and when the value corresponding to each element is larger than the initial reference value, the server updates the initial reference value with the value corresponding to each element to obtain an updated reference value, and the server acquires the updated reference value and sets the updated reference value as the target prediction probability value until the cycle is finished.
Further, the server can establish a target mapping relation for the target neural network classification model, the target express address information, the target prediction probability value and the target express coding data, and store the target mapping relation into a preset database. The server inquires a plurality of mapping relations from a preset database according to preset duration and a target neural network classification model, wherein the plurality of mapping relations comprise a target mapping relation; the server generates an express code prediction report corresponding to the target neural network classification model based on the plurality of mapping relations, sets a prediction probability value smaller than a preset probability threshold in the express code prediction report, and pushes warning information. For example, the preset probability threshold is 0.900, if the prediction probability value A in the express coding prediction report is 0.894, the server determines that the prediction probability value A is smaller than the preset probability threshold, and if the prediction probability value A is smaller than the preset probability threshold, the server sets warning information for the prediction probability value A and pushes the warning information to the target terminal. The server can set the prediction probability value smaller than the preset probability threshold value as an abnormal probability value, and retrains the corresponding neural network classification model based on the express delivery coding data and the express delivery address information corresponding to the abnormal probability value, so that the accuracy of the neural network classification model in identifying the express delivery address information is improved, and the accuracy and the efficiency of predicting the express delivery coding are improved.
In the embodiment of the invention, a target neural network classification model is determined through a target provincial address, express coding prediction processing is carried out on target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coding data, and the mapping relation between the target express address information and a plurality of phrase vectors and between the plurality of phrase vectors and the plurality of express coding data is established through the target neural network classification model, so that the recognition rate of express addresses is improved; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value. The generation accuracy and the generation efficiency of the express delivery codes are improved.
In the above description of the method for generating an express delivery code in the embodiment of the present invention, referring to fig. 3, an express delivery code generating device in the embodiment of the present invention is described below, where an embodiment of the express delivery code generating device in the embodiment of the present invention includes:
the extraction module 301 is configured to obtain an express code generation request, and extract initial express address information from the express code generation request;
the preprocessing module 302 is configured to perform data preprocessing on the initial express address information to obtain a target provincial address and target express address information;
the prediction module 303 is configured to determine a target neural network classification model according to the target provincial address, and perform express coding prediction processing on target express address information through the target neural network classification model to obtain multiple prediction probability values and multiple express coded data, where each prediction probability value corresponds to each express coded data one to one;
the determining module 304 is configured to obtain a maximum predicted probability value from the multiple predicted probability values to obtain a target predicted probability value, and determine target express delivery encoded data according to the target predicted probability value.
In the embodiment of the invention, a target neural network classification model is determined through a target provincial address, express coding prediction processing is carried out on target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coding data, and the identification rate of the express address is improved through the target neural network classification model; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value. The generation accuracy and the generation efficiency of the express delivery codes are improved.
Referring to fig. 4, another embodiment of the express delivery code generating device according to the embodiment of the present invention includes:
the extraction module 301 is configured to obtain an express code generation request, and extract initial express address information from the express code generation request;
the preprocessing module 302 is configured to perform data preprocessing on the initial express address information to obtain a target provincial address and target express address information;
the prediction module 303 is configured to determine a target neural network classification model according to the target provincial address, and perform express coding prediction processing on target express address information through the target neural network classification model to obtain multiple prediction probability values and multiple express coded data, where each prediction probability value corresponds to each express coded data one to one;
the determining module 304 is configured to obtain a maximum predicted probability value from the multiple predicted probability values to obtain a target predicted probability value, and determine target express delivery encoded data according to the target predicted probability value.
Optionally, the extracting module 301 may be further specifically configured to:
receiving an express code generation request, and performing parameter analysis on the express code generation request to obtain an analysis result;
verifying the parameter name and the parameter value of the analysis result to obtain a verification result;
and when the verification result is that the verification is passed, reading the initial express address information from the analysis result.
Optionally, the preprocessing module 302 may be further specifically configured to:
deleting a space symbol from initial express address information, wherein the initial express address information comprises a target provincial address, a city address, a district and county address and an actual user receiving address;
performing word segmentation processing on the initial express address information through a preset word segmentation tool to obtain a plurality of express address word segments;
matching and analyzing the express delivery address participles according to a preset province dictionary to obtain target province addresses;
and dividing words of the plurality of express addresses, deleting repeated words, obtaining a plurality of cleaned express addresses, and combining the plurality of cleaned express addresses into target express address information.
Optionally, the prediction module 303 may be further specifically configured to:
inquiring a preset model configuration table according to the target provincial address to obtain a target neural network classification model;
transmitting the target express address information to a target neural network classification model, and performing fragment segmentation on the target express address information based on a preset N-gram window word-taking algorithm to obtain a plurality of phrase fragments, wherein the value range of N is greater than or equal to 2;
respectively carrying out random initialization on the plurality of phrase segments to obtain a plurality of phrase vectors, wherein the vector dimension corresponding to each phrase vector is the dimension of a preset number, and the preset number is a positive integer;
calculating an average word vector according to the plurality of phrase vectors, and determining a plurality of initial express codes corresponding to the average word vector through a full connection layer in a target neural network classification model;
and performing express coding prediction processing on the average word vector and the initial express codes through a classifier in the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one.
Optionally, the determining module 304 may be further specifically configured to:
sequencing the prediction probability values in the order from large to small to obtain a plurality of sequenced probability values;
screening a prediction probability value with the largest value from the plurality of sequenced probability values to obtain a target prediction probability value;
and determining corresponding express coded data according to the target prediction probability value, and setting the express coded data corresponding to the target prediction probability value as target express coded data.
Optionally, the express delivery code generating device further includes:
an obtaining module 305, configured to obtain multiple pieces of signed express order data, where each piece of signed express order data includes province information, recipient address information, delivery code information of different types, and sign-in time;
the cleaning module 306 is configured to perform data cleaning processing on the multiple signed express order data respectively to obtain multiple express order sample data;
the dividing module 307 is configured to divide the sample data of the multiple express orders according to a preset proportion and provincial information to obtain multiple express order training sets and multiple express order test sets, where each express order training set corresponds to each express order test set one by one;
the training module 308 is configured to perform model training and model testing on the initial neural network classification model based on each express order training set and each express order testing set to obtain a plurality of trained neural network classification models, where the plurality of trained neural network classification models include a target neural network classification model;
the deployment module 309 is configured to store the plurality of trained neural network classification models into the model file corresponding to each trained neural network classification model, and deploy each trained neural network classification model according to the model file corresponding to each trained neural network classification model.
Optionally, the cleaning module 306 may be further specifically configured to:
deleting space symbols and blank line symbols from the multiple signed express order data respectively to obtain multiple filtered express order data;
carrying out character string splicing processing on different types of delivery code information in each piece of filtered express order data to obtain a target delivery code corresponding to each piece of filtered express order data;
sorting the addressee information in the filtered express order data in a reverse order according to the sign-in time in the filtered express order data to obtain a plurality of sorted address information;
deleting duplicate addresses from the plurality of sequenced address information to obtain a plurality of cleaned address data;
respectively and sequentially performing word segmentation processing and repeated field deletion on the plurality of cleaned address data to obtain target address information corresponding to each piece of cleaned express order data;
and combining the target delivery code corresponding to each piece of filtered express order data and the target address information corresponding to each piece of cleaned express order data to obtain a plurality of express order sample data.
In the embodiment of the invention, a target neural network classification model is determined through a target provincial address, express coding prediction processing is carried out on target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coding data, and the mapping relation between the target express address information and a plurality of phrase vectors and between the plurality of phrase vectors and the plurality of express coding data is established through the target neural network classification model, so that the recognition rate of express addresses is improved; and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value. The generation accuracy and the generation efficiency of the express delivery codes are improved.
The express delivery code generating device in the embodiment of the present invention is described in detail in terms of modularization in fig. 3 and 4, and the express delivery code generating device in the embodiment of the present invention is described in detail in terms of hardware processing in the following.
Fig. 5 is a schematic structural diagram of an express delivery code generating device according to an embodiment of the present invention, where the express delivery code generating device 500 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations for the courier code generation apparatus 500. Still further, the processor 510 may be configured to communicate with the storage medium 530, and execute a series of instruction operations in the storage medium 530 on the courier code generation apparatus 500.
The courier code generation apparatus 500 may also 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 service, Mac OS X, Unix, Linux, FreeBSD, and so forth. Those skilled in the art will appreciate that the courier code generation facility configuration shown in fig. 5 does not constitute a limitation of courier code generation facilities, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps of the courier code generation method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An express delivery code generation method is characterized by comprising the following steps:
the method comprises the steps of obtaining an express code generation request, and extracting initial express address information from the express code generation request;
carrying out data preprocessing on the initial express address information to obtain a target provincial address and target express address information;
determining a target neural network classification model according to the target provincial address, and performing express coding prediction processing on the target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one to one;
and obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining target express coded data according to the target prediction probability value.
2. The express delivery code generation method of claim 1, wherein the obtaining an express delivery code generation request and extracting initial express delivery address information from the express delivery code generation request includes:
receiving an express code generation request, and performing parameter analysis on the express code generation request to obtain an analysis result;
verifying the parameter name and the parameter value of the analysis result to obtain a verification result;
and when the verification result is that the verification is passed, reading the initial express address information from the analysis result.
3. The express delivery code generation method according to claim 1, wherein the pre-processing the initial express delivery address information to obtain a target provincial address and target express delivery address information includes:
deleting a space symbol from the initial express address information to obtain processed express address information, wherein the initial express address information comprises a target provincial address, a city address, a district-county address and a user actual receiving address;
performing word segmentation processing on the processed express address information through a preset word segmentation tool to obtain a plurality of express address word segments;
matching and analyzing the express delivery address participles according to a preset province dictionary to obtain the target province address;
and segmenting the plurality of express addresses, deleting repeated words, obtaining a plurality of cleaned express addresses, and combining the plurality of cleaned express addresses into target express address information.
4. The express delivery code generation method according to claim 1, wherein the determining a target neural network classification model according to the target provincial address, and performing express delivery code prediction processing on the target express delivery address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express delivery code data, wherein each prediction probability value corresponds to each express delivery code data one to one, includes:
inquiring a preset model configuration table according to the target provincial address to obtain a target neural network classification model;
transmitting the target express address information to the target neural network classification model, and performing fragment segmentation on the target express address information based on a preset N-gram window word-taking algorithm to obtain a plurality of phrase fragments, wherein the value range of N is greater than or equal to 2;
respectively carrying out random initialization on the plurality of phrase segments to obtain a plurality of phrase vectors, wherein the vector dimension corresponding to each phrase vector is the dimension of a preset number, and the preset number is a positive integer;
calculating an average word vector according to the plurality of phrase vectors, and determining a plurality of initial express codes corresponding to the average word vector through a full connection layer in the target neural network classification model;
and performing express coding prediction processing on the average word vector and the initial express codes through a classifier in the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one.
5. The express delivery code generation method according to claim 1, wherein the obtaining a maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value, and determining the target express delivery code data according to the target prediction probability value includes:
sequencing the prediction probability values according to the numerical value from large to small to obtain a plurality of sequenced probability values;
screening a prediction probability value with the largest value from the plurality of sequenced probability values to obtain a target prediction probability value;
and determining corresponding express coded data according to the target prediction probability value, and setting the express coded data corresponding to the target prediction probability value as target express coded data.
6. The courier code generation method of any of claims 1 to 5, wherein before the obtaining of the courier code generation request and the extracting of the initial courier address information from the courier code generation request, the courier code generation method further comprises:
acquiring a plurality of signed express order data, wherein each signed express order data comprises province information, receiving address information, delivery code information of different types and signing time;
respectively carrying out data cleaning processing on the plurality of signed express order data to obtain a plurality of express order sample data;
dividing the sample data of the express orders according to a preset proportion and the provincial information to obtain a plurality of express order training sets and a plurality of express order testing sets, wherein each express order training set corresponds to each express order testing set one by one;
performing model training and model testing on the initial neural network classification model based on each express order training set and each express order testing set to obtain a plurality of trained neural network classification models, wherein the plurality of trained neural network classification models comprise a target neural network classification model;
and storing the trained neural network classification models into model files corresponding to the trained neural network classification models, and deploying the trained neural network classification models according to the model files corresponding to the trained neural network classification models.
7. The express delivery code generation method according to claim 6, wherein the step of performing data cleaning processing on the plurality of signed express delivery order data to obtain a plurality of express delivery order sample data includes:
deleting space symbols and blank line symbols from the multiple signed express order data respectively to obtain multiple filtered express order data;
carrying out character string splicing processing on different types of delivery code information in each piece of filtered express order data to obtain a target delivery code corresponding to each piece of filtered express order data;
sorting the addressee information in the filtered express order data in a reverse order according to the sign-in time in the filtered express order data to obtain a plurality of sorted address information;
deleting duplicate addresses from the plurality of sequenced address information to obtain a plurality of cleaned address data;
respectively and sequentially performing word segmentation processing and repeated field deletion on the plurality of cleaned address data to obtain target address information corresponding to each piece of cleaned express order data;
and combining the target delivery code corresponding to each piece of filtered express order data and the target address information corresponding to each piece of cleaned express order data to obtain a plurality of express order sample data.
8. An express delivery code generation device, characterized in that the express delivery code generation device includes:
the system comprises an extraction module, a storage module and a processing module, wherein the extraction module is used for acquiring an express code generation request and extracting initial express address information from the express code generation request;
the preprocessing module is used for preprocessing data of the initial express address information to obtain a target provincial address and target express address information;
the prediction module is used for determining a target neural network classification model according to the target provincial address and performing express coding prediction processing on the target express address information through the target neural network classification model to obtain a plurality of prediction probability values and a plurality of express coded data, wherein each prediction probability value corresponds to each express coded data one by one;
and the determining module is used for acquiring the maximum prediction probability value from the plurality of prediction probability values to obtain a target prediction probability value and determining target express delivery coded data according to the target prediction probability value.
9. An express delivery code generation device, characterized in that the express delivery code generation device includes: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the courier code generation device to perform the courier code generation method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing a courier code generation method according to any one of claims 1-7.
CN202110399814.7A 2021-04-14 2021-04-14 Express delivery code generation method, device, equipment and storage medium Pending CN113191707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110399814.7A CN113191707A (en) 2021-04-14 2021-04-14 Express delivery code generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110399814.7A CN113191707A (en) 2021-04-14 2021-04-14 Express delivery code generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113191707A true CN113191707A (en) 2021-07-30

Family

ID=76973959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110399814.7A Pending CN113191707A (en) 2021-04-14 2021-04-14 Express delivery code generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113191707A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116502974A (en) * 2023-06-25 2023-07-28 深圳市恒顺合鑫科技有限公司 Logistics information analysis method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5950317B1 (en) * 2016-02-25 2016-07-13 有限会社Ics Sakabe Code recognition system, code recognition method, code recognition program, and package sorting system
CN112364651A (en) * 2020-10-21 2021-02-12 上海东普信息科技有限公司 Express bill two-segment code generation method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5950317B1 (en) * 2016-02-25 2016-07-13 有限会社Ics Sakabe Code recognition system, code recognition method, code recognition program, and package sorting system
CN112364651A (en) * 2020-10-21 2021-02-12 上海东普信息科技有限公司 Express bill two-segment code generation method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHANG Y.: "The application of artificial intelligence in logistics and express delivery", JOURNAL OF PHYSICS: CONFERENCE SERIES, pages 1325 *
王然: "快递面单高效地址辨识数字化编码设计研究", 全国商情, no. 28, pages 19 - 21 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116502974A (en) * 2023-06-25 2023-07-28 深圳市恒顺合鑫科技有限公司 Logistics information analysis method, device, equipment and storage medium
CN116502974B (en) * 2023-06-25 2024-01-12 深圳市恒顺合鑫科技有限公司 Logistics information analysis method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111783419B (en) Address similarity calculation method, device, equipment and storage medium
CN112632292A (en) Method, device and equipment for extracting service keywords and storage medium
CN111241241A (en) Case retrieval method, device and equipment based on knowledge graph and storage medium
CN107145516B (en) Text clustering method and system
CN109165273B (en) General Chinese address matching method facing big data environment
CN110968654A (en) Method, equipment and system for determining address category of text data
CN113033198B (en) Similar text pushing method and device, electronic equipment and computer storage medium
CN113778894B (en) Method, device, equipment and storage medium for constructing test cases
CN114003721A (en) Construction method, device and application of dispute event type classification model
CN113268615A (en) Resource label generation method and device, electronic equipment and storage medium
CN112883730A (en) Similar text matching method and device, electronic equipment and storage medium
CN115357904A (en) Multi-class vulnerability detection method based on program slice and graph neural network
CN115146062A (en) Intelligent event analysis method and system fusing expert recommendation and text clustering
CN113191707A (en) Express delivery code generation method, device, equipment and storage medium
CN113486664A (en) Text data visualization analysis method, device, equipment and storage medium
CN112560425A (en) Template generation method and device, electronic equipment and storage medium
CN115146653B (en) Dialogue scenario construction method, device, equipment and storage medium
CN116340781A (en) Similarity determination method, similarity prediction model training method and device
CN115438340A (en) Mining behavior identification method and system based on morpheme characteristics
CN114610882A (en) Abnormal equipment code detection method and system based on electric power short text classification
CN114398069A (en) Method and system for identifying accurate version of public component library based on cross fingerprint analysis
CN113535883A (en) Business place entity linking method, system, electronic device and storage medium
CN112488200A (en) Logistics address feature extraction method, system, equipment and storage medium
CN113449510B (en) Text recognition method, device, equipment and storage medium
CN113434760B (en) Construction method recommendation method, device, equipment and storage medium

Legal Events

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