CN116433114A - Logistics community village group prediction method, device, computer equipment and readable medium - Google Patents

Logistics community village group prediction method, device, computer equipment and readable medium Download PDF

Info

Publication number
CN116433114A
CN116433114A CN202111673323.3A CN202111673323A CN116433114A CN 116433114 A CN116433114 A CN 116433114A CN 202111673323 A CN202111673323 A CN 202111673323A CN 116433114 A CN116433114 A CN 116433114A
Authority
CN
China
Prior art keywords
community
village group
address
sample
community village
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
CN202111673323.3A
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.)
Fengtu Technology Shenzhen Co Ltd
Original Assignee
Fengtu Technology Shenzhen 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 Fengtu Technology Shenzhen Co Ltd filed Critical Fengtu Technology Shenzhen Co Ltd
Priority to CN202111673323.3A priority Critical patent/CN116433114A/en
Publication of CN116433114A publication Critical patent/CN116433114A/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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/243Natural language query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Remote Sensing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a logistics community village group prediction method, a device and a computer readable medium, wherein the method comprises the following steps: acquiring an address text to be processed; carrying out vectorization processing on words of different address levels in the address text and word levels corresponding to the words to obtain a spliced vector formed by combining word vectors and corresponding word level vectors; inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text; the invention predicts the community/village group based on the deep learning technology, and can improve the generalization capability and accuracy of community/village group identification, thereby saving the cost and expenditure of the whole logistics.

Description

Logistics community village group prediction method, device, computer equipment and readable medium
Technical Field
The invention belongs to the technical field of logistics, and particularly relates to a logistics community village group prediction method, a device, computer equipment and a readable medium.
Background
In a complete logistics distribution system, the community/village group is the final range of the courier to receive and dispatch the mail to the home. The accurate distribution of the courseware to the community/village group, i.e., the logistics network point, near the recipient address is a very critical ring throughout the logistics distribution cycle, beginning with customer order. However, some clients can provide clear standard addresses when making an order, but some users cannot provide standard addresses, and address information is partially lost, conflicted, mistaken and the like, so that couriers cannot directly extract effective community/village group information from the order addresses of the clients, and follow-up dispatch service is affected.
The conventional solution is to build and maintain a white list address library (dictionary) according to the existing address, pre-determine address text matching rules, and then match the address with the existing address in the white list address library based on the matching rules after obtaining the address provided by the client, so as to obtain an accurate address. However, the greatest disadvantage of the rule matching is that a dictionary and matching rules need to be maintained, chinese address writing methods are various, the maintenance cost of an address library is high, and the identification accuracy of a community/village group is low.
Disclosure of Invention
Aiming at least one defect or improvement requirement of the prior art, the invention provides a logistics community village group prediction method, a device, computer equipment and a readable medium, which can improve the identification accuracy of community village groups and reduce maintenance cost.
To achieve the above object, according to a first aspect of the present invention, there is provided a logistics community village group prediction method, comprising:
acquiring an address text to be processed;
carrying out vectorization processing on words of different address levels and word levels corresponding to the words in the address text to obtain spliced vectors formed by combining word vectors and corresponding word level vectors, wherein different word vectors correspond to different spliced vectors;
Inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text; the community village group prediction model is obtained by training sample address texts with community village group data labels, and each sample address text is provided with one community village group data label.
Preferably, in the method for predicting a logistics community village group, the obtaining at least one community village group data corresponding to the address text further includes:
when the community village group prediction model outputs community village group data corresponding to the address text, the community village group data is used as finally output community village group data;
when the community village group prediction model outputs a plurality of community village group data corresponding to the address text,
judging whether the confidence coefficient with the maximum value in the confidence coefficient corresponding to each community village group data is larger than a preset first threshold value;
if yes, the community village group data corresponding to the confidence coefficient with the largest value is used as finally output community village group data;
otherwise, judging whether the sum of the confidence degrees of N before the numerical value size sorting is larger than a preset second threshold value; if the value is larger than a preset second threshold value, taking a plurality of community village group data corresponding to the confidence coefficient of N before the numerical value size sorting as a plurality of finally output community village group data; wherein N is a positive integer greater than 1.
Preferably, the method for predicting the logistics community village group further comprises the following steps:
and if the address text to be processed is not greater than the preset second threshold value, performing similarity matching on the address text to be processed and the preset dictionary address, and extracting community village group data from the matched preset dictionary address.
Preferably, in the method for predicting a community village group, the training process of the community village group prediction model includes:
acquiring a first sample address text set, wherein each first sample address text in the first sample address text set is provided with at least one community village group label;
carrying out vectorization processing on words with different address levels in the first sample address text and word levels corresponding to the words to obtain a sample splicing vector formed by combining sample word vectors and corresponding sample word level vectors;
obtaining first training samples according to sample splicing vectors corresponding to the first sample address text and at least one community village group label, and summarizing the first training samples to form a first training sample set;
and performing model training according to the first training sample set to obtain a trained community village group prediction model.
Preferably, in the method for predicting a community village group, the model training is performed according to the first training sample set to obtain a trained community village group prediction model, including:
Generating corresponding community village group prediction data according to the sample splicing vector through a community village group prediction model to be trained;
calculating errors between the community village group prediction data and corresponding community village group labels, and reversely adjusting model parameters of the community village group prediction model to be trained according to the errors;
and returning to the step of generating corresponding community village group prediction data according to the sample splicing vector by the community village group prediction model to be trained, and continuing to execute until the iteration stopping condition is met, stopping iteration, and obtaining the trained community village group prediction model.
Preferably, the community village group prediction model includes a first neural network layer and a second neural network layer, and the method for logistics community village group prediction specifically includes:
extracting features of the sample splicing vectors through the first neural network layer to obtain corresponding global feature vectors;
processing the global feature vector through the second neural network layer to obtain a corresponding maximum pooling feature vector, an average pooling feature vector and a weight feature vector;
Generating at least one candidate community village group according to the maximum pooling feature vector, the average pooling feature vector and the weight feature vector, wherein each candidate community village group has a corresponding confidence;
and selecting the candidate community village group corresponding to the confidence with the largest value as community village group prediction data.
Preferably, the reversely adjusting the model parameters of the community village group prediction model to be trained according to the error includes:
calculating an influence factor of each sample word vector in the sample splicing vector and a corresponding sample word level vector on community village group prediction data output by a community village group prediction model;
and for the sample word vector with the influence factor larger than a preset value, increasing the output weight of the corresponding network node in the community village group prediction model.
According to a second aspect of the present invention, there is also provided a logistics community village group prediction apparatus, comprising:
the acquisition module is used for acquiring the address text to be processed;
the vector generation module is used for carrying out vectorization processing on words with different address levels and word levels corresponding to the words in the address text to obtain spliced vectors formed by combining word vectors and corresponding word level vectors, and different word vectors correspond to different spliced vectors;
The prediction module is used for inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text; the community village group prediction model is obtained by training sample address texts with community village group data labels, and each sample address text is provided with one community village group data label.
According to a third aspect of the present invention there is also provided a computer device comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program which, when executed by the processing unit, causes the processing unit to perform the steps of any of the methods described above.
According to a fourth aspect of the present invention there is also provided a computer readable medium storing a computer program executable by a computer device, the computer program, when run on the computer device, causing the computer device to perform the steps of any one of the methods described above.
In general, the above technical solutions conceived by the present invention, compared with the prior art, enable the following beneficial effects to be obtained:
(1) According to the logistics community village group prediction method, the device, the computer equipment and the readable medium, after the address text to be processed is obtained, vectorization processing is carried out on words with different address levels in the address text and word levels corresponding to the words, so that a spliced vector formed by combining word vectors and corresponding word level vectors is obtained; inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text; the irregular address text is processed through the trained community village group prediction model, missing or wrong community/village group data in the address text can be rapidly and accurately identified, and generalization capability and accuracy of community/village group identification can be improved.
(2) The method can be applied to any scene with address prediction requirements of the community/village group, can form complementation with the traditional matching algorithm, increases the index of the whole system on community/village group prediction, reduces the error division situation of the community/village group, and saves the cost of dispatching; in addition, the model iteration is simple, full-time investment of operation and maintenance personnel is not needed, and labor cost is saved.
Drawings
FIG. 1 is a schematic diagram of a composition architecture of a logistics community village group prediction system provided by an embodiment of the present invention;
fig. 2 is a schematic diagram of a composition structure of a server according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for predicting a logistics community village group according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a network structure of a community village group prediction model according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a scenario of training set preparation, model training and community village group prediction in a logistics community village group prediction method provided by an embodiment of the invention;
FIG. 6 is a logic block diagram of a logistics community village group prediction apparatus provided by an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
The logistics community village group prediction scheme provided by the application is suitable for processing the nonstandard address text provided by the client and giving out the accurate community/village group information corresponding to the address text, so that the courier can accurately distribute the express to the community/village group near the receiving address, and a foundation is provided for subsequent dispatching to the user.
For ease of understanding, a system scenario to which the logistics community village group prediction scheme provided herein is applicable will be described first, with reference to fig. 1, which shows a schematic diagram of a composition architecture of a logistics community village group prediction system of the present application.
The system can comprise: the terminal 100 and the server 200 are connected to each other by a network. The server 200 obtains the address text to be processed, and the address text may be directly input into the server 200 or the terminal 100 may be sent to the server 200 through a network; the server 200 processes the address text to obtain at least one community village group data corresponding to the address text; the server 200 issues the at least one community village group data to the terminal 100 through the network, and the courier holding the terminal 100 can acquire the corresponding community/village group data in time through the application interface on the terminal 100 to execute the subsequent dispatch operation.
The terminal 100 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the terminal 100 may collect a mailing address provided by a user and send it to the server 200 for processing; further, the terminal 100 may have a function of scanning and recognizing a handwriting address, and processing the handwriting address into address text information, and the like.
It should be noted that the above description uses a server as an independent server, but it is understood that in practical application, the server may be replaced by a server cluster or a distributed cluster formed by a plurality of servers.
In order to implement the corresponding functions on the server, a computer program for implementing the corresponding functions needs to be stored in a memory of the server. In order to facilitate understanding of the hardware configuration of each server, the following description will be given by taking the server as an example. As shown in fig. 2, a schematic structural diagram of a server according to the present application, the server 200 in this embodiment may include: a processor 201, a memory 202, a communication interface 203, an input unit 204, a display 205, and a communication bus 206.
The processor 201, the memory 202, the communication interface 203, the input unit 204, the display 205, and the communication bus 206 are all used to perform communication.
In this embodiment, the processor 201 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, an off-the-shelf programmable gate array, or other programmable logic device.
The processor 201 may call a program stored in the memory 202. In particular, the processor 201 may perform the operations performed at the server side in the following embodiments of the logistics community village group prediction method.
The memory 202 is used to store one or more programs, and the programs may include program code that includes computer operation instructions, and in this embodiment, at least the programs for implementing the following functions are stored in the memory:
acquiring an address text to be processed;
carrying out vectorization processing on words of different address levels and word levels corresponding to the words in the address text to obtain spliced vectors formed by combining word vectors and corresponding word level vectors, wherein different word vectors correspond to different spliced vectors;
inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text; the community village group prediction model is obtained by training sample address texts with community village group data labels, and each sample address text is provided with one community village group data label.
In one possible implementation, the memory 202 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, and at least one application program required for functions (such as text vectorization processing), and the like; the stored data area may store data created during use of the computer, such as word vectors, word level vectors, splice vectors, and community village group prediction models and samples, among others.
In addition, memory 202 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state storage device.
The communication interface 203 may be an interface of a communication module, such as an interface of a GSM module.
Of course, the structure of the server shown in fig. 2 does not limit the server in the embodiments of the present application, and the server may include more or fewer components than shown in fig. 2 or may combine some components in practical applications.
With reference to fig. 3, the present embodiment shows a flow chart of a method for predicting a logistics community village group, where the method in the present embodiment includes the following steps:
step 301, obtaining an address text to be processed.
The address text to be processed is address data with the conditions of community/village group information missing, community/village group information conflict, error and the like, wherein the community/village group information is important information for determining which logistics network point is allocated in a logistics distribution system, and the logistics network points are places for mass material storage, transportation and distribution; for example, the address text to be processed is: hong Shanou the celluloid is named road 312 No. 1; in the address text, community information is missing, which is not beneficial for couriers to quickly lock target delivery areas.
In a specific example, the server receives an address text processing request sent by the terminal, and parses the address text processing request to obtain an address text to be processed.
In a specific example, the address text to be processed may be manually input by a user, or may be automatically acquired by the server, for example, when the address text processing condition is met, the server acquires the address text to be processed from a preset receiving and dispatching bill address library. It should be noted that the pick-up and dispatch waybill address library may be a word library independent of the full-scale address library, which is dedicated to storing address text that requires community/village group predictions.
The address text processing condition is a condition or basis for triggering an address text processing operation, specifically, may be that a request instruction of address text processing sent by a terminal is received, or a preset duration is reached since the previous triggering of the address text processing operation, or a newly added address text to be processed appears in a dispatch bill address library is detected, which is not limited herein specifically. And the terminal generates a request instruction of address text processing according to the address text processing triggering operation of the user and sends the request instruction to the server. The preset duration may be customized, such as 1 hour.
In one embodiment, address text may be subjected to address word segmentation to obtain each word of different address levels and a word level corresponding to the word level, where the word level corresponds to the address level. The address word segmentation process is mainly based on the special attribute that addresses have different address levels, address texts are split into words with different address levels, the numerical value of the address levels reflects the size of a corresponding geographic position area, and in general, the larger the geographic position area is, the smaller the numerical value of the address level can be set, for example, the address level of province can be set to be 1, and the address level corresponding to a region can be set to be 2. For example, the normalized address text is: the local part of the Lawsonia of Wuhan in Hubei province is the No. 312 1-tree, and the address data obtained by performing address word segmentation processing on the address text is: the method comprises the following steps of (1) in Hubei province, (2) in Wuhan city, (3) in Heshan region, (Yu Lu) 9|312 in Lap-11|1) in Lap-province, (14) in Hubei province, (1) in Hubei province, the word is "Hubei province," and the word level of the word is 1.
In one embodiment, the server invokes a preset address word segmentation system to perform address word segmentation on the normalized address text to obtain corresponding address data. The address word segmentation system can adopt an open source word segmentation system such as jieba word segmentation, halimasch word segmentation and the like, and the scheme is not particularly limited; because the open source word segmentation systems such as jieba word segmentation and halibut word segmentation belong to word segmentation tools for solving general texts, in the field of address word segmentation, a person skilled in the art can train a special address word segmentation model according to the naming rule of an address, so that the word segmentation effect of the address is better, a large number of address texts are acquired in the embodiment, planning processing is carried out on the address texts to serve as training samples, the address word segmentation model is obtained through training of the training samples, and later, word segmentation processing is carried out on the address texts after standardization processing through the address word segmentation model obtained through training, and the address texts are segmented into: provinces, cities, regions, streets, roads, road numbers, campuses, buildings, units, house numbers, and the like.
It is easy to understand that, since the address word segmentation system is usually trained based on some learning models, standard address texts are used as training samples during training, so that the address texts that can be processed usually need to be standardized, while the address texts to be processed that are taken by the server are usually address texts provided by each client during the delivery and receiving of the express, address writing habits of different clients are easy to generate address texts that do not conform to the standard, so that the address texts to be processed need to be standardized before the address word segmentation, that is, after the step S301, before the address word segmentation processing, the method for predicting the logistics community village group may further include: and normalizing the address text.
Among these normalization processes are, but are not limited to, elimination of invalid illegal characters (such as characters that are not used at all in standardized address text), number English normalization, multiple reduction, elimination of duplicate content, bracketed content processing, suffix content processing, and the like.
And 302, carrying out vectorization processing on words of different address levels and word levels corresponding to the words in the address text to obtain spliced vectors formed by combining word vectors and word level vectors, wherein different word vectors correspond to different spliced vectors.
Where word vectors refer to vectors corresponding to individual words of different address levels, such as vectors corresponding to the word "flood mountain region". Specifically, the server traverses each word of the different address levels in the filtered address text and generates a word vector corresponding to each word traversed.
The word level vector refers to a word level vector corresponding to words of different address levels in the address text, and the word level (corresponding to the address level) is a word level vector formed by pre-configuring, for example, word level "3" corresponding to the word "flood mountain area". Specifically, the server traverses word levels corresponding to words of different address levels in the filtered address text and generates word level vectors of the word levels corresponding to each word.
The splicing vector can be formed by combining and splicing a word vector and a word level vector corresponding to the word vector, for example, the word vector corresponding to the flood mountain area and the word level vector corresponding to the word level 3 are spliced to obtain the splicing vector. Specifically, the server traverses word vectors corresponding to each word of different address levels in the filtered address text and word level vectors thereof, and splices to generate splice vectors corresponding to each word.
In one embodiment, the vectorization process includes the steps of converting high-dimensional characters into low-dimensional vectors, and combining and stitching the converted vectors. The server can convert words and word levels in the address text into word vectors and word level vectors through a trained vector model, and splice the vectors into splice vectors through a set combination splice rule. The training step of the vector model comprises the following steps: obtaining a plurality of sample address texts, performing address word segmentation on the plurality of sample address texts to obtain an address text corpus, and training an initialized vector model by utilizing each word and word level in the address text corpus to obtain a trained vector model. In this embodiment, the machine learning algorithm adopted in the training process of the vector model is a network structure of Word2Vec, doc2Vec, CRNN or Text-CNN.
For example, if the address text after word segmentation is: the word vectors processed by the vector model are in turn: v (flood mountain area), V (celluloid Yu Lu), V (312), V (1 span), wherein "V (flood mountain area)" characterizes a word vector corresponding to the word "flood mountain area". The word-level vectors are in turn: v (3), V (9), V (11), V (14), wherein, taking "V (3)" as an example, the term "V (3)" characterizes the word vector of the word class "3" corresponding to the word "flood mountain area".
In one embodiment, the above-mentioned splicing and combining rule may be set manually, for example, if the word vector is V (flood mountain area) and the corresponding word level vector is V (3), the splicing vector obtained by combining the word vector and the corresponding word level vector is V (flood mountain area).
According to the scheme, word-level vectorization is added on the basis of word vectorization, and a spliced vector of the word vector and the word-level vector is used as an input parameter of a community village group prediction model. The method has the advantages that: each word after the address word segmentation has a hierarchical relationship, word level information representing the hierarchical relationship is substituted into a word vector, so that the model is more sensitive to the word segmentation position of the address, and address information with the same word but different corresponding word levels in different address texts can be effectively distinguished.
Because different word vectors correspond to different splice vectors, that is, a plurality of splice vectors are input into the community village group prediction model, before the splice vectors are input into the model, the splice vectors can be firstly sequenced from large to small based on word level, and then input after a splice vector sequence is obtained, for example, the splice vector sequence can be: v (Lawsonia area A3), V (Lopa nationality Yu Lu A9), (312 # 11), (1 st. Times.14).
In addition, after the step S301, the logistics community village group prediction method may further include:
and carrying out vectorization processing on each word generated by words of different address levels in the address text and the word level corresponding to the word to obtain an expansion splicing vector formed by combining a word vector and a word level vector.
The word vector refers to a vector corresponding to a single word, specifically, the server traverses each word in each word of different address levels in the address text, and generates a word vector corresponding to each traversed word. For example: the word vectors corresponding to each word in the word "flood mountain area" are respectively: v (flood), V (mountain), V (zone);
since the word level corresponding to each word is the same as the word level of the word to which it belongs, the word level vectors corresponding to the word vectors of the plurality of words belonging to the same word are also the same. Specifically, the server traverses word levels corresponding to each word in words of different address levels in the address text, and generates a corresponding word level vector for each word in the words. For example: the word class corresponding to the word "flood mountain area" is "3", and the word vector V (flood), V (mountain) and the word class vector corresponding to V (area) are both V (3) for each word in the hierarchical word "flood mountain area".
The server traverses and filters the word vector corresponding to each word in the address text and the word level vector thereof, and splices the word vectors to generate a spliced vector corresponding to each word. For example: the expansion splicing vectors obtained by combining each word vector with the corresponding word level vector are as follows in sequence: v (flood-3), V (mountain-3), V (zone-3), V (Lopa-9), V (self-evident-9), V (road-9), V (3-11), V (1-11), V (2-11), V (number-11), V (1-14), V (span-14).
At this time, the vector in the subsequent input community village group prediction model may be a target spliced vector sequence formed by combining the spliced vector and the extended spliced vector, that is, the logistics community village group prediction method may further include:
ordering the expansion splicing vectors formed by the word vectors and the word-level vectors to obtain an expansion splicing vector sequence;
sequencing the spliced vectors formed by the word vectors and the word-level vectors to obtain a spliced vector sequence;
and combining the extended splicing vector sequence with the splicing vector sequence to serve as a target splicing vector sequence of an input prediction model.
For example: the address text is: the vector sequence of the splice is as follows, where the flood mountain area is 3|Lopa Yu Lu, 9|312, 11|1, 14: v (flood mountain area ζ3), V (Lopa Yu Lu ζ9), (312 scale A11), (1 scale A14), the extended splice vector sequence may be: v (flood-3), V (mountain-3), V (zone-3), V (Lopa-9), V (self-evident-9), V (road-9), V (3-11), V (1-11), V (2-11), V (number-11), V (1-14), V (span-14), the target splice vector sequence may be: { V (Lap-3), V (zone-3), V (Lopa-9), V (self-evident-9), V (Lopa-9), V (3-11), V (1-11), V (2-11), V (No. 11), V (1-14), V (Tong-14) }, V (SEP), { V (Lap-3), V (Lopa-Yu Lu-9), (312-11), (1-14) }.
Step 303, inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text;
the community village group data comprises community data and/or village group data, different logistics network points generally correspond to different community village group data, and the logistics network points to which express items with the address text belong can be distinguished through the community village group data. The community village group prediction model is obtained by training a sample address text set with community village group labels, each sample address text in the sample address text set is provided with at least one community village group label, and after each sample address text is processed into a splicing vector, the community village group label corresponding to the splicing vector is input into the community village group prediction model.
It is to be readily understood that, when the extended splice vector is also generated in the above step S302, the target splice vector sequence formed by combining the extended splice vector and the splice vector may be used as an input vector for inputting the community prediction model.
Taking the spliced vector as an input vector of a community prediction model as an example, the community village group prediction model is a model which is obtained by training based on a first training sample set obtained in advance and can be used for obtaining a corresponding community village group according to the spliced vector prediction. The first training sample set comprises a first sample splicing vector and a sample label corresponding to the first sample address text. The first sample splice vector is a vector formed by combining vectors of each word and corresponding word level in the first sample address text, and the forming process of the first sample splice vector is the same as that of the splice vector. The sample label is at least one community/village group data which is expected to be output, and the community/village group data serving as the training label of the first sample address text is not limited to one, and the reason is that part of the receiving and dispatching part address is positioned at the juncture position of two adjacent communities/village groups and can be attributed to any community/village group; thus, the sample tag for this portion of the sample address may be set to any one community/village group, or two or more adjacent community village groups may each be set to a tag.
Illustrating: the first sample address text is: hong Shanou Lou self-evident road 312 number 1, the corresponding sample label is the community data to which it belongs: a seven-two community residence; preferably, corresponding street data can be added in community data serving as sample labels, and label conflicts caused by the fact that the street data are added in the labels can be avoided when communities/village groups of different samples are renamed; for example: optimizing the sample label as follows: lopa nationality street-seven two community living convention.
Specifically, in a model training stage, a server acquires a first sample address text set, each first sample address text in the first sample address text set has a preconfigured first sample label, vectorization processing is carried out on each first sample address text to obtain a corresponding first sample splicing vector, a first training sample set is obtained according to the first sample splicing vector corresponding to each first sample address text and the first sample label, and model training is carried out according to the first training sample set to obtain a trained community village group prediction model. In the model application stage, after a server generates a corresponding splicing vector for an address text to be processed, the splicing vector is input into a trained community village group prediction model, the address text is processed according to the splicing vector through the community village group prediction model, and corresponding community/village group data is predicted and output. In this embodiment, firstly, a community village group prediction model is trained based on a first training sample set, and address text is processed through the trained community village group prediction model, so that missing or wrong community/village group data in the address text can be rapidly and accurately identified, and generalization capability and accuracy of community/village group identification can be improved.
In one embodiment, the training process of the community village group prediction model comprises: acquiring a plurality of first sample address texts (i.e., a first sample address text set), wherein each first sample address text has at least one community village group label; carrying out vectorization processing on each word of different address levels and the word level corresponding to each word in the first sample address text to obtain a sample splicing vector formed by combining a sample word vector and a sample word level vector; obtaining a first training sample set according to a sample splicing vector corresponding to the first sample address text and at least one community village group label; and performing model training according to the first training sample set to obtain a trained community village group prediction model.
In one embodiment, the server obtains full-size address data for at least half a year from a shipping bill address library, obtains full-size address data from a national address standard library, and obtains a plurality of first sample address texts based on the obtained full-size address data. Wherein, the full address data refers to all address data meeting the acquisition requirement.
In a specific example, performing model training according to the first training sample set to obtain a trained community village group prediction model specifically includes:
Generating corresponding community village group prediction data according to the sample splicing vector through a community village group prediction model to be trained; calculating errors between community village group prediction data and corresponding community village group labels, namely correspondingly setting a loss function of the community village group prediction model, wherein the loss function is a key element which is the most basic in machine learning, and the loss function plays a role in: and measuring the quality of model prediction. The loss function is used to represent the difference between the predicted value and the actual value, in this embodiment, the predicted value is the predicted data of the community village group, and the actual value is the data tag of the community village group. And (3) bringing the predicted value and the actual value of the community village group prediction model into a loss function to obtain an error between the predicted value and the corresponding actual value.
Then, reversely adjusting model parameters of a community village group prediction model to be trained according to the error; and returning to the step of generating corresponding community village group prediction data according to the sample splicing vector by the community village group prediction model to be trained, and continuing to execute until the iteration stopping condition is met, stopping iteration, and obtaining the trained community village group prediction model.
Further, reversely adjusting the model parameters of the community village group prediction model to be trained according to the error specifically comprises: calculating influence factors of each sample word vector (i.e. the vector corresponding to the word in the first sample address text) and the corresponding word-level vector (i.e. the vector corresponding to the word level) in the sample splicing vector on the community village group prediction data output by the community village group prediction model, and increasing the output weight of the sample word vector (sample word) with the influence factor being larger than a preset value in the corresponding network node in the community village group prediction model, wherein different influence factors represent that the correlation between the corresponding sample word vector and the community village group data expected to be output is different, and in general, the larger the influence of the sample word vector with the higher correlation on the accuracy of the community village group data finally output (i.e. the larger the influence factor is), so that the community village group prediction model can be endowed with different output weights for the sample word vectors with different influence factors.
In one embodiment, the community village group prediction model includes a first neural network layer and a second neural network layer;
the first neural network layer is used as an input node of a community village group prediction model and is mainly used for receiving a sample spliced vector sequence and carrying out recursive feature extraction and convolution feature extraction on the sample spliced vector sequence to generate a spliced and fused global feature vector;
the second neural network layer is mainly used for receiving the global feature vector generated by the first neural network layer, obtaining a maximum pooling feature vector sequence, an average pooling feature vector sequence and a weight feature vector sequence through maximum pooling, average pooling and attention weight distribution respectively, and performing splicing and fusion on the maximum pooling feature vector sequence, the average pooling feature vector sequence and the weight feature vector sequence to generate at least one candidate community village group, wherein each candidate community village group has corresponding confidence.
At this time, the step of generating the corresponding community village group prediction data according to the sample splicing vector through the community village group prediction model to be trained specifically includes: carrying out feature extraction and calculation on the sample spliced vector through a community village group prediction model to be trained to obtain a corresponding maximum pooling feature vector sequence, an average pooling feature vector sequence and a weight feature vector sequence; generating at least one candidate community village group data according to the maximum pooling feature vector sequence, the average pooling feature vector sequence and the weight feature vector sequence, wherein each candidate community village group data has a corresponding confidence; and selecting the candidate community village group data with the highest confidence as community village group prediction data.
The confidence is used to characterize the probability that the candidate community village group data is an actual community village group (i.e., the probability calculated by the community village group prediction model), and the candidate community village group with the highest confidence is generally selected as the community village group prediction data. Model parameters of the community village group prediction model to be trained can be reversely adjusted according to errors between the community village group prediction data (i.e. the predicted value) with the maximum confidence and the community village group data tag (i.e. the actual value), and single iteration training of the community village group prediction model is completed. Repeating the steps until the iteration stopping condition is met, and completing model training. The iteration stop condition, such as the number of iterations being greater than or equal to the iteration number threshold, and further, such as the loss function corresponding to a single iteration having been minimized, is not specifically limited herein.
In a specific example, please refer to fig. 4, fig. 4 is a schematic diagram of a network structure of the community village prediction model provided in the present embodiment. The first neural network layer comprises an LSTM (Long short-term memory) network layer and a IDCNN (Iterated Dilated CNN) network layer, and the second neural network layer comprises an average pooling layer, a maximum pooling layer and an Attention network layer; LSTM is a long and short term memory network, which is used as a variant of a cyclic neural network and can better explain the relation between long sequence texts and sequences; IDCNN is a hollow convolutional neural network, mainly a variant of the convolutional neural network, and can extract relevant information in a key way; attention is Attention weight calculation, and important input points can be focused in the network iteration process. Because of the hierarchical relationship of the segmentation words in the address text, the LSTM and IDCNN network is better.
The main function of the Attention network layer is to calculate the influence degree (i.e. influence factor) of each level of information in the global input address vector on the finally predicted community/village group, and different weights are given to different word levels according to the influence degree. The weight of the words with high relevance to the community/village group is added in the Attention network layer, for example, 13-level POI (Point of Interest, interest point) words, 9-level road words and 11-level road number words are word levels with relatively large influence on the community/village group prediction, and the weight of the word levels is added, so that the accuracy rate of the community/village group prediction is improved.
In this embodiment, the second network layer in the community village group prediction model uses the maximum pooling layer and the average pooling layer at the same time, and performs a connection operation on the respective output maximum pooling feature vector and average pooling feature vector, and because the address belongs to a short text, the adoption of such pooling operation is beneficial to preserving more upper-layer feature information.
Further, a Mask layer is added to the Attention network layer, and the Mask layer is mainly used for filtering word levels which frequently occur but are not important for community/village group prediction, such as 'flood mountain areas'.
Further, dropout layers are added in the average pooling layer and the maximum pooling layer respectively, and are used for randomly inactivating neurons, so that overfitting of the model can be prevented, and generalization capability of the model is improved.
In one embodiment, when training the community village group prediction model according to the model training manner provided in one or more embodiments of the present application, training parameters of the model, such as a learning rate of a network, a model update rate, an empirical cache size, an action selection coefficient, a coefficient decay rate, and the like, are adaptively adjusted, which are not limited herein.
In order to accelerate the model training time as much as possible and reduce the model size as much as possible, the embodiment performs self-optimization on the learning rate as the training parameter in the model training process; specifically, an initial learning rate is predefined, a loss function of the iteration is calculated in each iteration training, and if the loss function of a plurality of continuous iterations is unchanged, the initial learning rate is reduced according to a preset attenuation amplitude. In this embodiment, when a certain batch of iterative training is performed or it is monitored that the change of the loss function is not large, the learning rate is automatically reduced, so that the best convergence point is mainly found, because the gradient change is small when the loss function is about to converge, and if the learning rate is kept unchanged, the found convergence point has an error. For example: defining the initial learning rate as 0.1, and if no change or little change of the loss function of the continuous three-time iterative training is detected, attenuating the initial learning rate by 10%, and updating to 0.9.
In one embodiment, after training a community village group prediction model, a server generates a corresponding spliced vector for an address text to be processed, inputs the spliced vector into the trained community village group prediction model, processes the address text according to the spliced vector through the community village group prediction model, and predicts to obtain corresponding one or more community/village group data and a confidence coefficient corresponding to each community/village group data; in this embodiment, the community village group prediction model outputs the most likely one to three communities/village groups according to the confidence coefficient.
In one embodiment, after predicting at least one community village group data corresponding to the address text, the method further includes:
when the community village group prediction model outputs community village group data corresponding to the address text, the server takes the community village group data as finally output community village group data;
when the community village group prediction model outputs a plurality of community village group data corresponding to the address text, the server judges whether the confidence coefficient with the largest value in the confidence coefficient corresponding to each community village group data is larger than a preset first threshold value; if yes, the server takes the community village group data corresponding to the confidence coefficient with the largest value as finally output community village group data; otherwise, the server judges whether the sum of the confidence degrees of N before the numerical value size sorting is larger than a preset second threshold value; if the value is larger than a preset second threshold value, taking a plurality of community village group data corresponding to the confidence coefficient of N before the numerical value size sorting as a plurality of finally output community village group data; wherein N is a positive integer greater than 1.
And if the address text to be processed is not greater than the preset second threshold value, performing similarity matching on the address text to be processed and the preset dictionary address, and extracting community village group data from the matched preset dictionary address. When the values of N are different, the magnitudes of the corresponding second thresholds may also be different.
In a specific example, the magnitude relation of the first threshold and the second threshold is not particularly limited, and for example, the first threshold is set to 0.8 and the second threshold is set to 0.95. Preferably, N has a value of 2 or 3. After sequencing the plurality of community village group data according to the confidence, if the confidence corresponding to the community village group data with the highest confidence is larger than 0.8, the server only takes the community village group data with the highest confidence as one community village group data finally output; if the confidence coefficient corresponding to the community village group data with the highest confidence coefficient is not more than 0.8, calculating whether the sum of the confidence coefficient of the two community village group data with the first two digits of the confidence coefficient ordering is more than 0.95, and if so, outputting the two community village group data with the first two digits of the confidence coefficient ordering; the TOP-K output provided by the scheme is particularly suitable for ambiguous pickup addresses which can belong to a plurality of community/village groups.
Otherwise, if the sum of confidence degrees of two community village group data of the first two digits of the confidence degree sequencing is not more than 0.95, which indicates that the community/village group predicted by the model may deviate from the actual community/village group, discarding the community/village group data output by the community village group prediction model by the server, performing similarity matching on the address text to be processed and the dictionary according to a preset address matching rule, if the similarity between the address text to be processed and the dictionary address is more than a preset similarity threshold, successfully matching, and directly extracting the community village group data from the dictionary address successfully matched as missing or wrong community/village group information in the address text to be processed.
In one embodiment, the logistics community village group prediction method further comprises: when the updating condition of the community village group prediction model is met, a second training sample set is obtained; the second training sample set comprises a second sample splicing vector sequence and a sample label corresponding to a second sample address text; and carrying out iterative updating on the community village group prediction model according to the second training sample set to obtain an updated community village group prediction model, and taking the updated community village group prediction model as a trained community village group prediction model.
The model update condition is a condition or basis for triggering the model update operation, specifically, a model update instruction sent by the terminal is received, or a specified duration is reached from the last time of triggering the model update operation. The appointed duration is 6 months, and as new addresses can appear continuously, the trained community village group prediction model needs to be updated regularly according to a preset period, so that generalization capability and robustness of the community village group prediction model to the new addresses are improved.
Specifically, the server takes the newly added address text in the address library as a second sample address text, and configures a community village group tag for the second sample address text; carrying out vectorization processing on each word of different address levels and word levels corresponding to each word in the second sample address text, and carrying out vectorization processing on each word of different address levels and word levels corresponding to each word to obtain a second sample spliced vector formed by combining a plurality of vectors; forming a second sample splicing vector sequence according to a second sample splicing vector corresponding to the second sample address text; and the server acquires a second training sample set according to a second sample splicing vector sequence and a second sample label corresponding to each second sample address text, iteratively updates the trained community village group prediction model according to the second training sample set and a similar process of model training, and takes the updated community village group prediction model as the trained community village group prediction model when the subsequent address text is processed.
In the above embodiment, iterative update training is performed on the trained community village group prediction model according to the model update condition, so as to further improve the accuracy of model prediction, generalization capability and robustness of the new address.
In a preferred example, before step S302, that is, before vectorizing the address text processed in step S301, the method further includes the following processing steps:
the address text processed in step S301 is compared with the address in the pre-configured whitelist address library, where the whitelist address library is mainly used to store the address text with the model prediction error and the community/village group corresponding to the address text, that is, the address text with the model past prediction error or lower accuracy is stored in the whitelist address library, and a mapping relationship is established for the address text to match with the accurate community/village group by means of manual searching or dictionary matching. Specifically, after acquiring a new address text to be processed, the server firstly matches the address text with addresses in a white list address library, judges whether the address text to be processed belongs to an address where the model is likely to predict errors, if so, identifies a community/village group corresponding to the address text according to the white list address library without inputting a community village group prediction model for processing, and avoids wasting calculation resources of the model.
In one embodiment, for address texts which are not successfully matched with addresses in the white list address library, the server processes the address texts to be processed according to a preset filtering rule, and aims at filtering out invalid addresses; if the address text to be processed does not belong to the invalid address, inputting the address text to be processed into a trained community village group prediction model, and performing community/village group prediction recognition.
In one embodiment, as shown in fig. 5, fig. 5 provides a schematic view of a scenario of training set preparation, model training, and community village group prediction in a logistics community village group prediction method; the method comprises the steps that a server obtains a training set, the training set comprises sample address texts and sample community village group labels corresponding to the sample address texts, and normalization processing is carried out on the training set before model training; then, converting the normalized sample address text into a sample splicing vector, wherein the sample splicing vector is formed by vectorizing each Word of different address levels in the sample address text and the Word level corresponding to the Word, for example, vectorizing the Word by Word2Vec to obtain a sample splicing vector formed by combining a sample Word vector and a sample Word level vector; and then training a community village group prediction model through the spliced vector. The server takes the tensorsurface platform as a main framework of model training, namely, trains a community village group prediction model based on the tensorsurface platform, and stores the trained community village group prediction model as a tensorsurface platform savedmodel. When the trained community village group prediction model is deployed online to provide web services, the server uses the labstack/echo framework of the Golang language to deploy the savedmodel of the tensorflow platform. The Golang is selected because the Golang has an API (application program interface) specially calling a tensorf low platform, is convenient to use, and the labstack/echo framework is good in high-concurrency multithreading optimization, so that the web service performance of the deployed model can be maximized.
In one embodiment, according to the training mode of the community village group prediction model provided in one or more embodiments of the present application, corresponding community village group prediction models are respectively trained for 300 cities throughout the country, and the community village group prediction models respectively trained for each city are deployed to the same server, where the server can cover processing of address texts corresponding to each address in all cities based on the deployed community village group prediction models, that is, can provide community/village group prediction functions of address texts corresponding to addresses of any city. The same server may be a single server, such as a single 256G memory server, or may be a server cluster formed by multiple servers.
In one embodiment, as shown in fig. 6, there is provided a logistics community village group prediction apparatus 500, comprising: an acquisition module 501, a vector generation module 502, a prediction module 503, and an output module 504 and a preprocessing module 505, wherein:
an obtaining module 501, configured to obtain an address text to be processed;
the vector generation module 502 is configured to perform vectorization processing on words of different address levels in the address text and word levels corresponding to the words, so as to obtain a spliced vector formed by combining word vectors and word level vectors;
The prediction module 503 is configured to input the spliced vector into a trained community village group prediction model, so as to obtain at least one community village group data corresponding to the address text; the community village group prediction model is obtained by training sample address texts with community village group data labels, and each sample address text is provided with one community village group data label.
In a preferred embodiment, the acquisition module 501 is further configured to: the acquired address text is normalized, and the processed address text is input to the vector generation module 502.
In one embodiment, the logistics community village group prediction apparatus 500 further includes: a model training module;
the model training module is used for: acquiring a first sample address text, wherein the first sample address text is provided with at least one community village group label; vectorizing the first sample address text to obtain a sample splicing vector; obtaining a first training sample set according to a sample splicing vector corresponding to the first sample address text and at least one community village group label; and performing model training according to the first training sample set to obtain a trained community village group prediction model.
In one embodiment, the model training module is further to: generating corresponding community village group prediction data according to the sample splicing vector through a community village group prediction model to be trained; calculating errors between community village group prediction data and corresponding community village group labels, and reversely adjusting model parameters of the community village group prediction model to be trained according to the errors; and continuing to execute the step of generating corresponding community village group prediction data according to the sample splicing vector through the community village group prediction model to be trained until the iteration stopping condition is met, stopping iteration, and obtaining a trained community village group prediction model.
In one embodiment, the model training module is further to: when the updating condition of the community village group prediction model is met, a second training sample set is obtained; the second training sample set comprises a second sample splicing vector and a sample label corresponding to a second sample address text; and carrying out iterative updating on the community village group prediction model according to the second training sample set to obtain an updated community village group prediction model, and taking the updated community village group prediction model as a trained community village group prediction model.
In a preferred embodiment, the logistics community village group prediction apparatus 500 further comprises: an output module 504;
the output module 504 is configured to: when the community village group prediction model outputs community village group data corresponding to the address text, the community village group data is used as finally output community village group data;
when the community village group prediction model outputs a plurality of community village group data corresponding to the address text, the output module 504 judges whether the confidence coefficient with the largest value in the confidence coefficient corresponding to each community village group data is larger than a preset first threshold value; if yes, community village group data corresponding to the confidence coefficient with the largest value is used as community village group data which is finally output; otherwise, judging whether the sum of the confidence coefficient of N before the numerical value size sorting is larger than a preset second threshold value; if the value is larger than a preset second threshold value, taking a plurality of community village group data corresponding to the confidence coefficient of N before the numerical value size sorting as a plurality of community village group data finally output; wherein N is a positive integer greater than 1.
If the address text is not greater than the preset second threshold, the output module 504 performs similarity matching on the address text to be processed and the preset dictionary address, and extracts community village group data from the matched preset dictionary address.
In a preferred embodiment, the logistics community village group prediction apparatus 500 further comprises: a pre-processing module 505;
the preprocessing module 505 is used for: and matching the address text provided by the acquisition module 501 with the address in the white list address library, judging whether the address text to be processed belongs to the address where the model is likely to predict errors, and if so, identifying the community/village group corresponding to the address text according to the white list address library. The white list address library is mainly used for storing address texts with model prediction errors and community/village groups corresponding to the address texts, and establishing a mapping relation for the community/village groups with accurate address text matching through a manual searching or dictionary matching mode.
Further, the preprocessing module 505 is further configured to: processing the address text to be processed according to a preset filtering rule for the address text which is not successfully matched with the address in the white list address library, and filtering invalid addresses; if the address text to be processed does not belong to an invalid address, the preprocessing module 505 sends the address text to the vector generation module 502 for vectorization processing, the processed address data is input into a trained community village group prediction model, and community/village group prediction recognition is performed by the community village group prediction model.
For specific limitations on the logistics community village group prediction apparatus, reference may be made to the above limitation on the logistics community village group prediction method, and the details are not repeated here. The various modules in the logistics community village group prediction device can be fully or partially implemented by software, hardware and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
It will be readily appreciated by those skilled in the art that the foregoing description is merely a preferred embodiment of the invention and is not intended to limit the invention, but any modifications, equivalents, improvements or alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A method for predicting a logistics community village group, comprising:
Acquiring an address text to be processed;
carrying out vectorization processing on words of different address levels and word levels corresponding to the words in the address text to obtain spliced vectors formed by combining word vectors and corresponding word level vectors, wherein different word vectors correspond to different spliced vectors;
inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text; the community village group prediction model is obtained by training sample address texts with community village group data labels, and each sample address text is provided with one community village group data label.
2. The logistics community village group prediction method as defined in claim 1, further comprising, after obtaining the at least one community village group data corresponding to the address text:
when the community village group prediction model outputs community village group data corresponding to the address text, the community village group data is used as finally output community village group data;
when the community village group prediction model outputs a plurality of community village group data corresponding to the address text, judging whether the confidence coefficient with the largest value in the confidence coefficient corresponding to each community village group data is larger than a preset first threshold value;
If yes, the community village group data corresponding to the confidence coefficient with the largest value is used as finally output community village group data;
otherwise, judging whether the sum of the confidence degrees of N before the numerical value size sorting is larger than a preset second threshold value; if the value is larger than a preset second threshold value, taking a plurality of community village group data corresponding to the confidence coefficient of N before the numerical value size sorting as a plurality of finally output community village group data; wherein N is a positive integer greater than 1.
3. The logistics community village group prediction method as defined in claim 2, further comprising:
and if the address text to be processed is not greater than the preset second threshold value, performing similarity matching on the address text to be processed and the preset dictionary address, and extracting community village group data from the matched preset dictionary address.
4. The logistics community village group prediction method as defined in claim 1, wherein the training process of the community village group prediction model comprises:
acquiring a first sample address text set, wherein each first sample address text in the first sample address text set is provided with at least one community village group label;
carrying out vectorization processing on words with different address levels and word levels corresponding to the words in the first sample address text to obtain sample splicing vectors formed by combining sample word vectors and corresponding sample word level vectors, wherein different sample word vectors correspond to different sample splicing vectors;
Obtaining first training samples according to sample splicing vectors corresponding to the first sample address text and at least one community village group label, and summarizing the first training samples to form a first training sample set;
and performing model training according to the first training sample set to obtain a trained community village group prediction model.
5. The logistics community village group prediction method as defined in claim 4, wherein the performing model training according to the first training sample set to obtain a trained community village group prediction model comprises:
generating corresponding community village group prediction data according to the sample splicing vector through a community village group prediction model to be trained;
calculating errors between the community village group prediction data and corresponding community village group labels, and reversely adjusting model parameters of the community village group prediction model to be trained according to the errors;
and returning to the step of generating corresponding community village group prediction data according to the sample splicing vector by the community village group prediction model to be trained, and continuing to execute until the iteration stopping condition is met, stopping iteration, and obtaining the trained community village group prediction model.
6. The logistics community village group prediction method as claimed in claim 5, wherein the community village group prediction model comprises a first neural network layer and a second neural network layer, and the generating the corresponding community village group prediction data according to the sample splicing vector through the community village group prediction model to be trained specifically comprises:
Extracting features of the sample splicing vectors through the first neural network layer to obtain corresponding global feature vectors;
processing the global feature vector through the second neural network layer to obtain a corresponding maximum pooling feature vector, an average pooling feature vector and a weight feature vector;
generating at least one candidate community village group according to the maximum pooling feature vector, the average pooling feature vector and the weight feature vector, wherein each candidate community village group has a corresponding confidence;
and selecting the candidate community village group corresponding to the confidence with the largest value as community village group prediction data.
7. The logistics community village group prediction method as defined in claim 5, wherein said inversely adjusting model parameters of said community village group prediction model to be trained based on said error comprises:
calculating an influence factor of each sample word vector in the sample splicing vector and a corresponding sample word level vector on community village group prediction data output by a community village group prediction model;
and for the sample word vector with the influence factor larger than a preset value, increasing the output weight of the corresponding network node in the community village group prediction model.
8. A logistics community village group prediction device, comprising:
the acquisition module is used for acquiring the address text to be processed;
the vector generation module is used for carrying out vectorization processing on words of different address levels in the address text and word levels corresponding to the words to obtain spliced vectors formed by combining word vectors and corresponding word level vectors, and different word vectors correspond to different spliced vectors;
the prediction module is used for inputting the spliced vector into a trained community village group prediction model to obtain at least one community village group data corresponding to the address text; the community village group prediction model is obtained by training sample address texts with community village group data labels, and each sample address text is provided with one community village group data label.
9. A computer device comprising at least one processing unit, and at least one storage unit, wherein the storage unit stores a computer program which, when executed by the processing unit, causes the processing unit to perform the steps of the method of any of claims 1 to 7.
10. A computer readable medium, characterized in that it stores a computer program executable by a computer device, which computer program, when run on the computer device, causes the computer device to perform the steps of the method according to any one of claims 1-7.
CN202111673323.3A 2021-12-31 2021-12-31 Logistics community village group prediction method, device, computer equipment and readable medium Pending CN116433114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111673323.3A CN116433114A (en) 2021-12-31 2021-12-31 Logistics community village group prediction method, device, computer equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111673323.3A CN116433114A (en) 2021-12-31 2021-12-31 Logistics community village group prediction method, device, computer equipment and readable medium

Publications (1)

Publication Number Publication Date
CN116433114A true CN116433114A (en) 2023-07-14

Family

ID=87080201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111673323.3A Pending CN116433114A (en) 2021-12-31 2021-12-31 Logistics community village group prediction method, device, computer equipment and readable medium

Country Status (1)

Country Link
CN (1) CN116433114A (en)

Similar Documents

Publication Publication Date Title
CN110827929B (en) Disease classification code recognition method and device, computer equipment and storage medium
CN111461637A (en) Resume screening method and device, computer equipment and storage medium
CN110598070B (en) Application type identification method and device, server and storage medium
CN113298197B (en) Data clustering method, device, equipment and readable storage medium
CN112632278A (en) Labeling method, device, equipment and storage medium based on multi-label classification
CN112052670B (en) Address text word segmentation method, device, computer equipment and storage medium
CN113505190B (en) Address information correction method, device, computer equipment and storage medium
CN113591881B (en) Intention recognition method and device based on model fusion, electronic equipment and medium
CN114329004A (en) Digital fingerprint generation method, digital fingerprint generation device, data push method, data push device and storage medium
CN112579774B (en) Model training method, model training device and terminal equipment
CN116433114A (en) Logistics community village group prediction method, device, computer equipment and readable medium
CN114861818A (en) Main data matching method, device, equipment and storage medium based on artificial intelligence
CN116414808A (en) Method, device, computer equipment and storage medium for normalizing detailed address
CN114328894A (en) Document processing method, document processing device, electronic equipment and medium
CN109918583B (en) Task information processing method and device
CN109885647B (en) User history verification method, device, electronic equipment and storage medium
CN116431656A (en) Road identification method and device based on big data, computer equipment and readable medium
CN110968685B (en) Commodity name collection method and device
CN112052673A (en) Logistics network point identification method and device, computer equipment and storage medium
CN116415551A (en) Sensitive word detection method, device, computer equipment and readable medium
CN116384386A (en) POI-based address type identification method, device and storage medium
CN116886991B (en) Method, apparatus, terminal device and readable storage medium for generating video data
CN112507126B (en) Entity linking device and method based on recurrent neural network
CN113792163B (en) Multimedia recommendation method and device, electronic equipment and storage medium
Yin Personalized advertisement push method based on semantic similarity and data mining

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