Loading and unloading point evaluation model training method, recommendation method, device and equipment

By constructing a loading and unloading point evaluation model including an input layer, an embedding layer, a factor weighting layer, an attention layer, a noise reduction layer and a nonlinear training layer, the accuracy of the loading and unloading point recommendation model in the existing technology in complex scenarios is solved. and insufficient fitting capabilities, achieving accurate and rapid assessment in complex geographical scenarios, significantly improving business results.

CN118761697APending Publication Date: 2024-10-11SHENZHEN YISHIHUOLALA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411057213.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing loading and unloading point recommendation models are difficult to accurately evaluate in complex geographical scenarios, and their fitting capabilities are insufficient to meet the needs of freight loading and unloading point recommendation.

Method used

A pre-trained evaluation model consisting of an input layer, an embedding layer, a factor weighting layer, an attention layer, a noise reduction layer, a nonlinear training layer and a gradient control layer is used to train through the joint action of these layers to ensure that the model performs well in complex scenarios. Fast convergence and accurate evaluation, and comes with a noise reduction mechanism and multi-scale expression.

Benefits of technology

It achieves accurate and fast loading and unloading point assessment in complex geographical scenarios, avoids the problem of gradient jitter caused by noise, improves the model's anti-noise ability and fitting ability, and significantly improves business results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761697A_ABST
    Figure CN118761697A_ABST
Patent Text Reader

Abstract

The invention provides a loading and unloading point evaluation model training method and device, a recommendation method and device and equipment. The model training method comprises the steps of obtaining a training sample set; and training a pre-training evaluation model by using the training sample set, wherein the pre-training evaluation model comprises an input layer, an embedded layer, a factor weighting layer, an attention layer, a noise reduction layer, a nonlinear training layer and a gradient control layer. According to the model training method, an evaluation model composed of seven core modules including an input layer, an embedded layer, a factor weighting layer, an attention layer, a noise reduction layer, a nonlinear training layer and a gradient control layer is constructed, through the combined action of the seven layers, it is guaranteed that the whole model can be rapidly and smoothly converged, accurate evaluation on loading and unloading points is achieved, and the evaluation efficiency is improved. The model has a noise reduction mechanism and multi-scale expression, can prevent strong gradient jitter caused by noise, avoids the problem that a loss value cannot be reduced, and can still accurately and quickly evaluate loading and unloading points in some complex geographical scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of loading and unloading point recommendation, and in particular to a loading and unloading point evaluation model training method, recommendation method, device and equipment. Background Art

[0002] In freight scenarios, the user's choice of loading and unloading points directly affects the difficulty of meeting the driver and the cargo. The recommendation of loading and unloading points needs to take into account the user's historical behavior, geographical location, local transportation capacity distribution, order time, and point transparency. In terms of geographical location alone, it is necessary to consider the differences in loading and unloading locations of points of interest such as schools, logistics parks, hospitals, and supermarkets. Due to the complexity and diversity of freight meeting scenarios, the precise ranking model for loading and unloading point recommendation has high requirements and challenges in selection and modeling.

[0003] In the face of the above problems, the patent "Training method and device for recommendation model, method and device for loading and unloading point recommendation" (CN114331266A) proposed a model training method for loading and unloading point recommendation scenario, including sample construction, label annotation, feature construction, etc., but did not specify which model to use, the detailed model structure, and the semantics that each structure needs to capture, resulting in the inability to quickly implement the freight loading and unloading point recommendation scenario. The patent "Marketing activity prediction model structure and prediction method based on deep factor decomposition machine" (CN112884513A) proposed the use of deepFM model to predict marketing activities, and added an integrated network layer to the final output, but the structure of the FM model itself has not been greatly changed. The network structure of its nonlinear training layer is just an ordinary neural network, and no unnecessary modifications have been made. However, the data noise of the freight loading and unloading point recommendation scenario is very large, and the scenarios are very diverse. The deepFM model proposed in the patent cannot meet the modeling requirements in the freight loading and unloading point recommendation scenario, and it is difficult to implement directly. Summary of the invention

[0004] In view of the above defects of the prior art, the present invention provides a loading and unloading point evaluation model training method, recommendation method and device, and equipment to solve the technical problem that the existing model cannot recommend loading and unloading points well.

[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a loading and unloading point evaluation model training method, comprising: obtaining a training sample set, the training sample set comprising a plurality of training samples, each training sample comprising a plurality of scene dimension identifiers, a candidate point identifier list, continuous features and manual evaluation results of target candidate points; using the training sample set to train a pre-trained evaluation model, the pre-trained evaluation model comprising an input layer, an embedding layer, a factor weighting layer, an attention layer, a noise reduction layer, a nonlinear training layer and a gradient control layer; wherein, during training: the scene dimension identifier and the candidate point identifier list of the training sample are input into the embedding layer through the input layer to obtain an embedding vector; the embedding vector is input into the In the factor weighting layer, the embedding vector is factor-weighted; the embedding vector is input into the attention layer to obtain the attention weight; the continuous features of the training sample are input into the denoising layer for denoising to obtain the continuous features after denoising; the attention weight and the continuous features after denoising are concatenated, and the concatenated features are input into the nonlinear training layer for high-order feature extraction and implicit crossover processing; the outputs of the factor weighting layer and the nonlinear training layer are fused to obtain the model prediction results of the target candidate points; according to the manual evaluation results and the model prediction results of the target candidate points, the parameters of the pre-trained evaluation model are updated using the gradient control layer to obtain the loading and unloading point evaluation model.

[0006] In one embodiment of the present invention, the scene dimension identifier and the candidate point identifier list of the training sample are input into the embedding layer through the input layer to obtain an embedding vector, including: mapping the scene dimension identifier and the candidate point identifier list of the training sample to subscript values ​​by hashing; and obtaining the embedding vector from the initialized embedding table according to the subscript value corresponding to each identifier.

[0007] In one embodiment of the present invention, the scene dimension identifier includes a user code, a point of interest code, an H3 grid code of a target candidate point, a city code where the user is located, and an H3 grid code of a user requested location; the candidate point identifier list includes an H3 grid code list of all candidate points and a road code list of the candidate points; the embedding vector is input into the factor weighting layer to perform factor weighting on the embedding vector, including: processing the embedding vector by the following formula: Where w0 is the learnable bias term, w i is the learnable weight corresponding to the i-th encoding class feature, v i is the embedding vector corresponding to the i-th encoding of the training sample, w j is and v i The same length of learnable weight vectors, n is the number of embedding vectors, m is wj The number of vectors; the feature y is layer-normalized and summed up and pooled in turn.

[0008] In one embodiment of the present invention, the embedding vector is input into the attention layer to obtain the attention weight, including: splicing the embedding vectors corresponding to all the codes in the scene dimension identifier to obtain the query vector representation of the attention layer; splicing the embedding vectors corresponding to the H3 grid codes of all candidate points to obtain the key vector representation and value vector representation of the attention layer; obtaining the attention weight according to the query vector representation, key vector representation and value vector representation of the attention layer.

[0009] In one embodiment of the present invention, the continuous features include the user's historical order frequency, and / or the user's order time, and / or the distance from the target candidate point to the requested location; the continuous features of the training samples are input into the denoising layer for denoising to obtain the denoised continuous features, including: inputting the continuous features of the training samples into the denoising layer, using a large value constraint algorithm, and / or a logarithmic and square root compression algorithm, and / or a multi-hot encoding algorithm to perform denoising to obtain the denoised continuous features.

[0010] In one embodiment of the present invention, the nonlinear training layer includes three alternating batch normalization layers and a neural network, and the activation function of the neural network is ReLU; splicing the attention weights and the continuous features after denoising, and inputting the spliced ​​features into the nonlinear training layer for high-order feature extraction and implicit cross processing, including: splicing the attention weights and the continuous features after denoising, and inputting the spliced ​​features into three alternating batch normalization layers and a neural network for high-order feature extraction and implicit cross processing.

[0011] In one embodiment of the present invention, the parameters of the pre-trained evaluation model are updated using the gradient control layer according to the manual evaluation results and the model prediction results of the target candidate points, including: calculating the loss value using a loss function according to the manual evaluation results and the model prediction results of the target candidate points, wherein the loss value includes variables; calculating the partial derivatives of the variables; obtaining the gradient according to the partial derivatives and the learning rate; clipping the gradient according to the L2 regularization value of the gradient tensor and the set gradient threshold; and updating the parameters of the pre-trained evaluation model according to the clipped gradient value.

[0012] To achieve the above-mentioned purpose and other related purposes, the present invention also provides a method for recommending loading and unloading points, comprising: receiving a user request; obtaining a list of candidate loading and unloading points based on the user request, wherein the list of candidate loading and unloading points includes multiple candidate loading and unloading points; evaluating multiple candidate loading and unloading points using a loading and unloading point evaluation model trained using the above-mentioned loading and unloading point evaluation model training method to obtain an evaluation result for each of the candidate loading and unloading points; and obtaining a list of recommended loading and unloading points based on the evaluation results of the multiple candidate loading and unloading points.

[0013] To achieve the above-mentioned purpose and other related purposes, the present invention also provides a loading and unloading point recommendation device, including: a request receiving module, used to receive user requests; a retrieval module, used to obtain a list of candidate loading and unloading points according to the user request, wherein the list of candidate loading and unloading points includes multiple candidate loading and unloading points; a loading and unloading point evaluation model, wherein the loading and unloading point evaluation model is trained using the above-mentioned loading and unloading point evaluation model training method, and is used to evaluate multiple candidate loading and unloading points to obtain an evaluation result for each of the candidate loading and unloading points; and a recommendation module, used to obtain a recommended loading and unloading point list according to the evaluation results of the multiple candidate loading and unloading points.

[0014] To achieve the above-mentioned purpose and other related purposes, the present invention also provides an electronic device, including a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the method provided in any one of the above-mentioned embodiments.

[0015] To achieve the above object and other related objects, the present invention further provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is used to enable a computer to execute the method provided in any one of the above embodiments.

[0016] Beneficial effects of the present invention: The present invention proposes a loading and unloading point evaluation model training method, recommendation method, device and equipment. The model training method constructs a pre-trained evaluation model composed of seven core modules: input layer, embedding layer, factor weighting layer, attention layer, noise reduction layer, nonlinear training layer and gradient control layer. Through the joint action of these seven layers, it is guaranteed that the entire model can converge quickly and smoothly during training, and the loading and unloading points can be accurately evaluated. The model has its own noise reduction mechanism and multi-scale expression, which can prevent the strong jitter of the gradient caused by noise and avoid the problem that the loss value cannot be reduced, so that in some complex geographical scenarios, the loading and unloading points can still be accurately and quickly evaluated. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A general flow chart of a method for training a loading and unloading point evaluation model provided by an embodiment of the present invention;

[0019] Figure 2 A model structure diagram provided for an embodiment of the present invention;

[0020] Figure 3 A training step diagram provided for an embodiment of the present invention;

[0021] Figure 4 A flowchart of obtaining an embedding vector provided by an embodiment of the present invention;

[0022] Figure 5 A processing flow chart of a factor weighting layer provided by an embodiment of the present invention;

[0023] Figure 6 A processing flow chart of the attention layer provided by one embodiment of the present invention;

[0024] Figure 7 A processing flow chart of a gradient control layer provided by an embodiment of the present invention;

[0025] Figure 8 A model iteration flow chart provided for an embodiment of the present invention;

[0026] Fig. 9 A flow chart of a method for recommending loading and unloading points provided by an embodiment of the present invention;

[0027] Fig.10 A schematic diagram of a loading and unloading point recommendation device provided by an embodiment of the present invention;

[0028] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0029] Description of reference numerals: 101, request receiving module; 102, retrieval module; 103, loading and unloading point evaluation model; 104, recommendation module; 201, processor; 202, memory. DETAILED DESCRIPTION

[0030] The following describes the embodiments of the present invention through specific specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. It should be noted that the following embodiments and the features in the embodiments can be combined with each other without conflict. In addition to the specific methods, equipment, and materials used in the embodiments, according to the technical personnel in this technical field's grasp of the prior art and the records of the present invention, any methods, equipment, and materials of the prior art that are similar or equivalent to the methods, equipment, and materials described in the embodiments of the present invention can also be used to implement the present invention.

[0031] It should be understood that the terms used in the embodiments of the present invention are for describing specific embodiments rather than for limiting the scope of protection of the present invention. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those generally understood by those skilled in the art.

[0032] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In some of the embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0033] The flowchart and block diagram in the accompanying drawings illustrate the system architecture, functions and operations that may be implemented according to the methods and computer program products of various embodiments disclosed in the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0034] See also Figure 1 , Figure 1 A loading and unloading point evaluation model training method provided by an embodiment of the present invention includes step S100 and step S200.

[0035] Step S100, obtaining a training sample set, the training sample set includes a number of training samples, each training sample includes a number of scene dimension identifiers, a candidate point identifier list, continuous features, and manual evaluation results of target candidate points. The scene dimension identifiers, candidate point identifier list, and continuous features in the training samples can be obtained from historical order data, and the manual evaluation results of the target candidate points need to be obtained by manual marking.

[0036] Scene dimension identifiers may include, for example, user codes, point of interest codes, H3 grid codes of target candidate points, user city codes, H3 grid codes of user requested locations, etc. User codes may be, for example, user IDs, user city codes may be, for example, city IDs, and points of interest may be, for example, IDs of locations such as schools, logistics parks, hospitals, and supermarkets. H3 grid coding is an efficient geospatial indexing system developed by Uber to solve the management and analysis problems of large-scale geographic location data. H3 divides the earth's surface into a series of nested, non-overlapping hexagonal grids. Each grid cell has a unique H3 index code. The H3 grid code of the target candidate point and the H3 grid code of the user requested location correspond to the H3 index codes of these two locations, respectively.

[0037] The above example mentions points of interest, target candidate points, and user requested locations. It should be noted that the definitions of these three locations are different. Point of Interest (POI) refers to all entities that can be abstracted as geographic points; user requested locations refer to the locations corresponding to user search requests; target candidate points refer to one of the candidate points in the list of candidate loading and unloading points retrieved according to the user search request, and are also the candidate points that need to be evaluated.

[0038] The candidate point identification list may include, for example: an H3 grid code list of all candidate points, a road code list of candidate points, and the like.

[0039] Continuous features may include, for example, the user's historical order frequency, the user's order time (such as hour, day of the week, etc.), the distance from the target candidate point to the requested location, etc.

[0040] The manual evaluation results of the target candidate points can be labeled, for example, in the following manner: if the distance between the target candidate point and the actual loading and unloading point is less than a preset distance (for example, 30 meters), the sample is labeled as 1, otherwise it is labeled as 0.

[0041] Step S200: Use the training sample set to train the pre-training evaluation model, which includes an input layer, an embedding layer, a factor weighting layer, an attention layer, a noise reduction layer, a nonlinear training layer, and a gradient control layer. The specific structure of the pre-training evaluation model is as follows: Figure 2 As shown, it can be obtained from Figure 2 The structural relationship of these seven layers can be seen in the figure.

[0042] This method constructs a pre-trained evaluation model consisting of seven core modules: input layer, embedding layer, factor weighting layer, attention layer, denoising layer, nonlinear training layer and gradient control layer. Through the joint action of these seven layers, it is guaranteed that the entire model can converge quickly and smoothly during training and accurately evaluate the loading and unloading points. The model has its own denoising mechanism and multi-scale expression, which can prevent the strong jitter of the gradient caused by noise and avoid the problem of the loss value not being able to decrease. In some complex geographical scenarios, the loading and unloading points can still be evaluated accurately and quickly.

[0043] See also Figure 3 , Figure 3 It is a specific training step diagram. During training, step S200 includes steps S210 to S270.

[0044] Step S210: Input the scene dimension identifier and candidate point identifier list of the training sample into the embedding layer through the input layer to obtain an embedding vector. In this step, the id class feature can be mapped to the embedding vector through the embedding layer, which is beneficial for subsequent feature extraction.

[0045] See also Figure 4 In a specific embodiment of the present invention, step S210 includes: S211, mapping the scene dimension identifiers and candidate point identifier list of the training sample to subscript values ​​by hashing; S212, obtaining the embedding vector from the initialized embedding table according to the subscript value corresponding to each identifier. The hash process is injective, ensuring that different ids have different embedding vectors, and the embedding table is initialized with a Gaussian distribution.

[0046] In a specific embodiment of the present invention, step S211 includes: frequency filtering of the scene dimension identifier of the training sample and the code (id) in the candidate point identifier list: if the frequency of occurrence of the code is greater than or equal to the preset frequency, it is retained; if the frequency of occurrence of the code is less than the preset frequency, it is set to the default value. This can prevent the dimension of the embedding table from being too large. Only ids that have appeared a certain frequency in the historical order data are included in the training. If the frequency is lower than the frequency, it is considered to be feature missing and set to the default value.

[0047] Step S220: Input the embedding vector into the factor weighting layer to perform factor weighting on the embedding vector. In this step, various ID-type features are factor weighted, and weighted operations are performed on each element value of the embedding vector, thereby enhancing the fitting ability of complex scenes.

[0048] See also Figure 5In a specific embodiment of the present invention, step S220 includes step S221 and step S222.

[0049] Step S221, process the embedding vector using the following formula: Where w0 is the learnable bias term, w i is the learnable weight corresponding to the i-th encoding class feature, v i is the embedding vector corresponding to the i-th encoding of the training sample, w j is and v i The same length of learnable weight vectors, n is the number of embedding vectors, m is w j The number of vectors.

[0050] The original FM process is as follows: In order to enable the model to fit multiple scenarios, the second-order cross section on the FM side was modified in this step. The processing process after the modification is as follows: In this embodiment, all inputs of the module are id features, so x i It can be considered to be equal to 1. In this step, the cross-subject is transformed from the cross-over between id-type features and id-type features to the cross-over between id-type features and variables, which can be considered as factor weighting and multi-head for the embedding vector of id-type features. In this embodiment, there is no cross-over between vectors, but it becomes factor weighting under multi-scenario and multi-scale, which enhances the fitting ability of the model.

[0051] Step S222, perform layer normalization and sum pooling on feature y in sequence. Because some features are missing in the features input to the factor weighting layer, the input embedding matrix may be of different lengths. Therefore, in this step, layer normalization (LN) is performed so that each element of the output vector has a value, which helps to alleviate the problem of different lengths. After layer normalization, sum pooling is performed, one is to reduce the dimension, and the other is to perform information fusion, which is convenient for subsequent calculation of loss values.

[0052] Step S230: Input the embedding vector into the attention layer to obtain the attention weight. The attention mechanism can capture the selection requirements for candidate points in a specific scenario.

[0053] See also Figure 6In a specific embodiment of the present invention, step S230 includes: S231, splicing the embedding vectors corresponding to all codes in the scene dimension identifier to obtain the query vector representation (query) of the attention layer; S232, splicing the embedding vectors corresponding to the H3 grid codes of all candidate points to obtain the key vector representation (key) and value vector representation (value) of the attention layer; S233, according to the query vector representation, key vector representation and value vector representation of the attention layer, obtain the attention weight. Taking 30 candidate points as an example, the attention layer is to use the characteristics of the scene class to perform an attention mechanism on the 30 candidate points, which can be understood as a weighted summation of each candidate point in a specific scene, expressing the intention of selecting the point in the scene. The query of the attention layer is the splicing of the embedding vectors of the id features of some scene dimensions, such as the embedding vector corresponding to the user id, the embedding vector corresponding to the point of interest id, the embedding vector corresponding to the city id, etc. The key and value of the attention are sequences spliced ​​from the embedding vectors of the 30 candidate points, and the selection requirements for candidate points in a specific scene are captured through the attention mechanism.

[0054] Step S240: input the continuous features of the training samples into the denoising layer for denoising to obtain the denoised continuous features.

[0055] In a specific embodiment of the present invention, step S240 includes: inputting the continuous features of the training samples into the denoising layer, performing denoising processing using a large value constraint algorithm, and / or a logarithmic and square root compression algorithm, and / or a multi-hot encoding algorithm, to obtain the denoised continuous features. Large value constraint algorithm: If the feature value exceeds a certain threshold, it is considered to be a threshold, and the purpose is to cut out the noise caused by the feature maximum value. Logarithmic and square root compression algorithm: The features of the maximum value actually contain some useful information to a certain extent, and direct cutting may lose this part of the information, so the two methods of taking logarithms and taking square roots are used to ensure information losslessness while reducing noise, and the square root is very friendly to feature values ​​between 0 and 1, which can increase the distinguishability, and the logarithm has a strong compression force on the large value part, which enhances the denoising effect while retaining information. Multi-hot encoding (also known as bucketing multi-hot): Time features such as hours and weeks actually have no special meaning in terms of size. They are more about representing periodic information. Therefore, all time features are concatenated and then multi-hot is taken. In this way, behaviors at different times are actually equally weighted, and the model adjusts the weights adaptively through learning.

[0056] Step S250, concatenate the attention weights and the continuous features after denoising, and input the concatenated features into a nonlinear training layer for high-order feature extraction and implicit cross processing.

[0057] In a specific embodiment of the present invention, the nonlinear training layer includes three alternating batch normalization layers (BN) and a neural network, and the activation function of the neural network is ReLU; step S250 includes: splicing the attention weights and the continuous features after noise reduction, and inputting the spliced ​​features into the three alternating batch normalization layers and the neural network to perform high-order feature extraction and implicit cross processing. Specifically, there are three layers of nonlinear training layers, each of which includes a batch normalization layer and a neural network with an activation function of ReLU, that is, the data is first input into the batch normalization layer, and then into the neural network with an activation function of ReLU. The intention of doing this is to further weaken the noise by adjusting the feature distribution on the one hand, and to speed up the convergence speed on the other hand. The ReLU activation function helps to solve the sparse process while avoiding the disappearance of the gradient.

[0058] In a specific embodiment of the present invention, the nonlinear training layer also includes a neural network without an activation function (i.e. Figure 2 After three alternating batch normalization layers and neural network processing, the tensor is processed by a neural network without an activation function. This is equivalent to a linear combination, which is for dimensionality reduction and information fusion, and also for the convenience of subsequent calculation of loss values.

[0059] Step S260, fuse the outputs of the factor weighting layer and the nonlinear training layer to obtain the model prediction results of the target candidate points. In this step, the information extracted from the factor weighting layer and the nonlinear training layer is fused to obtain the feedforward logit of the model, which corresponds to a probability. The probability can be directly used as the model prediction result, or it can be normalized and the resulting value is considered to be the score, which can also be used as the model prediction result.

[0060] Step S270: Based on the manual evaluation results and model prediction results of the target candidate points, the parameters of the pre-trained evaluation model are updated using the gradient control layer to obtain the loading and unloading point evaluation model. The gradient control layer can set the core strategy for model training. For example, two core strategies can be set in this embodiment: one is the gradient constraint. For the calculated gradient, the model will constrain it according to the set hyperparameters; the other is the warm-up learning rate. At the beginning of the iteration, a small learning rate is set. As the number of iterations increases, the learning rate gradually increases. After a certain number of iterations, the learning rate is kept constant.

[0061] See also Figure 7In a specific embodiment of the present invention, step S270 includes: S271, according to the manual evaluation results of the target candidate points and the model prediction results, using the loss function to calculate the loss value, the loss function can be a cross entropy loss function, the loss value includes variables, the variables can be, for example, the learnable weights involved in the factor weighting layer; S272, calculating the partial derivatives of the variables; S273, according to the partial derivatives and the learning rate, the gradient is obtained, the gradient is equal to the product of the partial derivative and the learning rate; S274, according to the L2 regularization value of the gradient tensor and the set gradient threshold, the gradient is Clipping processing; after the gradient is calculated, its descent may be relatively large. By setting the gradient threshold, a constraint is added to the gradient to avoid a large drop in the gradient, which can effectively prevent the model from falling into the local optimum due to a large drop in the gradient. The L2 regularization value of the gradient tensor is the L2 regularization processing of the gradient vector, where the L2 regularization processing refers to the sum of the squares of each element in the vector and then taking the square root; S275, according to the gradient value after clipping processing, update the parameters of the pre-trained evaluation model. After the gradient is calculated, update the variables of each layer by back propagation.

[0062] When all the training samples in this training sample set are trained, the training is stopped and the model parameters are saved to obtain the loading and unloading point evaluation model.

[0063] See also Figure 8 In a specific embodiment of the present invention, the model training mode in the present invention is a mini-batch mode, that is, instead of loading all the data into the memory, a small batch is loaded and trained until all the data is input. Figure 8 , a detailed and complete description of the training iteration process of the loading and unloading point evaluation model is given.

[0064] 01: In order to ensure that a batch of data read in is a random sampling of all data and reduce the distribution error of different samples, a shuffle operation will be added when reading the data, and then a batch will be randomly selected according to the set batch size by sampling without replacement.

[0065] 02: Take the embedding vector for ID-type features such as user ID and point of interest ID, and transparently transmit the continuous features.

[0066] 03: Perform element wise hierarchical crossover on discrete embedding vectors, that is, use the modified FM to factor weight the embedding vectors.

[0067] 04: Perform layer normalization on the output of step 03.

[0068] 05: Perform summing and pooling on the output of step 04.

[0069] 06: Perform attention based on scene features and candidate point lists.

[0070] 07: Perform noise reduction on continuous features.

[0071] 08: The output of the attention layer is concatenated with the output of the denoising layer, and then input into the nonlinear training layer for processing.

[0072] 09: Use a single-layer neural network to reduce the dimension of the output of step 08.

[0073] 10: Fusion of the information extracted by the factor weighting layer and the nonlinear training layer to obtain the feedforward logit of the model.

[0074] 11: Normalize the output of step 10, and the resulting value is considered the score.

[0075] 12: Calculate the cross entropy loss function using the output of step 10 and the label of the sample (label, i.e. the manual annotation result).

[0076] 13: Calculate gradients and gradient normalization through the combined effect of the warmup learning rate strategy and the gradient constraint strategy.

[0077] 14: After the gradient is calculated, the variables of each layer are updated through back propagation.

[0078] 15: After the training of the samples in the current batch is completed, prepare to start the training of the samples in the next batch.

[0079] In the above iterative training process, after step 10 "doing summation and generating feedforward logit", we go to step 12, which is the training task, and continuously iterates the parameter fitting scenario through this process loop. After step 10 "doing summation and generating feedforward logit", we go to step 11, which outputs the prediction score for the prediction task, which corresponds to the prediction task.

[0080] It can be understood that when obtaining the training sample set, a test sample set can also be obtained to test the effect of the loading and unloading point evaluation model.

[0081] See also Fig. 9 , Fig. 9 A method for recommending loading and unloading points provided in an embodiment of the present invention includes steps S1 to S4.

[0082] Step S1: receiving a user request. The user request corresponds to a piece of location information, namely the user request location mentioned above.

[0083] Step S2: according to the user's request, a list of candidate loading and unloading points is obtained, wherein the list of candidate loading and unloading points includes a plurality of candidate loading and unloading points.

[0084] Step S3: using the loading and unloading point evaluation model trained by the loading and unloading point evaluation model training method in any of the above embodiments, evaluate multiple candidate loading and unloading points to obtain an evaluation result for each candidate loading and unloading point, which may be a score, for example.

[0085] Step S4: obtain recommended loading and unloading points based on the evaluation results of the multiple candidate loading and unloading points. The recommended loading and unloading points may be a list of candidate loading and unloading points sorted by scores, or may be a list of recommended loading and unloading points with higher scores selected from the multiple candidate loading and unloading points (e.g., selecting the 10 candidate loading and unloading points with the highest scores from 30 candidate loading and unloading points), and then sorting them by scores to obtain the recommended loading and unloading points.

[0086] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0087] See also Fig.10 , Fig.10 A loading and unloading point recommendation device provided in an embodiment of the present invention includes a request receiving module 101, a retrieval module 102, a loading and unloading point evaluation model 103 and a recommendation module 104. The request receiving module 101 is used to receive a user request; the retrieval module 102 is used to obtain a candidate loading and unloading point list according to the user request, and the candidate loading and unloading point list includes multiple candidate loading and unloading points; the loading and unloading point evaluation model 103 is trained using the above-mentioned loading and unloading point evaluation model training method, and is used to evaluate multiple candidate loading and unloading points to obtain an evaluation result of each candidate loading and unloading point; the recommendation module 104 is used to select some candidate loading and unloading points as recommended loading and unloading points according to the evaluation results of multiple candidate loading and unloading points.

[0088] It should be noted that the loading and unloading point recommendation device of this embodiment is a device corresponding to the above-mentioned loading and unloading point recommendation method, and the functional modules in the loading and unloading point recommendation device may correspond to the corresponding steps in the loading and unloading point recommendation method. The loading and unloading point recommendation device of this embodiment can be implemented in conjunction with the loading and unloading point recommendation method, that is, in the absence of conflict, the relevant technical details mentioned in the loading and unloading point recommendation method of the above-mentioned embodiment can also be applied to the loading and unloading point recommendation device of this embodiment.

[0089] See also Fig.11 , Fig.11An electronic device provided for one embodiment of the present invention includes a processor 201, a memory 202 and a communication bus; the communication bus is used to connect the processor 201 and the memory 202; the processor 201 is used to execute the computer program stored in the memory 202 to implement the above-mentioned loading and unloading point evaluation model training method or loading and unloading point recommendation method.

[0090] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program being used to enable a computer to execute the above-mentioned loading and unloading point evaluation model training method or loading and unloading point recommendation method.

[0091] In general, the modified deepFM model proposed in the present invention has a model structure different from that of ordinary deepFM. This structure has a good ability to characterize freight scenarios. The model has its own noise reduction mechanism and multi-scale expression, which can prevent the strong jitter of the gradient caused by noise to a certain extent, and then cause the problem that the loss value cannot be reduced. In addition, the model performed well in the online AB experiment. Compared with the GBDT tree model and the ordinary deepFM model, it has a significant improvement in both interpretability and business effect. In the freight scenario, compared with the ordinary deepFM and GBDT tree models, the modified deepFM has an improvement of nearly 5% in business indicators. At the same time, due to the improved noise resistance and fitting capabilities, the effect improvement in some complex geographical scenarios, such as underground parking lots of supermarkets and loading and unloading areas of logistics wholesale markets, has exceeded 10%.

[0092] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A loading and unloading point evaluation model training method, characterized in that: include: Acquire a training sample set, wherein the training sample set includes a plurality of training samples, each training sample includes a plurality of scene dimension identifiers, a candidate point identifier list, continuous features, and manual evaluation results of target candidate points; The pre-training evaluation model is trained using the training sample set, wherein the pre-training evaluation model includes an input layer, an embedding layer, a factor weighting layer, an attention layer, a noise reduction layer, a nonlinear training layer, and a gradient control layer; Among them, during training: Inputting the scene dimension identifier and the candidate point identifier list of the training sample into the embedding layer through the input layer to obtain an embedding vector; Inputting the embedding vector into the factor weighting layer to perform factor weighting on the embedding vector; Inputting the embedding vector into the attention layer to obtain an attention weight; Inputting the continuous features of the training samples into the denoising layer for denoising to obtain the denoised continuous features; Concatenating the attention weights and the denoised continuous features, and inputting the concatenated features into the nonlinear training layer for high-order feature extraction and implicit cross processing; Fusion of the outputs of the factor weighting layer and the nonlinear training layer to obtain a model prediction result of the target candidate point; According to the manual evaluation results and model prediction results of the target candidate points, the parameters of the pre-trained evaluation model are updated using the gradient control layer to obtain a loading and unloading point evaluation model.

2. The method for training a loading and unloading point evaluation model according to claim 1, characterized in that: Inputting the scene dimension identifier and the candidate point identifier list of the training sample into the embedding layer through the input layer to obtain an embedding vector, including: Mapping the scene dimension identifier and candidate point identifier list of the training sample to the subscript value by hashing; According to the subscript value corresponding to each identifier, the embedding vector is obtained from the initialized embedding table.

3. The method for training a loading and unloading point evaluation model according to claim 1, characterized in that: The scene dimension identifier includes a user code, a point of interest code, an H3 grid code of a target candidate point, a city code where the user is located, and an H3 grid code of a user requested location; the candidate point identifier list includes an H3 grid code list of all candidate points and a road code list of the candidate points; Inputting the embedding vector into the factor weighting layer to perform factor weighting on the embedding vector includes: The embedding vector is processed by the following formula: Where w0 is the learnable bias term, w i is the learnable weight corresponding to the i-th encoding class feature, v i is the embedding vector corresponding to the i-th encoding of the training sample, w j is and v i The same length of learnable weight vectors, n is the number of embedding vectors, m is w j The number of vectors; The feature y is subjected to layer normalization and sum pooling processing in sequence.

4. The method for training a loading and unloading point evaluation model according to claim 3, characterized in that: Input the embedding vector into the attention layer to obtain the attention weight, including: Concatenate the embedding vectors corresponding to all the codes in the scene dimension identifier to obtain the query vector representation of the attention layer; Concatenate the embedding vectors corresponding to the H3 grid codes of all candidate points to obtain the key vector representation and value vector representation of the attention layer; An attention weight is obtained according to the query vector representation, the key vector representation and the value vector representation of the attention layer.

5. The method for training a loading and unloading point evaluation model according to claim 1, characterized in that: The continuous features include the user's historical order frequency, and / or the user's order time, and / or the distance from the target candidate point to the requested location; Inputting the continuous features of the training samples into the denoising layer for denoising to obtain the denoised continuous features, including: The continuous features of the training samples are input into the denoising layer, and denoising is performed using a large value constraint algorithm, and / or a logarithmic and square root compression algorithm, and / or a multi-hot encoding algorithm to obtain denoised continuous features.

6. The method for training a loading and unloading point evaluation model according to claim 1, characterized in that: The nonlinear training layer includes three alternating batch normalization layers and a neural network, and the activation function of the neural network is ReLU; Splicing the attention weight and the denoised continuous features, and inputting the spliced ​​features into the nonlinear training layer for high-order feature extraction and implicit cross processing, including: The attention weights and the denoised continuous features are concatenated, and the concatenated features are input into three alternating batch normalization layers and a neural network for high-order feature extraction and implicit cross processing.

7. The method for training a loading and unloading point evaluation model according to claim 1, characterized in that: According to the manual evaluation results and the model prediction results of the target candidate points, the parameters of the pre-trained evaluation model are updated using the gradient control layer, including: Calculate a loss value using a loss function according to the manual evaluation results and the model prediction results of the target candidate points, wherein the loss value includes variables; calculating partial derivatives of the variables; According to the partial derivative and the learning rate, a gradient is obtained; According to the L2 regularization value of the gradient tensor and the set gradient threshold, the gradient is clipped; According to the clipped gradient values, the parameters of the pre-trained evaluation model are updated.

8. A method for recommending loading and unloading points, characterized in that: include: Receive user requests; According to the user request, a candidate loading and unloading point list is obtained, wherein the candidate loading and unloading point list includes a plurality of candidate loading and unloading points; Using the loading and unloading point evaluation model trained by the loading and unloading point evaluation model training method according to any one of claims 1 to 7, multiple candidate loading and unloading points are evaluated to obtain an evaluation result of each candidate loading and unloading point; According to the evaluation results of the plurality of candidate loading and unloading points, a list of recommended loading and unloading points is obtained.

9. A loading and unloading point recommendation device, characterized in that: include: A request receiving module, used for receiving user requests; A search module, used to obtain a list of candidate loading and unloading points according to the user request, wherein the list of candidate loading and unloading points includes a plurality of candidate loading and unloading points; A loading and unloading point evaluation model, wherein the loading and unloading point evaluation model is trained using the loading and unloading point evaluation model training method according to any one of claims 1 to 7, and is used to evaluate a plurality of candidate loading and unloading points to obtain an evaluation result for each of the candidate loading and unloading points; The recommendation module is used to obtain a list of recommended loading and unloading points based on the evaluation results of the plurality of candidate loading and unloading points.

10. An electronic device, characterized in that: It includes a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute the computer program stored in the memory to implement the loading and unloading point evaluation model training method according to any one of claims 1 to 7 or the loading and unloading point recommendation method according to claim 8.

11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to enable a computer to execute the loading and unloading point evaluation model training method according to any one of claims 1 to 7 or the loading and unloading point recommendation method according to claim 8.

Citation Information

Cited By

  • Text classification method based on layer-by-layer unfreezing progressive training model

    CN120086369A