Data processing method and apparatus, and electronic device, computer-readable storage medium and computer program product

Through distributed storage and processing of different types of sparse features in the graphics processor, the problems of slow CPU training speed and insufficient GPU storage are solved, and efficient updating and rapid acquisition of embedded features are achieved.

WO2024221925A1PCT designated stage expired Publication Date: 2024-10-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/135891
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-28
Filing Date
2023-12-01
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

In the existing technology, learning and training of embedded features based on the Parameter Server method are performed on the CPU, resulting in slow training speed, and the storage capacity of the GPU cannot meet the storage requirements of large-scale embedded features.

Method used

By storing and processing different types of full sparse features in the graphics processor, using multiple graphics processors for distributed storage and processing, distributed storage and updating of embedded features of sparse features are achieved, and probabilistic mapping processing is used to generate update instructions to Update embedded features.

Benefits of technology

While meeting storage requirements, it significantly improves the update speed of embedded features, fully utilizes the computational efficiency of the graphics processor, and improves training efficiency and acquisition efficiency of embedded features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023135891_31102024_PF_FP_ABST
    Figure CN2023135891_31102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are an artificial-intelligence-based data processing method and apparatus, and an electronic device, a computer-readable storage medium and a computer program product. The data processing method is applied to a first graphics processing unit. The first graphics processing unit stores embedding features of full-scale sparse features of a first type, and a second graphics processing unit stores embedding features of full-scale sparse features of a second type, wherein the first type is different from the second type. The method comprises: a first graphics processing unit acquiring sparse features of a target sample, wherein the sparse features of the target sample include first sparse features of a first type and second sparse features of a second type; the first graphics processing unit acquiring, from among embedding features of full-scale sparse features of the first type, embedding features corresponding to the first sparse features; the first graphics processing unit acquiring, from a second graphics processing unit, embedding features that correspond to the second sparse features and are obtained by querying embedding features of full-scale sparse features of the second type; the first graphics processing unit combining the embedding features corresponding to the first sparse features and the embedding features corresponding to the second sparse features, so as to form embedding features corresponding to the sparse features of the target sample; and the first graphics processing unit executing probability mapping processing on the embedding features corresponding to the sparse features of the target sample, and generating an update instruction according to a probability mapping result, wherein the update instruction is used for instructing the second graphics processing unit to update the embedding features of the full-scale sparse features of the second type.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, device, electronic device, computer-readable storage medium, and computer program product

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the Chinese patent application with application number 202310492698.2 and application date April 28, 2023, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference. Technical Field

[0003] The present application relates to artificial intelligence technology, and in particular to a data processing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art

[0004] Artificial Intelligence (AI) is a comprehensive field of computer science that studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. Analysis of medical images and medical texts is a key application of AI. Medical analysis systems use computers to process, analyze, and understand medical images and texts to identify various patterns of targets and objects.

[0005] Related technologies use a parameter server approach to learn embedded features. Typically, the embedded representations of sparse features are stored on the central processing unit (CPU), so embedding training is also performed on the CPU. However, the large scale of embedding operations results in slow training speeds.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide an artificial intelligence-based data processing method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the update processing speed through a graphics processor while achieving large-scale embedded feature storage.

[0008] The technical solution of the embodiment of the present application is implemented as follows:

[0009] An embodiment of the present application provides an artificial intelligence-based data processing method, the data processing method being applied to a first graphics processor, the first graphics processor storing embedded features of a first type of full sparse features, and a second graphics processor storing embedded features of a second type of full sparse features, where the first type is different from the second type. The method includes:

[0010] The first graphics processor obtains sparse features of a target sample, where the sparse features of the target sample include a first sparse feature of the first type and a second sparse feature of the second type;

[0011] The first graphics processor obtains an embedded feature corresponding to the first sparse feature from the embedded features of the full set of sparse features of the first type;

[0012] The first graphics processor obtains, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full amount of sparse features of the second type;

[0013] The first graphics processor combines the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features into embedded features corresponding to the sparse features of the target sample;

[0014] The first graphics processor performs probability mapping processing on the embedded features of the sparse features corresponding to the target sample, and generates an update instruction based on the probability mapping result, wherein the update instruction is used to instruct the second graphics processor to update the embedded features of the full amount of sparse features of the second type.

[0015] An embodiment of the present application provides an artificial intelligence-based data processing device. The data processing method is applied to a first graphics processor, the first graphics processor stores embedded features of a first type of full sparse features, and the second graphics processor stores embedded features of a second type of full sparse features, where the first type is different from the second type. The device includes:

[0016] a first receiving module configured to obtain, for the first graphics processor, sparse features of a target sample, where the sparse features of the target sample include a first sparse feature of the first type and a second sparse feature of the second type;

[0017] A first acquisition module is configured to obtain, by the first graphics processor, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full set of sparse features of the second type;

[0018] A first returning module is configured to obtain, by the first graphics processor, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full set of sparse features of the second type;

[0019] a first determining module configured to use the first graphics processor to combine the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features into embedded features corresponding to the sparse features of the target sample;

[0020] The first update module is configured to cause the first graphics processor to perform probability mapping processing on the embedded features of the sparse features corresponding to the target sample, and generate an update instruction based on the probability mapping result, wherein the update instruction is used to instruct the second graphics processor to update the embedded features of the full amount of sparse features of the second type.

[0021] An embodiment of the present application provides a data processing method, the data processing method being applied to a second graphics processor, wherein the first graphics processor stores embedded features of a first type of full sparse features, and the second graphics processor stores embedded features of a second type of full sparse features, where the first type is different from the second type;

[0022] The method comprises:

[0023] The second graphics processor receives the second sparse features of the second type sent by the first graphics processor;

[0024] The second graphics processor queries the embedded features of the full set of sparse features of the second type to obtain an embedded feature corresponding to the second sparse feature;

[0025] The second graphics processor transmits the embedded features corresponding to the second sparse features to the first graphics processor, so that the first graphics processor performs a probability mapping process on the embedded features corresponding to the first sparse features of the first type and the embedded features corresponding to the second sparse features, wherein the embedded features corresponding to the first sparse features are obtained by the first graphics processor from the embedded features of the full set of sparse features of the first type;

[0026] The second graphics processor receives an update instruction generated according to the probability mapping result from the first graphics processor, and updates the embedded features of the second type of full-quantity sparse features based on the update instruction.

[0027] An embodiment of the present application provides a data processing device, wherein the data processing method is applied to a second graphics processor, wherein the first graphics processor stores embedded features of a first type of full sparse features, and the second graphics processor stores embedded features of a second type of full sparse features, where the first type is different from the second type.

[0028] The device comprises:

[0029] a second receiving module, configured to receive, by the second graphics processor, the second sparse features of the second type sent by the first graphics processor;

[0030] A query module configured to query, by the second graphics processor, the embedded features corresponding to the second sparse features from the embedded features of the full set of sparse features of the second type;

[0031] a second returning module configured to cause the second graphics processor to transmit the embedded features corresponding to the second sparse features to the first graphics processor, so that the first graphics processor performs a probability mapping process on the embedded features corresponding to the first sparse features of the first type and the embedded features corresponding to the second sparse features, wherein the embedded features corresponding to the first sparse features are obtained by the first graphics processor from the embedded features of the full set of sparse features of the first type;

[0032] The second updating module is configured to receive an update instruction generated according to the probability mapping result from the first graphics processor by the second graphics processor, and update the embedded features of the second type of full-scale sparse features based on the update instruction.

[0033] An embodiment of the present application provides a graphics processor, which is used to execute the data processing method provided in the embodiment of the present application.

[0034] An embodiment of the present application provides an electronic device, comprising:

[0035] a memory for storing computer-executable instructions;

[0036] The graphics processor is configured to implement the data processing method provided in the embodiment of the present application when executing the computer-executable instructions stored in the memory.

[0037] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor is a central processing unit or a graphics processing unit.

[0038] An embodiment of the present application provides a computer program product, including computer-executable instructions, which, when executed by a processor, implement the data processing method provided in the embodiment of the present application, wherein the processing area is a central processing unit or a graphics processing unit.

[0039] The embodiments of the present application have the following beneficial effects:

[0040] Storing embedded features in different graphics processors according to type can achieve distributed storage of embedded features. The first graphics processor obtains different types of sparse features of the target sample. The first graphics processor obtains the first type of embedded features locally and obtains the second type of embedded features from the second graphics processor. The classification according to type makes it convenient to obtain embedded features from the corresponding graphics processor, which can improve acquisition efficiency and facilitate feature management. The first graphics processor performs probability mapping processing on the two types of embedded features and transmits update instructions to the second graphics processor based on the probability mapping results. The update instructions are used to instruct the second graphics processor to update the second type of embedded features, thereby realizing the update of embedded features under the premise of distributed storage, making full use of the high efficiency of graphics processor calculation, and greatly improving the update speed of embedded features while meeting storage requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] FIG1A is a schematic diagram of the structure of an artificial intelligence-based data processing system provided in an embodiment of the present application;

[0042] FIG1B is an architecture diagram of a data processing system provided in an embodiment of the present application;

[0043] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0044] 3A-3D are flowcharts of an artificial intelligence-based data processing method according to an embodiment of the present application;

[0045] FIG4 is a schematic diagram of a framework of a recommendation system provided in an embodiment of the present application;

[0046] FIG5 is a schematic diagram of the physical architecture of the Parameter Server provided in an embodiment of the present application;

[0047] FIG6 is a schematic diagram of a single working node provided in an embodiment of the present application;

[0048] FIG7 is a schematic diagram of data flow of an artificial intelligence-based data processing method provided in an embodiment of the present application;

[0049] FIG8 is a data flow diagram of the artificial intelligence-based data processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0051] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0052] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0054] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0055] 1) Feature Embedding: Embedding is a method of representing an object using a numerical vector. This object can be a word, an item, or even a movie. Recommendation scenarios involve numerous categorical and ID-type features. Extensive use of one-hot encoding results in extremely sparse sample feature vectors. The structural characteristics of deep learning are not conducive to processing sparse feature vectors. Therefore, almost all deep learning recommendation models use an embedding layer to convert sparse high-dimensional feature vectors into dense low-dimensional feature vectors, also known as feature embedding.

[0056] 2) TensorFlow: It is a symbolic mathematical system based on data flow programming. It is widely used in the programming implementation of various machine learning algorithms. It has a multi-level structure and can be deployed on various servers, PC terminals and web pages. It supports GPU and TPU high-performance numerical calculations and is widely used in product development and scientific research in various fields.

[0057] 3) Parameter Server: This is a programming framework that facilitates the development of distributed parallel programs, with a focus on supporting the distributed storage and coordination of large-scale parameters. Nodes in a parameter server cluster can be divided into two types: compute nodes and parameter service nodes. Compute nodes are responsible for computing and learning the assigned training data (blocks) and updating the corresponding parameters. Parameter service nodes utilize distributed storage, each storing a portion of the global parameters and acting as a service provider to accept parameter query and update requests from compute nodes.

[0058] 4) Sparse features and dense features: Sparse features are those that appear discontinuously in a dataset, and most of their values ​​are zero. For example, if there are 100 account numbers, then for each account number, 99 digits of the sparse features will be 0, and only 1 digit will be 1. They are called sparse features because they have very few non-zero values ​​in the dataset. The full sparse features represent the sparse features of all samples. For example, for an account type, if all samples have a total of 100 accounts, then the 100 sparse features corresponding to these 100 accounts are the full sparse features of the account type. Dense features are generally used relative to sparse features. The proportion of 0 values ​​in dense features is small, or even non-existent.

[0059] 5) Type: The type provided in the embodiments of the present application can be a content type or a data format type. The content type is distinguished based on the semantics represented by the sparse features, and the data format type is distinguished based on the data format of the sparse features.

[0060] In the related art, the embedded features are learned based on the Parameter Server method. Usually, the embedded feature representation (embedding) of the sparse features will be stored on the central processing unit (CPU), and the embedding training is also completed in the CPU. However, due to the large scale of the embedding operation, if the embedding training is completed in the CPU, the training speed will be limited. When implementing the embodiments of the present application, the applicant found that if the embedding training is deployed in the graphics processing unit (GPU), the training speed can be effectively improved, but the storage capacity of the GPU cannot meet the storage requirements of large-scale embedding.

[0061] The embodiments of the present application provide an artificial intelligence-based data processing method, device, electronic device, and computer-readable storage medium, which can improve the update processing speed through a graphics processor while achieving large-scale embedded feature storage.

[0062] The data processing method provided in the embodiments of the present application can be implemented by the terminal / server alone; it can also be implemented by the terminal and the server in collaboration, for example, the terminal or the server alone undertakes the data processing method described below, or the terminal sends a data sample to the server, and the server executes the data processing method based on the received data sample.

[0063] The electronic devices for data processing provided in the embodiments of the present application may be various types of terminals or servers, wherein the server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services; the terminal may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, vehicle-mounted terminal, etc., but is not limited thereto. The terminal and server may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0064] Taking servers as an example, it can be a server cluster deployed in the cloud, opening artificial intelligence cloud services (AI as a Service, AiaaS) to users. The platform will split several common AI services and provide independent or packaged services in the cloud. This service model is similar to an AI theme mall. All users can access one or more artificial intelligence services provided by the AIaaS platform through the application programming interface.

[0065] As an example, one AI cloud service may be a data processing service, where a cloud server encapsulates a data processing program provided by an embodiment of the present application. A user invokes the data processing service in the cloud service through a terminal, causing the cloud server to invoke the encapsulated data processing program.

[0066] Refer to Figure 1A, which is a schematic diagram of an application scenario of the data processing system provided in an embodiment of the present application. The terminal 400 is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. There are 4 GPUs deployed in the server 200, and GPU1 and GPU2 are used for illustration below.

[0067] The data sample may be a data sample for a recommendation model. For example, for a news recommendation model, a single data sample may include relevant object data of an account logged into a news client, where the relevant object data includes an account identifier (account ID), account age, attribute tags representing account interests, etc. The embedded features of the sparse features corresponding to the first type (e.g., account identifier type) in the full data sample are stored in GPU 1 deployed in server 200, and the embedded features of the sparse features corresponding to the second type (e.g., age group type) in the full data sample are stored in GPU 2 deployed in server 200.

[0068] Terminal 400 sends a matching request to server 200, which calls a recommendation model. A recommendation model is deployed on any GPU (e.g., GPU1). The inputs to the recommendation model are the target object's account ID type embedded features and the age group type embedded features. Therefore, GPU1 needs to query GPU2 for the target object's age group type embedded features based on the sparse features of the age group type. The output of the recommendation model is the recommendation probability that the target object will click on a piece of news. When the recommendation probability exceeds the probability threshold, server 200 returns the news to terminal 400, and the news client pushes the news to the target object. To improve recommendation accuracy, the following describes the process for updating each type of embedded features.

[0069] See FIG. 1B , which is an architecture diagram of a data processing system provided in an embodiment of the present application. Server 200 receives target sample A, where target sample A is input to GPU1. GPU1 obtains the sparse features of target sample A. The sparse features of target sample A include the sparse features of target sample A in the account identification type and the sparse features of target sample A in the age group type. GPU1 obtains the embedded features of the sparse features of target sample A in the account identification type from the embedded features of the full set of sparse features of the account identification type. GPU1 obtains the embedded features of the sparse features of target sample A in the age group type from GPU2. The embedded features of the sparse features of target sample A in the age group type are obtained by GPU2 from the embedded features of the full set of sparse features of the age group type. GPU1 determines the embedded features of the sparse features of target sample A based on the embedded features of the sparse features of target sample A in the account identification type and the embedded features of the sparse features of target sample A in the age group type. GPU1 forward propagates the embedded features of the sparse features of target sample A and transmits an update instruction to GPU2 based on the probability mapping result. The update instruction is used to instruct GPU2 to update the embedded features of the full set of sparse features of the age group type.

[0070] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be 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, and big data and artificial intelligence platforms. The terminal 400 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to these. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present invention.

[0071] In some embodiments, the terminal or server can implement the artificial intelligence-based data processing method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a live broadcast APP or an instant messaging APP; it can also be a small program, that is, a program that can be run only by downloading it into a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in.

[0072] The structure of an electronic device for data processing provided by an embodiment of the present application is described below. Referring to FIG2 , FIG2 is a schematic diagram of the structure of an electronic device for data processing provided by an embodiment of the present application. Taking the electronic device as a server 200 as an example, the server 200 for data processing shown in FIG2 includes: at least one processor 210 (the processor 210 may be a graphics processor or a central processing unit), a memory 250, and at least one network interface 220. The various components in the server 200 are coupled together via a bus system 240. It is understandable that the bus system 240 is used to implement connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 240 in FIG2 .

[0073] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0074] The memory 250 includes a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiments of the present application is intended to include any suitable type of memory. The memory 250 may optionally include one or more storage devices physically remote from the processor 210.

[0075] In some embodiments, the memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0076] The operating system 251 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks.

[0077] The network communication module 252 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 220. Exemplary network interfaces 220 include Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB).

[0078] In some embodiments, the data processing device provided in the embodiments of the present application can be implemented in software. For example, it can be a data processing plug-in in the terminal described above, or it can be a data processing service in the server described above. Of course, it is not limited to this. The data processing device provided in the embodiments of the present application can be provided as various software embodiments, including various forms including applications, software, software modules, scripts or codes. Figure 2 shows a data processing device 255-1 stored in the memory 250, which can be software in the form of programs and plug-ins, such as an image processing plug-in, and includes a series of modules, including a first receiving module 2551, a first obtaining module 2552, a first returning module 2553, a first determining module 2554 and a first updating module 2555. Figure 2 also shows a data processing device 255-2 stored in the memory 250, which can be software in the form of programs and plug-ins, such as an image processing plug-in, and includes a series of modules, including a second receiving module 2556, a query module 2557, a second returning module 2558, and a second updating module 2559.

[0079] As previously mentioned, the data processing method provided in the embodiments of the present application can be implemented by various types of electronic devices. For example, an electronic device including multiple graphics processors, wherein a first graphics processor and a second graphics processor are deployed in the electronic device (the first graphics processor and the second graphics processor may also be deployed in different electronic devices), or an electronic device including multiple central processing units, wherein a first central processing unit and a second central processing unit are deployed in the electronic device, wherein the computing power of the graphics processor is superior to that of the central processing unit.

[0080] In some embodiments, a first graphics processor stores embedded features of a first type of full sparse features, and a second graphics processor stores embedded features of a second type of full sparse features, where the first type is different from the second type. Through embodiments of the present application, embedded features of multiple types of full sparse features can be divided and stored in different graphics processors, thereby alleviating the storage pressure on each graphics processor.

[0081] As an example, if the type here is a content type distinguished based on the semantics represented by the sparse feature, the field of the semantics represented by the sparse feature can be obtained (the field can be, for example, a keyword), and when the field matches the preset field, the content type corresponding to the preset field is used as the content type of the sparse feature. For example, the field of the semantics represented by the sparse feature can be "account", and the preset field can be the account type. Then the field here matches the preset field, and the type of the sparse feature is the account type. The distributed storage method based on the distinction of content types can help to quickly obtain the embedded features of sparse features of different content types, so that in recommendation scenarios that require feature diversity and richness, the embedded features of the corresponding content type can be queried more quickly, thereby improving the efficiency of acquiring embedded features during training in distributed scenarios.

[0082] As an example, the type here can also be a data format type that is distinguished based on the data format of sparse features. The data format type can be a text type, an image type, a voice type, etc. The distributed storage method based on the distinction of data format types can help to quickly obtain the embedded features of sparse features of different data format types, so that the embedded features of the corresponding data format type can be queried more quickly, thereby improving the efficiency of acquiring embedded features during training in distributed scenarios.

[0083] The types provided by the embodiments of the present application are not limited to the above examples. In the recommendation scenario, sparse features are data used to describe users, so the types can be object types obtained by dividing based on different users. For example, if there are 10 sparse features that are all used to describe user A, then the type to which these 10 sparse features belong is object type A. If there are 10 sparse features that are all used to describe user B, then the type to which these 10 sparse features belong is object type B. That is, each user corresponds to an object type, and the embedded features of the sparse features belonging to the same object type are stored in the same graphics processor. According to this distributed storage method, in the recommendation scenario, when the target samples participating in the training come from different users, all relevant embedded features of the corresponding users can be queried more quickly, thereby improving the efficiency of acquiring embedded features during the training process in the distributed scenario. The types provided by the embodiments of the present application can also be source types obtained by dividing based on the source of the sparse features, etc. The types provided by the embodiments of the present application can also be time period types obtained by dividing based on the time period for obtaining the sparse features, which will not be repeated here.

[0084] The following mainly uses content type as an example for explanation. The first graphics processor and the second graphics memory store all sparse features of multiple content types, and a total of 100 sparse features are stored. For example, the content type here can be an account type, an age group type, etc. The first type here can be an account type, and the second type here can be an age group type. Then the embedded features of the full amount of sparse features of the identity type stored in the first graphics processor represent that the first graphics processor stores the sparse features of the identity type of all samples. Then the full amount of embedded features of the sparse features of the age group type stored in the second graphics processor represent that the second graphics processor stores the sparse features of the age group type of all samples.

[0085] In some embodiments, the first graphics processor and the second graphics processor belong to multiple graphics processors, and the multiple graphics processors store embedded features of multiple types of full-quantity sparse features, the first type includes at least one type of the multiple types, and the second type includes at least one type of the multiple types. Through the embodiments of the present application, the embedded features of multiple types of full-quantity sparse features can be divided into different graphics processors for storage according to type, so that when querying, there can be clear directionality without having to query from all graphics processors.

[0086] Continuing with the above example, the graphics processor system includes multiple graphics processors, for example, 4 graphics processors, wherein the first graphics processor and the second graphics processor are 2 of the 4 graphics processors, and the 100 embedded features corresponding to the 100 sparse features will be distributedly stored in the 4 graphics processors. The first type here can be the account type and the interest type, and the second type here can be the age group type and the gender type. Then the first graphics processor stores the embedded features of all sparse features of the identity type and the embedded features of all sparse features of the interest type, and the second graphics processor stores the embedded features of all sparse features of the age group type and the embedded features of all sparse features of the gender type.

[0087] In some embodiments, the storage location of the embedded features of the first type of full sparse features and the storage location of the embedded features of the second type of full sparse features are divided when the data amount of the embedded features of multiple types of full sparse features is greater than a threshold. Through the embodiment of the present application, distributed storage is only performed when the data amount is greater than the threshold, thereby improving the storage resource utilization of the graphics processor and avoiding excessive load on the storage resources of a single graphics processor. When the data amount of the embedded features of multiple types of full sparse features is not greater than the threshold, the embedded features of multiple types of full sparse features are stored in each graphics processor of the multiple graphics processors. Through the embodiment of the present application, a single graphics processor can be used to store the embedded features of all sparse features when the data amount is not greater than the threshold, so that each graphics processor does not need to obtain embedded features from other graphics processors in the subsequent training stage, which can improve training efficiency.

[0088] As an example, the data amount here can be the total number of embedded features. When the total number of embedded features of multiple types of full sparse features is greater than a threshold, the embedded features of the first type of full sparse features and the embedded features of the second type of full sparse features will be stored in two graphics processors in a distributed manner. When the total number of embedded features of multiple types of full sparse features is not greater than a threshold, the embedded features of multiple types of full sparse features, that is, all embedded features will be stored in each graphics processor, that is, each graphics processor stores a full amount of embedded features.

[0089] As an example, in actual business scenarios, the total amount of sparse features is usually large, and the required processing is more complicated. The embodiment of the present application uses the dynamic embedding data structure storage of the tfra component for sparse features. When the number of sparse feature parameters is large, the number of corresponding embedded features will be large (for example, greater than the threshold), and the GPU single card memory cannot accommodate it. The embedding corresponding to the sparse feature can be divided into the memory of multiple GPU cards by type. When the total number of sparse features is small, it means that the total number of corresponding embedded features is small (for example, not greater than the threshold), and the GPU single card memory can accommodate it. Using the Replica method, a full copy of the embedded features is placed in the memory of each GPU card.

[0090] As an example, in the field of recommendation systems, embedding has become a common means of processing sparse features. As a "function mapping", the embedding layer usually maps high-dimensional sparse features to low-dimensional dense vectors. The low-dimensional dense vector obtained here is the embedded feature. The embedded feature here has the same meaning as the information represented by the corresponding sparse feature, but occupies a smaller storage space and has a lower data type, and then the model is trained end-to-end. The embodiment of the present application uses the component tfra.dynamic_embedding as the storage method of embedding. The component uses tf.lookup.MutableHashTable to save multiple parameters (fullweights), that is, to save the embedded features, and can reuse the native optimizer of tensorflow.

[0091] As an example, the mapping process for each sparse feature is as follows: the type number of the sparse feature is divided by a set value to obtain a corresponding remainder. The remainder obtained based on the type number of the sparse feature is the processor identifier of the sparse feature, and the sparse feature is saved in the graphics processor indicated by the corresponding processor identifier.

[0092] Through the embodiments of the present application, the embedded features of sparse features can be stored in the corresponding graphics processors according to their types, and the storage resources of multiple graphics processors can be reasonably allocated. Moreover, compared with the technical solution that each graphics processor stores the embedded features of all types of sparse features, in the present application, each graphics processor is only responsible for saving and updating the embedded features of the assigned specific type of sparse features, reducing storage and update overhead and reducing costs. Through the embodiments of the present application, embedded features can be stored flexibly, achieving a balance between the storage resource utilization of each graphics processor and the interactive resource occupancy rate between graphics processors.

[0093] See Figure 3A, which is a flow chart of the artificial intelligence-based data processing method provided in an embodiment of the present application, and will be explained in conjunction with steps 101 to 105 shown in Figure 3A.

[0094] In step 101 , a first graphics processor obtains sparse features of a target sample, where the sparse features of the target sample include a first sparse feature of a first type and a second sparse feature of a second type.

[0095] As an example, multiple graphics processors can be deployed in the server, and step 101 here can be implemented by the first graphics processor. At the same time, the server can be a single machine or a server cluster composed of multiple machines, that is, multiple graphics processors can be deployed in one server or in multiple servers.

[0096] As an example, during training, the target sample is input into the first graphics processor, and the first graphics processor obtains the sparse features of the target sample from the target sample, such as the sparse features representing the account identification and the sparse features representing the age group, that is, the sparse features of the target sample here include the first sparse features and the second sparse features, where the first sparse features are the sparse features corresponding to the target sample in the full amount of sparse features of the first type described above, and the second sparse features are the sparse features corresponding to the target sample in the full amount of sparse features of the second type described above. For example, the target sample is user A, the first type is the account type, and the second type is age. Segment type, the first type of full sparse features are sparse features of the account types of all users. If the number of users is 100 and each user has one account, then the first type of full sparse features are sparse features of the account types of 100 users. The second type of full sparse features are sparse features of the age group types of all users. There are 50 age groups in total, so the second type of full sparse features are sparse features of 50 age group types. Here, the first sparse feature is the sparse feature of user A in the account type (sparse feature representing an account) and the sparse feature of user A in the age group type (sparse feature representing an age group).

[0097] Since the embedded features are pre-stored in the first graphics processor and the second graphics processor, and the embedded features are obtained by embedding and compressing the sparse features, the following specifically describes the process of obtaining the sparse features of multiple data samples before storage, that is, the process of obtaining the full amount of sparse features.

[0098] In some embodiments, multiple object accounts logged into the recommendation client and object data of each object account are obtained, the object data of the multiple object accounts are used as multiple data samples, feature analysis processing is performed on the object data of the multiple object accounts to obtain object features of the multiple object accounts, and the object features of the multiple object accounts are used as sparse features of the multiple data samples.

[0099] As an example, a recommendation client can be a news client, a video client, a shopping client, and so on. For the purpose of explanation, the target account is an account that has previously logged into the news client, and the account is held by the user (hereinafter referred to as "object" instead of "user"). For example, object A holds object account A, and object B holds object account B. The attribute data and operation data of object account A can be obtained as the object data of object account A. For object account A, the object data of object account A can be used as a data sample, and multiple data samples can be composed of the object data of all objects.

[0100] Through the embodiments of the present application, sparse features that accurately describe an object can be obtained, so that the embedded features can effectively characterize the object to improve the object characterization capability of the embedded features.

[0101] In some embodiments, the above-mentioned feature analysis processing of the object data of multiple object accounts to obtain the object features of multiple object accounts can be achieved through the following technical solution: performing the following processing for each object account: obtaining at least one of the following from the object data of the object account: account data corresponding to the object account, biological data corresponding to the object account, location data corresponding to the object account, and interest data of the object account; performing one-hot encoding processing on the obtained data, and using the obtained encoding result as the object feature of the object account.

[0102] As an example, for object A, the attribute data and operation data of object account A can be obtained as the object data of object account A, and the account identifier (such as account ID), biometric identifier (such as gender) and location identifier (such as long-term residence) can be obtained from the attribute data. The interest identifier can be obtained from the operation data. The operation data can be a browsing operation, a collection operation, etc. The interest identifier can be an interest tag of the information being operated. For example, if the information being operated is sports news, the interest tag can be sports. These identifiers are encoded through one-hot encoding. For example, the gender male is encoded as (0, 1) and the gender female is encoded as (1, 0). The encoding result obtained by one-hot encoding can be used as the object feature. During the storage process, for some objects, even if the objects are different, they have the same gender or the same age. Therefore, for some types of sparse features, the number of sparse features is fixed.

[0103] Through the embodiments of the present application, sparse features that accurately describe the object can be obtained, and the sparse features can comprehensively characterize the object, so that the embedded features can effectively characterize the object to improve the object characterization capability of the embedded features.

[0104] In some embodiments, before executing step 101, a historical target sample previously obtained by the first graphics processor from multiple data samples is obtained; data samples other than the historical target sample from the multiple data samples are used as other data samples; and at least one data sample is randomly obtained from the other data samples as a target sample.

[0105] As an example, in order to continuously improve the expressive power of embedded features, a graphics processor system composed of graphics processors will perform multiple trainings. Each training process can be performed on multiple data samples or on a portion of the multiple data samples. There is no limitation on this. However, in order to improve training efficiency, the embodiment of the present application provides multiple graphics processors so that each graphics processor can share a portion of the data samples. For example, this training process involves 10 data samples. These 10 data samples can be multiple data samples or a portion of the multiple data samples. The first graphics processor A will receive 2 data samples out of the 10 data samples. For each training process, the data samples (historical target samples) received by the first graphics processor in the previous training process are obtained. This acquisition process can be performed by the first graphics processor itself. For example, if the data samples received in the previous training process are data samples A and data samples B, then the current training process will randomly obtain any number of data samples other than data samples A and data samples B from the multiple data samples. Two data samples can be obtained, or other numbers of data samples can be obtained.

[0106] The embodiments of the present application can avoid a single graphics processor from repeatedly processing the same data samples during multiple training processes, thereby improving the training efficiency of a single graphics processor.

[0107] In some embodiments, before executing step 101, multiple data samples are evenly divided based on the number of graphics processors to obtain multiple sample sets, wherein each sample set includes at least one data sample and the number of sample sets is the same as the number of graphics processors; a one-to-one correspondence between the multiple sample sets and the multiple graphics processors is determined; and the data samples in the sample set that have a corresponding relationship with the first graphics processor are used as target samples corresponding to the first graphics processor. The embodiments of the present application can ensure load balancing for each graphics processor by evenly dividing the data. The embodiments of the present application can avoid a single graphics processor from repeatedly processing the same data sample during multiple training sessions, thereby optimizing the training effect.

[0108] As an example, in addition to avoiding a single graphics processor from repeatedly processing the same data sample during multiple training sessions according to the above ideas, the load balance of each graphics processor can also be ensured by average division. For example, multiple data samples include 10 data samples, and the graphics processor system includes 5 graphics processors. Five sample sets can be obtained by average division processing, and each sample set includes 2 data samples. The correspondence between the sample set and the graphics processor can be pre-saved and determined directly by acquisition. In addition, the matching degree between the sample set and the graphics processor can be determined, and the matching degree with each sample set is determined for each graphics processor in any random order. For example, for the first graphics processor A, the matching degree with the first graphics processor A and each sample set is determined, and then the sample set corresponding to the highest matching degree is used as the sample set having a corresponding relationship with the graphics processor. The matching degree is negatively correlated with the repetition degree of the sample set and the historical target sample data of the first graphics processor.

[0109] In step 102 , the first graphics processor obtains an embedded feature corresponding to a first sparse feature from embedded features of all sparse features of the first type.

[0110] As an example, the first graphics processor obtains the embedded features of the target sample in the first sparse feature of the first type from the embedded features of the full sparse feature of the first type.

[0111] As an example, the full amount represents all meanings, and each sparse feature corresponds to an embedded feature, which is equivalent to the embedded features of all samples (including the target sample) in the first type of sparse features are stored in the first graphics processor. Therefore, here is equivalent to querying from the full amount of embedded features. The first graphics processor queries the embedded features of the first sparse features of the first type from the embedded features corresponding to all the sparse features of the first type, which is equivalent to querying the embedded features of the target sample in the first type from all the embedded features of the first type. Through the embodiment of the present application, the embedded features of the first sparse features of the first type of the target sample can be directly obtained locally, thereby improving the efficiency of acquiring embedded features.

[0112] For example, the first type is the account identification type, and the full amount here represents all meanings. The first graphics processor stores the embedded features corresponding to all sparse features of the account identification type. For example, 100 embedded features corresponding to the sparse features of 100 account types are stored. The first graphics processor queries the embedded features of the target sample from all the embedded features belonging to the account identification type, such as the embedded features of object A in the account identification type. The query here is based on the sparse features of the target sample. For example, the sparse features of the target sample (object A) are (0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0) and the corresponding embedded features are queried from the hash table using the sparse features as the key. For example, the embedded feature here can be the value 9. The embedded feature here is equivalent to the value. The sparse features and embedded features are stored in the hash table as key-value pairs.

[0113] In step 103 , the first graphics processor obtains, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full set of sparse features of the second type.

[0114] As an example, the first graphics processor obtains the embedded features of the target sample in the second sparse features of the second type from the second graphics processor, and the embedded features of the target sample in the second sparse features of the second type are obtained by the second graphics processor from the embedded features of the full amount of sparse features of the second type.

[0115] In some embodiments, referring to FIG. 3B , in step 103 , the first graphics processor obtains from the second graphics processor the embedded features corresponding to the second sparse features obtained from the embedded feature query of the full amount of sparse features of the second type, which can be implemented through steps 1031 to 1033 shown in FIG. 3B .

[0116] In step 1031 , the first graphics processor transmits the second sparse features to the second graphics processor.

[0117] In step 1032 , the second graphics processor searches for an embedded feature corresponding to the second sparse feature from the embedded features of the full set of sparse features of the second type.

[0118] The full amount represents all meanings. Each sparse feature corresponds to an embedded feature, which is equivalent to that the embedded features of the second type of sparse features of all samples (including the target sample) are stored in the second graphics processor. Therefore, this is equivalent to querying from the full amount of embedded features. The second graphics processor queries the embedded features of the second sparse features corresponding to the target sample from the embedded features corresponding to all the sparse features of the second type, which is equivalent to querying the embedded features of the target sample in the second type from all the embedded features of the second type.

[0119] In step 1033 , the first graphics processor receives an embedded feature corresponding to the second sparse feature.

[0120] As an example, the first type is the account identification type, and the second type is the age group type. The first graphics processor transmits the sparse features of the age group type of the target sample to the second graphics processor. The second graphics processor queries the embedded features of the age group type of the target sample from all embedded features belonging to the age group type. The second graphics processor transmits the embedded features of the age group type of the target sample to the first graphics processor, and the first graphics processor receives the embedded features of the age group type of the target sample. The embodiment of the present application can realize the exchange of embedded features. For the first graphics processor, it can obtain the embedded features that are not stored locally in the first graphics processor from the second graphics processor. It can realize the sharing of embedded features under the premise of distributed storage, and improve the utilization rate of embedded features.

[0121] In step 104 , the first graphics processor combines the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features into embedded features corresponding to the sparse features of the target sample.

[0122] As an example, the first graphics processor combines the embedded features of the target sample in the first type of sparse features and the embedded features of the target sample in the second type of sparse features into the embedded features of the sparse features of the target sample. For example, the first graphics processor combines the embedded features of the target sample in the account identification type of sparse features and the embedded features of the target sample in the age group type of sparse features into the embedded features of the sparse features of the target sample as input for subsequent model inference.

[0123] In step 105, the first graphics processor performs probability mapping processing on the embedded features of the sparse features corresponding to the target sample, and generates an update instruction according to the probability mapping result, and the update instruction is used to instruct the second graphics processor to update the embedded features of the full amount of sparse features of the second type.

[0124] As an example, probability mapping refers to a mapping process that converts embedded features into probabilities. The probability mapping process can be a linear transformation process or a nonlinear transformation process, that is, the probability mapping process is actually a linear transformation or a nonlinear transformation of the embedded features to transform the embedded features into a probability value. There are many ways of probability mapping, which are not specifically limited in this application.

[0125] As an example, the probability mapping processing for linear transformation involves weight parameters (the data form of weight parameters is column vectors) and bias parameters (scalars). The weight parameters are dot-multiplied with embedded features (the data form of embedded features is row vectors), and the dot-multiplication result (the dot-multiplication result here is a scalar) is added to the bias parameter. Finally, the added value is used as the probability obtained by mapping (probability mapping result). The added value can also be normalized, and the normalized value is used as the probability mapping result.

[0126] As an example, the probability mapping process can also be specifically referred to formula (1):

[0127] Where x is the embedding feature, -W T is the weight parameter, b is the bias parameter, you can directly use -W T x+b is the probability obtained by probability mapping, and we can also use formula (1) to calculate -W T x+b is normalized to obtain h(x), and h(x) is used as the probability mapping result.

[0128] In some embodiments, referring to FIG3C , in step 105 , the first graphics processor performs probability mapping processing on the embedded features corresponding to the sparse features of the target sample, which can be achieved by executing step 1051 shown in FIG3C , and in step 105 , generating an update instruction based on the probability mapping result can be achieved by executing steps 1052 to 1053 shown in FIG3C .

[0129] In step 1051, the embedded features corresponding to the sparse features of the target sample are used as input to the recommendation model, and the recommendation model performs probability mapping processing on the embedded features corresponding to the sparse features of the target sample to obtain the recommendation probability corresponding to the target sample as the probability mapping result.

[0130] As an example, the recommendation model can be a deep neural network (DNN). For any target sample, there can be corresponding multiple types of embedded features. These types of embedded features are combined into embedded features corresponding to the target sample. The embedded features corresponding to the target sample are used as the input of the recommendation model. The recommendation model includes at least a fully connected layer. The fully connected layer can perform probability mapping processing (which can be a linear transformation or a nonlinear transformation) on the embedded features corresponding to the target sample to obtain the recommendation probability of each target sample.

[0131] In step 1052 , the first graphics processor determines an error between a recommendation probability corresponding to the target sample and a label value corresponding to the target sample, and determines a gradient of an embedded feature of the second type of full sparse feature of the target sample based on the error.

[0132] As an example, the error here is the value obtained by substituting the recommendation probability and the label value into the loss function. The gradient of the embedded features of the second type of full sparse features of the target sample is calculated by the error. The calculation methods include but are not limited to the following: numerical calculation method (calculation by function derivation) and analytical calculation method.

[0133] In step 1053 , the first graphics processor generates an update instruction carrying the gradient of the embedded feature of the second type of full sparse feature.

[0134] As an example, an update instruction that does not carry any information is first generated here to instruct the second graphics processor to update the embedded features of the second type of full sparse features. Since the update needs to be performed based on the gradient of the embedded features of the second type of full sparse features, the gradient of the embedded features of the second type of full sparse features is added to the above-mentioned update instruction that does not carry any information.

[0135] As an example, the first graphics processor transmits an update instruction to the second graphics processor, and the second graphics processor updates the embedded features of the second type of full sparse features based on the gradient of the embedded features of the second type of full sparse features.

[0136] Through the embodiments of the present application, the second graphics processor can update the locally stored embedded features, which is equivalent to realizing the embedded feature update under distributed storage, breaking through the information isolation barrier caused by distributed storage, and splitting the training process into different graphics processors to complete it in a distributed manner, which can effectively improve training efficiency.

[0137] In some embodiments, the first graphics processor updates the embedded features of the full amount of sparse features of the first type according to the probability mapping result. Specifically, the probability mapping result is the recommendation probability, and the first graphics processor determines the error between the recommendation probability and the label value, and determines the gradient of the embedded features of the full amount of sparse features of the first type based on the error, and then updates the embedded features of the full amount of sparse features of the first type according to the gradient of the embedded features of the full amount of sparse features of the first type. Through the embodiments of the present application, the first graphics processor can update the locally stored embedded features. Since the probability mapping result here is obtained by the first graphics processor, the first graphics processor can directly update the locally stored embedded features based on the probability mapping result, thereby improving training efficiency.

[0138] For example, TensorFlow provides a declarative programming interface. You don't need to worry about the details of derivation; you only need to define the model to obtain the loss equation, and then use the various optimizers (Op, Optimizer) implemented in TensorFlow to perform calculations to update the new embedded features. At the Python code level, the automatic derivation part is linked together by various Ops. TensorFlow's approach is to include the gradient calculation formula for each Op when building the graph. When constructing the forward computation graph, the backward computation graph is automatically created. The inputs and outputs of the forward computation are retained and deleted when used in the backward computation. Then, an Op (such as GradientDescentOptimizer or AdamOptimizer) is added at the end. Ops all inherit from the Optimizer class, which has many methods, including minimize, compute_gradients, apply_gradients, and the sl ot series. How the specific gradient is updated to the variable is implemented by the four methods _apply_dense, _resource_apply_dense, _apply_sparse, and _resource_apply_spars.

[0139] In some embodiments, the data processing method provided in the embodiments of the present application is applied to a second graphics processor, the first graphics processor stores embedded features of a first type of full sparse features, and the second graphics processor stores embedded features of a second type of full sparse features, and the first type is different from the second type.

[0140] See Figure 3D, which is a flowchart of the data processing method provided in an embodiment of the present application.

[0141] In step 201, the second graphics processor receives the second sparse feature of the second type sent by the first graphics processor.

[0142] The second graphics processor receives the second sparse features of the second type of the target sample sent by the first graphics processor.

[0143] In step 202 , the second graphics processor queries the embedded features of the full set of sparse features of the second type to obtain an embedded feature corresponding to the second sparse feature.

[0144] In step 203 , the second graphics processor transmits the embedded features corresponding to the second sparse features to the first graphics processor.

[0145] In step 204 , the first graphics processor performs a probability mapping process on the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features.

[0146] As an example, the embedded feature corresponding to the first sparse feature is obtained by the first graphics processor from the embedded features of all sparse features of the first type according to the first sparse feature of the first type of the target sample.

[0147] As an example, the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features are combined to form embedded features corresponding to the sparse features of the target sample, and probability mapping processing is performed on the embedded features corresponding to the sparse features of the target sample to obtain a probability mapping result.

[0148] In step 205 , the second graphics processor receives an update instruction generated according to the probability mapping result from the first graphics processor, and updates the embedded features of the full sparse features of the second type based on the update instruction.

[0149] In some embodiments, the first graphics processor and the second graphics processor belong to a plurality of graphics processors, and the plurality of graphics processors store embedded features of a full amount of sparse features of multiple types, the first type includes at least one type of the multiple types, and the second type includes at least one type of the multiple types.

[0150] In some embodiments, the storage locations of the embedded features of the first type of full sparse features and the storage locations of the embedded features of the second type of full sparse features are divided when the data amount of the embedded features of multiple types of full sparse features is greater than a threshold.

[0151] In some embodiments, when the data amount of the embedded features of the full amount of sparse features of the multiple types is not greater than a threshold, the embedded features of the full amount of sparse features of the multiple types are stored in each of the multiple graphics processors.

[0152] Storing embedded features in different graphics processors according to type can achieve distributed storage of embedded features. The first graphics processor obtains different types of sparse features of the target sample. The first graphics processor obtains the first type of embedded features locally and obtains the second type of embedded features from the second graphics processor. The classification according to type makes it convenient to obtain embedded features from the corresponding graphics processor, which can improve acquisition efficiency and facilitate feature management. The first graphics processor performs probability mapping processing on the two types of embedded features and transmits update instructions to the second graphics processor based on the probability mapping results. The update instructions are used to instruct the second graphics processor to update the second type of embedded features, thereby realizing the update of embedded features under the premise of distributed storage, making full use of the efficiency of GPU computing, and greatly improving the update speed of embedded features while meeting storage requirements.

[0153] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.

[0154] In some embodiments, in order for a news client to provide users with news recommendations that are in line with their interests, it is necessary to train and deploy a news recommendation model (hereinafter referred to as the recommendation model). The input of the recommendation model is the embedded features of the target object, and the output of the recommendation model is the probability that the target object clicks on a certain news. When the probability is greater than the probability threshold, the news client pushes the news to the target object. In the above process, the embedded features are obtained by mapping sparse features such as account ID. Therefore, the representation ability of the embedded features for sparse features greatly affects the recommendation accuracy, so we need to update the embedded features so that the embedded features have excellent expressive power.

[0155] The following describes the update process for embedded features. The data sample can be a data sample for a recommendation model. For example, for a news recommendation model, a single data sample can include relevant object data of an account logged into a news client. The relevant object data here includes the account identifier (account ID), account age, attribute tags representing account interests, etc. The embedded features corresponding to the first type of sparse features in the full data sample are stored in GPU1 deployed in server 200, and the embedded features corresponding to the second type of sparse features in the full data sample are stored in GPU2 deployed in server 200.

[0156] Server 200 receives target sample A, where target sample A is input to GPU1. GPU1 obtains the sparse features of target sample A. The sparse features of target sample A include the sparse features of target sample A in the account identification type and the sparse features of target sample A in the age group type. GPU1 obtains the embedded features of the sparse features of target sample A in the account identification type from the embedded features of the full set of sparse features of the account identification type. GPU1 obtains the embedded features of the sparse features of target sample A in the age group type from GPU2. The embedded features of the sparse features of target sample A in the age group type are obtained by GPU2 from the embedded features of the full set of sparse features of the age group type. GPU1 determines the embedded features of the sparse features of target sample A based on the embedded features of the sparse features of target sample A in the account identification type and the embedded features of the sparse features of target sample A in the age group type. GPU1 forward propagates the embedded features of the sparse features of target sample A and transmits an update instruction to GPU2 based on the probability mapping result. The update instruction is used to instruct GPU2 to update the embedded features of the full set of sparse features of the age group type.

[0157] The recommendation system will help users select satisfactory products, interesting news, most suitable courses, short videos that match their interests, and music that meets their needs. See Figure 4. Based on the "user information", "item information" and "scene information", the problem that the recommendation system has to deal with can be defined in a more formal way: for user U, in a specific scene C, based on the massive item information, construct a function f(U, I, C) to predict the user's preference for a specific candidate item I, and then sort all candidate items according to the preference to generate a recommendation list.

[0158] When training using a parameter server, embeddings for recommendation scenarios are stored on the CPU, and embedding updates are also performed within the CPU. The CPU performs complex and large-scale computations at the embedding layer, which not only limits training speed but also prevents the use of more complex models in production. Complex models require the CPU to compute a given input for an excessively long time, preventing it from responding to requests in a timely manner. GPU training has achieved significant success in applications such as image recognition and text processing. GPU training, with its unique efficiency advantages in mathematical operations such as convolution, significantly accelerates the training of deep neural networks. However, in recommendation scenarios, due to the large number of sparse samples (such as user IDs), each user ID must be mapped to a corresponding embedding vector before entering the recommendation model. Consequently, the complete recommendation model is often too large to store on a single GPU. Related technologies either rely on high-throughput electronic devices for computation, limited by the storage capacity of the devices (such as GPU memory), making it difficult to scale embeddings. Alternatively, to accommodate large embeddings (e.g., terabytes), CPU training is required, which prevents the performance advantages of data-parallel training.

[0159] To address the engineering challenges of recommendation systems, a distributed and scalable parameter server solution has been proposed. This solution almost perfectly addresses the distributed training of machine learning models. Parameter Server is not only directly used on machine learning platforms but has also been integrated into mainstream deep learning frameworks such as TensorFlow and MXNet, serving as a key solution for distributed machine learning training. As shown in Figure 5, the parameter server consists of server nodes and worker nodes. The server node's primary functions are to store model parameters, receive local gradients calculated by worker nodes, aggregate and calculate global gradients, and update model parameters. The worker node's primary functions are to store a portion of training data, pull the latest model parameters from the server node, calculate local gradients based on the training data, and upload them to the server node. As shown in Figure 6, standalone TensorFlow training is performed on a single worker node. Within the worker node, parallel computations are performed across different GPU and CPU nodes according to a task relationship graph.

[0160] Next, we'll discuss large-scale embedding. The purpose of the embedding layer in deep learning networks is to convert sparse input vectors into dense vectors, but its presence often slows down the convergence of the entire neural network. The embedding layer has a large number of parameters. For example, if the input layer has a dimension of 100,000, the output dimension of the embedding layer is 32, and then there are five 32-dimensional fully connected layers, with a final output dimension of 10. The number of parameters from the input layer to the embedding layer is 3,200,000, and the total number of parameters for all remaining layers is 4,416. The embedding layer weights account for 99.86% of the total network weights, meaning they comprise the vast majority of the training time and computational overhead. Because the input features are so sparse, only the embedding layer weights connected to non-zero features (embedded features) are updated during stochastic gradient descent, further slowing the convergence of the embedding layer.

[0161] The use of large-scale, sparse, discrete features has led to a dramatic increase in the amount of data required in the embedding layer of deep models. Recommendation models sized in the multi-terabyte range were once prevalent in major industry scenarios. In most cases, because recommendation tasks are highly latency-sensitive, coarse-grained model architectures are typically relatively short and fat, with a large number of feature inputs mapped to embedding vectors, and the neural network layer is relatively shallow. Consequently, parsing and embedding feature sample content account for a significant portion of the overall training time. When training using a parameter server, the embeddings for recommendation scenarios are stored and trained on the CPU, limiting training speed. Furthermore, due to the relatively high proportion of embedding time, this makes it difficult to compute deep models. Consequently, complex models cannot be used in production because they would take too long for the CPU to compute the given input, hindering timely response to requests.

[0162] The data processing method provided in the embodiment of the present application supports GPU training of large-scale embedding. The embodiment of the present application provides a training solution based on the GPU system. The model that can be selected is NVIDIA V100. The hardware topology of the server includes 8 GPUs, and the characteristics of the hardware are fully considered to give full play to the performance advantages. The GPU system mainly includes three core modules: data module, computing module and communication module. The data module relies on Tensorflow's data processing API to complete pre-reading (prefetch) and dump (dumpfile) and other logic; the computing module is used to control each GPU to start a TensorFlow training process to perform training; in the communication module, the Horovod process is used for inter-card communication of distributed training, and a Horovod process is started on each node to perform the corresponding communication tasks.

[0163] Referring to Figure 7, GPU0 and GPU1 respectively execute the processing logic of prefetch and dumpfile through their respective IO interfaces, so that GPU0 obtains input sample 0, GPU1 obtains input sample 1, GPU0 performs feature analysis on sample 0 to obtain sparse features 0 of the first type and sparse features 1 of the second type, GPU1 performs feature analysis on sample 1 to obtain sparse features 0 of the first type and sparse features 1 of the second type, GPU0 locally stores the sparse features 0 of the first type of all samples, GPU1 locally stores the sparse features 1 of the second type of all samples, so GPU0 transmits the sparse features 1 of the second type of sample 0 to GPU1, and GPU1 transmits the sparse features 0 of the first type of sample 1 to GPU0. GPU0 searches hash table 0 based on the first type of sparse feature 0 of sample 0 and the first type of sparse feature 0 of sample 1 to obtain the first type of embedded feature 0 of sample 0 and the first type of embedded feature 0 of sample 1. GPU1 searches hash table 1 based on the second type of sparse feature 1 of sample 0 and the second type of sparse feature 1 of sample 1 to obtain the second type of embedded feature 1 of sample 0 and the second type of embedded feature 1 of sample 1, where the sparse features are keys (key), for example, key1, key2, and key3, and the embedded features are values ​​(value), for example, value1, value2, and value3). GPU0 transmits the first type of sparse feature 0 of sample 1 to GPU1, and GPU1 transmits the second type of sparse feature 1 of sample 0 to GPU0, so that GPU0 performs inference processing based on the first type of embedded feature 0 of sample 0 and the second type of embedded feature 1 of sample 0. GPU1 performs inference processing based on the deep model based on the first type of embedded feature 0 of sample 1 and the second type of embedded feature 1 of sample 1.

[0164] The entire training process of the embodiment of the present application involves several key parts, such as embedding storage, sparse feature processing and embedding segmentation, and inter-card communication.

[0165] First, let’s introduce the embedding parameter storage. In the field of recommendation systems, embedding has become a common means of processing identity-related sparse features. As a kind of “function mapping”, embedding usually maps high-dimensional sparse features into low-dimensional dense vectors, and then performs end-to-end training of the model. In the TensorFlow framework, all data are calculated, stored and transmitted using dense Tensor as the basic data unit. TensorFlow also provides a static embedding mechanism based on dense Tensor. The Tensorshape used to store embedding is fixed to [vocabulary_size, embedding_dimension], and vocabulary_size is usually determined by the identity space. The embodiment of the present application uses the component tfra.dynamic_embedding as the storage method for embedding. The component uses tf.lookup.MutableHashTable to save multiple parameters (fullweights) and can reuse the native optimizer of tensorflow.

[0166] Next, we will introduce sparse feature processing and embedding segmentation. In actual business scenarios, the total amount of sparse features is usually large, and the required processing is more complicated. The embodiment of the present application uses the dynamic embedding data structure storage of the tfra component for sparse features. When the number of sparse feature parameters is large, the number of corresponding embedded features will be large (for example, greater than the threshold), and the GPU single card memory cannot accommodate it. The embedding corresponding to the sparse feature can be divided into the memory of multiple GPU cards by type. When the total number of sparse features is small, it means that the total number of corresponding embedded features is small (for example, not greater than the threshold), and the GPU single card memory can accommodate it. Use the Replica method to place a full set of embedded features in the memory of each GPU card.

[0167] Finally, let's discuss inter-card communication. Sparse features (for example, identity features) are large in scale, so hash tables are used to store them. Since each GPU receives different input sample data, the embedding feature vectors corresponding to the input sparse features may be stored on other GPUs. During the forward propagation of training, each card uses inter-GPU AllToAll communication to query the internal hash table for the embedding feature vectors corresponding to the sparse features. Then, through inter-GPU AllToAll communication, the feature vectors obtained from other GPUs in the first AllToAll call are returned along the same path. Through two rounds of inter-GPU AllToAll communication, the sparse features of each GPU's sample input can obtain the corresponding embedding features. During the reverse update process of training, the gradients of the embedded features are returned to the other GPUs again through inter-GPU AllToAll communication. After each GPU obtains its own gradient, it performs optimization processing through the optimizer, completing the optimization of large-scale embedded features.

[0168] Referring to Figure 8 , GPU0 performs feature parsing on sample 0 to obtain sparse features of the first type 0 and sparse features of the second type 1. GPU1 performs feature parsing on sample 1 to obtain sparse features of the first type 0 and sparse features of the second type 1. GPU0 locally stores sparse features of the first type 0 for all samples, and GPU1 locally stores sparse features of the second type 1 for all samples. Therefore, GPU0 transmits sparse features of the second type 1 for sample 0 to GPU1, and GPU1 transmits sparse features of the first type 0 for sample 1 to GPU0. GPU0 searches hash table 0 based on sparse features of the first type 0 for sample 0 and sparse features of the first type 0 for sample 1 to obtain embedded features of the first type 0 for sample 0 and embedded features of the first type 0 for sample 1. GPU1 searches hash table 1 based on sparse features of the second type 1 for sample 0 and sparse features of the second type 1 for sample 1 to obtain embedded features of the second type 1 for sample 0 and embedded features of the second type 1 for sample 1 to obtain embedded features of the second type 1 for sample 0 and embedded features of the second type 1 for sample 1. GPU0 transmits the first type of sparse feature 0 of sample 1 to GPU1, and GPU1 transmits the second type of sparse feature 1 of sample 0 to GPU0. GPU0 then performs inference processing based on the deep model based on the first type of embedded feature 0 of sample 0 and the second type of embedded feature 1 of sample 0, obtaining a probability mapping result. Based on the error between the probability mapping result and the label value, GPU1 determines the gradient 0 corresponding to the first type of embedded feature 0 and the gradient 1 corresponding to the second type of embedded feature 1. GPU1 performs inference processing based on the deep model based on the first type of embedded feature 0 of sample 1 and the second type of embedded feature 1 of sample 1, obtaining a probability mapping result. Based on the error between the probability mapping result and the label value, GPU1 determines the gradient 0 corresponding to the first type of embedded feature 0 and the gradient 1 corresponding to the second type of embedded feature 1. GPU0 transmits the gradient 1 corresponding to the second type of embedded feature 1 to GPU1, and the optimizer of GPU1 updates the second type of embedded feature 1 based on the gradient 1 corresponding to the second type of embedded feature 1. GPU1 transmits the gradient 0 corresponding to the first type of embedded feature 0 to GPU0, and the optimizer of GPU0 updates the first type of embedded feature 0 based on the gradient 0 corresponding to the first type of embedded feature 0.

[0169] Existing engineering solutions for recommendation systems either rely on high-throughput computing devices, limited by their storage capacity (e.g., GPU memory), making it difficult to scale embeddings. Alternatively, to accommodate large-scale embeddings (e.g., terabytes), CPU training is required, which fails to leverage the performance advantages of data-parallel training.

[0170] The embodiment of the present application proposes a GPU training solution that can support large-scale embedding, which has the following advantages: using the GPU to store embedding parameters, fully utilizing the high efficiency of GPU training, and greatly improving the training speed of the model; supporting large-scale embedding parameter storage. When the embedding parameters cannot be stored on a single GPU card, the embedding split storage logic is implemented through efficient GPUNCCL communication; without losing ease of use, it can seamlessly connect to third-party frameworks such as TensorFlow, Pytorch and other mainstream frameworks.

[0171] It is understandable that in the embodiments of the present application, when user information and other related data are involved, when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0172] The following continues to describe an exemplary structure of the artificial intelligence-based data processing device 255-1 provided in an embodiment of the present application implemented as a software module. The data processing method is applied to the second graphics processor. The first graphics processor stores the embedded features of the full amount of sparse features of the first type, and the second graphics processor stores the embedded features of the full amount of sparse features of the second type. The first type is different from the second type. In some embodiments, as shown in Figure 2, the software modules stored in the artificial intelligence-based data processing device 255-1 stored in the memory 250 may include: a first receiving module 2551, configured for the first graphics processor to obtain the sparse features of the target sample, the sparse features of the target sample include the first sparse features of the first type and the second sparse features of the second type; a first obtaining module 2552, configured for the first graphics processor to obtain the sparse features of the second type from the second graphics processor The embedded features corresponding to the second sparse features are obtained by querying the embedded features of the full sparse features; the first return module 2553 is configured for the first graphics processor to obtain the embedded features corresponding to the second sparse features obtained from the embedded features query of the full sparse features of the second type from the second graphics processor; the first determination module 2554 is configured for the first graphics processor to combine the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features into embedded features corresponding to the sparse features of the target sample; the first update module 2555 is configured for the first graphics processor to perform probability mapping processing on the embedded features of the sparse features corresponding to the target sample, and generate an update instruction based on the probability mapping result, wherein the update instruction is used to instruct the second graphics processor to update the embedded features of the full sparse features of the second type.

[0173] In some embodiments, the first updating module 2555 is further configured to update the embedded features of the first type of full-quantity sparse features according to the probability mapping result by the first graphics processor.

[0174] In some embodiments, the first graphics processor and the second graphics processor belong to a plurality of graphics processors, and the plurality of graphics processors store embedded features of a full amount of sparse features of multiple types, the first type includes at least one type of the multiple types, and the second type includes at least one type of the multiple types.

[0175] In some embodiments, the storage locations of the embedded features of the first type of full sparse features and the storage locations of the embedded features of the second type of full sparse features are divided when the data amount of the embedded features of multiple types of full sparse features is greater than a threshold.

[0176] In some embodiments, when the data amount of the embedded features of the full amount of sparse features of the multiple types is not greater than a threshold, the embedded features of the full amount of sparse features of the multiple types are stored in each of the multiple graphics processors.

[0177] In some embodiments, the first return module 2553 is further configured as follows: the first graphics processor transmits the second sparse feature to the second graphics processor, so that the second graphics processor queries the embedded feature corresponding to the second sparse feature from the embedded features of the full amount of sparse features of the second type; the first graphics processor receives the embedded feature corresponding to the second sparse feature.

[0178] In some embodiments, the first returning module 2553 is further configured to: the first graphics processor queries the embedded features corresponding to the first sparse features from the embedded features of the full set of sparse features of the first type.

[0179] In some embodiments, before the first graphics processor obtains the sparse features of the target sample, the first receiving module 2551 is further configured to obtain a historical target sample previously obtained by the first graphics processor from multiple data samples; use data samples other than the historical target sample from the multiple data samples as other data samples; and randomly obtain at least one data sample from the other data samples as the target sample.

[0180] In some embodiments, before the first graphics processor obtains the sparse features of the target sample, the first receiving module 2551 is further configured to perform an even division process on the multiple data samples based on the number of graphics processors to obtain multiple sample sets, wherein each sample set includes at least one data sample, and the number of sample sets is the same as the number of graphics processors; determine a one-to-one correspondence between the multiple sample sets and the multiple graphics processors; and use the data samples in the sample sets that have a corresponding relationship with the first graphics processor as the target samples corresponding to the first graphics processor.

[0181] In some embodiments, the first update module 2555 is configured to use the embedded features of the sparse features corresponding to the target sample as the input of the recommendation model, perform probability mapping processing on the embedded features of the sparse features corresponding to the target sample through the recommendation model, and obtain the recommendation probability corresponding to the target sample as the probability mapping result; the first graphics processor determines the error between the recommendation probability corresponding to the target sample and the label value corresponding to the target sample, and determines the gradient of the embedded features of the second type of full sparse features of the target sample based on the error; and generates an update instruction carrying the gradient of the embedded features of the second type of full sparse features.

[0182] The following continues to describe an exemplary structure of the artificial intelligence-based data processing device 255-2 provided in an embodiment of the present application implemented as a software module. The data processing method is applied to the second graphics processor. The first graphics processor stores the embedded features of the first type of full-quantity sparse features, and the second graphics processor stores the embedded features of the second type of full-quantity sparse features. The first type is different from the second type. In some embodiments, as shown in Figure 2, the software modules stored in the artificial intelligence-based data processing device 255-2 stored in the memory 250 may include: a second receiving module 2556, configured for the second graphics processor to receive the second sparse features of the second type sent by the first graphics processor; a query module 2557, configured for the second graphics processor to receive the second sparse features of the second type from the full-quantity sparse features of the second type The embedded features corresponding to the second sparse features are queried from the embedded features; the second return module 2558 is configured for the second graphics processor to transmit the embedded features corresponding to the second sparse features to the first graphics processor, so that the first graphics processor performs probability mapping processing on the embedded features corresponding to the first sparse features of the first type and the embedded features corresponding to the second sparse features, wherein the embedded features corresponding to the first sparse features are obtained by the first graphics processor from the embedded features of the full sparse features of the first type; the second update module 2559 is configured for the second graphics processor to receive the update instructions generated according to the probability mapping results from the first graphics processor, and update the embedded features of the full sparse features of the second type based on the update instructions.

[0183] An embodiment of the present application provides a graphics processor for executing the artificial intelligence-based data processing method described above in the embodiment of the present application.

[0184] An embodiment of the present application provides a computer program product comprising computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the artificial intelligence-based data processing method described in the embodiment of the present application. The processor is a graphics processing unit (GPU) or a central processing unit (CPU).

[0185] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will cause the processor to execute the artificial intelligence-based data processing method provided by the embodiment of the present application, for example, the artificial intelligence-based data processing method shown in Figures 3A-3D, where the processor is a graphics processor or a central processing unit.

[0186] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.

[0187] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0188] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0189] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0190] To sum up, by storing embedded features in different graphics processors according to type, distributed storage of embedded features can be achieved. The first graphics processor obtains different types of sparse features of the target sample. The first graphics processor obtains the first type of embedded features locally and obtains the second type of embedded features from the second graphics processor. The classification according to type makes it convenient to obtain embedded features from the corresponding graphics processor, which can improve acquisition efficiency and facilitate feature management. The first graphics processor performs probability mapping processing on the two types of embedded features and transmits update instructions to the second graphics processor according to the probability mapping results. The update instructions are used to instruct the second graphics processor to update the second type of embedded features, thereby realizing the update of embedded features under the premise of distributed storage, making full use of the efficiency of GPU computing, and greatly improving the update speed of embedded features while meeting storage requirements.

[0191] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. A data processing method, the data processing method being applied to a first graphics processor, the first graphics processor storing embedded features of a first type of full sparse features, and a second graphics processor storing embedded features of a second type of full sparse features, the first type being different from the second type; The method comprises: The first graphics processor acquires sparse features of a target sample, where the sparse features of the target sample include a first sparse feature of the first type and a second sparse feature of the second type; The first graphics processor obtains an embedded feature corresponding to the first sparse feature from the embedded features of the full amount of sparse features of the first type; The first graphics processor obtains, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full amount of sparse features of the second type; The first graphics processor combines the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features into embedded features corresponding to the sparse features of the target sample; The first graphics processor performs probability mapping processing on the embedded features of the sparse features corresponding to the target sample, and generates an update instruction according to the probability mapping result, wherein the update instruction is used to instruct the second graphics processor to update the embedded features of the full amount of sparse features of the second type.

2. The method according to claim 1, wherein: The method further comprises: The first graphics processor updates the embedded features of the first type of full-quantity sparse features according to the probability mapping result.

3. The method according to claim 1 or 2, wherein: The first graphics processor and the second graphics processor belong to a plurality of graphics processors, and the plurality of graphics processors store embedded features of a plurality of types of full-quantity sparse features, the first type includes at least one type of the plurality of types, and the second type includes at least one type of the plurality of types.

4. The method according to claim 3, wherein: The storage locations of the embedded features of the first type of all sparse features and the storage locations of the embedded features of the second type of all sparse features are divided when the data amount of the embedded features of the multiple types of all sparse features is greater than a threshold.

5. The method according to claim 3, wherein: When the data amount of the embedded features of the plurality of types of all sparse features is not greater than a threshold, the embedded features of the plurality of types of all sparse features are stored in each of the plurality of graphics processors.

6. The method according to any one of claims 1 to 5, wherein: The first graphics processor obtains, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full amount of sparse features of the second type, including: The first graphics processor transmits the second sparse feature to the second graphics processor, so that the second graphics processor queries the embedded feature corresponding to the second sparse feature from the embedded features of the full amount of sparse features of the second type; The first graphics processor receives an embedded feature corresponding to the second sparse feature.

7. The method according to any one of claims 1 to 6, wherein: The first graphics processor obtains an embedded feature corresponding to the first sparse feature from the embedded features of the first type of full sparse features, including: The first graphics processor queries the embedded features corresponding to the first sparse features from the embedded features of the full amount of sparse features of the first type.

8. The method according to any one of claims 1 to 7, wherein: Before the first graphics processor acquires the sparse features of the target sample, the method further includes: Acquire a historical target sample previously acquired by the first graphics processor from the plurality of data samples; taking data samples other than the historical target sample from the multiple data samples as other data samples; At least one data sample is randomly acquired from the other data samples as the target sample.

9. The method according to any one of claims 1 to 8, wherein: Before the first graphics processor acquires the sparse features of the target sample, the method further includes: Performing an even division process on the multiple data samples based on the number of the graphics processors to obtain multiple sample sets, wherein each of the sample sets includes at least one data sample, and the number of the sample sets is the same as the number of the graphics processors; Determine a one-to-one correspondence between the plurality of sample sets and the plurality of graphics processors; the data samples in the sample set having the corresponding relationship with the first graphics processor, as a target sample corresponding to the first graphics processor.

10. The method according to any one of claims 1 to 9, wherein: The first graphics processor performs a probability mapping process according to the embedded features corresponding to the sparse features of the target sample, including: Taking the embedded features corresponding to the sparse features of the target sample as input of the recommendation model, performing probability mapping processing on the embedded features corresponding to the sparse features of the target sample through the recommendation model, and obtaining a recommendation probability corresponding to the target sample as the probability mapping result; The step of generating an update instruction according to the probability mapping result includes: The first graphics processor determines an error between a recommendation probability corresponding to the target sample and a label value corresponding to the target sample, and determines a gradient of an embedded feature of a second type of full sparse feature of the target sample based on the error; Generate an update instruction for the gradient of the embedded feature carrying the full amount of sparse features of the second type.

11. A data processing method, the data processing method being applied to a second graphics processor, the first graphics processor storing embedded features of a first type of full sparse features, the second graphics processor storing embedded features of a second type of full sparse features, the first type being different from the second type; The method comprises: The second graphics processor receives the second sparse feature of the second type sent by the first graphics processor; The second graphics processor queries the embedded features of all sparse features of the second type to obtain the embedded features corresponding to the second sparse features; The second graphics processor transmits the embedded features corresponding to the second sparse features to the first graphics processor, so that the first graphics processor performs probability mapping processing on the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features, wherein the embedded features corresponding to the first sparse features are obtained by the first graphics processor from the embedded features of the full amount of sparse features of the first type; The second graphics processor receives an update generated according to the probability mapping result from the first graphics processor. Instructions are given, and the embedded features of the full amount of sparse features of the second type are updated based on the update instructions.

12. The method according to claim 11, wherein: The first graphics processor and the second graphics processor belong to a plurality of graphics processors, and the plurality of graphics processors store embedded features of a plurality of types of full-quantity sparse features, the first type includes at least one type of the plurality of types, and the second type includes at least one type of the plurality of types.

13. The method according to claim 12, wherein: The storage locations of the embedded features of the first type of all sparse features and the storage locations of the embedded features of the second type of all sparse features are divided when the data amount of the embedded features of the multiple types of all sparse features is greater than a threshold.

14. The method according to claim 12, wherein: When the data amount of the embedded features of the plurality of types of all sparse features is not greater than a threshold, the embedded features of the plurality of types of all sparse features are stored in each of the plurality of graphics processors.

15. A data processing device, wherein the data processing method is applied to a first graphics processor, the first graphics processor stores embedded features of a first type of full sparse features, and the second graphics processor stores embedded features of a second type of full sparse features, the first type is different from the second type, and the device comprises: A first receiving module is configured to obtain a sparse feature of a target sample for the first graphics processor, where the sparse feature of the target sample includes a first sparse feature of the first type and a second sparse feature of the second type; A first acquisition module is configured to enable the first graphics processor to acquire, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full amount of sparse features of the second type; A first returning module is configured to enable the first graphics processor to obtain, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of the full amount of sparse features of the second type; The first determining module is configured to use the first graphics processor to combine the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features into a Embedding features of sparse features; The first update module is configured so that the first graphics processor performs probability mapping processing on the embedded features of the sparse features corresponding to the target sample, and generates an update instruction based on the probability mapping result, wherein the update instruction is used to instruct the second graphics processor to update the embedded features of the full amount of sparse features of the second type.

16. A data processing device, wherein the data processing method is applied to a second graphics processor, the first graphics processor stores embedded features of a first type of full sparse features, and the second graphics processor stores embedded features of a second type of full sparse features, the first type being different from the second type; The device comprises: A second receiving module, configured to receive, by the second graphics processor, the second sparse features of the second type sent by the first graphics processor; A query module configured to query, by the second graphics processor, the embedded features corresponding to the second sparse features from the embedded features of the full amount of sparse features of the second type; A second returning module is configured for the second graphics processor to transmit the embedded features corresponding to the second sparse features to the first graphics processor, so that the first graphics processor performs probability mapping processing on the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features, wherein the embedded features corresponding to the first sparse features are obtained by the first graphics processor from the embedded features of the full amount of sparse features of the first type; The second update module is configured so that the second graphics processor receives an update instruction generated according to the probability mapping result from the first graphics processor, and updates the embedded features of the second type of full-quantity sparse features based on the update instruction.

17. A graphics processor, configured to execute the data processing method according to any one of claims 1 to 10 or claims 11 to 14.

18. An electronic device, comprising: A memory for storing computer executable instructions; A graphics processor, configured to implement the data processing method of any one of claims 1 to 10 or claims 11 to 14 when executing the computer executable instructions stored in the memory.

19. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the data processing method according to any one of claims 1 to 10 or claims 11 to 14, wherein the processing area is a central processing unit or a graphics processing unit.

20. A computer program product, comprising computer executable instructions, wherein when the computer executable instructions are executed by a processor, the data processing method according to any one of claims 1 to 10 or claims 11 to 14 is implemented, wherein the processing area is a central processing unit or a graphics processing unit.

Citation Information

Patent Citations

  • A default user probability prediction method based on sparse feature embedding

    CN109919436A

  • Model training method, model training node and parameter server

    CN112884157A

  • Data processing method, system and device, program product and storage medium

    CN113971428A

  • Data processing method and device, equipment, storage medium and program product

    CN116974781A

  • Set operations using multi-core processing unit

    US20210319078A1