WO2024221925A1 - 数据处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品 - Google Patents
数据处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品 Download PDFInfo
- Publication number
- WO2024221925A1 WO2024221925A1 PCT/CN2023/135891 CN2023135891W WO2024221925A1 WO 2024221925 A1 WO2024221925 A1 WO 2024221925A1 CN 2023135891 W CN2023135891 W CN 2023135891W WO 2024221925 A1 WO2024221925 A1 WO 2024221925A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- features
- sparse
- type
- graphics processor
- embedded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/10—Machine learning using kernel methods, e.g. support vector machines [SVM]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
- G06N3/0455—Auto-encoder networks; Encoder-decoder networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0475—Generative networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/088—Non-supervised learning, e.g. competitive learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/09—Supervised learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/098—Distributed learning, e.g. federated learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/0985—Hyperparameter optimisation; Meta-learning; Learning-to-learn
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/01—Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N7/00—Computing arrangements based on specific mathematical models
- G06N7/01—Probabilistic graphical models, e.g. probabilistic networks
Definitions
- 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.
- Artificial Intelligence is a comprehensive technology in computer science. By studying the design principles and implementation methods of various intelligent machines, machines are given the functions of perception, reasoning and decision-making. Analysis based on medical images and medical texts is one of the important applications in the field of artificial intelligence.
- the medical analysis system refers to a system that uses computers to process, analyze and understand medical images and medical texts to identify targets and objects of various different patterns.
- the embedding feature is learned based on the Parameter Server method.
- the embedding feature representation (embedding) of the sparse feature is stored on the central processing unit (CPU), so the embedding training is also completed in the CPU.
- the training speed is slow.
- the embodiments of the present application provide a data processing method, device, electronic device, computer-readable storage medium and computer program product based on artificial intelligence, which can improve the update processing speed through a graphics processor under the premise of realizing large-scale embedded feature storage.
- the embodiment of the present application provides an artificial intelligence-based data processing method, 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, the method includes:
- 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.
- the embodiment of the present application provides an artificial intelligence-based 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 includes:
- 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;
- the first returning module is configured to obtain from the second graphics processor an embedded feature corresponding to the second sparse feature obtained by querying the embedded features of all sparse features of the second type;
- a 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 embedded features corresponding to the sparse features of the target sample;
- 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.
- An embodiment of the present application provides a data processing method, 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, the second graphics processor stores embedded features of a second type of full sparse features, the first type is 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 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 amount of sparse features of the first type;
- 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.
- the 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 amount of sparse features, and the second A second graphics processor stores embedded features of a full amount of sparse features of a second type, wherein the first type is 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 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 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.
- 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.
- An embodiment of the present application provides an electronic device, the electronic device comprising:
- a memory for storing computer executable instructions
- the graphics processor is used to implement the data processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
- An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions.
- the computer-executable instructions are executed by a processor, the data processing method provided by the embodiment of the present application is implemented.
- the processor is a central processing unit or a graphics processing unit.
- 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.
- 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 high efficiency of graphics processor calculations, and greatly improving the update speed of embedded features while meeting storage requirements.
- FIG1A is a schematic diagram of the structure of an artificial intelligence-based data processing system provided in an embodiment of the present application.
- FIG1B is an architecture diagram of a data processing system provided in an embodiment of the present application.
- FIG2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- 3A-3D are schematic flow charts of a data processing method based on artificial intelligence provided in an embodiment of the present application.
- FIG4 is a schematic diagram of a framework of a recommendation system provided in an embodiment of the present application.
- FIG5 is a schematic diagram of the physical architecture of the Parameter Server provided in an embodiment of the present application.
- FIG6 is a schematic diagram of a single working node provided in an embodiment of the present application.
- FIG7 is a schematic diagram of data flow of an artificial intelligence-based data processing method provided in an embodiment of the present application.
- FIG8 is a schematic diagram of data flow of an artificial intelligence-based data processing method provided in an embodiment of the present application.
- 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 here can be implemented in an order other than that illustrated or described here.
- Embedding is a method of using a numerical vector to represent an object.
- the object here can be a word, an item, or a movie, etc.
- 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.
- Parameter Server It is a programming framework that facilitates the writing of distributed parallel programs, with a focus on supporting the distributed storage and coordination of large-scale parameters.
- the nodes in the cluster of the server can be divided into two types: computing nodes and parameter service nodes.
- the computing nodes are responsible for computing and learning the training data (blocks) assigned to their local area and updating the corresponding parameters;
- the parameter service nodes use distributed storage to store part of the global parameters and accept parameter query and update requests from computing nodes as service providers.
- Sparse features are those that do not appear continuously in the data set, and most of the 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 data set.
- the full sparse features represent the sparse features of all samples. For example, for account types, all samples have a total of 100 accounts, and the 100 sparse features corresponding to these 100 accounts are the full sparse features of the account type. Dense features are generally relative to sparse features, and the proportion of 0 in dense features is small, or even non-existent.
- Type The type provided in the embodiments of the present application may be a content type or a data format type.
- the content type is distinguished based on the semantics represented by sparse features
- the data format type is distinguished based on the data format of sparse features.
- the embedded features are learned based on the Parameter Server method.
- the embedded feature representation (embedding) of the sparse features is stored on the central processing unit (CPU), and the embedding training is also completed in the CPU.
- the training speed will be limited.
- 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.
- 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.
- the data processing method provided in the embodiments of the present application can be implemented by the terminal/server alone; or it can 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 according to the received data sample. Data processing methods.
- the electronic device for data processing may be various types of terminals or servers, wherein the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services; the terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto.
- the terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the present application.
- the server can be a server cluster deployed in the cloud, opening artificial intelligence cloud services (AI as a Service, AiaaS) to users.
- AI artificial intelligence cloud services
- AiaaS artificial intelligence cloud services
- 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 an application programming interface.
- one of the artificial intelligence cloud services may be a data processing service, that is, a server in the cloud is encapsulated with a data processing program provided by the embodiment of the present application.
- the user calls the data processing service in the cloud service through the terminal, so that the server deployed in the cloud calls the encapsulated data processing program.
- FIG. 1A is a schematic diagram of an application scenario of a data processing system provided in an embodiment of the present application.
- a terminal 400 is connected to a server 200 via a network 300.
- the network 300 may be a wide area network or a local area network, or a combination of the two.
- Four GPUs are deployed in the server 200, and GPU1 and GPU2 are used for illustration below.
- the data sample may be a data sample of a 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 of the first type (e.g., account identifier type) in the full data sample are stored in GPU1 deployed in server 200, and the embedded features of the sparse features of the second type (e.g., age group type) in the full data sample are stored in GPU2 deployed in server 200.
- the terminal 400 sends a matching request to the server 200, and the server 200 calls the recommendation model.
- the recommendation model is deployed in any GPU (for example, GPU1), and the input of the recommendation model is the account of the target object. Therefore, GPU1 needs to query the embedded features of the target object's age group type from GPU2 based on the sparse features of the age group type.
- the output of the recommendation model is the recommendation probability of the target object clicking on a certain news item. When the recommendation probability is greater than the probability threshold, server 200 returns the news item to terminal 400, and the news client pushes the news item to the target object.
- the following describes the process of updating each type of embedded features.
- Server 200 receives target sample A, where target sample A is input to GPU1, GPU1 obtains sparse features of target sample A, the sparse features of target sample A include sparse features of target sample A in account identification type and sparse features of target sample A in age group type, GPU1 obtains embedded features of sparse features of target sample A in account identification type from embedded features of full sparse features of account identification type; GPU1 obtains embedded features of sparse features of target sample A in age group type from GPU2, the embedded features of sparse features of target sample A in age group type are obtained by querying embedded features of full sparse features of age group type by GPU2; GPU1 determines embedded features of sparse features of target sample A based on embedded features of sparse features of target sample A in account identification type and embedded features of sparse features of target sample A in age group type; GPU1 forward propagates based on embedded features of sparse features of target sample A, and transmit
- the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
- the terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto.
- 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.
- 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.
- the computer program can be a native program or software module in the operating system; it can be a native application (APP, Applic ation), 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 mini-program, that is, a program that can be run by just downloading it to a browser environment; it can also be a mini-program that can be embedded in any APP.
- the above-mentioned computer program can be any form of application, module or plug-in.
- FIG. 2 is a schematic diagram of the structure of the electronic device for data processing provided by the embodiment of the present application, and the electronic device is a server 200 as an example.
- the server 200 for data processing shown in FIG. 2 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 through a bus system 240. It is understandable that the bus system 240 is used to realize the connection and communication between these components.
- 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 marked as bus systems 240 in FIG.
- 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., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
- DSP digital signal processor
- the memory 250 includes a volatile memory or a non-volatile memory, and may also 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 embodiment of the present application is intended to include any suitable type of memory.
- the memory 250 optionally includes one or more storage devices that are physically far away from the processor 210.
- 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 exemplarily described below.
- 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 businesses and process hardware-based tasks.
- hardware-related tasks such as a framework layer, a core library layer, a driver layer, etc.
- the network communication module 252 is used to communicate with the network interface 220 via one or more (wired or wireless) As for other electronic devices, exemplary network interface 220 includes: Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB).
- exemplary network interface 220 includes: Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB).
- the data processing device provided in the embodiment of the present application can be implemented in a software manner, 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 embodiment of the present application can be provided as various software embodiments, including various forms including application programs, 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 acquisition module 2552, a first return module 2553, a first determination module 2554 and a first update 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 return module 2558, and a second update module 2559.
- the data processing method provided in the embodiments of the present application can be implemented by various types of electronic devices.
- an electronic device including multiple graphics processors in which a first graphics processor and a second graphics processor are deployed (the first graphics processor and the second graphics processor can also be deployed on different electronic devices), for example, an electronic device including multiple central processing units, in which a first central processing unit and a second central processing unit are deployed, wherein the computing power of the graphics processor is better than that of the central processing unit.
- the first graphics processor stores embedded features of a first type of full sparse features
- 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 field of the semantics represented by the sparse feature can be obtained (the field can be a keyword, for example).
- the content type corresponding to the preset field is used as the content type of the sparse feature.
- 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 between 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 types can be queried more quickly, improving the efficiency of acquiring embedded features during training in distributed scenarios.
- 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.
- the sparse features are used to describe the user's data, so the type can be an object type obtained by dividing based on different users. For example, if there are 10 sparse features that are 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 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.
- 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 acquisition period of the sparse features, which will not be repeated here.
- 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.
- the content type here can be an account type, an age group type, etc.
- the first type here can be an account type
- the second type here can be an age group type.
- 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.
- the second graphics processor stores the full amount of embedded features of the sparse features of the age group type, representing that the second graphics processor stores the sparse features of the age group type of all samples.
- 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.
- 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, it can have clear directionality without having to query from all graphics processors.
- 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 100 embedded features corresponding to the 100 sparse features will be distributedly stored in the 4 graphics processors.
- the first type here can be an account type and an interest type
- the second type here can be an age group type and a gender type.
- 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
- 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.
- the storage location of the embedded features of the full amount of sparse features of the first type and the storage location of the embedded features of the full amount of sparse features of the second type are divided when the amount of data of the embedded features of the full amount of sparse features of multiple types is greater than a threshold.
- distributed storage is only performed when the amount of data is greater than the threshold, thereby improving the utilization rate of the storage resources of the graphics processor and avoiding excessive load on the storage resources of a single graphics processor.
- the embedded features of the full amount of sparse features of multiple types are stored in each graphics processor of the multiple graphics processors.
- a single graphics processor can be used to store the embedded features of all sparse features when the amount of data 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 the training efficiency.
- the data volume here can be the total number of embedded features.
- the embedded features of the first type of full sparse features and the embedded features of the second type of full sparse features are stored in a distributed manner in In two graphics processors, 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 saved in each graphics processor, that is, each graphics processor saves a full amount of embedded features.
- the embodiment of the present application uses the dynamic embedding data structure of the tfra component for storage of sparse features.
- 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 embeddings corresponding to the sparse features 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 amount of embedded features are placed in the memory of each GPU card.
- 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 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 embedded features, and can reuse the native optimizer of tensorflow.
- 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, so that the sparse feature is saved in the graphics processor indicated by the corresponding processor identifier.
- the embedded features of sparse features can be stored in the corresponding GPUs according to their types, and the storage resources of multiple GPUs can be reasonably allocated. Moreover, compared with the technical solution that each GPU stores the embedded features of all types of sparse features, in the present application, each GPU is only responsible for storing the embedded features of the specific type of sparse features it is assigned. With the embodiment of the present application, the embedded features can be flexibly stored, and a balance can be achieved between the storage resource utilization rate of each graphics processor and the interactive resource occupancy rate between graphics processors.
- Figure 3A is a flow chart of the artificial intelligence-based data processing method provided in an embodiment of the present application, which will be explained in conjunction with steps 101 to 105 shown in Figure 3A.
- 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.
- multiple graphics processors can be deployed in the server, and step 101 here can be implemented by the first graphics processor.
- 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.
- the target sample is input into the first graphics processor, and the first graphics processor obtains sparse features of the target sample from the target sample, such as sparse features representing the account ID and 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 of 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 of 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.
- the first type of full sparse features are sparse features of the account type 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 type of 100 users.
- the second type of full sparse features are sparse features of the age group type 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.
- 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).
- 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 process of obtaining the sparse features of multiple data samples before storage, that is, the process of obtaining the full amount of sparse features, is described in detail below.
- multiple object accounts that log in to 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.
- the recommendation client can be a news client, a video client, a shopping client, etc., and the news client is used as an example for explanation.
- the object account is an account that has logged into the news client before, and the account is held by the user (hereinafter, the user is uniformly replaced by the object).
- object A holds object account A
- 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.
- 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.
- the above-mentioned feature analysis processing of the object data of multiple object accounts to obtain the object features of the 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, 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.
- 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), biological identifier (such as gender) and location identifier (such as long-term residence) are obtained from the attribute data.
- the interest identifier is 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 by 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.
- the object feature In 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.
- 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.
- 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.
- a graphics processor system composed of graphics processors will perform multiple trainings.
- Each training process can be performed on multiple data samples, or on some data samples in multiple data samples. There is no restriction on this.
- the embodiment of the present application provides multiple graphics processors, so that each graphics processor can share some data samples.
- this training process will involve 10 data samples, and these 10 data samples can be multiple data samples, or some data samples in multiple data samples.
- the first graphics processor A will receive 2 data samples out of the 10 data samples.
- the data samples (historical target samples) received by the first graphics processor in the last training process are obtained. This acquisition process can be performed by the first graphics processor itself.
- the data samples received in the last training process are data samples A and data samples B. Then, this training process will randomly obtain any number of data samples other than data samples A and data samples B from multiple data samples. Two data samples can be obtained, or other numbers of data samples can be obtained.
- 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.
- 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 multiple sample sets and multiple graphics processors is determined; and a data sample in a sample set that has a corresponding relationship with a first graphics processor is used as a target sample corresponding to the first graphics processor.
- the load balancing of each graphics processor can be ensured by even division.
- the embodiments of the present application can avoid a single graphics processor from repeatedly processing the same data samples during multiple training processes, thereby optimizing the training effect.
- each graphics processor can also be ensured by average division.
- 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.
- 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.
- 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 historical target sample data of the sample set and the first graphics processor.
- step 102 the first graphics processor obtains an embedded feature corresponding to the first sparse feature from the embedded features of all sparse features of the first type.
- 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 amount of sparse features of the first type.
- the full amount represents all meanings
- each sparse feature corresponds to an embedded feature, which is equivalent to that the embedded features of the sparse features of the first type of all samples (including the target sample) are stored in the first graphics processor. Therefore, it is equivalent to querying from the embedded features of the full amount.
- the first graphics processor queries the embedded features of the first sparse features of the first type of the target sample 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.
- 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.
- the first type is the account identification type, where the full amount represents all meanings
- the first graphics processor stores the embedded features corresponding to all sparse features belonging to the account identification type.
- 100 embedded features corresponding to the sparse features of 100 account types are stored.
- the detector queries the embedded features of the target sample from all embedded features of 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.
- the sparse features of the target sample (object A) are (0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0).
- the corresponding embedded features are queried from the hash table using the sparse features as keys.
- the embedded features here can be the value 9.
- the embedded features are equivalent to values.
- the sparse features and embedded features are stored in the hash table as key-value pairs.
- the first graphics processor obtains, from the second graphics processor, an embedded feature corresponding to the second sparse feature obtained from the embedded feature query of the full amount of sparse features of the second type.
- the first graphics processor obtains the embedded features of the second sparse features of the second type of the target sample from the second graphics processor, and the embedded features of the second sparse features of the second type of the target sample are obtained by the second graphics processor from the embedded features of the full amount of sparse features of the second type.
- 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 by steps 1031 to 1033 shown in FIG. 3B .
- step 1031 the first graphics processor transmits the second sparse features to the second graphics processor.
- 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.
- Each sparse feature corresponds to an embedded feature, which is equivalent to that the embedded features of the sparse features of the second type 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.
- step 1033 the first graphics processor receives an embedded feature corresponding to the second sparse feature.
- the first type is the account identification type
- the second type is the age group type.
- the first GPU transmits the sparse features of the age group type of the target sample to the second GPU, and the second GPU queries 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.
- the embedded features that are not stored locally in the first graphics processor can be obtained from the second graphics processor, and the embedded features can be shared under the premise of distributed storage, thereby improving the utilization rate of the embedded features.
- 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 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.
- the first graphics processor combines the embedded features of the target sample in the account ID 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.
- 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.
- probability mapping refers to the mapping process of converting 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.
- probability mapping There are many ways of probability mapping, which are not specifically limited in this application.
- 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.
- 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.
- the probability mapping process can also be specifically referred to in formula (1):
- x is the embedded feature
- -W T is the weight parameter
- b is the bias parameter.
- -W T x+b can be directly used as the probability obtained by probability mapping.
- -W T x+b can also be normalized according to formula (1) to obtain h(x), and h(x) is used as the probability mapping result.
- 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 FIG. 3C , and in step 105 , generating update instructions according to the probability mapping results can be achieved by executing steps 1052 to 1053 shown in FIG. 3C .
- 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.
- the recommendation model can be a deep neural network (DNN).
- DNN deep neural network
- the recommendation model includes at least a fully connected layer. Through the fully connected layer, probability mapping processing (which can be a linear transformation or a nonlinear transformation) can be performed on the embedded features corresponding to the target sample to obtain the recommendation probability of each target sample.
- 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.
- the error here is the reason 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.
- step 1053 the first graphics processor generates an update instruction carrying the gradient of the embedded feature of the full amount of sparse features of the second type.
- an update instruction without any information is first generated here to instruct the second graphic
- the processor updates the embedded features of the full sparse features of the second type. Since the update needs to be performed based on the gradient of the embedded features of the full sparse features of the second type, the gradient of the embedded features of the full sparse features of the second type is added to the above-mentioned update instruction that does not carry any information.
- 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 gradients of the embedded features of the second type of full sparse features.
- 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 in a distributed manner, which can effectively improve the training efficiency.
- 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.
- the probability mapping result is the recommendation probability
- 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.
- 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.
- TensorFlow provides a declarative programming interface. You don't need to worry about the details of the derivation. You only need to define the model to get the loss equation, and then use the various optimizers (Op, Optimizer) implemented by TensorFlow to perform operations to update the new embedded features.
- Op Optimizer
- the automatic derivation part is strung together by various Ops.
- TensorFlow's approach is that each Op includes its gradient calculation formula when building the graph.
- the calculation graph of the reverse part is automatically established. The input and output of the forward calculation will be retained and deleted when used up in the backward calculation, and then an Op (such as GradientDescentOptimizer, AdamOptimizer) is added at the end.
- 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.
- step 201 the second graphics processor receives a second sparse feature of a second type sent by the first graphics processor.
- the second graphics processor receives the second sparse features of the second type of the target sample sent by the first graphics processor.
- step 202 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.
- step 203 the second graphics processor transmits the embedded features corresponding to the second sparse features to the first graphics processor.
- 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.
- 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.
- the embedded features corresponding to the first sparse features and the embedded features corresponding to the second sparse features are composed of 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.
- 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 amount of sparse features of the second type based on the update instruction.
- the first GPU and the second GPU belong to a plurality of GPUs, and the plurality of GPUs store embedded features of a plurality of types of full-quantity sparse features, wherein the first type includes a plurality of The first type includes at least one of the first and second types, and the second type includes at least one of the plurality of types.
- 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 multiple types of all sparse features is greater than a threshold.
- the embedded features of the multiple types of full amount sparse features are stored in each of the multiple graphics processors.
- 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 high efficiency of GPU computing, and greatly improving the update speed of embedded features while meeting storage requirements.
- the recommendation model in order to enable the news client to provide users with news recommendations that meet 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
- the output of the recommendation model is the probability that the target object clicks on a certain news.
- the probability is greater than the probability threshold
- the news client pushes the news to the target object.
- 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 expression capabilities.
- the data sample can be a data sample of a recommendation model.
- a single data sample can include the relevant object data of an account that logs into a news client.
- the relevant object data here includes the account identifier (account ID), account age, and the data that represents the account. Attribute labels of interest, etc.
- the embedded features corresponding to the first type of sparse features in the full data sample are stored in GPU1 deployed in the 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 the server 200.
- Server 200 receives target sample A, where target sample A is input to GPU1, GPU1 obtains sparse features of target sample A, the sparse features of target sample A include sparse features of target sample A in account identification type and sparse features of target sample A in age group type, GPU1 obtains embedded features of sparse features of target sample A in account identification type from embedded features of full sparse features of account identification type; GPU1 obtains embedded features of sparse features of target sample A in age group type from GPU2, the embedded features of sparse features of target sample A in age group type are obtained by GPU2 from embedded features of full sparse features of age group type; GPU1 determines embedded features of sparse features of target sample A based on embedded features of sparse features of target sample A in account identification type and embedded features of sparse features of target sample A in age group type; GPU1 forward propagates based on embedded features of sparse features of target sample A, and transmits update instructions to GPU2 based on probability mapping results, the update instructions are used to instruct GPU2 to update embedded features
- the recommendation system will help users select satisfactory products, interesting news, most suitable courses, short videos that match users' interests, and music that meets users' needs. See Figure 4.
- 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, for a large amount of 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.
- the embeddings in recommendation scenarios are stored on the CPU, and embedding updates are also completed in the CPU.
- the CPU performs complex and large-scale computing operations on the embedding layer, which not only limits the speed of training, but also makes it impossible to use more complex models in actual production, because the use of complex models will cause the CPU to take too long to calculate the given input and cannot respond to requests in time.
- GPU training has achieved great success in applications such as image recognition and text processing. GPU training has greatly improved the speed of training deep neural networks with its unique efficiency advantages in mathematical operations such as convolution.
- Parameter Server a distributed and scalable parameter service (Parameter Server) solution was proposed, which almost perfectly solved the distributed training problem of machine learning models.
- Parameter Server is not only directly applied to the machine learning platform, but also integrated into mainstream deep learning frameworks such as TensorFlow and MXNet as an important solution for distributed training of machine learning.
- FIG 5 it can be seen that Parameter Server consists of server nodes (server nodes) and worker nodes (worker nodes). The main functions of the server node are to save model parameters, accept local gradients calculated by worker nodes, summarize and calculate global gradients, and update model parameters.
- the main function of the worker node is to save part of the 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.
- the single-machine training of TensorFlow is performed on a single worker node.
- the worker node performs parallel calculations between different GPU and CPU nodes in the form of a task relationship graph.
- the role of the embedding layer in a deep learning network is to convert sparse input vectors into dense vectors, but the existence of the embedding layer often slows down the convergence of the entire neural network.
- the number of parameters in the embedding layer is huge. Assuming that the dimension of the input layer is 100,000, the output dimension of the embedding layer is 32, and then 5 layers of 32-dimensional fully connected layers are added, and the final output layer dimension is 10, then the number of parameters from the input layer to the embedding layer is 3,200,000, and the total number of parameters of all other layers is 4,416.
- the total weight of the embedding layer accounts for 99.86%, which means that the weight of the embedding layer accounts for the vast majority of the weight of the entire network.
- the training process most of the training time and computational overhead are occupied by the embedding layer; because the input features are too sparse, during the process of stochastic gradient descent, only the weights of the embedding layer connected to the non-zero features (embedded features) will be updated, which further reduces the convergence speed of the embedding layer.
- the use of large-scale sparse discrete features leads to a sharp increase in the amount of data in the embedding layer of the deep model.
- the recommendation models with TB size were once popular in major business scenarios in the industry. In most cases, because the recommendation tasks are very sensitive to latency, the model structure of the coarse-grained scenario is usually "short and fat", with a large number of feature inputs and then mapped to embedding vectors, and the depth of the neural network part is relatively low. Therefore, the analysis and embedding of the feature sample content account for a relatively high proportion of the overall time consumption.
- the embedding of the recommendation scenario is stored on the CPU, and the embedding training is also completed on the CPU side, which not only limits the training speed, but also because the embedding accounts for a relatively high proportion of the overall time consumption, it is impossible to support the calculation of models with higher depth. Therefore, more complex models cannot be used in actual production, because the use of complex models will cause the CPU to calculate the given input for too long and fail to respond to requests in time.
- 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 can be selected as NVIDIAV100.
- 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.
- 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 feature 0 of the first type and sparse feature 1 of the second type, GPU1 performs feature analysis on sample 1 to obtain sparse feature 0 of the first type and sparse feature 1 of the second type, GPU0 locally stores sparse feature 0 of the first type of all samples, GPU1 locally stores sparse feature 1 of the second type of all samples, therefore GPU0 transmits sparse feature 1 of the second type of sample 0 to GPU1, GPU1 transmits sparse feature 0 of the first type of sample 1 to GPU0.
- GPU0 searches in hash table 0 based on sparse feature 0 of the first type of sample 0 and sparse feature 0 of the first type of sample 1, and obtains embedded feature 0 of the first type of sample 0 and embedded feature 0 of the first type of sample 1
- GPU1 searches in hash table 0 based on sparse feature 1 of the second type of sample 0 and sample 1, and obtains embedded feature 0 of the first type of sample 0 and embedded feature 0 of the first type of sample 1.
- the second type of sparse feature 1 of sample 1 is searched in hash table 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, value3).
- GPU0 transmits the first type of sparse feature 0 of sample 1 to GPU1
- GPU1 transmits the second type of sparse feature 1 of sample 0 to GPU0, so that GPU0 performs reasoning processing based on the deep model according to the first type of embedded feature 0 of sample 0 and the second type of embedded feature 1 of sample 0, and GPU1 performs reasoning processing based on the deep model according to the first type of embedded feature 0 of sample 1 and the second type of embedded feature 1 of sample 1.
- 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.
- 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 tensorflow's native optimizer.
- the embodiment of the present application uses the dynamic embedding data structure storage of the tfra component for sparse features.
- 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 embeddings corresponding to the sparse features 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 amount of embedded features in the memory of each GPU card.
- Sparse features are large in scale, so hash tables are used to store them. Since the input sample data of each GPU is different, the embedding feature vectors corresponding to the input sparse features may be stored on other GPU cards.
- each card queries the embedding feature vectors corresponding to the sparse features in the internal hash table. Then, through the AllToAll communication between GPUs, the feature vectors obtained from other GPUs in the first AllToAll are returned to the original path.
- the sparse features of the sample input of each GPU can obtain the corresponding embedded features.
- the gradients of the embedded features will be returned to other GPUs again through the AllToAll communication between GPUs. After each GPU obtains its own gradient, it performs optimization processing through the optimizer to complete the optimization of large-scale embedded features.
- 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. Sparse features 0 of the first type of all samples are locally stored in GPU0, and sparse features 1 of the second type of all samples are locally stored in GPU1. Therefore, GPU0 transmits sparse features 1 of the second type of sample 0 to GPU1, and GPU1 transmits sparse features 0 of the first type of sample 1 to GPU0.
- GPU0 searches hash table 0 to obtain embedded features 0 of the first type of sample 0 and embedded features 0 of the first type of sample 1.
- GPU1 searches hash table 1 to obtain embedded features 1 of the second type of sample 0 and embedded features 1 of the second type of 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, so that GPU0 performs reasoning processing based on the deep model according to the first type of embedded feature 0 of sample 0 and the second type of embedded feature 1 of sample 0 to obtain a probability mapping result, and 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 based on the error between the probability mapping result and the label value, and GPU1 performs reasoning processing based on the deep model according to the first type of embedded feature 0 of sample 1 and the second type of embedded feature 1 of sample 1 to obtain a probability mapping result, and 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 based on the error between the probability mapping result and the label value.
- the gradient 0 of the embedded feature 0 and the gradient 1 of the embedded feature 1 of the second type are transmitted by GPU0 to GPU1, and the optimizer of GPU1 updates the embedded feature 1 of the second type based on the gradient 1 corresponding to the embedded feature 1 of the second type.
- GPU1 transmits the gradient 0 corresponding to the embedded feature 0 of the first type to GPU0, and the optimizer of GPU0 updates the embedded feature 0 of the first type based on the gradient 0 corresponding to the embedded feature 0 of the first type.
- the embodiment of the present application proposes a GPU training solution that can support large-scale embedding, which has the following advantages: using GPU to store embedding parameters, making full use of 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.
- third-party frameworks such as TensorFlow, Pytorch and other mainstream frameworks.
- 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
- the second graphics processor stores embedded features of a second type of full sparse features.
- the first type is different from the second type.
- the software module stored in the artificial intelligence-based data processing device 255-1 of the memory 250 may include: a first receiving module 2551, configured for the first graphics processor to obtain sparse features of a 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 acquisition module 2552, configured for the first graphics processor to obtain from the second graphics processor the embedded features of the full sparse features of the second type obtained from the query; The embedded features corresponding to the second sparse features obtained; 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 of the second type of full sparse features 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 to form the embedded features corresponding to the sparse features of the target sample; the first update module 2555 is configured for the first graphics processor
- the first updating module 2555 is further configured as the first graphics processor to update the embedded features of the first type of full-quantity sparse features according to the probability mapping result.
- 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.
- 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 multiple types of all sparse features is greater than a threshold.
- the embedded features of the multiple types of full amount sparse features are stored in each of the multiple graphics processors.
- the first return module 2553 is further configured as: 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.
- 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 amount of sparse features of the first type.
- 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.
- the first receiving module 2551 is further configured to perform an average 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 set that have a corresponding relationship with the first graphics processor as the target samples corresponding to the first graphics processor.
- the first update module 2555 is configured to use the embedded features corresponding to the sparse features of the target sample as input to the recommendation model, perform probability mapping processing on the embedded features corresponding to the sparse features of 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.
- 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
- the second graphics processor stores embedded features of a second type of full sparse features.
- the first type is different from the second type.
- the software module stored in the artificial intelligence-based data processing device 255-2 of 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 query the embedded features of the second type of full sparse features to obtain the embedded features corresponding to the second sparse features; a second return module 2558, configured for the second graphics processor to transmit the embedded features corresponding to the second sparse features to the first graphics processor.
- the device enables the first graphics processor to perform 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 amount of sparse features of the first type;
- the second update module 2559 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 full amount of sparse features of the second type based on the update instruction.
- 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.
- the embodiment of the present application provides a computer program product, which includes computer executable instructions, which are stored in a computer-readable storage medium.
- the processor of the electronic device reads the computer executable instructions from the computer-readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the data processing method based on artificial intelligence described in the embodiment of the present application, and the processor is a graphics processor or a central processing unit.
- An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein computer-executable instructions are stored.
- the processor will 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.
- 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 it may be various devices including one or any combination of the above memories.
- 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.
- computer-executable instructions may, but need not necessarily, correspond to a file in a file system, may be stored as part of a file that holds other programs or data, such as in a hypertext markup file.
- the program may be stored in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
- HTML Hyper Text Markup Language
- 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 at multiple sites and interconnected by a communication network.
- 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 high efficiency of GPU computing, and greatly improving the update speed of embedded features while meeting storage requirements.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Mathematical Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Probability & Statistics with Applications (AREA)
- Algebra (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Neurology (AREA)
- Complex Calculations (AREA)
- Information Transfer Between Computers (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
Abstract
Description
Claims (20)
- 一种数据处理方法,所述数据处理方法应用于第一图形处理器,所述第一图形处理器存储有第一类型的全量稀疏特征的嵌入特征,第二图形处理器存储有第二类型的全量稀疏特征的嵌入特征,所述第一类型与所述第二类型不同;所述方法包括:所述第一图形处理器获取目标样本的稀疏特征,所述目标样本的稀疏特征包含所述第一类型的第一稀疏特征和所述第二类型的第二稀疏特征;所述第一图形处理器从所述第一类型的全量稀疏特征的嵌入特征中,获取对应于所述第一稀疏特征的嵌入特征;所述第一图形处理器从所述第二图形处理器获取从所述第二类型的全量稀疏特征的嵌入特征查询得到的对应于所述第二稀疏特征的嵌入特征;所述第一图形处理器将对应于所述第一稀疏特征的嵌入特征和对应于所述第二稀疏特征的嵌入特征,组成对应于所述目标样本的稀疏特征的嵌入特征;所述第一图形处理器对所述对应于所述目标样本的稀疏特征的嵌入特征执行概率映射处理,并根据概率映射结果生成更新指令,所述更新指令用于指示所述第二图形处理器更新所述第二类型的全量稀疏特征的嵌入特征。
- 根据权利要求1所述的方法,其中,所述方法还包括:所述第一图形处理器根据所述概率映射结果更新所述第一类型的全量稀疏特征的嵌入特征。
- 根据权利要求1或2所述的方法,其中,所述第一图形处理器和所述第二图形处理器属于多个图形处理器,所述多个图形处理器存储有多个类型的全量稀疏特征的嵌入特征,所述第一类型包含所述多个类型中的至少一个类型,所述第二类型包含所述多个类型中的至少一个类型。
- 根据权利要求3所述的方法,其中,所述第一类型的全量稀疏特征的嵌入特征的存储位置和所述第二类型的全量稀疏特征的嵌入特征的存储位置,是在所述多个类型的全量稀疏特征的嵌入特征的数据量大于阈值的情况下划分的。
- 根据权利要求3所述的方法,其中,在所述多个类型的全量稀疏特征的 嵌入特征的数据量不大于阈值的情况下,所述多个类型的全量稀疏特征的嵌入特征保存在所述多个图形处理器中的每个图形处理器中。
- 根据权利要求1至5中任意一项所述的方法,其中,所述第一图形处理器从所述第二图形处理器获取从所述第二类型的全量稀疏特征的嵌入特征查询得到的对应于所述第二稀疏特征的嵌入特征,包括:所述第一图形处理器向所述第二图形处理器传输所述第二稀疏特征,使得所述第二图形处理器从所述第二类型的全量稀疏特征的嵌入特征中查询出对应于所述第二稀疏特征的嵌入特征;所述第一图形处理器接收对应于所述第二稀疏特征的嵌入特征。
- 根据权利要求1至6中任意一项所述的方法,其中,所述第一图形处理器从所述第一类型的全量稀疏特征的嵌入特征中,获取对应于所述第一稀疏特征的嵌入特征,包括:所述第一图形处理器从所述第一类型的全量稀疏特征的嵌入特征中查询出对应所述第一稀疏特征的嵌入特征。
- 根据权利要求1至7中任意一项所述的方法,其中,在所述第一图形处理器获取目标样本的稀疏特征之前,所述方法还包括:获取所述第一图形处理器前一次从所述多个数据样本中获取到的历史目标样本;将所述多个数据样本中除所述历史目标样本的数据样本作为其他数据样本;从所述其他数据样本中随机获取至少一个数据样本作为所述目标样本。
- 根据权利要求1至8中任意一项所述的方法,其中,在所述第一图形处理器获取目标样本的稀疏特征之前,所述方法还包括:基于所述图形处理器的数目对所述多个数据样本进行平均划分处理,得到多个样本集合,其中,每个所述样本集合包括至少一个数据样本,所述样本集合的集合数目与所述图形处理器的数目相同;确定所述多个样本集合与所述多个图形处理器之间的一一对应关系;将与所述第一图形处理器之间具有所述对应关系的样本集合中的数据样本, 作为对应所述第一图形处理器的目标样本。
- 根据权利要求1至9中任意一项所述的方法,其中,所述第一图形处理器根据所述对应于所述目标样本的稀疏特征的嵌入特征执行概率映射处理,包括:以所述对应于所述目标样本的稀疏特征的嵌入特征作为推荐模型的输入,通过所述推荐模型对所述对应于所述目标样本的稀疏特征的嵌入特征执行概率映射处理,得到对应所述目标样本的推荐概率作为所述概率映射结果;所述根据概率映射结果生成更新指令,包括:所述第一图形处理器确定对应所述目标样本的推荐概率与对应所述目标样本的标签值之间的误差,并基于所述误差确定所述目标样本的第二类型的全量稀疏特征的嵌入特征的梯度;生成携带有所述第二类型的全量稀疏特征的嵌入特征的梯度的更新指令。
- 一种数据处理方法,所述数据处理方法应用于第二图形处理器,第一图形处理器存储有第一类型的全量稀疏特征的嵌入特征,所述第二图形处理器存储有第二类型的全量稀疏特征的嵌入特征,所述第一类型与所述第二类型不同;所述方法包括:所述第二图形处理器接收所述第一图形处理器发送的,所述第二类型的第二稀疏特征;所述第二图形处理器从所述第二类型的全量稀疏特征的嵌入特征中查询得到对应于所述第二稀疏特征的嵌入特征;所述第二图形处理器将对应于所述第二稀疏特征的嵌入特征传输至所述第一图形处理器,以使所述第一图形处理器对对应于第一稀疏特征的嵌入特征和对应于所述第二稀疏特征的嵌入特征,执行概率映射处理,其中,所述对应于第一稀疏特征的嵌入特征是所述第一图形处理器从所述第一类型的全量稀疏特征的嵌入特征中获取得到的;所述第二图形处理器从第一图形处理器接收根据概率映射结果生成的更新 指令,并基于所述更新指令更新所述第二类型的全量稀疏特征的嵌入特征。
- 根据权利要求11所述的方法,其中,所述第一图形处理器和所述第二图形处理器属于多个图形处理器,所述多个图形处理器存储有多个类型的全量稀疏特征的嵌入特征,所述第一类型包含所述多个类型中的至少一个类型,所述第二类型包含所述多个类型中的至少一个类型。
- 根据权利要求12所述的方法,其中,所述第一类型的全量稀疏特征的嵌入特征的存储位置和所述第二类型的全量稀疏特征的嵌入特征的存储位置,是在所述多个类型的全量稀疏特征的嵌入特征的数据量大于阈值的情况下划分的。
- 根据权利要求12所述的方法,其中,在所述多个类型的全量稀疏特征的嵌入特征的数据量不大于阈值的情况下,所述多个类型的全量稀疏特征的嵌入特征保存在所述多个图形处理器中的每个图形处理器中。
- 一种数据处理装置,所述数据处理方法应用于第一图形处理器,第一图形处理器存储有第一类型的全量稀疏特征的嵌入特征,所述第二图形处理器存储有第二类型的全量稀疏特征的嵌入特征,所述第一类型与所述第二类型不同,所述装置包括:第一接收模块,配置为所述第一图形处理器获取目标样本的稀疏特征,所述目标样本的稀疏特征包含所述第一类型的第一稀疏特征和所述第二类型的第二稀疏特征;第一获取模块,配置为所述第一图形处理器从所述第二图形处理器获取从所述第二类型的全量稀疏特征的嵌入特征查询得到的对应于所述第二稀疏特征的嵌入特征;第一返回模块,配置为所述第一图形处理器从所述第二图形处理器获取从所述第二类型的全量稀疏特征的嵌入特征查询得到的对应于所述第二稀疏特征的嵌入特征;第一确定模块,配置为所述第一图形处理器将对应于所述第一稀疏特征的嵌入特征和对应于所述第二稀疏特征的嵌入特征,组成对应于所述目标样本的 稀疏特征的嵌入特征;第一更新模块,配置为所述第一图形处理器对所述对应于所述目标样本的稀疏特征的嵌入特征执行概率映射处理,并根据概率映射结果生成更新指令,所述更新指令用于指示所述第二图形处理器更新所述第二类型的全量稀疏特征的嵌入特征。
- 一种数据处理装置,所述数据处理方法应用于第二图形处理器,第一图形处理器存储有第一类型的全量稀疏特征的嵌入特征,所述第二图形处理器存储有第二类型的全量稀疏特征的嵌入特征,所述第一类型与所述第二类型不同;所述装置包括:第二接收模块,配置为所述第二图形处理器接收所述第一图形处理器发送的,所述第二类型的第二稀疏特征;查询模块,配置为所述第二图形处理器从所述第二类型的全量稀疏特征的嵌入特征中查询得到对应于所述第二稀疏特征的嵌入特征;第二返回模块,配置为所述第二图形处理器将对应于所述第二稀疏特征的嵌入特征传输至所述第一图形处理器,以使所述第一图形处理器对对应于第一稀疏特征的嵌入特征和对应于所述第二稀疏特征的嵌入特征,执行概率映射处理,其中,所述对应于第一稀疏特征的嵌入特征是所述第一图形处理器从所述第一类型的全量稀疏特征的嵌入特征中获取得到的;第二更新模块,配置为所述第二图形处理器从第一图形处理器接收根据概率映射结果生成的更新指令,并基于所述更新指令更新所述第二类型的全量稀疏特征的嵌入特征。
- 一种图形处理器,所述图形处理器用于执行权利要求1至10或者权利要求11至14任一项所述的数据处理方法。
- 一种电子设备,所述电子设备包括:存储器,用于存储计算机可执行指令;图形处理器,用于执行所述存储器中存储的计算机可执行指令时,实现权利要求1至10或者权利要求11至14任一项所述的数据处理方法。
- 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现权利要求1至10或者权利要求11至14任一项所述的数据处理方法,所述处理区是中央处理器或者图形处理器。
- 一种计算机程序产品,包括计算机可执行指令,所述计算机可执行指令被处理器执行时实现权利要求1至10或者权利要求11至14任一项所述的数据处理方法,所述处理区是中央处理器或者图形处理器。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23935092.9A EP4614327A4 (en) | 2023-04-28 | 2023-12-01 | DATA PROCESSING METHOD AND APPARATUS, ELECTRONIC DEVICE, COMPUTER-READABLE STORAGE MEDIA AND COMPUTER PROGRAM PRODUCT |
| US19/235,945 US20250307980A1 (en) | 2023-04-28 | 2025-06-12 | Data processing method and apparatus, electronic device, computer-readable storage medium, and computer program product |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310492698.2A CN116974781A (zh) | 2023-04-28 | 2023-04-28 | 数据处理方法、装置、设备、存储介质及程序产品 |
| CN202310492698.2 | 2023-04-28 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/235,945 Continuation US20250307980A1 (en) | 2023-04-28 | 2025-06-12 | Data processing method and apparatus, electronic device, computer-readable storage medium, and computer program product |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024221925A1 true WO2024221925A1 (zh) | 2024-10-31 |
Family
ID=88478519
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/135891 Ceased WO2024221925A1 (zh) | 2023-04-28 | 2023-12-01 | 数据处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20250307980A1 (zh) |
| EP (1) | EP4614327A4 (zh) |
| CN (1) | CN116974781A (zh) |
| WO (1) | WO2024221925A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116974781A (zh) * | 2023-04-28 | 2023-10-31 | 腾讯科技(深圳)有限公司 | 数据处理方法、装置、设备、存储介质及程序产品 |
| CN118244997B (zh) * | 2024-05-28 | 2024-08-30 | 山东云海国创云计算装备产业创新中心有限公司 | 一种固态硬盘数据处理方法、装置、电子设备及存储介质 |
| CN121029778B (zh) * | 2025-10-30 | 2026-02-24 | 浙江星汉信息技术股份有限公司 | 基于稀疏注意力的大模型底层数据处理方法及系统 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109919436A (zh) * | 2019-01-29 | 2019-06-21 | 华融融通(北京)科技有限公司 | 一种基于稀疏特征嵌入的违约用户概率预测方法 |
| CN112884157A (zh) * | 2019-11-29 | 2021-06-01 | 北京达佳互联信息技术有限公司 | 一种模型训练方法、模型训练节点及参数服务器 |
| US20210319078A1 (en) * | 2020-04-14 | 2021-10-14 | Microsoft Technology Licensing, Llc | Set operations using multi-core processing unit |
| CN113971428A (zh) * | 2020-07-24 | 2022-01-25 | 北京达佳互联信息技术有限公司 | 数据处理方法、系统、设备、程序产品及存储介质 |
| CN116974781A (zh) * | 2023-04-28 | 2023-10-31 | 腾讯科技(深圳)有限公司 | 数据处理方法、装置、设备、存储介质及程序产品 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115423092B (zh) * | 2022-08-26 | 2025-12-19 | 北京潞晨科技有限公司 | 一种基于分布式异构计算的大规模推荐系统训练方法 |
-
2023
- 2023-04-28 CN CN202310492698.2A patent/CN116974781A/zh active Pending
- 2023-12-01 EP EP23935092.9A patent/EP4614327A4/en active Pending
- 2023-12-01 WO PCT/CN2023/135891 patent/WO2024221925A1/zh not_active Ceased
-
2025
- 2025-06-12 US US19/235,945 patent/US20250307980A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109919436A (zh) * | 2019-01-29 | 2019-06-21 | 华融融通(北京)科技有限公司 | 一种基于稀疏特征嵌入的违约用户概率预测方法 |
| CN112884157A (zh) * | 2019-11-29 | 2021-06-01 | 北京达佳互联信息技术有限公司 | 一种模型训练方法、模型训练节点及参数服务器 |
| US20210319078A1 (en) * | 2020-04-14 | 2021-10-14 | Microsoft Technology Licensing, Llc | Set operations using multi-core processing unit |
| CN113971428A (zh) * | 2020-07-24 | 2022-01-25 | 北京达佳互联信息技术有限公司 | 数据处理方法、系统、设备、程序产品及存储介质 |
| CN116974781A (zh) * | 2023-04-28 | 2023-10-31 | 腾讯科技(深圳)有限公司 | 数据处理方法、装置、设备、存储介质及程序产品 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4614327A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116974781A (zh) | 2023-10-31 |
| US20250307980A1 (en) | 2025-10-02 |
| EP4614327A4 (en) | 2026-03-25 |
| EP4614327A1 (en) | 2025-09-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11416268B2 (en) | Aggregate features for machine learning | |
| CN111368210B (zh) | 基于人工智能的信息推荐方法、装置以及电子设备 | |
| US9934260B2 (en) | Streamlined analytic model training and scoring system | |
| KR102794506B1 (ko) | 자연어 질문에 대해 검색 증강 생성(rag) 활용을 기초로 챗봇 서비스를 제공하는 시스템 | |
| CN114154048B (zh) | 构建推荐模型的方法、装置、电子设备及存储介质 | |
| US20250307980A1 (en) | Data processing method and apparatus, electronic device, computer-readable storage medium, and computer program product | |
| WO2020258487A1 (zh) | 一种问答关系排序方法、装置、计算机设备及存储介质 | |
| CN114329029B (zh) | 对象检索方法、装置、设备及计算机存储介质 | |
| WO2025026013A1 (zh) | 多模态的任务处理和对话任务处理的方法、系统及设备 | |
| CN111680799B (zh) | 用于处理模型参数的方法和装置 | |
| Li et al. | A fast distributed stochastic gradient descent algorithm for matrix factorization | |
| CN110334067A (zh) | 一种稀疏矩阵压缩方法、装置、设备及存储介质 | |
| CN116643814A (zh) | 模型库构建方法、基于模型库的模型调用方法和相关设备 | |
| CN112114968A (zh) | 推荐方法、装置、电子设备及存储介质 | |
| US20250238411A1 (en) | Database index recommendation generation by large language model | |
| US20250110979A1 (en) | Distributed orchestration of natural language tasks using a generate machine learning model | |
| CN116263659A (zh) | 数据处理方法、装置、计算机程序产品、设备及存储介质 | |
| CN114282002A (zh) | 基于人工智能的知识生成方法、装置、设备及存储介质 | |
| CN116126856B (zh) | 数据库业务处理方法、装置、计算机设备和存储介质 | |
| CN118861203A (zh) | 一种基于向量数据库的文本搜索方法、系统、设备及介质 | |
| CN115599987B (zh) | 业务处理方法、装置、设备及存储介质 | |
| HK40098123A (zh) | 数据处理方法、装置、设备、存储介质及程序产品 | |
| US11544240B1 (en) | Featurization for columnar databases | |
| US20200372108A1 (en) | Natural language skill generation for digital assistants | |
| US20260072947A1 (en) | Automated determining of metadata tags |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23935092 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023935092 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2023935092 Country of ref document: EP Effective date: 20250603 |
|
| WWP | Wipo information: published in national office |
Ref document number: 2023935092 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |