Data processing method and device, electronic equipment, storage medium and program product
By performing image conversion and convolution processing on the sample data set and combining feature fusion, the problem of low prediction accuracy in the prior art is solved, and more efficient data processing and prediction results are achieved.
Patent Information
- Application Number
- CN202411996525.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, when the prediction model processes complex data, the prediction accuracy is low, making it difficult to effectively capture the interaction between complex features.
By dividing the sample data set into a time-sorted first sample subset and a second sample subset of numerical data and category-type data, image conversion and convolution processing are performed, image vector sets are output, and feature fusion is performed to generate model prediction results.
Improve prediction accuracy, reduce the consumption of computing resources, and simplify the data processing process while retaining data characteristics.
Smart Images

Figure CN119942187A_ABST
Abstract
Description
Background Art
[0002] Prediction refers to the prediction of a future event or behavior based on historical data, current data, or a combination of the two. Neural networks are usually used for prediction in related technologies. Currently, there are many scenarios for prediction, and the data to be processed is relatively complex, resulting in low prediction accuracy. How to improve the accuracy of prediction is an urgent problem to be solved by related technical personnel.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] The present disclosure provides a data processing method, device, electronic device, storage medium and program product, which improve the accuracy of response during data processing.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0006] According to one aspect of the present disclosure, there is provided a data processing method, comprising:
[0007] Dividing the sample data set into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data;
[0008] Performing image conversion on the data in the first sample subset to form a first image data subset;
[0009] Converting the digital data in the second sample subset into categorical data, and performing image conversion on the categorical data in the second sample subset to form a second image data subset;
[0010] Convolutionally processing the first image data subset and the second image data subset to output a first image vector set and a second image vector set;
[0011] The first image vector set and the second image vector set are feature fused, and the model prediction result of the sample data set is output.
[0012] According to another aspect of the present disclosure, there is provided a data processing device, comprising:
[0013] A partitioning module, used to partition the sample data set into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data;
[0014] A first conversion module, used for performing image conversion on the data in the first sample subset to form a first image data subset;
[0015] A second conversion module, used to convert the digital data in the second sample subset into categorical data, and perform image conversion on the categorical data in the second sample subset to form a second image data subset;
[0016] A convolution module, used for convolving the first image data subset and the second image data subset to output a first image vector set and a second image vector set;
[0017] The output module is used to perform feature fusion on the first image vector set and the second image vector set, and output the model prediction result of the sample data set.
[0018] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the above-mentioned data processing methods by executing the executable instructions.
[0019] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned data processing methods is implemented.
[0020] According to another aspect of the present disclosure, a computer program product is provided. The computer program product includes a computer program or computer instructions. The computer program or computer instructions are loaded and executed by a processor to enable a computer to implement any of the above data processing methods.
[0021] In the disclosed embodiment, multiple types of sample data sets are obtained, the sample data sets are divided into a first sample subset and a second sample subset, the data in the first sample subset are image-converted to form a first image data subset, the digital data in the second sample subset are converted into categorical data, and the categorical data in the second sample subset are image-converted to form a second image data subset. The first image data subset and the second image data subset are convoluted to output a first image vector set and a first image vector set, feature fusion is performed on the first image vector set and the second image vector set, and the model prediction result of the sample data set is output, and prediction is performed after different types of sample data sets are converted into image data, thereby improving the accuracy of prediction.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0024] Figure 1 A schematic diagram of the structure of a data processing system in an embodiment of the present disclosure is shown.
[0025] Figure 2 A flow chart of a data processing method in an embodiment of the present disclosure is shown.
[0026] Figure 3 A schematic diagram of a neural network in an embodiment of the present disclosure is shown.
[0027] Figure 4 A flow chart of a data processing method in an embodiment of the present disclosure is shown.
[0028] Figure 5 A flow chart of a data processing method in an embodiment of the present disclosure is shown.
[0029] Figure 6 A flow chart of a data processing method in an embodiment of the present disclosure is shown.
[0030] Figure 7 A flow chart of a data processing method in an embodiment of the present disclosure is shown.
[0031] Figure 8 A flow chart showing an example of a data processing method in an embodiment of the present disclosure is shown.
[0032] Fig. 9 A schematic diagram of a data processing device in an embodiment of the present disclosure is shown.
[0033] Fig.10 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0035] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0036] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0037] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0038] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0039] Response prediction is a method based on data analysis and machine learning to predict the user's response to a specific thing. Through response prediction, related companies can better understand user needs and then meet user needs.
[0040] In the related art, linear structure response prediction intelligent models are usually used for response prediction, such as logistic regression, naive Bayes, online learning machine (Follow The Regularized Leader, FTRL) logistic regression and Bayesian probability regression. The above intelligent models mainly rely on a large number of sparse features and use one-bit effective coding. The above intelligent models are difficult to capture the interactions between complex features, resulting in poor generalization ability and prediction accuracy of linear structure intelligent models for learning different features. The related art then adopted nonlinear intelligent models, such as Factorisation Machines (FMs) and Gradient Boosting Trees (GBTs) to improve model performance by utilizing different feature combinations. However, the above nonlinear intelligent models usually require manual design of feature engineering and have poor ability to process complex data.
[0041] In order to improve the performance of intelligent models, neural networks are used in related technologies for response prediction. By constructing different network layers, high-order features are directly learned. However, with the increase in the feature dimension of the input and the increase in the number of hidden layer units, the number of parameters of the neural network model increases dramatically. With the increase in the number of parameters of the neural network model, the use of neural networks for response prediction consumes a lot of computing resources.
[0042] In order to solve the above problems, the present disclosure provides a data processing method, device, electronic device, computer-readable storage medium and computer program product. The embodiments of the present disclosure convert different types of sample data sets into object feature images of the same type, avoiding adding a large number of parameters to the intelligent model. While improving the generalization ability of the intelligent model, the consumption of computing resources in the response prediction process can be reduced.
[0043] In some application scenarios, the sample data set may be the browsing information of the user on the shopping network, and the object response may be the recommendation of related products. In some application scenarios, the user feature data may be the video browsing information, and the object response may be the target video recommendation. It should be noted that the present disclosure does not specifically limit the application scenario, and the present disclosure may be applied to any scenario of response prediction.
[0044] It should be pointed out that, in the absence of conflict, the embodiments of the present disclosure and the technical features therein may be combined with each other.
[0045] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
[0046] Figure 1 A schematic diagram of the structure of a data processing system in an embodiment of the present disclosure is shown, and the system can apply the data processing method or data processing device in each embodiment of the present disclosure.
[0047] like Figure 1 As shown, the data processing system 100 may include a data acquisition module 101 and a data processing module 102. The data acquisition module 101 and the data processing module 102 may be located on two different devices. The data acquisition module 101 may be a module on an electronic device with data acquisition capabilities, such as a recording device with sound collection capabilities, a photographic device with image collection capabilities, and a computer with text information collection capabilities. The data processing module 102 may be a module on an electronic device with processing capabilities such as a computer. The data acquisition module 101 and the data processing module 102 may be located on the same device. For example, the data acquisition module 101 and the data processing module 102 may be an input module and a processing module on a computer or a mobile phone.
[0048] The data acquisition module 101 and the data processing module 102 are connected to each other via a network, which may be a wired network or a wireless network.
[0049] Optionally, the wireless network or wired network described above uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0050] The following describes a situation where the data acquisition module 101 and the data processing module 102 are located on two different devices.
[0051] The data acquisition module 101 may be located on a terminal device, which may be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, wearable devices, augmented reality devices, virtual reality devices, etc.
[0052] Optionally, the client of the application installed in different terminal devices is the same, or the client of the same type of application based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc.
[0053] The data processing module 102 may be located on a server, which may be a server that provides various services, such as a background management server that provides support for devices operated by users using terminal devices. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal device.
[0054] Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0055] Those skilled in the art will know that Figure 1 The number of data acquisition modules and data processing modules in the embodiment is only for illustration, and any number of video acquisition modules and personality recognition modules may be provided according to actual needs. The embodiments of the present disclosure are not limited to this.
[0056] The exemplary implementation method is described in detail below with reference to the accompanying drawings and embodiments.
[0057] A data processing method is provided in an embodiment of the present disclosure. The method can be executed by any electronic device with computing and processing capabilities.
[0058] Figure 2 A flow chart of a data processing method in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the data processing method provided in the embodiment of the present disclosure may include the following: S210 to S250.
[0059] S210 , dividing multiple types of sample data sets into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data.
[0060] In some embodiments, the data sorted by time may be time series data. The data in the first sample subset may also be digital data and categorical data, but the digital data and categorical data in the first sample subset are sorted by time. Exemplarily, the data sorted by time may be: the number of times a user visits a certain address on the first day, the number of times a user visits a certain address on the second day, and the number of times a user visits a certain address on the nth day, where n is a positive integer greater than or equal to 2.
[0061] In some embodiments, the sample data set may be at least one of the basic data corresponding to the user, the user behavior data, and the environmental data corresponding to the user. Among them, the basic data corresponding to the user may include the data of the user itself, such as gender, age, geographic location, and interest tags. The user behavior data may include user voice data, user image data, and data generated by user behavior. Exemplarily, the data generated by user behavior may be data on items purchased by the user, data on user clicks on displayed content, and the time the user stays on specific content. The environmental data corresponding to the user may include user-related data and data associated with the content that the user is concerned about. Exemplarily, the user-related data may include data such as relatives, friends, and devices used by the user, and the data associated with the content that the user is concerned about may include associated data on the user's click data on displayed content. Such as the type, size, keywords, and contextual content of the relevant content clicked by the user.
[0062] In some embodiments, before S210, the method may further include: obtaining a sample data set, and obtaining the sample data set may include directly obtaining the sample data set and / or obtaining the sample data set through a third-party platform. Wherein, directly obtaining user data has been described in the data processing system embodiment and will not be repeated here. Obtaining the sample data set through a third-party platform may include being based on a database, a cloud platform, etc., and the third-party platform is not specifically limited here. In some embodiments, the predicted response obtained based on the sample data set can be made more accurate by collecting the sample data set in various aspects.
[0063] In some embodiments, when the sample data set is non-text type data, the non-text type data can be first converted into text type data. Then the text type data is divided into a first sample subset and a second sample subset. Among them, the non-text type data may include sound data, image data and video data. When the non-text type data is image data, the image data may not be converted into text data, and the image data may be directly input into a dual-branch convolutional neural network. When the non-text type data is voice data, the text information in the voice information can be extracted, and the present disclosure does not limit the specific extraction method. When the non-text type data is video data, the image can be extracted from the video and then executed according to the above method.
[0064] S220, performing image conversion on the data in the first sample subset to form a first image data subset.
[0065] In some embodiments, the first image data subset may include image data. In some embodiments, the acquired sample data set includes multiple types. Converting multiple types of sample data sets into image data subsets can reduce the difficulty of processing multiple types of sample data sets while retaining the characteristics of multiple types of feature data.
[0066] S230, converting the digital data in the second sample subset into categorical data, and performing image conversion on the categorical data in the second sample subset to form a second image data subset.
[0067] In some embodiments, the data included in the second image data subset may be image data.
[0068] In some embodiments, the method of converting the data in the first sample subset into an image may be different from the method of converting the categorical data in the second sample subset into an image.
[0069] S240, performing convolution processing on the first image data subset and the second image data subset, and outputting a first image vector set and a second image vector set.
[0070] In some embodiments, S240 may include: performing a first convolution process on a first image data subset to obtain a first feature map, performing a second convolution process on a second image data subset to obtain a second feature map; performing a third convolution process on the first feature map and the second feature map to obtain a first image vector set, and performing a fourth convolution process on the first feature map and the second feature map to obtain a second image vector set.
[0071] S250, performing feature fusion on the first image vector set and the second image vector set, and outputting a model prediction result of the sample data set.
[0072] In some embodiments, the model prediction result of the sample data set may be a result obtained by performing model prediction on the sample data set. For example, if the sample data set is a data set generated by a user, the model prediction result may include at least one of information content pushed to the user and user behavior prediction.
[0073] In order to explain the present disclosure in detail, Figure 3 A model architecture diagram of an embodiment of the present disclosure is shown. Figure 3As shown, the first image data subset and the second image data subset are input into the first convolution 101 and the second convolution 201 respectively, the first image data subset is input into the first convolution 101, the first convolution 101 is connected with the third convolution 102 and the fourth convolution 202, after the first convolution 101 processes the first image data subset, the third convolution 102 and the fourth convolution 202 are input; the second image data subset is input into the second convolution 201, the second convolution 201 is connected with the third convolution 102 and the fourth convolution 202, after the second convolution 201 processes the second image data subset, the third convolution 102 and the fourth convolution 202 are input. The third convolution 102 and the fourth convolution 202 are both connected to the feature fusion layer 30 on the output side, the feature fusion layer 30 is connected to the fully connected layer 40, and the fully connected layer 40 outputs the processing result. Exemplarily, the first convolution 101 and the third convolution 102 may constitute a first branch 10 , and the second convolution 201 and the fourth convolution 202 may constitute a second branch 20 .
[0074] In the disclosed embodiment, multiple types of sample data sets are obtained, the sample data sets are divided into a first sample subset and a second sample subset, the data in the first sample subset are image-converted to form a first image data subset, the digital data in the second sample subset are converted into categorical data, and the categorical data in the second sample subset are image-converted to form a second image data subset. The first image data subset and the second image data subset are convoluted to output a first image vector set and a second image vector set, feature fusion is performed on the first image vector set and the second image vector set, and the model prediction result of the sample data set is output, and the prediction is performed after the different types of sample data sets are converted into image data, thereby improving the accuracy of the prediction.
[0075] Figure 4 A flow chart of a data processing method in an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the data processing method provided in the embodiment of the present disclosure may include the following: S410 to S470.
[0076] S410, dividing the sample data set into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data;
[0077] S420, performing image conversion on the data in the first sample subset to form a first image data subset;
[0078] S430, dividing the multiple digital data in the second sample set into multiple sets, each set including at least one digital data;
[0079] S440, converting each set into corresponding categorical data, wherein the categorical data corresponding to the digital data in each set are the same.
[0080] In some embodiments, converting digital data into categorical data based on a bucketing method may include: dividing digital data into multiple intervals according to preset rules; converting digital data in corresponding intervals into corresponding categorical data. In some embodiments, the digital data in each of the multiple intervals is the same. In some embodiments, the size of each of the multiple intervals is the same. In some embodiments, different intervals may correspond to different categorical data. Exemplarily, if there are three intervals, a first interval, a second interval, and a third interval. Among them, the categorical data corresponding to the first interval may be a first category, the categorical data corresponding to the second interval may be a second category, and the category corresponding to the third interval may be a third category data. In some embodiments, different digital data may be determined based on the intervals in which the digital data is located and the digital data to which the categorical data corresponds. Exemplarily, if digital data 1, 2, and 3 are in the first interval, and 4, 5, and 6 are in the second interval, the categorical data corresponding to the first interval may be a first category, and the categorical data corresponding to the second interval may be a second category, then the categorical data corresponding to 1 may be a first category and a first type, the categorical data corresponding to 2 may be a first category and a second type, and the categorical data corresponding to 4 may be a second category and a fourth type.
[0081] S450, performing image conversion on the categorical data in the second sample subset to form a second image data subset;
[0082] S460, performing convolution processing on the first image data subset and the second image data subset, and outputting a first image vector set and a second image vector set.
[0083] S470, performing feature fusion on the first image vector set and the second image vector set, and outputting a model prediction result of the sample data set.
[0084] In some embodiments, the digital data is divided into multiple intervals, and then the digital data in the corresponding intervals are converted into corresponding categorical data. The categorical data before and after the conversion are then converted into non-sequential object feature images, and the data in the same format is converted into an image data subset, thereby reducing the difficulty of the conversion.
[0085] Figure 5 A flow chart of a data processing method in an embodiment of the present disclosure is shown as follows: Figure 5 As shown, the data processing method provided in the embodiment of the present disclosure may include the following: S510 to S560.
[0086] S510, dividing the sample data sets of multiple types into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data;
[0087] S520, performing image conversion on the data in the first sample subset to form a first image data subset;
[0088] S530: Convert the digital data in the second sample subset into categorical data.
[0089] S540, encoding the category data to obtain first feature data.
[0090] In some embodiments, the categorical data may be encoded using a one-hot encoding method or a hash encoding method to obtain feature data of the first dimension. Among them, one-hot encoding is a commonly used method for converting categorical variables into a numerical form that can be understood by a machine learning algorithm. This method is implemented by creating a vector that is 1 only at the index position representing the current category and 0 at all other positions. Hash encoding, also generally referred to as hash encoding or hash encoding, is a technique that transforms an input of arbitrary length into an output of fixed length through a hash algorithm. This conversion is a compression mapping, and the space of hash values is usually much larger than the space of inputs, so different inputs may produce the same output, and it is impossible to uniquely determine the input value from the hash value.
[0091] S550: Convert the first feature data into second feature data, wherein the dimension of the first feature data is not less than the dimension of the second feature data.
[0092] In some embodiments, data dimension refers to various aspects used to describe and organize data in data analysis, and is the basis for understanding and organizing complex data. It covers a variety of information types, such as time, location, user characteristics, etc., allowing analysts to examine data from multiple perspectives. Exemplarily, the first feature data can be two-dimensional data (x, y) where x and y are both real numbers, and the second feature data can be three-dimensional data (a, b, c) where a, b, and c are all real numbers.
[0093] In some embodiments, the first feature data may be converted into the second feature data based on a dimensionality reduction algorithm, and the dimensionality reduction algorithm may be principal component analysis (PCA) or kernel principal component analysis (Kernel PCA).
[0094] S560: Convert the second feature data into a second image data subset.
[0095] In some embodiments, converting the second feature data into a second image data subset may include converting the two-dimensional second feature data into a second image data subset, and converting the three-dimensional second feature data into a second image data subset. Specifically, each dimension may correspond to a coordinate point of the image, and then the final second image data subset may be determined based on the coordinate point. Exemplarily, if the feature data is (2, 3), then the second image data subset converted from the second feature data may be a point with a horizontal coordinate of 2 and a vertical coordinate of 3. It may also be a point with a horizontal coordinate of 3 and a vertical coordinate of 2.
[0096] S570, performing convolution processing on the first image data subset and the second image data subset, and outputting a first image vector set and a second image vector set.
[0097] S580, performing feature fusion on the first image vector set and the second image vector set, and outputting a model prediction result of the sample data set.
[0098] A point with a coordinate of 2 and a vertical coordinate of 3. It can also be a point with a horizontal coordinate of 3 and a vertical coordinate of 2.
[0099] In the disclosed embodiment, the categorical data is encoded to obtain first feature data, and then the first feature data is converted into second feature data, and the second feature data is converted into a second image data subset. After unifying the dimensions, the categorical data is finally converted into a second image data subset, which reduces the difficulty of converting a sample data set into image-type data while retaining the features of the categorical data.
[0100] In some embodiments, converting the second feature data into a second image data subset includes: embedding a position code in the second feature data; and converting the second feature data after the embedded position code into the second image data subset.
[0101] In some embodiments, the position coding may include data corresponding to each second feature data one by one. In some embodiments, embedding the position coding may include superimposing, multiplying, and other operations on the position coding and the second feature data. Exemplarily, if the second feature data is (2,3) and the position coding is 5, the data obtained after embedding the second feature data into the position coding may be (7,8). In some embodiments, the position coding corresponding to each second feature data is different. In some embodiments, a plurality of second feature data may be sorted, and then the corresponding position coding may be configured for the second feature data according to the sorting sequence.
[0102] In some embodiments, after the second feature data is embedded in the position code, all the second dimension feature data embedded in the position code may also be normalized. In some embodiments, the operation of converting the second feature data embedded in the position code into the second image data subset is the same as the operation of converting the second feature data into the second image data subset, which will not be repeated here.
[0103] In the disclosed embodiment, position codes are inserted into the second feature data so that the second feature data are different from each other, and further the second image data subsets corresponding to the second sample subsets are different, thereby retaining the characteristics of the sample data and making the model prediction results more accurate.
[0104] Figure 6 A flow chart of a data processing method in an embodiment of the present disclosure is shown as follows: Figure 6 As shown, the data processing method provided in the embodiment of the present disclosure may include the following: S610 to S640.
[0105] S610, using the time corresponding to the data in the first sample subset as the first coordinate, and using the data in the first sample subset as the second coordinate;
[0106] S620, determining an interval where the data in the first sample subset is located at the second coordinate, and dividing the interval into a plurality of sub-intervals based on the distribution of the data in the first sample subset;
[0107] S630: Perform scaling processing on the data in each sub-interval, and draw the scaled data in each sub-interval as a first image data subset.
[0108] In some embodiments, the data in the first sample subset may be time and data corresponding to the time. For example, if the data in the first sample subset is that the target is visited 6 times within 5 days, 5 may be used as the first coordinate and 6 may be used as the second coordinate. The first coordinate may be the horizontal coordinate and the second coordinate may be the vertical coordinate. The second coordinate may be the horizontal coordinate and the first coordinate may be the vertical coordinate.
[0109] In some embodiments, the data in different first sample subsets may include data associated with different things. In some embodiments, the number of data in the first sample subset may be the same as or different from the number of subintervals. Exemplarily, in the same period of time, the number of visits to the first target and the number of clicks on the second target may be data in the two first sample subsets. At this time, two subintervals may be determined based on the data in the two first sample subsets. Exemplarily, if within 1 hour, the number of visits to the first target every ten minutes is 1, 3, 5, 4, 2, and 6 respectively; the number of clicks on the second target every ten minutes may be 8, 10, 15, 16, 13, and 12. Then the first subinterval may be determined to be 1-7, and the second subinterval may be 8-16. In some embodiments, scaling the data in the corresponding first sample subset may include: scaling the data in the corresponding first sample subset according to a preset ratio, and the data scaling ratios in different subintervals are different. The present disclosure does not specifically limit the size of the preset ratio, and the user can customize the preset ratio so that the data in the scaled first sample subset can all be reflected in the same first image subset.
[0110] In the disclosed embodiment, by scaling the data in the first sample subset and then drawing the data in multiple first sample subsets in the same first image subset, when the model processes the first image subset, it is convenient for the model to obtain the features of the data in multiple first sample subsets based on the same first image subset, thereby improving the accuracy of data processing in the first sample subset.
[0111] Figure 7 A flow chart of a data processing method in an embodiment of the present disclosure is shown. Figure 7 As shown, the method may include:
[0112] S710, performing a first convolution process on the first image data subset to obtain a first feature map, and performing a second convolution process on the second image data subset to obtain a second feature map;
[0113] S720, performing a third convolution process on the first feature map and the second feature map to obtain a first image vector set, and performing a fourth convolution process on the first feature map and the second feature map to obtain a second image vector set.
[0114] S730, fusing the first image vector set and the second image vector set to obtain a fused feature vector;
[0115] S740, performing full connection processing on the fused feature vector to obtain a model prediction result of the sample data set.
[0116] In some embodiments, other neural network processing layers may be arranged between the first convolution and the third convolution. For example, at least one of an activation layer and a normalization layer may be arranged between the first convolution and the third convolution layer. Other neural network processing layers may be arranged between the second convolution and the fourth convolution. At least one of an activation layer and a normalization layer may be arranged between the second convolution and the fourth convolution. In some embodiments, input layers may be arranged before the first convolution and the second convolution, respectively.
[0117] In some embodiments, the fused feature vector may be a one-dimensional vector. By acquiring the first feature map and the second feature map, a first image vector set and a second image vector set are obtained, both of which may be one-dimensional vectors, and then the two one-dimensional vectors are fused into a final one-dimensional vector. In some embodiments, the above-mentioned image vector set may be the batch number, the number of channels, the feature map height, and the feature map width.
[0118] In the disclosed embodiment, the first image subset and the second image subset are processed separately through the model to obtain the model prediction result. While retaining the features of the first image subset and the second image subset, the features of the first image subset and the second image subset can be fused, thereby improving the accuracy of the model prediction.
[0119] The present disclosure also provides an exemplary embodiment of a data processing method. It should be noted that this example is applicable to a user product recommendation scenario. The example disclosed in the present disclosure is only used to explain the disclosed method in detail, and does not limit the above method. Figure 8 FIG. 2 is a flowchart showing an example of a data processing method in an embodiment of the present disclosure. Figure 8 As shown, the method may include:
[0120] S801, obtaining multiple types of sample data sets.
[0121] In some embodiments, the sample data set may include user data, and the user data may include at least one of user features, content features, context features, and behavioral features. Exemplarily, user features: include the user's basic information, interest tags, and historical behaviors, wherein the user's basic information includes the user's gender, age, and geographic location; interest tags include topics that the user is concerned about and areas of interest; historical behaviors include click history, purchase history, and browsing history. Content features: include content type, size, content keywords, content master information, etc. For recommendation systems, they also include attributes, tags, and descriptions of recommended content, wherein the content may include advertising content. Context features: include the user's current context environment information, such as access time, device type, network environment, and context information related to the content, such as page content and user search keywords.
[0122] S802, dividing the sample data set into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data.
[0123] In some embodiments, the data in the first sample subset is sorted by time, such as the time the user stays on a specific page every day in the past year, the number of times a specific button is clicked, and the number of times an application is logged in.
[0124] S803, performing bucket processing on the digital data in the second sample subset.
[0125] In some embodiments, if the digital data is the size and word count of the content that the user is interested in, and the numbers are 1, 2, 3, 4, 5, and 6 respectively, then 1, 2, and 3 are in the first interval, and 4, 5, and 6 are in the second interval, and the first interval and the second interval are different buckets after bucketing.
[0126] S804, converting the digital data after the bucketing process into categorical data.
[0127] In some embodiments, the category data corresponding to the first interval can be the first category, and the category data corresponding to the second interval can be the second category. In this case, the category data corresponding to 1 can be the first category and the first type, the category data corresponding to 2 can be the first category and the second type, and the category data corresponding to 4 can be the second category and the fourth type.
[0128] S805, encoding the categorical data after the bucketing process to obtain first feature data.
[0129] In some embodiments, the categorical data may be encoded using a one-hot encoding method or a hash encoding method to obtain first feature data. For example, if the categorical data is the first category, three-dimensional data such as (x, y, z) or two-dimensional data (x, y) may be obtained after encoding. Where x, y, and z are all real numbers.
[0130] S806, converting the first feature data into second feature data.
[0131] In some embodiments, the second characteristic data may be two-dimensional data.
[0132] In some embodiments, a dimensionality reduction algorithm, such as PCA, Kernel PCA, T-SNE, and Uap, may be used to reduce high-dimensional first feature data to second feature data of second dimension.
[0133] For example, if the first feature data is (x, y, z), then after conversion, the second feature data may be (a, b), where a and b are both real numbers.
[0134] S807, embed the second feature data into the position code.
[0135] In some embodiments, the method of embedding position encoding can be the same as the deep learning model Transformer based on the self-attention mechanism. In some embodiments, the second feature data of the embedded position encoding can be normalized.
[0136] Exemplarily, if the second feature data is (a, b) and (x, y), the second feature data after embedded position coding may be (a+3, b+3) and (x+5, y+5). It should be noted that different second feature data may have different embedded position codings.
[0137] S808, drawing a second image data subset based on the second feature data of the embedded position code.
[0138] Exemplarily, the second feature data after embedded position encoding can be (a+3, b+3) and (x+5, y+5). In this case, the coordinate point is plotted with a+3 as the horizontal coordinate and b+3 as the vertical coordinate, and the coordinate point is plotted with x+5 as the horizontal coordinate and y+5 as the vertical coordinate to obtain the second image data subset.
[0139] S809: Use the time corresponding to the data in the first sample subset as the first coordinate, and use the data in the first sample subset as the second coordinate.
[0140] For example, the data in the first sample subset may be time and data corresponding to the time, such as clicking the mouse 5 times in the first second and clicking the mouse 10 times in the second second.
[0141] At this time, you can draw an image with the first second as the horizontal axis, 5 times as the vertical axis, the second second as the horizontal axis, and 10 times as the vertical axis.
[0142] S810, determining an interval where the data in the first sample subset is located at the second coordinate.
[0143] S811, dividing the interval into multiple sub-intervals based on the distribution of data in the first sample subset.
[0144] For example, if within one hour, the number of visits to the first target every ten minutes is 1, 3, 5, 4, 2, 6 respectively; the number of clicks on the second target every ten minutes may be 8, 10, 15, 16, 13, 12. Then the first sub-interval may be determined to be 1-7, and the second sub-interval may be 8-16.
[0145] S812: scaling the data in the first sample subset within different sub-intervals to draw the data in different first sample subsets in the first image data subset.
[0146] In some embodiments, scaling may include converting each unit object in the original image into 10 pixels. After scaling, each unit corresponds to 1 pixel.
[0147] Exemplarily, scaling the data in the first sample subset may include: firstly dividing the image ordinate according to the number of the first sample subsets, taking the ordinate interval as [0,1] as an example, assuming that there are 4 first sample subset data, the sub-intervals of the data are [0,0.25], [0.25,0.50], [0.50,0.75], [0.75,1.0], and then scaling the different data accordingly according to the divided sub-intervals.
[0148] S813, performing convolution processing on the first image data subset and the second image data subset, and outputting a first image vector set and a second image vector set;
[0149] S814, performing feature fusion on the first image vector set and the second image vector set, and outputting the model prediction result of the sample data set.
[0150] Based on the same inventive concept, the present disclosure also provides a data processing device in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0151] Fig. 9 A schematic diagram of a data processing device in an embodiment of the present disclosure is shown. Fig. 9 As shown, the data processing device 900 includes:
[0152] A division module 910, configured to divide the sample data set into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data;
[0153] A first conversion module 920, configured to perform image conversion on the data in the first sample subset to form a first image data subset;
[0154] A second conversion module 930, configured to convert the digital data in the second sample subset into categorical data, and perform image conversion on the categorical data in the second sample subset to form a second image data subset;
[0155] A convolution module 940 is used to perform convolution processing on the first image data subset and the second image data subset, and output a first image vector set and a second image vector set;
[0156] The output module 950 is used to perform feature fusion on the first image vector set and the second image vector set, and output the model prediction result of the sample data set.
[0157] In one embodiment of the present disclosure, the second conversion module 930 includes:
[0158] An encoding unit, used for encoding the categorical data to obtain first feature data;
[0159] A first conversion unit, configured to convert the first feature data into second feature data, wherein the dimension of the first feature data is not less than the dimension of the second feature data;
[0160] The second conversion unit is used to convert the second feature data into a second image data subset.
[0161] In one embodiment of the present disclosure, the second conversion module 930 includes:
[0162] An inserting unit, used for embedding a position code in the second feature data;
[0163] The third conversion unit converts the second feature data after the embedding position encoding into a second image data subset.
[0164] In one embodiment of the present disclosure, the first conversion module 920 includes:
[0165] A first determining unit, configured to use the time corresponding to the data in the first sample subset as a first coordinate, and use the data in the first sample subset as a second coordinate;
[0166] A second determining unit, configured to determine an interval where the data in the first sample subset is located at the second coordinate, and divide the interval into a plurality of sub-intervals based on the distribution of the data in the first sample subset;
[0167] The scaling unit is used to scale the data in each sub-interval and draw the scaled data in each sub-interval as a first image data subset.
[0168] In one embodiment of the present disclosure, the convolution module 940 includes:
[0169] A first convolution unit, configured to perform a first convolution process on the first image data subset to obtain a first feature map, and perform a second convolution process on the second image data subset to obtain a second feature map;
[0170] The second convolution unit is used to perform a third convolution process on the first feature map and the second feature map to obtain a first image vector set, and perform a fourth convolution process on the first feature map and the second feature map to obtain a second image vector set.
[0171] In one embodiment of the present disclosure, the output module 950 includes:
[0172] A fusion unit, used for fusing the first image vector set and the second image vector set to obtain a fused feature vector;
[0173] The output unit is used to perform full connection processing on the fused feature vector to obtain the model prediction result of the sample data set.
[0174] In the disclosed embodiment, multiple types of sample data sets are obtained, the sample data sets are divided into a first sample subset and a second sample subset, the data in the first sample subset are image-converted to form a first image data subset, the digital data in the second sample subset are converted into categorical data, and the categorical data in the second sample subset are image-converted to form a second image data subset. The first image data subset and the second image data subset are convoluted to output a first image vector set and a second image vector set, feature fusion is performed on the first image vector set and the second image vector set, and the model prediction result of the sample data set is output, and the prediction is performed after the different types of sample data sets are converted into image data, thereby improving the accuracy of the prediction.
[0175] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0176] The present disclosure provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the above-mentioned data processing methods by executing the executable instructions.
[0177] For example, refer to Fig.10 The electronic device 1000 according to this embodiment of the present disclosure is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0178] like Fig.10As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, and a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010).
[0179] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps of various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps of the above method embodiment:
[0180] Dividing multiple types of sample data sets into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data;
[0181] Performing image conversion on the data in the first sample subset to form a first image data subset;
[0182] Converting the digital data in the second sample subset into categorical data, and performing image conversion on the categorical data in the second sample subset to form a second image data subset;
[0183] Convolutionally processing the first image data subset and the second image data subset to output a first image vector set and a second image vector set;
[0184] The first image vector set and the second image vector set are feature fused, and the model prediction result of the sample data set is output.
[0185] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202 , and may further include a read-only storage unit (ROM) 10203 .
[0186] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0187] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0188] The electronic device 1000 may also communicate with one or more external devices 1040 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0189] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0190] In the disclosed exemplary embodiments, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. Fig.10 A schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure is shown. Fig.10 As shown, the computer-readable storage medium 1000 stores a program product capable of implementing the above method of the present disclosure.
[0191] In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary implementations of the present disclosure described in the above "Specific Implementation Methods" section of this specification.
[0192] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, 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), 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 foregoing.
[0193] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0194] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0195] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0196] The embodiments of the present disclosure provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the data processing method provided in various optional ways in any embodiment of the present disclosure.
[0197] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0198] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0199] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope of the present disclosure is indicated by the appended claims.
Claims
1. A data processing method, characterized in that: include: Dividing multiple types of sample data sets into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data; Performing image conversion on the data in the first sample subset to form a first image data subset; converting the digital data in the second sample subset into categorical data, and performing image conversion on the categorical data in the second sample subset to form a second image data subset; Convolutionally processing the first image data subset and the second image data subset to output a first image vector set and a second image vector set; Feature fusion is performed on the first image vector set and the second image vector set, and a model prediction result of the sample data set is output.
2. The method according to claim 1, characterized in that The step of performing image conversion on the categorical data in the second sample subset to form a second image data subset includes: Encoding the category data to obtain first feature data; Converting the first feature data into second feature data, wherein the dimension of the first feature data is not less than the dimension of the second feature data; The second feature data is converted into the second image data subset.
3. The method according to claim 2, characterized in that The converting the second feature data into the second image data subset comprises: embedding a position code in the second feature data; The second feature data after the embedding position encoding is converted into the second image data subset.
4. The method according to claim 1, characterized in that: The performing image conversion on the data in the first sample subset to form a first image data subset includes: Using the time corresponding to the data in the first sample subset as the first coordinate, and using the data in the first sample subset as the second coordinate; Determine an interval in which the data in the first sample subset is located at the second coordinate, and divide the interval into a plurality of sub-intervals based on the distribution of the data in the first sample subset; Scaling processing is performed on the data in each of the sub-intervals, and the scaled data in each of the sub-intervals is drawn as the first image data subset.
5. The method according to claim 1, characterized in that The step of performing convolution processing on the first image data subset and the second image data subset to output a first image vector set and a second image vector set comprises: Performing a first convolution process on the first image data subset to obtain a first feature map, and performing a second convolution process on the second image data subset to obtain a second feature map; The first feature map and the second feature map are subjected to a third convolution process to obtain the first image vector set, and the first feature map and the second feature map are subjected to a fourth convolution process to obtain the second image vector set.
6. The method according to claim 1, characterized in that The step of fusing the features of the first image vector set and the second image vector set and outputting the model prediction result of the sample data set includes: fusing the first image vector set and the second image vector set to obtain a fused feature vector; The fused feature vector is fully connected to obtain a model prediction result of the sample data set.
7. A data processing device, characterized in that: include: a partitioning module, configured to partition the sample data set into a first sample subset and a second sample subset, wherein the data in the first sample subset is sorted by time, and the second sample subset includes digital data and categorical data; A first conversion module, used for performing image conversion on the data in the first sample subset to form a first image data subset; A second conversion module, used for converting the digital data in the second sample subset into categorical data, and performing image conversion on the categorical data in the second sample subset to form a second image data subset; A convolution module, performing convolution processing on the first image data subset and the second image data subset, and outputting a first image vector set and a second image vector set; An output module is used to perform feature fusion on the first image vector set and the second image vector set, and output the model prediction result of the sample data set.
8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the data processing method according to any one of claims 1 to 6 by executing the executable instructions.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program or computer instructions, characterized in that: The computer program or the computer instruction is loaded and executed by a processor, so that the computer implements the data processing method according to any one of claims 1 to 6.