CN118113905A - Data processing method, device, electronic equipment, medium and program product - Google Patents

Data processing method, device, electronic equipment, medium and program product Download PDF

Info

Publication number
CN118113905A
CN118113905A CN202211487177.XA CN202211487177A CN118113905A CN 118113905 A CN118113905 A CN 118113905A CN 202211487177 A CN202211487177 A CN 202211487177A CN 118113905 A CN118113905 A CN 118113905A
Authority
CN
China
Prior art keywords
resource
attribute
training
data processing
resources
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.)
Pending
Application number
CN202211487177.XA
Other languages
Chinese (zh)
Inventor
曹世磊
洪邦洋
卓呈祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211487177.XA priority Critical patent/CN118113905A/en
Publication of CN118113905A publication Critical patent/CN118113905A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a data processing method, a data processing device, electronic equipment, a medium and a program product, which can be applied to the technical field of data processing. The method comprises the following steps: training to obtain a second data processing model based on resource attribute characteristics of M first resources of each object in the object set, and generating an attribute characteristic matrix; training to obtain a third data processing model based on the resource attribute characteristics of N second resources of each object, wherein N is smaller than M; calling a third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedding characteristics; and determining preference attribute tags according to the similarity of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag. By adopting the embodiment of the application, the accuracy of the favorite attribute labels of the detected objects is facilitated. The embodiment of the application can be also applied to various scenes such as cloud technology, artificial intelligence, intelligent traffic, audio and video, auxiliary driving and the like.

Description

Data processing method, device, electronic equipment, medium and program product
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, electronic device, medium, and program product.
Background
Currently, in some scenes, such as a long video recommendation scene, each resource (e.g. episode) is associated with a plurality of attribute tags, such as a director, a matching angle, a director, a drama, etc., and the object favorites a resource may be a certain attribute of the drama, and then the object may be recommended for the resource (e.g. episode) based on the attribute that the object favors. The attribute labels loved by the object are usually determined through a certain rule statistical analysis, but the inventor finds that a great number of rule parameters are required to be manually configured through the rule determination, so that the condition that the rule parameter configuration is inaccurate easily occurs, and the accuracy of detecting the favorite attribute labels of the object is lower.
Disclosure of Invention
The embodiment of the application provides a data processing method, a device, electronic equipment, a medium and a program product, which are beneficial to detecting the accuracy of favorite attribute labels of objects.
In one aspect, an embodiment of the present application discloses a data processing method, where the method includes:
Acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, wherein M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and the at least one attribute tag associated with each first resource belongs to an attribute tag set;
Training a first data processing model based on resource attribute characteristics of M first resources corresponding to each object to obtain a second data processing model, and generating an attribute characteristic matrix, wherein the attribute characteristic matrix is used for representing attribute embedded characteristics corresponding to each attribute label in the attribute label set;
Acquiring resource attribute characteristics of N second resources of each object in the object set, which have forward access behaviors in a first time range, and training the second data processing model based on the resource attribute characteristics of the N second resources corresponding to each object to obtain a third data processing model, wherein N is a positive integer smaller than M;
acquiring resource attribute characteristics of L second resources of a target object with forward access behaviors in a second time range, and calling the third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedded characteristics of the target object, wherein L is a positive integer;
And determining at least one preference attribute tag of the target object according to the similarity of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix.
In one aspect, an embodiment of the present application discloses a data processing apparatus, including:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and the at least one attribute tag associated with each first resource belongs to an attribute tag set;
The processing unit is used for training the first data processing model based on the resource attribute characteristics of the M first resources corresponding to each object to obtain a second data processing model, and generating an attribute characteristic matrix, wherein the attribute characteristic matrix is used for representing attribute embedded characteristics corresponding to each attribute label in the attribute label set;
The acquiring unit is further configured to acquire resource attribute features of N second resources of each object in the object set, where the N second resources have forward access behaviors in a first time range, and train the second data processing model based on the resource attribute features of N second resources corresponding to each object, so as to obtain a third data processing model, where N is a positive integer smaller than M;
The acquiring unit is further configured to acquire resource attribute features of L second resources of the target object having forward access behaviors in a second time range, and call the third data processing model to process the resource attribute features of the L second resources corresponding to the target object, so as to obtain an object embedded feature of the target object, where L is a positive integer;
The processing unit is further configured to determine at least one preference attribute tag of the target object according to similarity of object embedded features of the target object and attribute embedded features corresponding to each attribute tag represented by the attribute feature matrix.
In one aspect, an embodiment of the present application provides an electronic device, including a processor, and a memory, where the memory is configured to store a computer program, the computer program including program instructions, and the processor is configured to perform the steps of:
Acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, wherein M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and the at least one attribute tag associated with each first resource belongs to an attribute tag set;
Training a first data processing model based on resource attribute characteristics of M first resources corresponding to each object to obtain a second data processing model, and generating an attribute characteristic matrix, wherein the attribute characteristic matrix is used for representing attribute embedded characteristics corresponding to each attribute label in the attribute label set;
Acquiring resource attribute characteristics of N second resources of each object in the object set, which have forward access behaviors in a first time range, and training the second data processing model based on the resource attribute characteristics of the N second resources corresponding to each object to obtain a third data processing model, wherein N is a positive integer smaller than M;
acquiring resource attribute characteristics of L second resources of a target object with forward access behaviors in a second time range, and calling the third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedded characteristics of the target object, wherein L is a positive integer;
And determining at least one preference attribute tag of the target object according to the similarity of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix.
In one aspect, embodiments of the present application provide a computer readable storage medium having stored therein program instructions which, when executed by a processor, are adapted to perform the steps of:
Acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, wherein M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and the at least one attribute tag associated with each first resource belongs to an attribute tag set;
Training a first data processing model based on resource attribute characteristics of M first resources corresponding to each object to obtain a second data processing model, and generating an attribute characteristic matrix, wherein the attribute characteristic matrix is used for representing attribute embedded characteristics corresponding to each attribute label in the attribute label set;
Acquiring resource attribute characteristics of N second resources of each object in the object set, which have forward access behaviors in a first time range, and training the second data processing model based on the resource attribute characteristics of the N second resources corresponding to each object to obtain a third data processing model, wherein N is a positive integer smaller than M;
acquiring resource attribute characteristics of L second resources of a target object with forward access behaviors in a second time range, and calling the third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedded characteristics of the target object, wherein L is a positive integer;
And determining at least one preference attribute tag of the target object according to the similarity of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix.
In one aspect, embodiments of the present application provide a computer program product or computer program comprising program instructions which, when executed by a processor, implement the method provided in one of the aspects above.
By adopting the embodiment of the application, the first data processing model can be trained in a first stage based on the resource attribute characteristics of M first resources (namely, the first resources with forward access behaviors) favored by each object in the object set to obtain the second data processing model, the second data processing model can be trained in a second stage based on the resource attribute characteristics of N second resources (namely, the second resources with forward access behaviors) favored by each object in the first time range to obtain the third data processing model, and the third data processing model can be finely tuned by utilizing the resources favored by the object for a last period after the data processing model is trained by utilizing a large number of the resources favored by the object, so that the latest favored by the object can be captured by the third data processing model finally obtained by training, further, after the object embedding characteristics are obtained by the third data processing model, the favorite attribute labels of the object can be determined based on the object embedding characteristics and the attribute characteristics of each attribute label, and the accuracy of the favored attribute labels of the detected object can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present application;
FIG. 2 is a flow chart of a data processing scheme according to an embodiment of the present application;
FIG. 3 is a flow chart of a training process of a first data processing model according to an embodiment of the present application;
FIG. 4 is a flow chart of a training process of a second data processing model according to an embodiment of the present application;
FIG. 5 is a flowchart of a preference attribute tag determination process according to an embodiment of the present application;
FIG. 6 is a flow chart of a data processing scheme according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a resource attribute feature provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
The embodiment of the application provides a data processing scheme, which can train a first data processing model in a first stage based on the resource attribute characteristics of M first resources (such as first resources with forward access behaviors) favored by each object in an object set to obtain a second data processing model, train a second data processing model in a second stage based on the resource attribute characteristics of N second resources (such as second resources with forward access behaviors) favored by each object in a first time range to obtain a third data processing model, and is also equivalent to that after training the data processing model by utilizing a large number of resources favored by the object, fine tuning the data processing model by utilizing the resources favored by the object for a last period of time, so that the third data processing model obtained by final training can capture the latest preference of the object, and further, the attribute labels related to the object, such as the attribute labels favored by the object, can be determined based on the third data processing model. For example, the trained third data processing model may be used to obtain the object embedded feature, and after the object embedded feature is obtained, the favorite attribute tag of the object may be determined based on the object embedded feature and the attribute embedded feature of each attribute tag, so that accuracy of detecting the favorite attribute tag of the object may be improved.
In addition, the embodiment of the application can use the attribute label associated with the resource to characterize the characteristic of the resource (namely the resource attribute characteristic), and process the resource attribute characteristic of the resource which is loved recently by the target object through the trained third data processing model to obtain the object embedded characteristic of the target object, so that the object embedded characteristic fuses the resource attribute characteristic of the resource which is loved by the object, thereby the potential association between the resource and the attribute label can be mined, the object embedded characteristic which characterizes the potential association between the object and the attribute label of the resource can be obtained, and the attribute label which is loved by the object can be better detected.
In one possible implementation, an embodiment of the present application provides a data processing system. Referring to fig. 1, fig. 1 is a schematic diagram of a data processing system according to an embodiment of the present application. As shown in figure 1 of the drawings, the data processing system may include a terminal (e.g., terminal 1 of fig. 1) terminal 2. N) and a server. The terminal is provided with a client, through which an object can access or view a resource, which may be video, graphic information, music, etc., without limitation, any resource may have a corresponding attribute tag, for example, may include a type of the resource (such as science and technology, humanity, history, etc.), a participant of the resource (such as a director, a match, a director, a drama, a publisher, etc.), and the like, without limitation. The object may refer to the user or a user account corresponding to the user, without limitation. The client may be in the form of application software, web pages, etc., without limitation. For example, the terminal may have a client of video playing software installed, and the object may access various video resources based on the client in the terminal. It can be appreciated that the object can access the resources (such as video, text information, music, etc.) in the client based on the terminal, for example, forward access behavior can be performed on each resource, and the forward access behavior can be behavior of viewing, praying, collecting, etc. the resource, and further resource recommendation can be performed on the basis of the resource on which the forward access behavior is performed by the object. The server can be used for executing the data processing scheme, namely, the resources of forward access behaviors of all objects through the terminal can be obtained, two-stage training is carried out on the data processing model, a third data processing model is finally obtained, further, the object embedding characteristics of the objects can be determined based on the third data processing model obtained through training, and attribute tags favored by the objects are determined based on the object embedding characteristics of the objects and the attribute embedding characteristics of all attribute tags generated during training of the data processing model, so that resource recommendation can be carried out on the basis of the attribute tags favored by the objects.
The technical scheme of the application can be applied to electronic equipment. The electronic device may be a server, such as the one shown in fig. 1 described above. The server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms and the like. Alternatively, the electronic device may be a terminal, or may be another device for performing data processing, which is not limited by the present application. Optionally, the terminal includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, an aircraft, an intelligent sound box, an intelligent home appliance, and the like, which are not limited herein.
In one embodiment, the embodiment of the application can be applied to the technical field of artificial intelligence, for example, the resource attribute characteristics of the resources of the target object can be processed based on the artificial intelligence technology to obtain the object embedded characteristics. Artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that simulates, extends, and extends human intelligence using a digital computer or a machine controlled by a digital computer, perceives the environment, obtains knowledge, and uses the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
In one possible implementation, the embodiment of the application can be applied to the technical field of blockchain, for example, the calculated at least one preference attribute label can be stored on the blockchain. Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer. The link-based platform may include processing modules such as basic services, smart contracts, and operations management. The platform product service layer provides basic capabilities and implementation frameworks of typical applications, and developers can complete the blockchain implementation of business logic based on the basic capabilities and the characteristics of the superposition business. The application service layer provides the application service based on the block chain scheme to the business participants for use.
It should be noted that, in the present application, before collecting the relevant data of the object and in the process of collecting the relevant data of the object (such as the above-mentioned object has the resource with forward access behavior, etc.), a prompt interface, a popup window or output voice prompt information may be displayed, where the prompt interface, popup window or voice prompt information is used to prompt the object to collect the relevant data currently, so that the present application only starts to execute the relevant step of obtaining the relevant data of the object after obtaining the confirmation operation of the object to the prompt interface or popup window, otherwise (i.e. when the confirmation operation of the object to the prompt interface or popup window is not obtained), the relevant step of obtaining the relevant data of the object is ended, i.e. the relevant data of the object is not obtained. In other words, all the subject data collected by the present application is collected with subject consent and authorization, and the collection, use and processing of the relevant subject data requires compliance with relevant laws and regulations and standards of the relevant country and region.
It can be understood that the above scenario is merely an example, and does not constitute a limitation on the application scenario of the technical solution provided by the embodiment of the present application, and the technical solution of the present application may also be applied to other scenarios. For example, as one of ordinary skill in the art can know, with the evolution of the system architecture and the appearance of new service scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.
Based on the above description, the embodiment of the application provides a data processing method. Referring to fig. 2, fig. 2 is a flow chart of a data processing scheme according to an embodiment of the application. The method may be performed by the electronic device described above. The data processing method may include the following steps.
S201, obtaining resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, wherein M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and at least one attribute tag associated with each first resource belongs to an attribute tag set.
The object set may be an object set of all objects corresponding to the client, or may be an object set of objects corresponding to a batch of training for the first data processing model. It can be understood that, because the data of the object set of all the objects corresponding to the general client is relatively huge, the object set can also be the object set of the objects corresponding to the training of a batch, thereby greatly reducing the data volume required to be processed and improving the efficiency of data processing. For example, the object of the present embodiment may be a user.
The first resource may be a resource for training a first data processing model with forward access behavior for the object. Wherein, the object having forward access to the resource may click on the viewed resource, collect the resource, praise the resource, etc. for the object to indicate that the object favorites the resource, without limitation. In one embodiment, the M first resources corresponding to any object may be M resources closest to a current time, where the current time may be a time for obtaining the first resources corresponding to each object; and the number of all the resources with forward access behaviors of the object is M, which is not limited herein. It can be understood that the acquired object has the first resource of the forward access behavior, and is acquired under the condition that the object agrees and authorizes, for example, a prompt interface, a popup window or output voice prompt information can be displayed, and the prompt interface, the popup window or the voice prompt information is used for prompting that the object is currently gathering the forward access behavior executed by the object, so that the application only starts to execute the related step of acquiring the forward access behavior executed by the object after acquiring the confirmation operation of the object on the prompt interface or the popup window, otherwise (i.e. when the confirmation operation of the object on the prompt interface or the popup window is not acquired), the related step of acquiring the related data of the object is ended, i.e. the related data of the object is not acquired.
The set of attribute tags may be a set of attribute tags that each resource is capable of associating. It will be appreciated that the associated attribute tags of the first resource corresponding to each object in the set of objects should cover as much as possible all of the attribute tags in the set of attribute tags so that more accurate attribute embedding characteristics of each attribute tag may be learned later.
The resource identification may be an identification for uniquely identifying a resource. The resource identifier may be a numerical number for each resource, such as resource identifiers of 0, 1,2,3, etc., without limitation. The resource identification may also be represented as a combination of numbers and letters, or in other forms, without limitation.
The resource attribute feature may be a feature for characterizing a resource, which merges at least one attribute tag of the resource with a corresponding resource identification. The resource attribute feature may be characterized as a vector or matrix, without limitation. In one embodiment, the step of obtaining the resource attribute characteristics of any of the first resources may include: acquiring resource identifiers of M first resources corresponding to any object and at least one resource attribute tag associated with the corresponding M first resources; and processing at least one attribute tag associated with the M first resources corresponding to any object and the resource identifiers of the M first resources corresponding to any object to obtain the resource attribute characteristics of the M first resources corresponding to any object. It can be understood that, at least one attribute tag associated with M first resources corresponding to any object and resource identifiers of M first resources corresponding to any object are processed, and an attention mechanism (attention mechanism) can be adopted to perform fusion processing, so that the resources can be characterized by the at least one attribute tag associated with the resources, thereby associating the resources with the attribute tags of the resources, so that the attribute embedded features of each attribute tag can be determined later.
S202, training the first data processing model based on resource attribute features of M first resources corresponding to each object to obtain a second data processing model, and generating an attribute feature matrix, wherein the attribute feature matrix is used for representing attribute embedded features corresponding to each attribute tag in an attribute tag set.
Wherein the first data processing model may be an untrained or a trained but test failed data processing model. In one embodiment, the first data processing model may be trained to randomly block at least one resource attribute feature in the resource attribute feature sequence corresponding to the M first resources by using the object, and further call the first data processing model to process the blocked resource attribute features of the M first resources so as to predict the resource identifier of the blocked resource attribute feature, and may synchronously maintain an attribute feature matrix, where the resource identifier of the resource attribute feature is the resource identifier of the resource corresponding to the resource attribute feature.
The attribute feature matrix may be used to characterize an attribute embedded feature corresponding to each attribute tag in the set of attribute tags. In one embodiment, the resource attribute feature is a learnable linear transformation matrix, also referred to as embedding table, generated during training of the first data processing model. The attribute feature matrix may be represented as a feature matrix, each row of the attribute feature matrix corresponds to an attribute tag, that is, each row of data in the attribute feature matrix represents an attribute embedded feature of the corresponding attribute tag, and the attribute embedded feature of any attribute tag may be represented as a vector. It will be appreciated that the representation of the attribute embedded feature of each attribute tag is unique.
In one possible implementation manner, training the first data processing model based on the resource attribute characteristics of the M first resources corresponding to each object to obtain a second data processing model may include the following steps:
① And sequencing the resource attribute characteristics of the M first resources of any object according to the execution time of the forward access behavior aiming at any object in the objects to obtain a first resource attribute characteristic sequence corresponding to any object. The first resource attribute feature sequence may be a sequence obtained by sorting the resource attribute features of the M first resources corresponding to the arbitrary object, and it is understood that the sorting according to the execution time of the forward access behavior may be sorting according to the time from far to near or from near to far, which is not limited herein.
② Randomly shielding the resource attribute characteristics of at least one first resource in the first resource attribute characteristic sequence corresponding to any object to obtain a first shielding characteristic sequence corresponding to any object. The randomly shielding of the resource attribute features of the at least one first resource may be randomly shielding according to a preset probability. Wherein, the resource attribute features in the first resource attribute feature sequence are blocked, which is also called covering, mask, etc., without limitation.
For example, the number of the cells to be processed, the first resource attribute feature sequence corresponding to any object may be { T1, T2...tm. }, if 2 resource attribute features are randomly masked according to a preset probability, a first occlusion feature sequence { T1, T2, [ mask ], T4..t 6, [ mask ], T8...tm } can be obtained.
③ Forming a first training data set according to the first shielding characteristic sequences corresponding to the objects, wherein any first training data in the first training data set comprises a first shielding characteristic sequence and a corresponding training label; the training label in any one of the first training data is determined according to the resource identifier corresponding to the occluded at least one resource attribute feature in the first occlusion feature sequence. The training label can be a label which is referred to when the data processing model is trained, and the data processing model is trained through the relation between the training label and the predicted result based on the data processing model.
In one embodiment, constructing the first training data set may include: determining a training label according to the resource identifier corresponding to at least one resource attribute feature which is blocked in the first blocking feature sequence of any object, and taking the first blocking feature sequence and the corresponding training label as first training data. It can be understood that when the resource attribute features in the first resource attribute feature sequence are blocked, different resource attribute features can be blocked randomly, so that different first training data can be generated based on the blocked first blocking feature sequences of different resource attribute features, a plurality of first blocking feature sequences can be obtained based on the first resource attribute feature sequence corresponding to one object, and a plurality of first training data can be obtained, so that the number of the training data can be greatly increased, and the training effect on the first data processing model can be improved.
④ And calling a first data processing model to respectively process each first training data in the first training data set to obtain a first training resource identifier corresponding to at least one resource attribute feature which is blocked in a first blocking feature sequence corresponding to each first training data. The first training resource identifier may be a resource identifier corresponding to an occluded resource attribute feature in a first occlusion feature sequence predicted based on the first data processing model. In one embodiment, invoking the first data processing model to process the first training data may include: and calling a first data processing model to process a first shielding characteristic sequence in the first training data to obtain a resource sequence characteristic corresponding to the first training data, and determining a first training resource identifier corresponding to at least one shielded resource attribute characteristic in the first shielding characteristic sequence of the first training data based on the resource sequence characteristic. The resource sequence features can be new feature representations corresponding to a first shielding feature sequence obtained after the first training data are processed based on the first data processing model, and the resource sequence features are fused with features of the object with favorite resources, so that each resource can be better represented.
In one embodiment, each resource attribute feature (including the blocked resource attribute feature) in the first blocking feature sequence may be referred to as a token, and after the first data processing model is invoked to process the second blocking feature sequence in the first training data, a new feature representation corresponding to each token may be obtained, where the new feature representation merges the upper and lower links of each token in the first blocking feature sequence, so as to obtain a more accurate resource sequence feature. In one embodiment, the first data processing model may be a neural network model, such as a Bert4Rec model (a neural network model), without limitation. In one embodiment, when the first resource attribute feature sequence is determined based on the resource attribute features, a token may be obtained by fusing each resource attribute feature with a corresponding position embedding feature, so that the first resource attribute feature sequence is determined based on the token fused with the position embedding feature, and then the token therein is randomly shielded to obtain a first shielding feature sequence, and the position embedding feature may represent a position corresponding to each token in the first shielding feature sequence, so that the data processing model learns an association relationship between each token in the first shielding feature sequence.
It can be understood that after the resource sequence feature is obtained based on the first data processing model, the classification and identification are equivalent to the classification and identification based on the resource sequence feature, so as to identify the resource identifier corresponding to the attribute feature of the blocked at least one resource in the first blocking feature sequence, and the candidate category in the classification and identification can be the resource identifier in the target resource identifier set, where each resource identifier in each target resource set can be the resource identifier set obtained by de-repeating the initial resource identifier set constructed based on the resource identifiers of the M first resources corresponding to each object. In one embodiment, when determining the first training resource identifier corresponding to the first training data, the resource identifier with the highest probability in the resource probabilities of the respective resource identifiers (i.e. the respective candidate categories) in the target resource set may be further used as the first training resource identifier for determining the resource probabilities of the respective resource identifiers (i.e. the respective candidate categories) in the target resource set by the first training data.
⑤ And training the first data processing model based on the first training resource identifiers corresponding to the first training data and the training labels corresponding to the first training data to obtain a second data processing model. In one embodiment, training the first data processing model may include: and determining a first loss value based on the first training resource identification corresponding to each first training data and the training label corresponding to each first training data, adjusting the model parameters of the first data processing model based on the first loss value, and taking the first data processing model with the adjusted model parameters as a second data processing model. It may be appreciated that the loss value may be obtained by calculating the first training resource identifier corresponding to each first training data by a loss function, for example, a cross entropy loss function. In one embodiment, the first loss value may also be obtained by calculating, through a loss function, a training label corresponding to each first training data, where the training label corresponds to each first training data, and the resource probability corresponding to each resource identifier (i.e. each candidate class) in the target resource set. It may be appreciated that as training of the first data processing model progresses, the first loss value gradually decreases until the first loss value meets a preset condition (e.g., is less than or equal to a threshold value), and the first data processing model after parameter adjustment is used as the second data processing model. It can be appreciated that as the training of the first data processing model proceeds, the first data processing model is able to learn the ability to accurately predict the favorite resources of the subject, and is able to learn the ability to generate more accurate sequence features of the resources, and learn better characterizations of the embedded features of each attribute tag, thereby enhancing the training effect.
For example, referring to fig. 3, fig. 3 is a schematic flow chart of a training process of a first data processing model according to an embodiment of the present application. As shown in FIG. 3, a first resource attribute feature sequence may be obtained by the resource attribute feature 301 and the location embedding feature 302, and at least one token, such as the 3 rd token and the 6 th token, are randomly blocked in the first resource attribute feature sequence, such as the token with the resource identifier 2 and the token with the resource identifier 5 in FIG. 3, so as to obtain a first blocked feature sequence 303. And further, the first data processing model 304 is called to process the first shielding feature sequence, so as to obtain a resource sequence feature 305 corresponding to the first shielding feature sequence, wherein the resource sequence feature comprises a new representation corresponding to each token. And further, the first training resource identifier corresponding to the new characterization prediction corresponding to the 3 rd token and the first training resource identifier 306 corresponding to the new characterization prediction corresponding to the 6 th token can be based on the new characterization prediction corresponding to the 3 rd token, so that the first data processing model can be trained based on the first training prediction identifier, specifically, model parameters of the first data processing model can be adjusted based on the training label corresponding to the first shielding feature sequence of the first training resource identifier, and therefore, along with recommendation of training, the first data processing model can accurately calculate to obtain the resource identifier corresponding to the 3 rd token as 2, and the resource identifier corresponding to the 6 th token as 5.
In an embodiment, the first training data set formed according to the first occlusion feature sequence corresponding to each object may further include positive sample training data and negative sample training data. The positive sample training data may be a training label with a training label being a correct resource identifier of the blocked first resource, and the negative sample training data may be a training label with a training label being a wrong resource identifier of the blocked first resource. Further, in the process of training the first data processing model, the first training resource identifier of the positive sample training data is gradually approaching to the training label, so that the difference between the first training resource identifier of the negative sample training data and the training label is increased. For example, when training is performed, the resource probability for each candidate category (i.e. each resource identifier in the target resource identifier set) may be obtained based on the input first training data, and further in the process of training the first data processing model, the resource probability corresponding to the resource identifier indicated by the training tag may be gradually increased in the resource probabilities of each candidate category corresponding to the positive sample training data, and the resource probability corresponding to the resource identifier indicated by the training tag may be gradually decreased in the resource probabilities of each candidate category corresponding to the negative sample training data.
In one embodiment, the first training data may be positive sample training data, and the forming of the first training data set according to the first occlusion feature sequence corresponding to each object may include the following steps: ① Aiming at any object in all objects, taking the shielding characteristic identifier in the first shielding characteristic sequence corresponding to any object as a positive sample training label of the first shielding characteristic sequence corresponding to any object; the occlusion feature identification is a resource identification of a resource that indicates that the resource attribute feature is occluded. ② And determining the first shielding characteristic sequence of any object and the corresponding positive sample training label as positive sample training data in the first training data set. The positive sample training label can be the training label of the correct resource identifier of the blocked first resource, namely the blocking feature identifier, and the first blocking feature sequence and the positive sample training label can be used as positive sample training data.
In one embodiment, the first training data may be negative training data, and the forming of the first training data set according to the first occlusion feature sequence corresponding to each object may include the following steps:
① And constructing an initial resource identification set based on the resource identifications of the M first resources corresponding to each object, and performing de-duplication processing on the resource identifications in the initial resource identification set to obtain a target resource identification set. Wherein, as described above, each resource identifier in the target set of resource identifiers may represent a respective candidate class corresponding when classifying based on the first data processing model. The initial resource identifier set may be a set of resource identifiers of M resources corresponding to each object, and since the first resource of different objects having forward access behaviors may have repeated resources, the initial resource identifier set may have repeated resource identifiers, and further the resource identifiers may be subjected to deduplication processing, that is, only one resource identifier is reserved in multiple identical resource identifiers, thereby obtaining a target resource identifier set.
② Aiming at any object in each object, taking any resource identifier in the target resource identifier set except for the shielding characteristic identifier corresponding to the first shielding characteristic sequence of any object as a negative sample training label of the first shielding characteristic sequence of any object; the occlusion feature identification is a resource identification of a resource that indicates that the resource attribute feature is occluded. The negative sample training label can be the training label of the wrong resource identifier of the blocked first resource, namely other resource identifiers except the blocking feature identifier in the target resource set.
③ And determining the first shielding characteristic sequence of any object and the corresponding negative sample training label as negative sample training data in the first training data set.
It can be appreciated that the first training data set may include either positive sample training data or negative sample training data, so as to train a second data processing model with better effect.
For example, the number of the cells to be processed, the first resource attribute feature sequence corresponding to any object may be { T1 }: t2.....tm. }, if 2 resource attribute features are randomly masked according to a preset probability, a first masking feature sequence { T1, T2, [ mask ] 1、T4...T6、[mask]2, T8...Tm } can be obtained. If positive sample training data in the first training data set needs to be determined, determining a training label corresponding to the mask 1 as a resource identifier of T3, and determining a training label corresponding to the mask 2 as a resource identifier of T7; if negative training data in the first training data set needs to be determined, the training label corresponding to the mask 1 may be determined as a resource identifier other than the resource identifier of T3, for example, determined as T2, and the training label corresponding to the mask 2 may be determined as a resource identifier other than the resource identifier of T7, for example, T6.
S203, acquiring resource attribute characteristics of N second resources of forward access behaviors of each object in the object set in a first time range, and training a second data processing model based on the resource attribute characteristics of the N second resources corresponding to each object to obtain a third data processing model, wherein N is a positive integer smaller than M.
The first time range may be a period of time closest to the current time, or a period of time with a fixed start time and an end time before the current time, which is not limited herein. The time length of the first time range may be a preset time length. For example, the first time range may be one week closest to the current time, so that the second resource with forward access behavior within one week of each object closest to the current time may be obtained; as another example, the first time range may be a period of time from 11 months 1 day to 11 months 7 days, which is a fixed start time and end time. And further, the second resource obtained through training can be finely adjusted through the favorite resource of the object in the first time range, so that the resource sequence characteristic which can better represent the current preference of the object can be obtained, and further, the object embedded characteristic which can better represent the current preference of the object can be obtained.
It can be understood that the method for determining the resource attribute features of any second resource may refer to the description related to the first resource, which is not described herein.
It will be appreciated that the second resource of any object may or may not have the same resource as the first resource of each object, which is not limited herein.
In one embodiment, training the second data processing model based on the resource attribute features of the N second resources corresponding to each object to obtain a third data processing model may include the following steps:
① And sequencing the resource attribute characteristics of N second resources corresponding to any object according to the execution time of the forward access behavior aiming at any object in the objects to obtain a second resource attribute characteristic sequence corresponding to any object.
② Randomly shielding the resource attribute characteristics of one second resource in the second resource attribute characteristic sequence corresponding to any object to obtain a second shielding characteristic sequence corresponding to any object.
③ Forming a second training data set according to the second shielding characteristic sequences corresponding to the objects, wherein any second training data in the second training data set comprises a second shielding characteristic sequence and a corresponding training label; the training label in any second training data is determined according to the resource identifier corresponding to the occluded resource attribute feature in the second occlusion feature sequence. For example, the number of the cells to be processed, the second resource attribute feature sequence corresponding to any object may be V1, V2. If 2 resource attribute features are randomly blocked according to a preset probability, a first blocking feature sequence { V1, [ mask ], V3...Vn } can be obtained. If positive sample training data in the second training data set needs to be determined, determining a training label corresponding to the mask as a resource identifier of V2; if negative training data in the second training data set needs to be determined, the training label corresponding to the mask may be determined as other resource identifiers except the resource identifier of V2, for example, as V3.
④ And calling a second data processing model to respectively process each second training data in the second training data set to obtain a second training resource identifier corresponding to the occluded resource attribute feature in the second occlusion feature sequence corresponding to each second training data.
⑤ And training the second data processing model based on the second training resource identifiers corresponding to the second training data and the training labels corresponding to the second training data to obtain a third data processing model.
It can be understood that the process of training the second data processing model to obtain the third data processing model may refer to the above-mentioned process of training the first data processing model to obtain the relevant description of the second data processing model, which is not described herein. It is noted that when the first data processing model is trained, at least one resource attribute feature in the first resource attribute feature sequence is randomly blocked, and when the second data processing model is trained, one resource attribute feature in the second resource attribute feature sequence is randomly blocked, so that fine adjustment of the second data processing model can be realized, the data processing model can learn the preference of the object for a last period of time, and meanwhile, the calculation amount of data processing is reduced, and the data processing efficiency is improved.
It will be appreciated that positive sample training data as well as negative sample training data may also be included when constructing the second training data set from the second occlusion feature sequences corresponding to the respective objects. The description of the positive training data and the negative training data may refer to the above description, and will not be repeated here.
Specifically, determining positive sample training data in the second training data set may include the steps of: ① Aiming at any object in the objects, taking the shielding characteristic identifier in the second shielding characteristic sequence corresponding to any object as a positive sample training label of the second shielding characteristic sequence corresponding to any object; the occlusion feature identification is a resource identification of a resource that indicates that the resource attribute feature is occluded.
② And determining the second shielding characteristic sequence of any object and the corresponding positive sample training label as positive sample training data in the second training data set.
Specifically, determining negative training data in the second training data set may include the steps of:
① And constructing an initial resource identification set corresponding to the second data processing model based on the resource identifications of the N second resources corresponding to each object, and performing de-duplication processing on the resource identifications in the initial resource identification set corresponding to the second data processing model to obtain a target resource identification set corresponding to the second data processing model.
② Aiming at any object in the objects, taking any resource identifier in a target resource identifier set corresponding to the second data processing model except for an shielding characteristic identifier corresponding to a second shielding characteristic sequence of any object as a negative sample training label of the second shielding characteristic sequence of any object; the occlusion feature identification is a resource identification of a resource that indicates that the resource attribute feature is occluded.
③ And determining the second shielding characteristic sequence of any object and the corresponding negative sample training label as negative sample training data in the second training data set.
For example, referring to fig. 4, fig. 4 is a schematic flow chart of a training process of a second data processing model according to an embodiment of the present application. As shown in FIG. 4, a second resource attribute feature sequence may be obtained by the resource attribute feature 401 and the location embedding feature 402, and a token, such as the 3 rd token in the second resource attribute feature sequence, is randomly blocked, for example, the token with the resource identifier of 2 in FIG. 4, so as to obtain a second blocked feature sequence 403. And further, the second data processing model 404 is called to process the second shielding feature sequence, so as to obtain a resource sequence feature 405 corresponding to the second shielding feature sequence, wherein the resource sequence feature 405 comprises a new representation corresponding to each token. And further, the second training resource identifier 406 corresponding to the new representation prediction corresponding to the 3 rd token can be based, so that the second data processing model can be trained based on the second training prediction identifier, specifically, model parameters of the second data processing model can be adjusted based on the training label corresponding to the second shielding feature sequence of the second training resource identifier, and accordingly, along with recommendation of training, the second data processing model can accurately calculate to obtain the resource identifier corresponding to the 3 rd token as 2.
S204, acquiring resource attribute characteristics of L second resources of which the target object has forward access behaviors in a second time range, and calling a third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedded characteristics of the target object, wherein L is a positive integer.
The second time range may be a period of time closest to the current time, or a period of time with a fixed start time and an end time before the current time, which is not limited herein. The time length of the second time range may be a preset time length. For example, the second time range may be one week closest to the current time, so that a second resource with forward access behavior within one week of each object closest to the current time may be obtained; as another example, the second time range may be a period of time of a fixed start time and end time of 11 months 1 day to 11 months 7 days. It is understood that the first time range may be the same as the second time range or may be different from the second time range, which is not limited herein. And further, the second resources obtained through training can be finely adjusted through the resources favored by the objects in the second time range, so that the resource sequence characteristics which can better represent the current favorites of the objects can be obtained, and further, the object embedded characteristics which can better represent the current favorites of the objects can be obtained. The object embedding feature may be an embedding feature corresponding to the object, and may also be referred to as an object feature. The object embedding feature may be represented as a matrix or vector or other form, without limitation.
It is understood that the target object may be any object in the object set that needs to detect attribute tag preference. It will be appreciated that the number of L may be the same as or different from N described above, and is not limited herein. In the above process, the third data processing model may learn the preference of each object (such as the target object) on the resource in the first time range, and further determine, based on the resource attribute features of the L second resources of the target object in the second time range, better object embedding features for characterizing the preference of the object on the attribute tags of the resource.
It may be appreciated that the description of the resource attribute features of the L second resources may be referred to the above description, which is not repeated herein.
In a possible implementation manner, the third data processing model is called to process the resource attribute features of the L second resources corresponding to the target object, so as to obtain the object embedded feature of the target object, which may include the following steps:
① And sequencing the resource attribute characteristics of the L second resources corresponding to the target object according to the execution time of the forward access behavior to obtain a target resource attribute characteristic sequence corresponding to the target object. It can be understood that the determining manner of the target resource attribute feature sequence may refer to the description related to the first resource attribute feature sequence, which is not described herein.
② And calling a third data processing model to process the target resource attribute feature sequence to obtain the resource sequence feature corresponding to the target resource attribute feature sequence, and determining the object embedded feature of the target object according to the resource sequence feature. It may be understood that the description of the resource sequence feature corresponding to the target resource attribute feature sequence may refer to the description of the resource sequence feature corresponding to the first resource attribute feature sequence, which is not described herein.
In one embodiment, as described above, each resource attribute feature in the target resource attribute feature sequence may be referred to as a token, and then a new token of each token may be obtained by processing the target resource attribute feature sequence by the third data processing model, and further when determining an object embedding feature of the target object according to the resource sequence feature, a feature corresponding to the first token (resource attribute feature) in the resource sequence feature may be used as the object embedding feature of the target object. It can be understood that the feature corresponding to the first token (resource attribute feature) in the resource sequence feature may be fused with the information of the entire target resource attribute feature sequence, and because the resource attribute feature is fused with the information of at least one attribute tag associated with the favorite resource (i.e. the resource with forward access behavior) of the object, the obtained object embedding feature may be fused with the information of each attribute tag of the favorite resource of the object, and further, the object embedding feature fused with the information of each attribute tag of the favorite resource of the object may be compared with the feature of each attribute tag, such as calculating similarity, to determine the favorite attribute tag of the target object.
In one embodiment, when the second data processing model is trained to obtain the third data processing model, the attribute feature matrix can be updated, so that the attribute feature matrix can be more in line with the recent preference of the object, and further the accuracy of detecting the attribute tags favored by the object can be improved.
S205, determining at least one preference attribute tag of the target object according to the similarity of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix.
Wherein the preference attribute tag is used for indicating attribute tags favored by the object. It may be appreciated that, as described above, the object embedded feature of the target object may be integrated with information of each attribute tag of the resource favored by the object, and then at least one preference attribute tag of the target object may be determined by similarity of the object embedded feature of the target object and the attribute embedded feature corresponding to each attribute tag.
It will be appreciated that the greater the similarity between the attribute embedded features of one attribute tag and the object embedded features, the more likely the target object favors that attribute tag, i.e., the more likely it is a preferred attribute tag of the target object, whereas the less the similarity between the attribute embedded features of one attribute tag and the object embedded features, the less likely it is that the target object favors that attribute tag, i.e., the less likely it is that the attribute tag is a preferred attribute tag of the target object.
In one possible implementation, the at least one preference attribute tag of the target object may be at least one attribute tag with the greatest similarity. Therefore, the favorites of the object on each resource can be attributed to the attribute label of the resource, and the preference attribute label of the object is obtained.
In one possible implementation, after determining the at least one preference attribute tag of the target object, the recommended resource for the target object may also be determined based on the at least one preference attribute tag of the target object. In one embodiment, determining the recommended resources for the target object may include the steps of: ① Acquiring at least one attribute tag associated with each resource in a resource set; ② Determining the attribute matching degree of at least one preference attribute tag of the target object and each resource based on at least one attribute tag associated with each resource in the resource set and at least one preference attribute tag of the target object; ③ And determining at least one recommended resource corresponding to the target object from the resource set based on the attribute matching degree. The attribute matching degree is used for indicating the matching degree of the attribute labels of the resources and preference attribute labels favored by the objects. It will be appreciated that the higher the attribute matching degree, the more likely the target object likes the resource from the perspective of its attribute tag, and conversely, the lower the attribute matching degree, the lower the likelihood that the target object likes the resource from the perspective of its attribute tag. The attribute matching degree can be determined by the matching quantity of at least one attribute tag associated with the resource and at least one preference attribute tag of the target object, and the greater the matching quantity of the at least one attribute tag associated with the resource and the at least one preference attribute tag of the target object is, the greater the attribute matching degree is, the more likely the target object favors the resource, and further a plurality of resources with the maximum attribute matching degree can be determined as recommended resources aiming at the target object. In one embodiment, after determining the recommended resources of the target object based on the preference attribute tag, the method can further perform screening based on the determined recommendation again, that is, the recommended resources can be further screened through some graph models, so as to obtain the resources finally recommended for the target object, and therefore accuracy of recommending the resources for the target object is improved.
In one possible implementation manner, after determining at least one preference attribute tag of the target object, the at least one preference attribute tag of the target object may be sent to a terminal corresponding to the target object for display, so that the object knows the preference of the attribute tag of the object. For example, at least one preference attribute tag of the object may be displayed in a graphic, table, or the like form at the terminal.
In one possible implementation manner, the step of acquiring the resource attribute characteristics of the L second resources having the forward access behaviors of the target object in the second time range may be performed after detecting the instruction for indicating to acquire the preference attribute tag of the target object, so that the steps S204 to S205 may be performed to acquire at least one preference attribute tag of the target object in response to the instruction, which is also called as obtaining the attribute tag portrait corresponding to the object. The instruction for indicating to obtain the preference attribute tag of the target object may be generated after detecting the request submitted by the object for indicating to obtain the at least one preference attribute tag of the target object, or may be generated after triggering a mechanism for indicating to make a resource recommendation for the target object, which is not limited herein.
For example, in some scenarios, the resource may be an episode, and the attribute tags associated with any episode may include tags of stars characters such as a director, an accessory, a director, a drama, etc. that reference the episode. The application can provide a service for acquiring the star image of the object, so that the object can view the favorite star image in the aspect of viewing. For example, after detecting a triggering operation for a control for indicating to acquire a star portrait, the terminal sends a star portrait acquisition request to a server corresponding to application software, and after receiving the star portrait acquisition request, the server generates an instruction for indicating to acquire a preference attribute tag feature of a target object, further acquires resource identifiers of L resources of the object in a first time range and attribute tags of each resource, determines resource attribute features of each resource based on the resource identifiers of the L resources of the object in the first time range and the attribute tags of each resource, and then invokes a third data processing model to process the resource attribute features to obtain object embedded features of the object, and further determines attribute tags of at least one star persona favored by the object based on similarity of the object embedded features and the attribute tags of each star persona, thereby obtaining the star portrait used for characterizing each star favored by the object.
The determination of the overall preference attribute tags is described herein in connection with illustrations. Referring to fig. 5, fig. 5 is a flowchart illustrating a preference attribute tag determining process according to an embodiment of the present application. As shown in fig. 5, first, the resource identifier of M resources of the object having the forward access behavior may be acquired (as in step S501 in fig. 5, and at least one attribute tag associated with M resources of the object having the forward access behavior may be acquired (as in step S502 in fig. 5), then the resource attribute feature of each resource may be obtained by using the attention mechanism fusion (as in step S503 in fig. 5), that is, the resource attribute feature of the corresponding resource is determined by the resource identifier of M resources of each object and the attribute tag associated with M resources respectively.
Further, the resource identifiers of the N resources having the forward access behaviors within the first time range of the object may be obtained (step S506 in fig. 5), and associated attribute tags of the N resources having the forward access behaviors within the first time range of the object may be obtained (step S507 in fig. 5), so as to fine tune the second data processing model by shielding one resource attribute feature in the second resource attribute feature sequence corresponding to the object, thereby obtaining a third data processing model (step S508 in fig. 5). The second resource attribute feature sequence may be a feature sequence constructed for acquiring the resource attribute features of the N resources to complete the training of the second stage of the data processing model. Optionally, in the training process of the second stage, the attribute feature matrix may be updated, so as to obtain a more accurate attribute feature matrix.
Further, after the third data processing model is obtained, the object embedded feature may be obtained based on the third data processing model (as in step S509 in fig. 5), and specifically, may be obtained by processing the resource attribute feature of the resource favored by the object needing to perform the preference tag detection in the first time range for invoking the third data processing model. Further, the attribute embedded features of each attribute tag may be obtained based on the attribute feature matrix (e.g., step S510 in fig. 5), then at least one preference attribute tag favored by the object may be determined based on the object embedded features and the similarity with each attribute embedded feature (e.g., step S511 in fig. 5), e.g., a similarity score may be determined based on the dot product of the object embedded features and each attribute embedded feature to characterize the similarity, thereby obtaining the preference attribute tag favored by the target object.
By adopting the embodiment of the application, the first data processing model can be trained in a first stage based on the resource attribute characteristics of M first resources (namely, the first resources with forward access behaviors) favored by each object in the object set to obtain the second data processing model, the second data processing model can be trained in a second stage based on the resource attribute characteristics of N second resources (namely, the second resources with forward access behaviors) favored by each object in the first time range to obtain the third data processing model, and the third data processing model can be finely tuned by utilizing the resources favored by the object for a last period after the data processing model is trained by utilizing a large number of the resources favored by the object, so that the latest favored by the object can be captured by the third data processing model finally obtained by training, and further, the attribute labels related to the object, such as the attribute labels favored by the object, can be determined based on the third data processing model. For example, the trained third data processing model may be used to obtain the object embedded feature, and after the object embedded feature is obtained, the favorite attribute tag of the object may be determined based on the object embedded feature and the attribute embedded feature of each attribute tag, so that accuracy of detecting the favorite attribute tag of the object may be improved.
Based on the above description, the embodiment of the application provides a data processing method. Referring to fig. 6, fig. 6 is a flow chart of a data processing scheme according to an embodiment of the application. The method may be performed by the electronic device described above. The data processing method may include the following steps.
S601, acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, wherein M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and at least one attribute tag associated with each first resource belongs to the attribute tag set.
In one possible implementation manner, the obtaining the resource attribute characteristics of the M first resources with forward access behaviors of each object in the object set may include the following steps:
① And acquiring resource identifiers of M first resources of which any object has forward access behaviors and at least one attribute tag associated with the M first resources of any object aiming at any object in the object set. The description of the resource identifier and the attribute tag may refer to the above description, which is not repeated herein.
② Initial resource identification characteristics corresponding to the resource identifications of the M first resources of any object respectively and initial attribute embedding characteristics corresponding to at least one attribute tag associated with the M first resources of any object respectively are determined.
It is understood that the initial resource identifier feature may be a feature obtained by processing the resource identifier based on a neural network, for example, a feature obtained by processing the resource identifier based on a full-connection layer (layer). The initial attribute embedding feature may be a feature obtained by processing a tag text or tag identification of an attribute tag based on a neural network, for example, the initial attribute embedding feature of the attribute tag may be obtained based on a full-connection layer and a mean layer (e.g., a layer+mean). It can be understood that, because the lengths of the various attribute tags of different resources are inconsistent, average operation is performed on all values in the attribute through an average layer after the values pass through a full connection layer, so that the lengths of the initial attribute embedded features of at least one attribute tag corresponding to each resource are consistent, and subsequent processing is facilitated.
③ And performing attention mechanism aggregation processing based on the initial resource identification features corresponding to the M first resources of any object and at least one initial attribute embedding feature corresponding to the M first resources of any object, so as to obtain resource attribute features corresponding to the M first resources of any object.
It can be understood that the attention mechanism (also called attention mechanism) can further obtain the resource attribute features through the initial attribute embedded features of each attribute tag and the initial resource identification features of each resource, so as to fuse the attribute tags of the M first resources corresponding to any object together. For example, the resource attribute characteristics of any resource can be calculated by the following formulas (formulas 1a and 1 b).
Attention=Softmax (cid emb*featureemb) equation 1a
S=concat (cid emb,Attention1cidemb1,…,Attentionm*cidembm) equation 1b
The Attention represents an Attention score obtained by processing an initial resource identification feature cid emb and an initial attribute embedding feature emb corresponding to any resource through an Attention mechanism, and Softmax () may be a normalized exponential function. S represents the resource attribute characteristics of one resource, concat () represents the fusion processing of the content in brackets through the contact layer, wherein cid emb represents any initial resource identification characteristic of any object, and Attention m*cidembm represents the product of the Attention score of the mth first resource in M first resources corresponding to any object and the initial resource identification characteristic.
For example, referring to fig. 7, fig. 7 is a schematic diagram of a resource attribute feature according to an embodiment of the present application. As shown in fig. 7, for a resource of any object, a resource identifier 701 of the resource and each attribute tag 702 associated with the resource may be obtained first, then the resource identifier may be processed by a full connection layer 703 to obtain an initial resource identifier feature 704, and each attribute tag may be processed by a full connection layer and a mean layer 705 to obtain an initial attribute embedded feature 706 of each attribute tag, then an attention mechanism process may be performed based on the initial resource identifier feature and the initial attribute embedded feature of each attribute tag to obtain an attention score 707, and in particular, may be determined with reference to the above formula 1 a. The attention score corresponding to each resource and the embedded feature 708 of each attribute tag can then be fused by the fusion layer 709 to obtain a resource attribute feature 710, which can be specifically determined by referring to the above formula 1 b.
S602, training the first data processing model based on resource attribute features of M first resources corresponding to each object to obtain a second data processing model, and generating an attribute feature matrix, wherein the attribute feature matrix is used for representing attribute embedded features corresponding to each attribute tag in an attribute tag set.
The description of step S602 may refer to the description of step S202, which is not described herein.
S603, acquiring resource attribute characteristics of N second resources of forward access behaviors of each object in the object set in a first time range, and training a second data processing model based on the resource attribute characteristics of the N second resources corresponding to each object to obtain a third data processing model, wherein N is a positive integer smaller than M.
The method for obtaining the resource attribute features of the second resource may refer to the above description for determining the resource attribute features of the first resource. That is, acquiring the resource attribute characteristics of the N second resources having forward access behaviors of each object in the object set may include the steps of:
① And acquiring resource identifiers of N second resources of which the any object has forward access behaviors and at least one attribute tag associated with the N second resources of the any object aiming at any object in the object set.
② And determining initial resource identification characteristics corresponding to the resource identifications of the N second resources of any object respectively, and initial attribute embedding characteristics corresponding to at least one attribute tag associated with the N second resources of any object respectively.
③ And performing attention mechanism aggregation processing based on the initial resource identification features corresponding to the N second resources of any object and at least one initial attribute embedding feature corresponding to the N second resources of any object, so as to obtain resource attribute features corresponding to the N second resources of any object.
S604, acquiring resource attribute characteristics of L second resources of which the target object has forward access behaviors in a second time range, and calling a third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedded characteristics of the target object.
The description of step S604 may refer to the description of step S204, which is not described herein.
S605, calculating similarity scores of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag represented by the attribute feature matrix.
Wherein the similarity score may be used to characterize the similarity between the object embedded features and the attribute embedded features, respectively. It will be appreciated that the higher the similarity score, the greater the similarity between the object embedded features and the attribute embedded features, respectively, and, conversely, the lower the similarity score, the less the similarity between the object embedded features and the attribute embedded features, respectively. For example, the similarity score and the similarity are positively correlated.
In one possible implementation, the similarity score between the object embedded feature and the attribute embedded feature of each attribute tag may be determined by a dot product between the object embedded feature and the attribute embedded feature. For example, the similarity score between the object embedded feature and the attribute embedded feature of any one of the attribute tags may be determined by the following formula (formula 2).
Score i=Embuser*Embtag_i equation 2
Wherein score i represents a similarity score between the attribute embedded feature of the ith attribute tag and the object embedded feature, emb user represents the object embedded feature, and Emb tag_ represents the attribute embedded feature corresponding to the ith attribute tag.
S606, sorting all attribute tags according to the sequence of similarity scores from large to small, taking the attribute tags with the sorting of K as preference attribute tags corresponding to the target object, wherein K is a positive integer.
It can be understood that the attribute tags with similarity scores in the first K are ranked as preference attribute tags corresponding to the target object, that is, K attribute tags with maximum similarity are used as preference attribute tags.
In one possible implementation, the order of the order corresponding to the determined preference attribute tags may also be recorded, and then the resource recommended by the object may be determined based on the preference attribute tags and the order of each preference attribute tag, or the attribute tag representation of the object may be determined based on the preference attribute tags and the order of each preference attribute tag.
For example, when determining the preference attribute tags and the order of each preference attribute tag as the recommended resource of the object, determining the attribute weight according to the order of the preference attribute tags, the earlier the order is, the larger the corresponding attribute weight is, further calculating the attribute matching degree based on the preference attribute tags of each resource, the attribute tags associated with each resource and the attribute weights of each preference attribute tag, and determining the plurality of resources with the largest attribute matching degree as the recommended resource of the target object. For example, in one possible implementation, determining the recommended resources for the target object may include the steps of:
① Acquiring at least one attribute tag associated with each resource in the resource set, and determining a corresponding attribute weight based on the order of at least one preference attribute tag of the target object;
② Determining the attribute matching degree of at least one preference attribute tag of the target object and each resource based on at least one attribute tag associated with each resource in the resource set, at least one preference attribute tag of the target object and the attribute weight of each preference attribute tag;
③ And determining at least one recommended resource corresponding to the target object from the resource set based on the attribute matching degree. The attribute weight can be used for representing the influence degree of the corresponding preference attribute label in the calculation process of the attribute matching degree.
It can be understood that the earlier the order of preference attribute tags is, the greater the corresponding attribute weight is indicated, and the greater the influence degree in the calculation of the attribute matching degree is, whereas the later the order of preference attribute tags is, the lesser the corresponding attribute weight is indicated, and the lesser the influence degree in the calculation of the attribute matching degree is. For example, if the order corresponding to the preference attribute tag a is 1 and the order corresponding to the preference attribute tag is 5, when the attribute tag of a resource is only matched with the preference attribute tag a, the attribute matching degree a of the resource can be obtained, and when the attribute tag of a resource is only matched with the preference attribute tag B, the attribute matching degree B of the resource can be obtained, and then the attribute matching degree a is greater than the attribute matching degree B.
For another example, the preference degree of the object for each preference attribute tag can be determined based on the order of the preference attribute tags, and then when the terminal displays at least one preference attribute tag of the target object, the preference degree of the target object for each preference attribute tag can be displayed, so that the attribute tag preference of the object can be displayed more intuitively. For example, when at least one preference attribute tag favored by an object is displayed through a graphic, the area of the graphic corresponding to the preference attribute tag earlier in the order may be larger, and the area of the graphic corresponding to the preference attribute tag later in the order may be smaller.
By adopting the embodiment of the application, the first data processing model can be trained in a first stage based on the resource attribute characteristics of M first resources (namely, the first resources with forward access behaviors) favored by each object in the object set to obtain the second data processing model, the second data processing model can be trained in a second stage based on the resource attribute characteristics of N second resources (namely, the second resources with forward access behaviors) favored by each object in the first time range to obtain the third data processing model, and the third data processing model can be finely tuned by utilizing the resources favored by the object for a last period after the data processing model is trained by utilizing a large number of the resources favored by the object, so that the latest favored by the object can be captured by the third data processing model finally obtained by training, and further, the attribute labels related to the object, such as the attribute labels favored by the object, can be determined based on the third data processing model. For example, the trained third data processing model may be used to obtain the object embedded feature, and after the object embedded feature is obtained, the favorite attribute tag of the object may be determined based on the object embedded feature and the attribute embedded feature of each attribute tag, so that accuracy of detecting the favorite attribute tag of the object may be improved.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 8, the data processing apparatus described in the present embodiment may include:
An obtaining unit 801, configured to obtain resource attribute characteristics of M first resources having forward access behaviors for each object in an object set, where M is a positive integer, each first resource is associated with at least one attribute tag, where the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and each at least one attribute tag associated with the first resource belongs to an attribute tag set;
A processing unit 802, configured to train the first data processing model based on resource attribute features of M first resources corresponding to the respective objects, obtain a second data processing model, and generate an attribute feature matrix, where the attribute feature matrix is used to characterize attribute embedded features corresponding to each attribute tag in the attribute tag set;
the obtaining unit 801 is further configured to obtain resource attribute features of N second resources of each object in the object set, where the N second resources have forward access behaviors in a first time range, and train the second data processing model based on the resource attribute features of N second resources corresponding to each object, to obtain a third data processing model, where N is a positive integer smaller than M;
The obtaining unit 801 is further configured to obtain resource attribute features of L second resources of the target object having forward access behaviors in a second time range, and call the third data processing model to process the resource attribute features of the L second resources corresponding to the target object, so as to obtain an object embedded feature of the target object, where L is a positive integer;
the processing unit 802 is further configured to determine at least one preference attribute tag of the target object according to similarity of object embedded features of the target object and attribute embedded features corresponding to each attribute tag represented by the attribute feature matrix.
In one implementation, the processing unit 802 is specifically configured to:
For any object in the object set, acquiring resource identifiers of M first resources of which any object has forward access behaviors and at least one attribute tag associated with the M first resources of the any object;
Determining initial resource identification characteristics corresponding to the resource identifications of the M first resources of any object respectively, and initial attribute embedding characteristics corresponding to at least one attribute tag associated with the M first resources of any object respectively;
And performing attention mechanism aggregation processing based on the initial resource identification features corresponding to the M first resources of the arbitrary object and at least one initial attribute embedding feature corresponding to the M first resources of the arbitrary object, so as to obtain resource attribute features corresponding to the M first resources of the arbitrary object.
In one implementation, the processing unit 802 is specifically configured to:
Sequencing the resource attribute characteristics of M first resources of any object according to the execution time of forward access behaviors aiming at any object in the objects to obtain a first resource attribute characteristic sequence corresponding to the any object;
Randomly shielding the resource attribute characteristics of at least one first resource in the first resource attribute characteristic sequence corresponding to any object to obtain a first shielding characteristic sequence corresponding to any object;
Forming a first training data set according to the first shielding characteristic sequences corresponding to the objects, wherein any one of the first training data in the first training data set comprises a first shielding characteristic sequence and a corresponding training label; the training label in any one of the first training data is determined according to the resource identifier corresponding to at least one resource attribute feature which is blocked in the first blocking feature sequence;
invoking the first data processing model to respectively process each first training data in the first training data set to obtain a first training resource identifier corresponding to at least one resource attribute feature which is blocked in a first blocking feature sequence corresponding to each first training data;
and training the first data processing model based on the first training resource identification corresponding to each first training data and the training label corresponding to each first training data to obtain the second data processing model.
In one implementation, the processing unit 802 is specifically configured to:
Aiming at any object in the objects, taking the shielding characteristic identifier in the first shielding characteristic sequence corresponding to the any object as a positive sample training label of the first shielding characteristic sequence corresponding to the any object; the shielding characteristic identifier is used for indicating a resource identifier of the resource with the resource attribute characteristic shielded;
and determining the first shielding characteristic sequence of any object and the corresponding positive sample training label as positive sample training data in a first training data set.
In one implementation, the processing unit 802 is specifically configured to:
constructing an initial resource identification set based on the resource identifications of M first resources corresponding to each object, and performing de-duplication processing on the resource identifications in the initial resource identification set to obtain a target resource identification set;
For any object in the objects, taking any resource identifier in the target resource identifier set except for the shielding characteristic identifier corresponding to the first shielding characteristic sequence of the any object as a negative sample training tag of the first shielding characteristic sequence of the any object; the shielding characteristic identifier is used for indicating a resource identifier of the resource with the resource attribute characteristic shielded;
And determining the first shielding characteristic sequence of any object and the corresponding negative-sample training label as negative-sample training data in a first training data set.
In one implementation, the processing unit 802 is specifically configured to:
for any one of the objects, sorting the resource attribute characteristics of N second resources corresponding to the any one object according to the execution time of the forward access behavior to obtain a second resource attribute characteristic sequence corresponding to the any one object;
randomly shielding the resource attribute characteristics of a second resource in the second resource attribute characteristic sequence corresponding to any object to obtain a second shielding characteristic sequence corresponding to any object;
Forming a second training data set according to the second shielding characteristic sequences corresponding to the objects, wherein any second training data in the second training data set comprises a second shielding characteristic sequence and a corresponding training label; the training label in any one of the second training data is determined according to the resource identifier corresponding to the blocked resource attribute feature in the second blocking feature sequence;
Invoking the second data processing model to respectively process each second training data in the second training data set to obtain a second training resource identifier corresponding to the occluded resource attribute feature in a second occlusion feature sequence corresponding to each second training data;
And training the second data processing model based on the second training resource identifiers corresponding to the second training data and the training labels corresponding to the second training data to obtain the third data processing model.
In one implementation, the processing unit 802 is specifically configured to:
sequencing the resource attribute characteristics of the L second resources corresponding to the target object according to the execution time of the forward access behavior to obtain a target resource attribute characteristic sequence corresponding to the target object;
And calling the third data processing model to process the target resource attribute feature sequence to obtain a resource sequence feature corresponding to the target resource attribute feature sequence, and determining an object embedded feature of the target object according to the resource sequence feature.
In one implementation, the processing unit 802 is specifically configured to:
Calculating similarity scores of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix respectively;
And sequencing each attribute label according to the sequence of the similarity score from large to small, taking the attribute label sequenced in the front K as a preference attribute label corresponding to the target object, wherein K is a positive integer.
In one implementation, the processing unit 802 is further configured to:
Acquiring at least one attribute tag associated with each resource in a resource set;
Determining the attribute matching degree of at least one preference attribute tag of the target object and each resource based on at least one attribute tag associated with each resource in the resource set and at least one preference attribute tag of the target object;
and determining at least one recommended resource corresponding to the target object from the resource set based on the attribute matching degree.
By adopting the embodiment of the application, the first data processing model can be trained in a first stage based on the resource attribute characteristics of M first resources (namely, the first resources with forward access behaviors) favored by each object in the object set to obtain the second data processing model, the second data processing model can be trained in a second stage based on the resource attribute characteristics of N second resources (namely, the second resources with forward access behaviors) favored by each object in the first time range to obtain the third data processing model, and the third data processing model can be finely tuned by utilizing the resources favored by the object for a last period after the data processing model is trained by utilizing a large number of the resources favored by the object, so that the latest favored by the object can be captured by the third data processing model finally obtained by training, further, after the object embedding characteristics are obtained by the third data processing model, the favorite attribute labels of the object can be determined based on the object embedding characteristics and the attribute characteristics of each attribute label, and the accuracy of the favored attribute labels of the detected object can be improved.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the application. The electronic device described in the present embodiment includes: processor 901, memory 902. Optionally, the electronic device may further include a network interface or a power module. Data may be exchanged between the processor 901 and the memory 902.
The Processor 901 may be a central processing unit (CeMtral ProcessiMg UMit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGMAL Processor, DSP), application specific integrated circuits (ApplicatioM SPECIFIC IMTEGRATED Circuit, ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The network interface may include input devices, such as a control panel, microphone, receiver, etc., and/or output devices, such as a display screen, transmitter, etc., which are not shown.
The memory 902 may include read only memory and random access memory and provide program instructions and data to the processor 901. A portion of the memory 902 may also include non-volatile random access memory. Wherein the processor 901, when calling the program instructions, is configured to execute:
Acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, wherein M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and the at least one attribute tag associated with each first resource belongs to an attribute tag set;
Training a first data processing model based on resource attribute characteristics of M first resources corresponding to each object to obtain a second data processing model, and generating an attribute characteristic matrix, wherein the attribute characteristic matrix is used for representing attribute embedded characteristics corresponding to each attribute label in the attribute label set;
Acquiring resource attribute characteristics of N second resources of each object in the object set, which have forward access behaviors in a first time range, and training the second data processing model based on the resource attribute characteristics of the N second resources corresponding to each object to obtain a third data processing model, wherein N is a positive integer smaller than M;
acquiring resource attribute characteristics of L second resources of a target object with forward access behaviors in a second time range, and calling the third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedded characteristics of the target object, wherein L is a positive integer;
And determining at least one preference attribute tag of the target object according to the similarity of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix.
In one implementation, the processor 901 is specifically configured to:
For any object in the object set, acquiring resource identifiers of M first resources of which any object has forward access behaviors and at least one attribute tag associated with the M first resources of the any object;
Determining initial resource identification characteristics corresponding to the resource identifications of the M first resources of any object respectively, and initial attribute embedding characteristics corresponding to at least one attribute tag associated with the M first resources of any object respectively;
And performing attention mechanism aggregation processing based on the initial resource identification features corresponding to the M first resources of the arbitrary object and at least one initial attribute embedding feature corresponding to the M first resources of the arbitrary object, so as to obtain resource attribute features corresponding to the M first resources of the arbitrary object.
In one implementation, the processor 901 is specifically configured to:
Sequencing the resource attribute characteristics of M first resources of any object according to the execution time of forward access behaviors aiming at any object in the objects to obtain a first resource attribute characteristic sequence corresponding to the any object;
Randomly shielding the resource attribute characteristics of at least one first resource in the first resource attribute characteristic sequence corresponding to any object to obtain a first shielding characteristic sequence corresponding to any object;
Forming a first training data set according to the first shielding characteristic sequences corresponding to the objects, wherein any one of the first training data in the first training data set comprises a first shielding characteristic sequence and a corresponding training label; the training label in any one of the first training data is determined according to the resource identifier corresponding to at least one resource attribute feature which is blocked in the first blocking feature sequence;
invoking the first data processing model to respectively process each first training data in the first training data set to obtain a first training resource identifier corresponding to at least one resource attribute feature which is blocked in a first blocking feature sequence corresponding to each first training data;
and training the first data processing model based on the first training resource identification corresponding to each first training data and the training label corresponding to each first training data to obtain the second data processing model.
In one implementation, the processor 901 is specifically configured to:
Aiming at any object in the objects, taking the shielding characteristic identifier in the first shielding characteristic sequence corresponding to the any object as a positive sample training label of the first shielding characteristic sequence corresponding to the any object; the shielding characteristic identifier is used for indicating a resource identifier of the resource with the resource attribute characteristic shielded;
and determining the first shielding characteristic sequence of any object and the corresponding positive sample training label as positive sample training data in a first training data set.
In one implementation, the processor 901 is specifically configured to:
constructing an initial resource identification set based on the resource identifications of M first resources corresponding to each object, and performing de-duplication processing on the resource identifications in the initial resource identification set to obtain a target resource identification set;
For any object in the objects, taking any resource identifier in the target resource identifier set except for the shielding characteristic identifier corresponding to the first shielding characteristic sequence of the any object as a negative sample training tag of the first shielding characteristic sequence of the any object; the shielding characteristic identifier is used for indicating a resource identifier of the resource with the resource attribute characteristic shielded;
And determining the first shielding characteristic sequence of any object and the corresponding negative-sample training label as negative-sample training data in a first training data set.
In one implementation, the processor 901 is specifically configured to:
for any one of the objects, sorting the resource attribute characteristics of N second resources corresponding to the any one object according to the execution time of the forward access behavior to obtain a second resource attribute characteristic sequence corresponding to the any one object;
randomly shielding the resource attribute characteristics of a second resource in the second resource attribute characteristic sequence corresponding to any object to obtain a second shielding characteristic sequence corresponding to any object;
Forming a second training data set according to the second shielding characteristic sequences corresponding to the objects, wherein any second training data in the second training data set comprises a second shielding characteristic sequence and a corresponding training label; the training label in any one of the second training data is determined according to the resource identifier corresponding to the blocked resource attribute feature in the second blocking feature sequence;
Invoking the second data processing model to respectively process each second training data in the second training data set to obtain a second training resource identifier corresponding to the occluded resource attribute feature in a second occlusion feature sequence corresponding to each second training data;
And training the second data processing model based on the second training resource identifiers corresponding to the second training data and the training labels corresponding to the second training data to obtain the third data processing model.
In one implementation, the processor 901 is specifically configured to:
sequencing the resource attribute characteristics of the L second resources corresponding to the target object according to the execution time of the forward access behavior to obtain a target resource attribute characteristic sequence corresponding to the target object;
And calling the third data processing model to process the target resource attribute feature sequence to obtain a resource sequence feature corresponding to the target resource attribute feature sequence, and determining an object embedded feature of the target object according to the resource sequence feature.
In one implementation, the processor 901 is specifically configured to:
Calculating similarity scores of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix respectively;
And sequencing each attribute label according to the sequence of the similarity score from large to small, taking the attribute label sequenced in the front K as a preference attribute label corresponding to the target object, wherein K is a positive integer.
In one implementation, the processor 901 is further configured to:
Acquiring at least one attribute tag associated with each resource in a resource set;
Determining the attribute matching degree of at least one preference attribute tag of the target object and each resource based on at least one attribute tag associated with each resource in the resource set and at least one preference attribute tag of the target object;
and determining at least one recommended resource corresponding to the target object from the resource set based on the attribute matching degree.
Optionally, the program instructions may further implement other steps of the method in the above embodiment when executed by the processor, which is not described herein.
The present application also provides a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the above-described method, such as the method performed by the above-described electronic device, which is not described herein in detail.
Alternatively, a storage medium such as a computer-readable storage medium to which the present application relates may be nonvolatile or may be volatile.
Alternatively, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of action described, as some steps may be performed in other order or simultaneously according to the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-OMly Memory, ROM, random access memory (RaMdom Access Memory, RAM), magnetic or optical disk, etc.
Embodiments of the present application also provide a computer program product or computer program comprising program instructions which, when executed by a processor, perform some or all of the steps of the above-described method. For example, the program instructions are stored in a computer readable storage medium. The program instructions are read from a computer-readable storage medium by a processor of a computer device (e.g., an electronic device as described above), and executed by the processor, cause the computer device to perform the steps performed in the embodiments of the methods described above. For example, the computer device may be a terminal, or may be a server.
The foregoing has described in detail a data processing method, apparatus, electronic device, medium and program product provided by the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, and the above description of the embodiments is only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (13)

1. A method of data processing, the method comprising:
Acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, wherein M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and the at least one attribute tag associated with each first resource belongs to an attribute tag set;
Training a first data processing model based on resource attribute characteristics of M first resources corresponding to each object to obtain a second data processing model, and generating an attribute characteristic matrix, wherein the attribute characteristic matrix is used for representing attribute embedded characteristics corresponding to each attribute label in the attribute label set;
Acquiring resource attribute characteristics of N second resources of each object in the object set, which have forward access behaviors in a first time range, and training the second data processing model based on the resource attribute characteristics of the N second resources corresponding to each object to obtain a third data processing model, wherein N is a positive integer smaller than M;
acquiring resource attribute characteristics of L second resources of a target object with forward access behaviors in a second time range, and calling the third data processing model to process the resource attribute characteristics of the L second resources corresponding to the target object to obtain object embedded characteristics of the target object, wherein L is a positive integer;
And determining at least one preference attribute tag of the target object according to the similarity of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix.
2. The method of claim 1, wherein the obtaining the resource attribute characteristics of M first resources having forward access behaviors for each object in the set of objects comprises:
For any object in the object set, acquiring resource identifiers of M first resources of which any object has forward access behaviors and at least one attribute tag associated with the M first resources of the any object;
Determining initial resource identification characteristics corresponding to the resource identifications of the M first resources of any object respectively, and initial attribute embedding characteristics corresponding to at least one attribute tag associated with the M first resources of any object respectively;
And performing attention mechanism aggregation processing based on the initial resource identification features corresponding to the M first resources of the arbitrary object and at least one initial attribute embedding feature corresponding to the M first resources of the arbitrary object, so as to obtain resource attribute features corresponding to the M first resources of the arbitrary object.
3. The method according to claim 1, wherein training the first data processing model based on the resource attribute features of the M first resources corresponding to the respective objects to obtain the second data processing model includes:
Sequencing the resource attribute characteristics of M first resources of any object according to the execution time of forward access behaviors aiming at any object in the objects to obtain a first resource attribute characteristic sequence corresponding to the any object;
Randomly shielding the resource attribute characteristics of at least one first resource in the first resource attribute characteristic sequence corresponding to any object to obtain a first shielding characteristic sequence corresponding to any object;
Forming a first training data set according to the first shielding characteristic sequences corresponding to the objects, wherein any one of the first training data in the first training data set comprises a first shielding characteristic sequence and a corresponding training label; the training label in any one of the first training data is determined according to the resource identifier corresponding to at least one resource attribute feature which is blocked in the first blocking feature sequence;
invoking the first data processing model to respectively process each first training data in the first training data set to obtain a first training resource identifier corresponding to at least one resource attribute feature which is blocked in a first blocking feature sequence corresponding to each first training data;
and training the first data processing model based on the first training resource identification corresponding to each first training data and the training label corresponding to each first training data to obtain the second data processing model.
4. A method according to claim 3, wherein said constructing a first training data set from a first occlusion feature sequence corresponding to said respective object comprises:
Aiming at any object in the objects, taking the shielding characteristic identifier in the first shielding characteristic sequence corresponding to the any object as a positive sample training label of the first shielding characteristic sequence corresponding to the any object; the shielding characteristic identifier is used for indicating a resource identifier of the resource with the resource attribute characteristic shielded;
and determining the first shielding characteristic sequence of any object and the corresponding positive sample training label as positive sample training data in a first training data set.
5. A method according to claim 3, wherein said constructing a first training data set from a first occlusion feature sequence corresponding to said respective object comprises:
constructing an initial resource identification set based on the resource identifications of M first resources corresponding to each object, and performing de-duplication processing on the resource identifications in the initial resource identification set to obtain a target resource identification set;
For any object in the objects, taking any resource identifier in the target resource identifier set except for the shielding characteristic identifier corresponding to the first shielding characteristic sequence of the any object as a negative sample training tag of the first shielding characteristic sequence of the any object; the shielding characteristic identifier is used for indicating a resource identifier of the resource with the resource attribute characteristic shielded;
And determining the first shielding characteristic sequence of any object and the corresponding negative-sample training label as negative-sample training data in a first training data set.
6. The method according to claim 1, wherein training the second data processing model based on the resource attribute features of the N second resources corresponding to the respective objects, to obtain a third data processing model, includes:
for any one of the objects, sorting the resource attribute characteristics of N second resources corresponding to the any one object according to the execution time of the forward access behavior to obtain a second resource attribute characteristic sequence corresponding to the any one object;
randomly shielding the resource attribute characteristics of a second resource in the second resource attribute characteristic sequence corresponding to any object to obtain a second shielding characteristic sequence corresponding to any object;
Forming a second training data set according to the second shielding characteristic sequences corresponding to the objects, wherein any second training data in the second training data set comprises a second shielding characteristic sequence and a corresponding training label; the training label in any one of the second training data is determined according to the resource identifier corresponding to the blocked resource attribute feature in the second blocking feature sequence;
Invoking the second data processing model to respectively process each second training data in the second training data set to obtain a second training resource identifier corresponding to the occluded resource attribute feature in a second occlusion feature sequence corresponding to each second training data;
And training the second data processing model based on the second training resource identifiers corresponding to the second training data and the training labels corresponding to the second training data to obtain the third data processing model.
7. The method of claim 1, wherein the calling the third data processing model to process the resource attribute features of the L second resources corresponding to the target object to obtain the object embedded feature of the target object includes:
sequencing the resource attribute characteristics of the L second resources corresponding to the target object according to the execution time of the forward access behavior to obtain a target resource attribute characteristic sequence corresponding to the target object;
And calling the third data processing model to process the target resource attribute feature sequence to obtain a resource sequence feature corresponding to the target resource attribute feature sequence, and determining an object embedded feature of the target object according to the resource sequence feature.
8. The method according to claim 1, wherein determining at least one preference attribute tag of the target object according to similarities of object embedding features of the target object to attribute embedding features respectively corresponding to the each attribute tag characterized by the attribute feature matrix comprises:
Calculating similarity scores of the object embedded features of the target object and the attribute embedded features corresponding to each attribute tag characterized by the attribute feature matrix respectively;
And sequencing each attribute label according to the sequence of the similarity score from large to small, taking the attribute label sequenced in the front K as a preference attribute label corresponding to the target object, wherein K is a positive integer.
9. The method according to claim 1, wherein the method further comprises:
Acquiring at least one attribute tag associated with each resource in a resource set;
Determining the attribute matching degree of at least one preference attribute tag of the target object and each resource based on at least one attribute tag associated with each resource in the resource set and at least one preference attribute tag of the target object;
and determining at least one recommended resource corresponding to the target object from the resource set based on the attribute matching degree.
10. A data processing apparatus, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring resource attribute characteristics of M first resources with forward access behaviors of each object in an object set, M is a positive integer, each first resource is associated with at least one attribute tag, the resource attribute characteristics are obtained by processing according to at least one attribute tag associated with the first resource and a resource identifier of the first resource, and the at least one attribute tag associated with each first resource belongs to an attribute tag set;
The processing unit is used for training the first data processing model based on the resource attribute characteristics of the M first resources corresponding to each object to obtain a second data processing model, and generating an attribute characteristic matrix, wherein the attribute characteristic matrix is used for representing attribute embedded characteristics corresponding to each attribute label in the attribute label set;
The acquiring unit is further configured to acquire resource attribute features of N second resources of each object in the object set, where the N second resources have forward access behaviors in a first time range, and train the second data processing model based on the resource attribute features of N second resources corresponding to each object, so as to obtain a third data processing model, where N is a positive integer smaller than M;
The acquiring unit is further configured to acquire resource attribute features of L second resources of the target object having forward access behaviors in a second time range, and call the third data processing model to process the resource attribute features of the L second resources corresponding to the target object, so as to obtain an object embedded feature of the target object, where L is a positive integer;
The processing unit is further configured to determine at least one preference attribute tag of the target object according to similarity of object embedded features of the target object and attribute embedded features corresponding to each attribute tag represented by the attribute feature matrix.
11. An electronic device comprising a processor, a memory, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-9.
12. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-9.
13. A computer program product comprising program instructions which, when executed by a processor, implement the method of any of claims 1-9.
CN202211487177.XA 2022-11-24 2022-11-24 Data processing method, device, electronic equipment, medium and program product Pending CN118113905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211487177.XA CN118113905A (en) 2022-11-24 2022-11-24 Data processing method, device, electronic equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211487177.XA CN118113905A (en) 2022-11-24 2022-11-24 Data processing method, device, electronic equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN118113905A true CN118113905A (en) 2024-05-31

Family

ID=91212572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211487177.XA Pending CN118113905A (en) 2022-11-24 2022-11-24 Data processing method, device, electronic equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN118113905A (en)

Similar Documents

Publication Publication Date Title
CN107766940B (en) Method and apparatus for generating a model
CN112466298B (en) Voice detection method, device, electronic equipment and storage medium
CN109145828B (en) Method and apparatus for generating video category detection model
CN112989035B (en) Method, device and storage medium for identifying user intention based on text classification
CN109871807B (en) Face image processing method and device
CN112181835B (en) Automatic test method, device, computer equipment and storage medium
CN116881429B (en) Multi-tenant-based dialogue model interaction method, device and storage medium
CN112818120B (en) Problem labeling method and device, storage medium and electronic equipment
CN111523035A (en) Recommendation method, device, server and medium for APP browsing content
CN111125177B (en) Method and device for generating data tag, electronic equipment and readable storage medium
US20190108416A1 (en) Methods for more effectively moderating one or more images and devices thereof
CN113128526B (en) Image recognition method and device, electronic equipment and computer-readable storage medium
CN111597361B (en) Multimedia data processing method, device, storage medium and equipment
KR102243275B1 (en) Method, device and computer readable storage medium for automatically generating content regarding offline object
CN117407507A (en) Event processing method, device, equipment and medium based on large language model
CN111460811A (en) Crowdsourcing task answer verification method and device, computer equipment and storage medium
CN118113905A (en) Data processing method, device, electronic equipment, medium and program product
CN113177543B (en) Certificate identification method, device, equipment and storage medium
CN115037790A (en) Abnormal registration identification method, device, equipment and storage medium
CN114238768A (en) Information pushing method and device, computer equipment and storage medium
CN114328995A (en) Content recommendation method, device, equipment and storage medium
CN114443904A (en) Video query method, video query device, computer equipment and computer readable storage medium
CN114676705A (en) Dialogue relation processing method, computer and readable storage medium
CN112861474A (en) Information labeling method, device, equipment and computer readable storage medium
CN112749686A (en) Image detection method, image detection device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication