Object recommendation method and apparatus, medium, and electronic device
By reducing the dimensionality of the object features of historical objects and using the fully connected layer attention module to process them, the computational complexity of long sequence data in recommendation scenarios is reduced, the real-time performance and accuracy of recommendations are improved, and the computational complexity in the existing technology is solved. Problems of high complexity.
Patent Information
- Application Number
- PCT/CN2024/084379
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-28
- Filing Date
- 2024-03-28
- Publication Date
- 2024-10-03
AI Technical Summary
In recommendation scenarios, long sequence data leads to high computational complexity, which affects the real-time performance and resource usage of recommendations. Moreover, the complexity of the existing self-attention mechanism has a square relationship with the sequence length, resulting in high computational complexity in long sequence scenarios. high.
By performing dimensionality reduction on the object features of historical objects, and using at least one layer of fully connected attention modules to process the dimensionality reduction features, interactive behavioral relationships between historical objects are constructed, which reduces the complexity of relationship construction and improves Real-time and accurate recommendations.
It reduces the complexity of building interactive behavior relationships, improves the real-time performance and accuracy of recommendations, reduces resource occupation, and improves the ability to express user interest features.
Smart Images

Figure CN2024084379_03102024_PF_FP_ABST
Abstract
Description
Object recommendation method, device, medium and electronic device
[0001] This application claims priority to Chinese patent application No. 202310318535.2 filed on March 28, 2023, the entire text of which is incorporated herein by reference as a part of this application. Technical Field
[0002] The present disclosure relates to an object recommendation method, device, medium, and electronic device. Background Art
[0003] In recommendation scenarios, modeling sequence data can be used to learn user preferences. However, when the sequence data is long, the computational complexity of the recommendation task is high, affecting the real-time performance of the recommendation. Furthermore, this high computational complexity also results in a high resource consumption for the recommendation.
[0004] Summary of the Invention
[0005] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0006] In a first aspect, the present disclosure provides an object recommendation method, comprising:
[0007] Acquire an object feature sequence, where the object feature sequence includes object features of historical objects that interacted with the user;
[0008] Performing dimensionality reduction processing on the object features of the historical object to obtain the reduced dimensionality features of the historical object;
[0009] The dimensionality reduction features of all the historical objects are processed through an attention module including at least one fully connected layer to obtain a first weight corresponding to each historical object. The output dimensions of other fully connected layers except the last fully connected layer are smaller than the feature dimension of the object features of the historical object. The first weight of the historical object is used to reflect the relationship between the interactive behavior with respect to the historical object and the interactive behavior with respect to other historical objects in the historical object sequence. The first weight is used to determine the interest feature of the user, and the interest feature is used to determine whether to recommend the object to be recommended to the user.
[0010] In a second aspect, the present disclosure provides an object recommendation device, comprising:
[0011] An acquisition module, configured to acquire an object feature sequence, wherein the object feature sequence includes object features of historical objects that interact with the user;
[0012] A dimensionality reduction module, configured to perform dimensionality reduction processing on the object features of the historical object to obtain the reduced dimensionality features of the historical object;
[0013] A processing module is used to process the dimensionality reduction features of all the historical objects through an attention module including at least one fully connected layer to obtain a first weight corresponding to each of the historical objects, wherein the output dimensions of the other fully connected layers except the last fully connected layer are smaller than the feature dimension of the object features of the historical objects, and the first weight of the historical objects is used to reflect the relationship between the interactive behavior with respect to the historical objects and the interactive behavior with respect to other historical objects in the historical object sequence, and the first weight is used to determine the interest features of the user, and the interest features are used to determine whether to recommend the object to be recommended to the user.
[0014] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.
[0015] In a fourth aspect, the present disclosure provides an electronic device, comprising:
[0016] a storage device having a computer program stored thereon;
[0017] A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.
[0018] Through the above technical solution, the object features of historical objects are dimensionality reduced to obtain the dimensionality reduction features of historical objects, and then the relationship between the interactive behavior for historical objects and the interactive behavior for other historical objects in the historical object sequence is constructed based on the dimensionality reduction features of all historical objects, thereby reducing the complexity of constructing the relationship between the interactive behavior for historical objects and the interactive behavior for other historical objects in the historical object sequence, thereby improving the real-time performance of recommendations based on the relationship and reducing resource usage. In addition, since the above relationship is constructed, the feature expression ability of the user interest features determined based on the relationship can be improved, which is conducive to improving the accuracy of recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:
[0020] FIG1 is a flowchart showing a method for recommending an object according to an exemplary embodiment of the present disclosure.
[0021] FIG2 is a schematic diagram showing a process of obtaining target features corresponding to historical objects according to an exemplary embodiment of the present disclosure.
[0022] FIG3 is a block diagram showing an object recommendation device according to an exemplary embodiment of the present disclosure.
[0023] FIG4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0026] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0028] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0030] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0031] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0032] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0033] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0034] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0035] In recommendation scenarios, modeling sequence data can be used to learn user preferences. However, when the sequence data is long, the computational complexity of the recommendation task is high, affecting the real-time performance of the recommendation. Furthermore, this high computational complexity also results in a high resource consumption for the recommendation.
[0036] Among them, sequence data is usually data composed of objects that users have interacted with historically. The sequence data is arranged in chronological order. By modeling the sequence data, users' interest preference information can be learned.
[0037] In related technologies, taking videos as an example, the self-attention mechanism is often used to model the relationships between videos in sequence data, obtaining potential relationships between videos and improving the depiction of user interest characteristics. The complexity of the self-attention mechanism can be expressed as C*N^2, where C is the feature dimension of the video and N is the sequence length of the sequence data. The complexity of the self-attention mechanism shows that in scenarios with long sequence data, the computational complexity of the self-attention mechanism is high, resulting in low real-time recommendations and high resource consumption.
[0038] In view of this, the embodiments of the present disclosure provide an object recommendation method, device, medium and electronic device, which reduce the complexity of constructing the relationship between interactive behaviors for historical objects and interactive behaviors for other historical objects in the historical object sequence, thereby improving the real-time performance of recommendations based on this relationship and reducing resource usage.
[0039] The present disclosure is further explained below with reference to the accompanying drawings.
[0040] FIG1 is a flowchart illustrating an object recommendation method according to an exemplary embodiment of the present disclosure. The object recommendation method can be applied to an electronic device, such as a mobile terminal, such as a mobile phone, a tablet, etc., or a fixed terminal, such as a server, a desktop computer, etc. Referring to FIG1 , the object recommendation method may include the following steps:
[0041] Step 101: Acquire an object feature sequence, where the object feature sequence includes object features of historical objects that interact with a user.
[0042] Among them, historical objects can be videos, texts, music, etc.; interactive behaviors can be historical objects being clicked, liked, and collected, etc. It can be understood that historical objects that interact with users can be regarded as objects of interest to users; the object features of historical objects can be represented by feature values of multiple different feature dimensions.
[0043] Step 102 : performing dimensionality reduction processing on the object features of the historical objects to obtain the reduced dimensionality features of the historical objects.
[0044] It is worth noting that the dimensionality reduction process here is used to map the object features of the historical object from the d-dimensional space to the reduced dimensionality features of the k-dimensional space, where d is greater than k. The reduced dimensionality features of the historical object preserve the information contained in the object features of the historical object as much as possible.
[0045] Step 103 : Process the dimensionality reduction features of all historical objects through an attention module including at least one fully connected layer to obtain a first weight corresponding to each historical object.
[0046] It's worth noting that fully connected layers are used to map feature data from one feature space to another. The complexity of a fully connected layer is O(din*dout), where din represents the size of the features input to the fully connected layer, dout represents the size of the features output by the fully connected layer, and O() represents the complexity function.
[0047] The at least one fully connected layer in the attention module is connected in series. The input of the first fully connected layer in the attention module is the object features of the historical objects, and the output of the last fully connected layer in the attention module is the first weight corresponding to each historical object. The input of the intermediate fully connected layer is the output of the fully connected layer above it, and the output of the intermediate fully connected layer is the input of the fully connected layer below it.
[0048] Among them, the output dimensions of other fully connected layers except the last fully connected layer are smaller than the feature dimensions of the object features of the historical objects, and the output dimension of the last fully connected layer is consistent with the length of the object feature sequence, which is used to reflect the number of historical objects. Each output dimension of the last fully connected layer uniquely corresponds to the first weight of a historical object.
[0049] Among them, the first weight of the historical object is used to reflect the relationship between the interactive behavior towards the historical object and the interactive behavior towards other historical objects in the historical object sequence. The first weight is used to determine the user's interest characteristics, and the interest characteristics are used to determine whether to recommend the object to be recommended to the user.
[0050] For example, when the attention module includes a fully connected layer, the input of the fully connected layer in the attention module is the dimensionality reduction feature of all historical objects, and the output of the fully connected layer in the attention module is the first weight of all historical objects. Taking the feature dimension of the dimensionality reduction feature as 3 and the number of historical objects as 200 as an example, when the attention module includes a fully connected layer, the complexity of the attention module is 3*N*N=3N^2, where 3*N represents the size of the input feature, that is, 3*N represents the size of the dimensionality reduction feature of all historical objects, N represents the size of the feature output by the fully connected layer, and N also represents the number of historical objects. It can be seen from this that when the attention module includes a fully connected layer, its complexity is independent of the feature dimension of the object feature, and since 3 is a value smaller than the number of feature dimensions of the object feature of the historical objects, the complexity of the attention module in constructing the first weight is smaller than that of the self-attention mechanism.
[0051] For example, the attention module includes two layers of fully connected layers, one of which is called the first fully connected layer, and the other is called the second fully connected layer. In this case, the step of processing the dimensionality reduction features of all historical objects through the attention module including at least one layer of fully connected layer to obtain the first weight corresponding to each historical object may include: processing the dimensionality reduction features of all historical objects through the first fully connected layer to obtain the output result of the first fully connected layer; processing the output result of the first fully connected layer through the second fully connected layer to obtain the first weight corresponding to each historical object output by the second fully connected layer. Continuing with the example in which the feature dimension of the dimensionality reduction features is 3 and the number of historical objects is 200, when the attention module includes two layers of fully connected layers, the input of the first fully connected layer is the dimensionality reduction features of all historical objects, the output of the first fully connected layer is used as the input of the second fully connected layer, and the output of the second fully connected layer is the first weight of all historical objects. At this time, the complexity of the attention module is: 3*N*64+64*N=256N, where 3*N*64 represents the complexity of the first fully connected layer, 64*N represents the complexity of the second fully connected layer, 3*N represents the size of the features input to the first fully connected layer, that is, the size of the dimensionality reduction features of all historical objects, 64 represents the size of the output features of the first fully connected layer and the size of the input features of the second fully connected layer, N represents the size of the output features of the second fully connected layer, and N also represents the number of historical objects. The output of the second fully connected layer is the first weight of all historical objects. From this, it can be seen that when the attention module includes two fully connected layers, its complexity is independent of the feature dimension of the object features, and the complexity is linearly related to the length of the object feature sequence, not the square of the sequence length in the self-attention mechanism. It can be understood that the magnitude of the square relationship is larger than the magnitude of the linear relationship. Therefore, compared with the self-attention mechanism, in long sequence scenarios, the complexity of using two fully connected layers is lower, and the longer the object feature sequence, the lower the complexity of using two fully connected layers than the complexity of one fully connected layer.
[0052] For example, the attention module includes two fully connected layers, and the three fully connected layers are arranged in order as the first fully connected layer, the second fully connected layer, and the third fully connected layer connected in series. The input of the first fully connected layer in the attention module is the dimensionality reduction feature of all historical objects, the output of the first fully connected layer is the input of the second fully connected layer, the output of the second fully connected layer is the input of the third fully connected layer, and the output of the third fully connected layer is the first weight of all historical objects. Continuing with the example in which the feature dimension of the dimensionality reduction feature is 3 and the number of historical objects is 200, when the attention module includes three fully connected layers, the input of the first fully connected layer is the dimensionality reduction feature of all historical objects, the output of the first fully connected layer is the input of the second fully connected layer, the output of the second fully connected layer is the input of the third fully connected layer, and the output of the third fully connected layer is the first weight of all historical objects. At this point, the complexity of the attention module is: 3*N*64+64*64+64*N=256N+4096, where 3*N*64 represents the complexity of the first fully connected layer, 64*64 represents the complexity of the second fully connected layer, and 64*N represents the complexity of the third fully connected layer. 3*N represents the size of the features input to the first fully connected layer, i.e., the size of the dimensionality-reduced features of all historical objects. 64 represents the size of the features output by the first fully connected layer and the size of the features output by the second fully connected layer. N represents the size of the features output by the third fully connected layer, and N also represents the number of historical objects. This shows that when the attention module includes three fully connected layers, similar to two fully connected layers, its complexity is independent of the feature dimension of the object features and is linearly related to the length of the object feature sequence, rather than the square of the sequence length as in the self-attention mechanism. Compared to two fully connected layers, the complexity of three fully connected layers increases by only a fixed amount. Therefore, compared to the self-attention mechanism, the complexity of three fully connected layers is lower in long sequence scenarios.
[0053] Through the above method, the object features of the historical objects are dimensionality reduced to obtain the dimensionality reduction features of the historical objects, and then the relationship between the interactive behavior for the historical objects and the interactive behavior for other historical objects in the historical object sequence is constructed based on the dimensionality reduction features of all historical objects, which reduces the complexity of constructing the relationship between the interactive behavior for the historical objects and the interactive behavior for other historical objects in the historical object sequence, thereby improving the real-time performance of recommendations based on the relationship and reducing resource usage. In addition, since the above relationship is constructed, the feature expression ability of the user interest features determined based on the relationship can be improved, which is conducive to improving the accuracy of recommendations.
[0054] In some embodiments, the inner product of the user's interest features and the object features of the object to be recommended is used as a score of the user's preference for the object to be recommended. The score is then converted into a probability score of the user's behavior towards the object to be recommended through a softmax function. The higher the probability score, the higher the probability that the user will interact with the object to be recommended.
[0055] Therefore, a preset probability threshold can be set in advance according to the actual situation. When the probability score exceeds the preset probability threshold, the object to be recommended is determined to be recommended to the user. Conversely, when the probability score does not exceed the preset probability threshold, the object to be recommended is determined not to be recommended to the user.
[0056] In some embodiments, the method may further include: determining a second weight corresponding to the historical object based on the object characteristics of the historical object and the object characteristics of the object to be recommended, the second weight corresponding to the historical object being used to characterize the similarity between the historical object and the object to be recommended; determining the target characteristics corresponding to the historical object based on the first weight, second weight and object characteristics corresponding to the historical object respectively; and determining the interest characteristics of the user based on the target characteristics corresponding to all historical objects.
[0057] Among them, the inner product of the object characteristics of the historical object and the object characteristics of the object to be recommended can be used as the second weight corresponding to the historical object; according to the first weight and second weight corresponding to the historical object, the object characteristics corresponding to the historical object are weighted to obtain the target characteristics corresponding to the historical object, that is, the product of the first weight, the second weight and the object characteristics corresponding to the historical object can be used as the target characteristics corresponding to the historical object; the sum of the target characteristics corresponding to all historical objects is used as the user's interest feature.
[0058] Referring to Figure 2, taking the historical object as a historical video as an example, the object feature sequence includes video features of M historical videos that interacted with the user, where the M video objects are video object 1, video object 2, ..., video object M, where M is an integer greater than 0. In Figure 2, the video features corresponding to historical videos 1 to M are respectively subjected to dimensionality reduction processing to obtain the dimensionality reduction features corresponding to each historical video. The dimensionality reduction features corresponding to historical videos 1 to M are respectively input into the attention module to obtain the first weight corresponding to each historical video; based on the video features corresponding to each historical video and the video features corresponding to the video to be recommended, the second weight corresponding to each historical video is calculated; for each historical video, the video features corresponding to the historical video, the first weight, and the second weight are multiplied to obtain the target feature corresponding to each historical video; finally, the target features corresponding to all historical videos are sum pooled to obtain the user's interest feature, where sum pooling can be understood as summation.
[0059] In the above manner, the video features corresponding to the historical videos, the first weight, and the second weight are multiplied to obtain the target features corresponding to each historical video, and the user's interest features are determined based on the target features corresponding to all historical objects, thereby enhancing the representation of the user's interest features and improving the accuracy of recommendations based on the interest features. In some embodiments, step 102 can be performed in the following manner: obtaining the feature values corresponding to each feature dimension in the object features of the historical object; determining at least one target feature value based on the feature values corresponding to all feature dimensions in the object features of the historical object, the at least one target feature value including the maximum feature value, the minimum feature value, and the average feature value of the feature values corresponding to all feature dimensions in the object features of the historical object; and concatenating the at least one target feature value to obtain a dimensionality reduction feature of the historical object.
[0060] Different feature dimensions correspond to different feature values, and the feature values of all feature dimensions are used to characterize the object features of historical objects.
[0061] It is worth noting that since the maximum eigenvalue, minimum eigenvalue and average eigenvalue among the eigenvalues corresponding to all feature dimensions are sufficient to characterize the object features of historical objects, the redundant information in the object features can be removed without affecting the recommendation accuracy, thereby reducing the computational complexity of the attention module.
[0062] FIG3 is a block diagram of an object recommendation device according to an exemplary embodiment of the present disclosure. Referring to FIG3 , the object recommendation device 300 includes:
[0063] An acquisition module 301 is configured to acquire an object feature sequence, wherein the object feature sequence includes object features of historical objects that interact with the user;
[0064] A dimensionality reduction module 302 is configured to perform dimensionality reduction processing on the object features of the historical object to obtain the reduced dimensionality features of the historical object;
[0065] The processing module 303 is used to process the dimensionality reduction features of all the historical objects through an attention module including at least one fully connected layer to obtain a first weight corresponding to each of the historical objects. The output dimensions of the other fully connected layers except the last fully connected layer are smaller than the feature dimension of the object features of the historical objects. The first weight of the historical object is used to reflect the relationship between the interactive behavior with respect to the historical object and the interactive behavior with respect to other historical objects in the historical object sequence. The first weight is used to determine the interest features of the user, and the interest features are used to determine whether to recommend the object to be recommended to the user.
[0066] In some embodiments, the apparatus 300 further includes:
[0067] a first determining module, configured to determine a second weight corresponding to the historical object based on an object feature of the historical object and an object feature of the object to be recommended, wherein the second weight corresponding to the historical object is used to represent a similarity between the historical object and the object to be recommended;
[0068] A second determining module is configured to determine a target feature corresponding to the historical object based on the first weight, the second weight, and the object feature respectively corresponding to the historical object;
[0069] The third determining module is configured to determine the user's interest feature based on the target features corresponding to all the historical objects.
[0070] In some embodiments, the attention module includes a first fully connected layer and a second fully connected layer, and the processing module 303 includes:
[0071] A first processing submodule, configured to process the dimensionality reduction features of all the historical objects through the first fully connected layer to obtain an output result of the first fully connected layer;
[0072] The second processing submodule is configured to process the output result of the first fully connected layer through the second fully connected layer to obtain a first weight corresponding to each of the historical objects output by the second fully connected layer.
[0073] In some embodiments, the dimensionality reduction module 302 includes:
[0074] An acquisition submodule, configured to acquire a feature value corresponding to each feature dimension in the object feature of the historical object;
[0075] a determination submodule, configured to determine at least one target feature value based on the feature values corresponding to all feature dimensions in the object feature of the historical object, wherein the at least one target feature value includes a maximum feature value, a minimum feature value, and an average feature value among the feature values corresponding to all feature dimensions in the object feature of the historical object;
[0076] The splicing submodule is used to splice the at least one target feature value to obtain the dimensionality reduction feature of the historical object.
[0077] In some embodiments, the second determination module is specifically configured to: weight the object features corresponding to the historical objects according to the first weight and the second weight corresponding to the historical objects to obtain the target features corresponding to the historical objects.
[0078] The specific implementation of each module in the above-mentioned device can refer to the above-mentioned method embodiment, and this embodiment will not be described in detail here.
[0079] Based on the same inventive concept, the present disclosure further provides a computer-readable medium having a computer program stored thereon, which implements the steps of the above method when executed by a processing device.
[0080] Based on the same inventive concept, the present disclosure further provides an electronic device, including:
[0081] a storage device having a computer program stored thereon;
[0082] A processing device is used to execute the computer program in the storage device to implement the steps of the above method.
[0083] Reference is now made to FIG4 , which illustrates a schematic diagram of the structure of an electronic device 400 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG4 is merely an example and should not limit the functionality or scope of use of embodiments of the present disclosure.
[0084] As shown in Figure 4, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. Various programs and data required for the operation of electronic device 400 are also stored in RAM 403. Processing device 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0085] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although FIG4 shows the electronic device 400 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0086] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0087] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0088] In some embodiments, the electronic devices can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0089] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0090] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains an object feature sequence, wherein the object feature sequence includes object features of historical objects that have interactive behaviors with the user; performs dimensionality reduction processing on the object features of the historical objects to obtain the reduced dimensionality features of the historical objects; processes the reduced dimensionality features of all the historical objects through an attention module including at least one fully connected layer to obtain the first weight corresponding to each of the historical objects, wherein the output dimensions of other fully connected layers except the last fully connected layer are smaller than the feature dimension of the object features of the historical objects, and the first weight of the historical object is used to reflect the relationship between the interactive behavior for the historical object and the interactive behavior for other historical objects in the historical object sequence, and the first weight is used to determine the interest features of the user, and the interest features are used to determine whether to recommend the object to be recommended to the user.
[0091] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0092] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0093] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0094] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0095] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0096] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0097] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0098] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. An object recommendation method, comprising: Acquire an object feature sequence, wherein the object feature sequence includes object features of historical objects that interact with the user; Performing dimensionality reduction processing on the object features of the historical object to obtain the reduced dimensionality features of the historical object; The dimensionality reduction features of all the historical objects are processed by an attention module including at least one fully connected layer to obtain a first weight corresponding to each of the historical objects. The output dimensions of the other fully connected layers except the last fully connected layer are smaller than the feature dimension of the object features of the historical objects. The first weight of the historical object is used to reflect the relationship between the interactive behavior with respect to the historical object and the interactive behavior with respect to other historical objects in the historical object sequence. The first weight is used to determine the interest features of the user, and the interest features are used to determine whether to recommend the object to be recommended to the user.
2. The method according to claim 1, further comprising: Determine, according to the object feature of the historical object and the object feature of the object to be recommended, a second weight corresponding to the historical object, wherein the second weight corresponding to the historical object is used to characterize the similarity between the historical object and the object to be recommended; Determining a target feature corresponding to the historical object according to the first weight, the second weight, and the object feature respectively corresponding to the historical object; The user's interest feature is determined according to the target features corresponding to all the historical objects.
3. The method according to claim 1, wherein: The attention module includes a first fully connected layer and a second fully connected layer, and the attention module including at least one fully connected layer processes the dimension reduction features of all the historical objects to obtain a first weight corresponding to each of the historical objects, including: Processing the dimension reduction features of all the historical objects through the first fully connected layer to obtain an output result of the first fully connected layer; The output result of the first fully connected layer is processed by the second fully connected layer to obtain a first weight corresponding to each of the historical objects output by the second fully connected layer.
4. The method according to any one of claims 1 to 3, wherein: The performing dimensionality reduction processing on the object features of the historical objects to obtain the dimensionality reduction features of the historical objects includes: Obtaining feature values corresponding to each feature dimension in the object feature of the historical object; Determine at least one target feature value according to the feature values corresponding to all feature dimensions in the object feature of the historical object, wherein the at least one target feature value includes a maximum feature value, a minimum feature value, and an average feature value among the feature values corresponding to all feature dimensions in the object feature of the historical object; The at least one target feature value is concatenated to obtain a dimension reduction feature of the historical object.
5. The method according to claim 2, wherein: The determining the target feature corresponding to the historical object according to the first weight, the second weight and the object feature respectively corresponding to the historical object includes: The object feature corresponding to the historical object is weighted according to the first weight and the second weight corresponding to the historical object to obtain the target feature corresponding to the historical object.
6. An object recommendation device, comprising: An acquisition module, configured to acquire an object feature sequence, wherein the object feature sequence includes object features of historical objects that interact with the user; A dimension reduction module, used for performing dimension reduction processing on the object features of the historical object to obtain the dimension reduction features of the historical object; A processing module is used to process the dimensionality reduction features of all the historical objects through an attention module including at least one fully connected layer to obtain a first weight corresponding to each of the historical objects, wherein the output dimensions of the other fully connected layers except the last fully connected layer are smaller than the feature dimension of the object features of the historical objects, and the first weight of the historical objects is used to reflect the relationship between the interactive behavior for the historical objects and the interactive behavior for other historical objects in the historical object sequence, and the first weight is used to determine the interest features of the user, and the interest features are used to determine whether to recommend the object to be recommended to the user.
7. The apparatus according to claim 6, further comprising: A first determination module, configured to determine a second weight corresponding to the historical object according to an object feature of the historical object and an object feature of the object to be recommended, wherein the second weight corresponding to the historical object is used to characterize a similarity between the historical object and the object to be recommended; A second determination module, configured to determine a target feature corresponding to the historical object according to the first weight, the second weight and the object feature respectively corresponding to the historical object; The third determination module is used to determine the user according to the target features corresponding to all the historical objects. User interest characteristics.
8. The device according to claim 6, wherein: The attention module includes a first fully connected layer and a second fully connected layer, and the processing module includes: A first processing submodule, configured to process the dimension reduction features of all the historical objects through the first fully connected layer to obtain an output result of the first fully connected layer; The second processing submodule is used to process the output result of the first fully connected layer through the second fully connected layer to obtain the first weight corresponding to each of the historical objects output by the second fully connected layer.
9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 5 are implemented.
10. An electronic device comprising: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Information processing method, information processing device, storage medium and electronic equipment
CN112632389A
Content recommendation method and related equipment
CN114443956A
Product recommendation method and device, electronic equipment and storage medium
CN114511387A
Training method and device of behavior prediction system
CN115438787A
Object recommendation method and device, medium and electronic equipment
CN116340632A
