Method and device for processing data
By extracting multiple types of features from the historical data of logistics nodes and using self-attention sub-models to predict, the problems of poor stability and low accuracy of prediction models in the prior art are solved, and more accurate logistics order prediction is achieved.
Patent Information
- Application Number
- CN202310675185.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2024-12-10
AI Technical Summary
The existing logistics node operation prediction method does not consider the feature diversity, resulting in poor stability and low accuracy of prediction model.
Multiple types of data features (text class, numerical class, timing class) are extracted from the historical data of logistics nodes, and the data processing sub-model and self-attention sub-model in the prediction model are processed, combining multiple features for prediction .
The stability and accuracy of the prediction model are improved, and the prediction deviation problem caused by feature diversity is overcome.
Smart Images

Figure CN119106752A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart logistics technology, and in particular to a method and device for processing data. Background Art
[0002] With the development of artificial intelligence and big data technologies, in logistics scenarios, machine learning can also be combined with big data to predict the operating conditions of logistics nodes (for example, stores, suppliers of goods, etc.), such as the output order volume, so that the logistics management end can manage each logistics node in a targeted manner.
[0003] The existing method for predicting the operation status of logistics nodes usually uses a single feature of the data generated by the node and inputs it into an existing prediction model to obtain the prediction result; since the existing method uses a single feature and an existing fixed prediction model, it does not consider the diversity of features, resulting in poor stability of the prediction model and low prediction accuracy. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for processing data, which can extract multiple types of data features from the historical node data of the logistics node, use the data processing sub-model included in the prediction model to process the corresponding types of data features, and input the processing results into the self-attention sub-model; based on the results output by the self-attention sub-model, the logistics order situation generated by the logistics node is predicted, and the logistics order situation is sent to the logistics management end; the problem of poor stability of the prediction model and low prediction accuracy caused by not considering feature diversity in the prior art is overcome.
[0005] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a method for processing data is provided, characterized in that it includes: acquiring historical node data of a logistics node; extracting multiple types of data features from the historical node data, the multiple types including: any multiple of text, numerical, and time series; inputting the multiple types of data features into a trained prediction model, wherein the prediction model includes a data processing sub-model and a self-attention sub-model for processing each type of data feature; using the data processing sub-model included in the prediction model to process the data features of the corresponding type, and inputting the processing results into the self-attention sub-model; predicting the logistics order situation generated by the logistics node based on the result output by the self-attention sub-model, and sending the logistics order situation to the logistics management end.
[0006] Optionally, the data processing sub-model processes data features of corresponding types, including: the data processing sub-model of the text class determines whether the data features of each input text class belong to long text features or short text features; uses the word vector sub-model included in the data processing sub-model of the text class to perform a dimensionality reduction operation on the data features belonging to the long text features to obtain a first text feature; uses the embedding sub-model included in the data processing sub-model corresponding to the text class to perform a dimensionality reduction operation on the data features belonging to the short text features to obtain a second text feature; and processes the first text feature and the second text feature.
[0007] Optionally, the data processing sub-model processes data features of its corresponding type, including: using the fully connected network sub-model included in the data processing sub-model to extract target data features from the numerical data features, and using the activation function through nonlinear mapping to extract key features from the target data features.
[0008] Optionally, the method for processing data, when the type of the business feature is a time series feature, divides the time series feature into long-term time series features or short-term time series features; the data processing sub-model processes the data features of the corresponding type, including: using the transformer sub-model included in the time series data processing sub-model to extract long-term time series features from the data features, wherein the long-term time series features indicate long-distance data dependencies; using the convolutional neural network classification sub-model included in the time series data processing sub-model to extract multiple short-term time series features from the data features, wherein the distance between each adjacent two short-term time series features in the multiple short-term time series features is a set step size; using the residual connection sub-model included in the time series data processing sub-model to connect the long-term time series features and the short-term time series features.
[0009] Optionally, the method for processing data also includes: using the self-attention sub-model to score the processing results of each of the data processing sub-models input; selecting an indicator value indicating changes in logistics orders based on the scoring results; predicting the logistics order status generated by the logistics node based on the results output by the self-attention sub-model, including: predicting the logistics order status generated by the logistics node based on the selected indicator value indicating changes in logistics orders.
[0010] Optionally, the prediction model also includes a prediction classification sub-model; the prediction of the logistics order status generated by the logistics node includes: inputting an indicator value indicating the change in logistics orders into the prediction classification sub-model, and the prediction classification sub-model outputs the logistics order status generated by the logistics node.
[0011] Optionally, the results output by the prediction classification sub-model include the probability of increasing / decreasing logistics orders and / or the probability that the increase / decrease quantity of logistics orders reaches a set ratio; based on the probability of increasing / decreasing logistics orders and / or the probability that the increase / decrease quantity of logistics orders reaches a set ratio, the step of predicting the logistics order situation generated by the logistics node is executed.
[0012] To achieve the above-mentioned purpose, according to a second aspect of an embodiment of the present invention, a device for processing data is provided, characterized in that it comprises: a feature extraction module, a data processing module and a prediction module; wherein:
[0013] The feature extraction module is used to obtain historical node data of logistics nodes; extract multiple types of data features from the historical node data, and the multiple types include: any type of text type, numerical type, and time series type;
[0014] The data processing module is used to input the multiple types of data features into the trained prediction model, wherein the prediction model includes a data processing sub-model and a self-attention sub-model for processing each type of data feature; the data processing sub-model included in the prediction model is used to process the data features of the corresponding type, and the processing results are input into the self-attention sub-model;
[0015] The prediction module predicts the logistics order status generated by the logistics node based on the results output by the self-attention sub-model, and sends the logistics order status to the logistics management end.
[0016] Optionally, the device for processing data includes: the data processing sub-model processes the data features of its corresponding type, including: the data processing sub-model of the text class determines that the data features of each input text class belong to the long text feature or the short text feature; uses the word vector sub-model included in the data processing sub-model of the text class to perform a dimensionality reduction operation on the data features belonging to the long text feature to obtain a first text feature; uses the embedding sub-model included in the data processing sub-model corresponding to the text class to perform a dimensionality reduction operation on the data features belonging to the short text feature to obtain a second text feature; and processes the first text feature and the second text feature.
[0017] Optionally, the device for processing data includes: the data processing sub-model processes data features of its corresponding type, including: using the fully connected network sub-model included in the data processing sub-model to extract target data features from the data features of the numerical class, and using the activation function through nonlinear mapping to extract key features from the target data features.
[0018] Optionally, the device for processing data is used to divide the time series features into long-term time series features or short-term time series features when the type of the business characteristics is a time series feature; the data processing sub-model processes the data features of the corresponding type, including: using the transformer sub-model included in the time series data processing sub-model to extract long-term time series features from the data features, wherein the long-term time series features indicate long-distance data dependencies; using the convolutional neural network classification sub-model included in the time series data processing sub-model to extract multiple short-term time series features from the data features, wherein the distance between each adjacent two short-term time series features in the multiple short-term time series features is a set step size; using the residual connection sub-model included in the time series data processing sub-model to connect the long-term time series features and the short-term time series features.
[0019] Optionally, the data processing device is also used to use the self-attention sub-model to score the processing results of each of the data processing sub-models input; based on the scoring results, select an indicator value indicating changes in logistics orders; and predict the logistics order situation generated by the logistics node based on the results output by the self-attention sub-model, including: predicting the logistics order situation generated by the logistics node based on the selected indicator value indicating changes in logistics orders.
[0020] Optionally, the data processing device includes: the prediction model also includes a prediction classification sub-model; the prediction of the logistics order status generated by the logistics node includes: inputting an indicator value indicating the change in logistics orders into the prediction classification sub-model, and the prediction classification sub-model outputs the logistics order status generated by the logistics node.
[0021] Optionally, the data processing device includes: the result output by the prediction classification sub-model includes the probability of increase / decrease in logistics orders and / or the probability that the increase / decrease in the logistics order quantity reaches a set ratio; based on the probability of increase / decrease in logistics orders and / or the probability that the increase / decrease in the logistics order quantity reaches a set ratio, executing the step of predicting the logistics order situation generated by the logistics node.
[0022] To achieve the above-mentioned purpose, according to the third aspect of an embodiment of the present invention, there is provided an electronic device for processing data, characterized in that it comprises: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the above-mentioned methods for processing data.
[0023] To achieve the above-mentioned purpose, according to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any method as described in the above-mentioned method for processing data is implemented.
[0024] An embodiment of the above invention has the following advantages or beneficial effects: it can extract multiple types of data features from the historical node data of the logistics node, use the data processing sub-model included in the prediction model to process the corresponding types of data features, and input the processing results into the self-attention sub-model; predict the logistics order situation generated by the logistics node based on the result output by the self-attention sub-model, and send the logistics order situation to the logistics management end; overcome the problems of poor stability of the prediction model and low prediction accuracy in the prior art due to failure to consider feature diversity.
[0025] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0027] Figure 1 It is a flowchart of a method for processing data provided by an embodiment of the present invention;
[0028] Figure 2 is a schematic diagram of the structure of a prediction model provided by an embodiment of the present invention;
[0029] Figure 3 is another schematic diagram of a data processing flow provided by an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of the structure of a device for processing data provided by an embodiment of the present invention;
[0031] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0032] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0034] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0035] After collecting the historical node data of the logistics nodes, we will de-identify the data through technical means.
[0036] When displaying the predicted order status, we will desensitize the information by de-identifying or anonymizing it to protect the information security. In order to count the usage of our products / services, we will aggregate, analyze and use the technically processed user data and share the processed statistical information with third parties. We will use secure encryption technology processing and other methods to ensure that the recipient of the information cannot re-identify a specific individual.
[0037] like Figure 1 As shown, an embodiment of the present invention provides a method for processing data, which may include the following steps:
[0038] Step S101: Acquire historical node data of a logistics node; extract multiple types of data features from the historical node data, wherein the multiple types include any multiple types of text, numerical, and time series.
[0039] Specifically, in the logistics business chain, there are many different logistics nodes related to the logistics transport party, such as: item providers, stores, etc.; for the logistics transport party, targeted business management can be carried out by predicting and analyzing the order situation of various logistics nodes, which can greatly improve the efficiency of the logistics transport party in handling business.
[0040] Furthermore, historical node data of the logistics node is obtained, wherein the historical node data is historical information for the logistics node stored in one or more data sources, and the historical node data includes, for example, basic information of the node (node identification, industry to which the node belongs, address information, shipment type, etc.), node business data (for example: order volume, complaint volume, penetration rate, etc.), and other data.
[0041] Furthermore, multiple types of data features are extracted from the historical node data, and the multiple types include any of text, numerical, and time series. For example, text data features are extracted from the basic information of the logistics node, numerical data features are extracted from the business data, and time series data features are extracted from the business data according to time sequence and time continuity.
[0042] Step S102: Input the multiple types of data features into a trained prediction model, wherein the prediction model includes a data processing sub-model and a self-attention sub-model for processing each type of data feature; use the data processing sub-model included in the prediction model to process the data features of the corresponding type, and input the processing results into the self-attention sub-model.
[0043] Specifically, multiple types of data features are extracted from the historical node data, wherein the multiple types include any multiple types of text, numerical, and time series. The extracted data features of various types are input into the trained prediction model.
[0044] Figure 2 A schematic diagram of the structure of a prediction model provided by an embodiment of the present invention is shown. Figure 2 As shown, the prediction model includes a data processing sub-model for processing data features of text-word vector sub-model or embedding sub-model (201), a data processing sub-model for processing data features of numerical value-fully connected network sub-model (202), and a data processing sub-model for processing data features of time series-transformer sub-model or convolutional neural network classification sub-model (203); that is, the data processing sub-models included in the prediction model are used to process the data features of the corresponding type; further, the output after processing of each data sub-model is used as the input of the self-attention sub-model (204), and the data output is obtained after being processed by the activation function layer (205) and the prediction classification sub-model (206). It can be seen that the embodiment of the present invention combines multiple types of data features and further uses the self-attention sub-model to extract key features, wherein the embedding layer can be used to perform the step of feature combination. The number of data feature dimensions of the text class can be: the number of samples * the number of features; the number of data feature dimensions of the numerical class can be: the number of samples * the number of features; the number of data feature dimensions of the time series class can be: the number of samples * the number of features * the length of the time series. By extracting different types of features from different dimensions, the refinement and prediction accuracy of the prediction model are improved, while overcoming the problem of prediction deviation of the model for other types of features due to the single feature type, that is, the problem of poor model stability. It is understandable that the prediction model of the embodiment of the present invention can be iteratively trained by obtaining multiple historical data of multiple nodes in the logistics business chain to obtain a trained prediction model.
[0045] Step S103: Predict the logistics order status generated by the logistics node based on the result output by the self-attention sub-model, and send the logistics order status to the logistics management end.
[0046] Specifically, the self-attention sub-model can extract key features from a variety of different types of data features, wherein the method for extracting key features is to score each type of data feature received, and different weights can be set for different features, and then the index value indicating the change of logistics orders (i.e., key features) is screened out according to the scoring results, so as to further perform the step of predicting the logistics order situation generated by the logistics node according to the index value of the change of logistics orders. That is, the processing results of each of the data processing sub-models input are scored using the self-attention sub-model; the index value indicating the change of logistics orders is selected according to the scoring results; the prediction of the logistics order situation generated by the logistics node based on the result output by the self-attention sub-model includes: predicting the logistics order situation generated by the logistics node based on the selected index value indicating the change of logistics orders.
[0047] Furthermore, the indicator value indicating the change in logistics orders output by the self-attention sub-model is input into the prediction classification sub-model (such as softmax, etc.); to obtain probability data corresponding to the logistics order situation; that is, the prediction model also includes a prediction classification sub-model; the prediction of the logistics order situation generated by the logistics node includes: inputting the indicator value indicating the change in logistics orders into the prediction classification sub-model, and the prediction classification sub-model outputs the logistics order situation generated by the logistics node.
[0048] Further, the result output by the prediction classification sub-model includes the probability of increasing / decreasing orders in logistics orders and / or the probability that the increase / decrease amount of logistics orders reaches a set ratio; for example: the probability of increasing orders at a certain logistics node within a set time in the future, the probability of decreasing orders, the probability of increasing orders by 10% in the case of increasing orders, the probability of decreasing orders by 20% in simple cases, etc.; thereby predicting the logistics order situation generated by each logistics node according to the output probability value; for example: predicting that logistics node A increases orders by 10%, logistics node B decreases orders by 20%, logistics node C increases orders by 20%, etc. That is, the result output by the prediction classification sub-model includes the probability of increasing / decreasing orders in logistics orders and / or the probability that the increase / decrease amount of logistics orders reaches a set ratio; based on the probability of increasing / decreasing orders in logistics orders and / or the probability that the increase / decrease amount of logistics orders reaches a set ratio, the step of predicting the logistics order situation generated by the logistics node is performed.
[0049] like Figure 3 As shown, an embodiment of the present invention provides a process for processing data, which may include the following steps:
[0050] Step S301: using the word vector sub-model to perform a dimensionality reduction operation on the data features belonging to the long text features to obtain the first text features; using the embedding sub-model to perform a dimensionality reduction operation on the data features belonging to the short text features to obtain the second text features.
[0051] Specifically, in an embodiment of the present invention, the data processing sub-model processes the data features of its corresponding type, and for the data features of the text class, the text can be divided into long text features and short text features for separate processing; for example: using the word vector sub-model word2vec to perform feature mapping and dimension reduction on the data features of the long text features, a first text feature corresponding to the long text feature is obtained; using the embedding sub-model (such as the Embedding model in tensorflow) to perform dimension reduction operations on the data features of the short text features to obtain a second text feature; and using the residual connection to combine the two text features as the data features of the text class to perform subsequent operations. That is, the data processing sub-model processes the data features of its corresponding type, including: the data processing sub-model of the text class determines that each data feature of the input text class belongs to a long text feature or a short text feature; using the word vector sub-model included in the data processing sub-model of the text class to perform a dimension reduction operation on the data features belonging to the long text feature to obtain a first text feature; using the embedding sub-model included in the data processing sub-model corresponding to the text class to perform a dimension reduction operation on the data features belonging to the short text feature to obtain a second text feature; processing the first text feature and the second text feature.
[0052] Step S302: Use the fully connected network sub-model to extract target data features from the data features of the numerical class, and use the activation function through nonlinear mapping to extract key features.
[0053] Specifically, for data features of numerical type, the data processing sub-model processes data features of the corresponding type; wherein the data processing sub-model processes data features of the corresponding type, including: extracting target data features from data features of numerical type using the fully connected network sub-model included in the data processing sub-model, and extracting key features from the target data features through nonlinear mapping using an activation function. The fully connected network sub-model can be set up with a four-layer neural network, and the number of neurons in each layer of the neural network is related to the number of features; extracting target data features from data features of numerical type using the fully connected network sub-model; further, extracting key features from the target data features through nonlinear mapping using an activation function (such as Relu, etc.).
[0054] Step S303: extracting long-term time series features from the data features using the transformer sub-model; extracting multiple short-term time series features from the data features using the convolutional neural network classification sub-model.
[0055] Specifically, for the time series data features, the time series data processing sub-model is used for processing; it can be understood that the time series features are one of the important factors for obtaining potential change trends, and the time series features include various data features such as order volume series and complaint volume series in different time ranges; in an embodiment of the present invention, the time series features are divided into long-term time series features and short-term time series features; among them, the long-term time series features correspondingly extract data dependencies between longer distances in data processing; the short-term time series features correspondingly extract data dependencies between adjacent data in data processing (for example: adjacent data, adjacent N data, etc.).
[0056] In an embodiment of the present invention, a transformer sub-model (e.g., a Transformer model) is used to extract long-term time series features from the data features; wherein, according to the application scenario, the Transformer model can only have a two-layer structure; a convolutional neural network classification sub-model (e.g., TextCNN) is used to extract multiple short-term time series features from the data features; wherein, three types of convolution kernels (5, 10, 15) can be used in TextCNN to convolve the time series data to extract short time series features. Furthermore, the long-term time series features and the short-term time series features can be connected using a residual connection sub-model. That is, in the case where the type of the business feature is a time series feature, the time series feature is divided into a long-term time series feature or a short-term time series feature; the data processing sub-model processes the data features of the corresponding type, including: using the transformer sub-model included in the time series data processing sub-model to extract long-term time series features from the data features, wherein the long-term time series features indicate long-distance data dependencies; using the convolutional neural network classification sub-model included in the time series data processing sub-model to extract multiple short-term time series features from the data features, wherein the distance between each two adjacent short-term time series features in the multiple short-term time series features is a set step size; using the residual connection sub-model included in the time series data processing sub-model to connect the long-term time series features and the short-term time series features.
[0057] The numbering sequence of step S301 to step S303 is only an example. When processing data characteristics, there is no sequential dependency between the three steps.
[0058] Step S304: Use the self-attention sub-model to score the processing results of each of the input data processing sub-models, and select indicator values indicating changes in logistics orders based on the scoring results.
[0059] Step S305: The prediction classification sub-model outputs the logistics order status generated by the logistics node.
[0060] Specifically, the description of the logistics order situation generated by the logistics node output by the self-attention sub-model and the prediction classification sub-model is consistent with the description of step S103 and will not be repeated here.
[0061] From the description of step S301 to step S305, it can be seen that the embodiment of the present invention processes data features by utilizing the data processing sub-model and self-attention sub-model included in the prediction model to process multiple types of data features; the refinement and accuracy of extracting data features are improved, and at the same time, the problem of poor stability of the prediction model and low prediction accuracy caused by not considering the diversity of features in the existing method due to the use of a single feature and an existing fixed prediction model is overcome.
[0062] like Figure 4 As shown, the embodiment of the present invention provides a device 400 for processing data, including: a feature extraction module 401, a data processing module 402 and a prediction module 403; wherein,
[0063] The feature extraction module 401 is used to obtain historical node data of logistics nodes; extract multiple types of data features from the historical node data, and the multiple types include: any type of text type, numerical type, and time series type;
[0064] The data processing module 402 is used to input the multiple types of data features into the trained prediction model, wherein the prediction model includes a data processing sub-model and a self-attention sub-model for processing each type of data feature; the data processing sub-model included in the prediction model is used to process the data features of the corresponding type, and the processing results are input into the self-attention sub-model;
[0065] The prediction module 403 predicts the logistics order status generated by the logistics node based on the result output by the self-attention sub-model, and sends the logistics order status to the logistics management end.
[0066] An embodiment of the present invention also provides an electronic device for processing data, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0067] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in any of the above embodiments is implemented.
[0068] Figure 5 An exemplary system architecture 500 is shown to which the method for processing data or the apparatus for processing data according to the embodiment of the present invention can be applied.
[0069] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0070] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various client applications can be installed on terminal devices 501, 502, 503, such as e-commerce client applications, web browser applications, search applications, instant messaging tools, and email clients.
[0071] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting various client applications, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0072] The server 505 may be a server that provides various services, such as a background management server that provides support for client applications used by users using the terminal devices 501, 502, and 503. The background management server may process the received request for predicting the logistics order status generated by any logistics node, and feed back the logistics order status to the terminal device.
[0073] It should be noted that the method for processing data provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the device for processing data is generally disposed in the server 505 .
[0074] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0075] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0076] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0077] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0078] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0079] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0080] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing 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 or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0081] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be provided in a processor. For example, they may be described as follows: a processor includes a feature extraction module, a data processing module, and a prediction module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the feature extraction module may also be described as a "module for extracting multiple types of data features from the historical node data."
[0082] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining historical node data of logistics nodes; extracting multiple types of data features from the historical node data, the multiple types including: any multiple of text, numerical, and time series; inputting the multiple types of data features into a trained prediction model, wherein the prediction model includes a data processing sub-model and a self-attention sub-model for processing each type of data feature; using the data processing sub-model included in the prediction model to process the data features of the corresponding type, and inputting the processing results into the self-attention sub-model; predicting the logistics order situation generated by the logistics node based on the results output by the self-attention sub-model, and sending the logistics order situation to the logistics management end.
[0083] The embodiments of the present invention can extract multiple types of data features from the historical node data of the logistics node, use the data processing sub-model included in the prediction model to process the data features of the corresponding types, and input the processing results into the self-attention sub-model; predict the logistics order situation generated by the logistics node based on the results output by the self-attention sub-model, and send the logistics order situation to the logistics management end; overcome the problems of poor stability of the prediction model and low prediction accuracy in the prior art due to failure to consider feature diversity.
[0084] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing data, characterized in that: include: Obtain historical node data of logistics nodes; Extracting multiple types of data features from the historical node data, the multiple types including any of text, numerical, and time series; Inputting the plurality of types of data features into a trained prediction model, wherein the prediction model includes a data processing sub-model and a self-attention sub-model for processing each type of data feature; Using the data processing sub-model included in the prediction model to process the data features of the corresponding type, and inputting the processing results into the self-attention sub-model; The logistics order status generated by the logistics node is predicted based on the result output by the self-attention sub-model, and the logistics order status is sent to the logistics management end.
2. The method according to claim 1, characterized in that The data processing sub-model processes the data features of the corresponding type, including: The data processing sub-model of the text class determines whether the data feature of each input text class belongs to a long text feature or a short text feature; Using the word vector sub-model included in the data processing sub-model of the text class to perform a dimensionality reduction operation on the data features belonging to the long text features to obtain a first text feature; Using the embedding sub-model included in the data processing sub-model corresponding to the text class, a dimensionality reduction operation is performed on the data features belonging to the short text features to obtain a second text feature; The first text feature and the second text feature are processed.
3. The method according to claim 1, characterized in that The data processing sub-model processes the data features of the corresponding type, including: The fully connected network sub-model included in the data processing sub-model is used to extract target data features from the data features of the numerical class, and the activation function is used to extract key features from the target data features through nonlinear mapping.
4. The method according to claim 1, characterized in that: In the case where the type of the business characteristic is a time series characteristic, the time series characteristic is classified into a long-term time series characteristic or a short-term time series characteristic; The data processing sub-model processes the data features of the corresponding type, including: Extracting long-term time series features from the data features using a transformer sub-model included in a time series data processing sub-model, wherein the long-term time series features indicate a long-distance data dependency; A convolutional neural network classification submodel included in the time series data processing submodel is used to extract a plurality of short-term time series features from the data features, wherein the distance between each two adjacent short-term time series features in the plurality of the short-term time series features is a set step length; The long-term time series features and the short-term time series features are connected using the residual connection sub-model included in the time series data processing sub-model.
5. The method according to claim 1, characterized in that Also includes: Using the self-attention sub-model to score the processing results of each of the input data processing sub-models; According to the scoring results, select the indicator value indicating the change of logistics orders; The predicting of the logistics order situation generated by the logistics node based on the result output by the self-attention sub-model includes: predicting the logistics order situation generated by the logistics node based on the selected indicator value indicating the change of the logistics order.
6. The method according to claim 5, characterized in that The prediction model also includes a prediction classification sub-model; The predicting of the logistics order situation generated by the logistics node includes: The index value indicating the change of logistics orders is input into the prediction classification sub-model, and the prediction classification sub-model outputs the logistics order status generated by the logistics node.
7. The method according to claim 6, characterized in that The results output by the prediction classification sub-model include the probability of an increase / decrease in logistics orders and / or the probability that the increase / decrease in the logistics order quantity reaches a set ratio; Based on the probability of increase / decrease of logistics orders and / or the probability that the increase / decrease quantity of logistics orders reaches a set ratio, a step of predicting the logistics order situation generated by the logistics node is executed.
8. A device for processing data, characterized in that: include: Extract feature module, process data module and predict module; among them, The feature extraction module is used to obtain historical node data of logistics nodes; extract multiple types of data features from the historical node data, and the multiple types include: any multiple types of text, numerical, and time series; The data processing module is used to input the multiple types of data features into the trained prediction model, wherein the prediction model includes a data processing sub-model and a self-attention sub-model for processing each type of data feature; the data processing sub-model included in the prediction model is used to process the data features of the corresponding type, and the processing results are input into the self-attention sub-model; The prediction module predicts the logistics order status generated by the logistics node based on the results output by the self-attention sub-model, and sends the logistics order status to the logistics management end.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
