CN111241360A - Information recommendation method, device, equipment and storage medium - Google Patents

Information recommendation method, device, equipment and storage medium Download PDF

Info

Publication number
CN111241360A
CN111241360A CN202010021144.0A CN202010021144A CN111241360A CN 111241360 A CN111241360 A CN 111241360A CN 202010021144 A CN202010021144 A CN 202010021144A CN 111241360 A CN111241360 A CN 111241360A
Authority
CN
China
Prior art keywords
category
sample data
information
data
probability
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.)
Granted
Application number
CN202010021144.0A
Other languages
Chinese (zh)
Other versions
CN111241360B (en
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.)
Shenzhen Yayue Technology 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 CN202010021144.0A priority Critical patent/CN111241360B/en
Publication of CN111241360A publication Critical patent/CN111241360A/en
Application granted granted Critical
Publication of CN111241360B publication Critical patent/CN111241360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an information recommendation method, device, equipment and storage medium; the method comprises the following steps: acquiring at least one category center corresponding to at least one preset user category, feature weight information and attribute features corresponding to a target object; the feature weight information represents the importance degree of attribute features to user category classification; generating data to be clustered according to the attribute characteristics; determining data to be clustered with weight based on the data to be clustered and the characteristic weight information, and respectively determining at least one class probability that a target object belongs to at least one user class according to the data to be clustered with weight and at least one class center; acquiring recommendation information from a recommended content library according to at least one category probability and sequencing to obtain a recommendation result; and sending the recommendation result to a terminal corresponding to the target object. By the method and the device, the accuracy of information recommendation can be improved.

Description

Information recommendation method, device, equipment and storage medium
Technical Field
The present invention relates to internet technologies, and in particular, to an information recommendation method, apparatus, device, and storage medium.
Background
The information recommendation refers to a process that a server matches corresponding recommended content from a database according to the identity attribute, the interest attribute and the like of a user and then presents the recommended content on a terminal of the user. In the related technology, the server classifies users with the same or similar identity attributes and interest attributes into one category, that is, determines user categories for the users, and then recommends contents which some users in a certain user category are interested in as recommended contents to other users in the user category.
Common user category division modes include division directly according to original attribute data of a user, division according to features extracted from the original attribute data, and the like. However, the original attribute data may often contain features that have a low impact on the user's categorization, even features that have a negative impact on the user's categorization. At this time, the accuracy of classification of the user category using the original attribute data and using the features extracted from the original attribute data is low, resulting in low accuracy of information recommendation.
Disclosure of Invention
The embodiment of the invention provides an information recommendation method, an information recommendation device, information recommendation equipment and a storage medium, which can improve the accuracy of information recommendation.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides an information recommendation method, which is applied to a server and comprises the following steps:
acquiring at least one preset category center corresponding to at least one user category, feature weight information and attribute features corresponding to a target object; the characteristic weight information represents the importance degree of the attribute characteristics to the classification of the user categories; the at least one class center is obtained by training the training sample data by the server;
generating data to be clustered according to the attribute characteristics;
determining data to be clustered with weight based on the data to be clustered and the characteristic weight information, and respectively determining at least one category probability that the target object belongs to the at least one user category according to the data to be clustered with weight and the at least one category center;
acquiring recommendation information from a recommended content library according to the at least one category probability;
and sending the recommendation information to a terminal corresponding to the target object.
The embodiment of the invention provides an information recommendation method, which is applied to a terminal and comprises the following steps:
receiving recommendation information sent by a server; the recommendation information is determined by the server according to the attribute characteristics of the target object;
when the function interface receives a recommended information browsing instruction, entering a recommended information presentation interface;
and presenting the recommendation information on the recommendation information presentation interface to complete information recommendation for the target object.
An embodiment of the present invention provides an information recommendation apparatus, including:
the acquisition module is used for acquiring at least one category center corresponding to at least one preset user category, characteristic weight information and attribute characteristics corresponding to a target object; the characteristic weight information represents the importance degree of the attribute characteristics to the classification of the user categories; the at least one class center is obtained by training the training sample data by the server;
the data generation module is used for generating data to be clustered according to the attribute characteristics;
the category determination module is used for determining data to be clustered with weights based on the data to be clustered and the characteristic weight information, and respectively determining at least one category probability that the target object belongs to the at least one user category according to the data to be clustered with weights and the at least one category center;
the result generation module is used for acquiring recommendation information from a recommended content library according to the at least one category probability;
and the sending module is used for sending the recommendation information to a terminal corresponding to the target object.
An embodiment of the present invention provides a presentation apparatus, including:
the receiving module is used for receiving the recommendation information sent by the server; the recommendation information is determined by the server according to the attribute characteristics of the target object; when the function interface receives a recommended information browsing instruction, entering a recommended information presentation interface;
and the result presenting module is used for presenting the recommendation information on the recommendation information presenting interface to complete information recommendation aiming at the target object.
An embodiment of the present invention provides a server, including:
a first memory for storing executable information recommendation instructions;
the first processor is configured to implement the information recommendation method provided by the server side in the embodiment of the present invention when the executable information recommendation instruction stored in the first memory is executed.
An embodiment of the present invention provides a terminal, including:
a second memory for storing executable information recommendation instructions;
and the second processor is used for implementing the information recommendation method provided by the terminal side in the embodiment of the invention when the executable information recommendation instruction stored in the second memory is executed.
The embodiment of the invention provides a storage medium, which stores an executable information recommendation instruction, and is used for causing a first processor to execute and realizing an information recommendation method provided by a server side in the embodiment of the invention, or causing a second processor to execute and realizing an information recommendation method provided by a terminal side in the embodiment of the invention.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the server can firstly acquire at least one category center, feature weight information and feature attributes corresponding to a target object, which are obtained by training sample data by the server, generate data to be clustered according to the feature attributes, then determine data to be clustered with weights based on the data to be clustered and the feature weight information, respectively determine at least one category probability that the target object belongs to at least one user category according to the data to be clustered with weights and the at least one category center, then acquire recommendation information according to the at least one category probability to obtain recommendation information, and send the recommendation information to a terminal corresponding to the target object, so that the terminal presents the recommendation information. Therefore, the server can eliminate the influence of the noise features in the feature attributes on the user category classification by using the feature weight information, and improve the accuracy of the user category classification, thereby improving the accuracy of information recommendation.
Drawings
Fig. 1 is a schematic diagram of an alternative structure of an information recommendation system 100 according to an embodiment of the present invention;
fig. 2 is an alternative structural diagram of a server 200 according to an embodiment of the present invention;
fig. 3 is an alternative structural diagram of a terminal 400 according to an embodiment of the present invention;
fig. 4 is a first flowchart of an alternative information recommendation method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a prompt identifier displayed on a functional interface according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of recommendation information provided by an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating an alternative flow of an information recommendation method according to an embodiment of the present invention;
fig. 8 is a schematic diagram illustrating that a server allocates weights to sub-data in data to be clustered according to an embodiment of the present invention;
fig. 9 is a schematic diagram illustrating an alternative flow chart of an information recommendation method according to an embodiment of the present invention;
fig. 10 is a schematic view of a recommendation result provided by an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the description that follows, references to the terms "first", "second", and the like, are intended only to distinguish similar objects and not to indicate a particular ordering for the objects, it being understood that "first", "second", and the like may be interchanged under certain circumstances or sequences of events to enable embodiments of the invention described herein to be practiced in other than the order illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) The user category refers to a category divided according to natural attributes, interest attributes and the like of different users. Different users can belong to different user categories, and according to the operation of some users belonging to the same user category on certain media content, the operation of other users belonging to the user category on the media content can be inferred. For example, when some users in a user category choose to block an article, other users belonging to the user category may also block the article.
2) The category center is a vector corresponding to the center of the user category. Specifically, for the user category classification process, the attribute features of the user are mapped to a vector space, and then the distance between a vector generated according to the attribute features of the user and a vector corresponding to the center of the user category is determined to classify the user category.
3) The characteristic weight information is used for giving weights to various attribute characteristics of the user, and determining which attribute characteristics have larger influence on the classification of the user according to the weight, and which attribute characteristics have no influence or even have negative influence on the classification of the user.
4) The recommended content refers to media content to be recommended to the user, and may be content such as news, articles, music, or video.
5) And the recommendation information represents a result which needs to be presented to the user on a display interface after the recommended contents are sequenced. For example, the obtained plurality of recommended contents may be arranged in order of distribution time or in order of popularity.
6) The penalty parameter is a parameter introduced to represent the sparsity of the distribution indicating the probability when the clustering model is trained to obtain the class center and the feature weight information. The appropriate penalty parameter means that the distribution of the indication probability has appropriate sparsity, so that the compactness between the training data sample and each user category can be reasonably quantized, and the category center obtained by training is more accurate.
The information recommendation refers to a process that a server matches corresponding recommended content from a database according to the identity attribute, the interest attribute and the like of a user and then presents the recommended content on a terminal of the user. In the related technology, the server will classify users with the same or similar identity attributes and interest attributes into one category, that is, determine the user category to which the users belong for different users, and then recommend the content of interest of some users in a certain user category as recommended content to other users in the user category. Therefore, the accuracy of classification of the user categories directly influences the accuracy of information recommendation.
The common user category division mode is that the division is directly performed according to the original attribute data of the user, namely, the division is directly performed according to the operation of the user on various media contents, the identity characteristics of the user and the like; the classification may be performed based on features extracted from the original attribute data, for example, features representing interest that are manually or automatically selected by a machine.
However, in the actual user classification, the original attribute data of the user is often noisy, i.e. contains features that have a low contribution to the user classification, or even have a negative influence on the user classification. At this time, no matter the original attribute data is used for directly performing user category classification, or the features extracted from the original attribute data are used for performing user category classification, the user category classification may be affected by the noise features, so that the accuracy of the user category classification is low, and finally, the accuracy of information recommendation is low.
The embodiment of the invention provides an information recommendation method, an information recommendation device, information recommendation equipment and a storage medium, which can improve the accuracy of information recommendation. An exemplary application of the information recommendation device provided by the embodiment of the present invention is described below, and the information recommendation device provided by the embodiment of the present invention may be implemented as various types of user terminals such as a smart phone, a tablet computer, and a notebook computer, and may also be implemented as a server. Next, an exemplary application when the information recommendation device is implemented as a terminal and a server will be described.
Referring to fig. 1, fig. 1 is an optional architecture diagram of an information recommendation system 100 according to an embodiment of the present invention, in order to implement supporting an information recommendation application, a terminal 400 is connected to a server 200 through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two.
The server 200 first obtains at least one category center and feature weight information corresponding to at least one preset user category, and obtains attribute features corresponding to the target object, wherein the at least one category center is obtained by training sample data by the server 200. Then, the server 200 generates data to be clustered according to the attribute features, and determines at least one category probability that the target object belongs to at least one user category based on the data to be clustered and the acquired at least one category center and feature weight information. Then, the server 200 acquires recommendation information from the recommended content library according to the determined at least one category probability. Next, the server 200 sends the recommendation information to the terminal 400 corresponding to the target object, so that the terminal 400 presents the recommendation information. The terminal 400 receives the recommendation information sent by the server 200, and enters the recommendation information presentation interface 410 when the function interface receives a recommendation information browsing instruction. Finally, the terminal 400 presents the recommendation information in the recommendation information presentation interface 410, and thus, the information recommendation process for the target object is completed.
Referring to fig. 2, fig. 2 is a schematic diagram of an alternative structure of a server 200 according to an embodiment of the present invention, where the server 200 shown in fig. 2 includes: at least one first processor 210, a first memory 250, at least one first network interface 220, and a first user interface 230. The various components in server 200 are coupled together by a first bus system 240. It is understood that the first bus system 240 is used to enable communications for connections between these components. The first bus system 240 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as a first bus system 240 in fig. 2.
The first Processor 210 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc., wherein the general purpose Processor may be a microprocessor or any conventional Processor, etc.
The first user interface 230 includes one or more first output devices 231, including one or more speakers and/or one or more visual display screens, that enable presentation of media content. The first user interface 230 also includes one or more first input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The first memory 250 includes volatile memory or nonvolatile memory and may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The first memory 250 described in embodiments of the invention is intended to comprise any suitable type of memory. The first memory 250 optionally includes one or more storage devices physically located remotely from the first processor 210.
In some embodiments, the first memory 250 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
A first operating system 251 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a first network communication module 252 for communicating to other computing devices via one or more (wired or wireless) first network interfaces 220, an exemplary first network interface 220 comprising: bluetooth, wireless-compatibility authentication (Wi-Fi), and Universal Serial Bus (USB), etc.;
a first display module 253 to enable presentation of information (e.g., a user interface for operating peripherals and displaying content and information) via one or more first output devices 231 (e.g., a display screen, speakers, etc.) associated with the first user interface 230;
a first input processing module 254 for detecting one or more user inputs or interactions from one of the one or more first input devices 232 and translating the detected inputs or interactions.
In some embodiments, the information recommendation apparatus provided by the embodiments of the present invention may be implemented in software, and fig. 2 shows the information recommendation apparatus 255 stored in the first memory 250, which may be software in the form of programs and plug-ins, and includes the following software modules: an acquisition module 2551, a data generation module 2552, a category determination module 2553, a result generation module 2554 and a transmission module 2555, the functions of which will be described below.
In other embodiments, the information recommendation apparatus provided in embodiments of the present invention may be implemented in hardware, and for example, the information recommendation apparatus provided in embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the information recommendation method provided in embodiments of the present invention, for example, the processor in the form of the hardware decoding processor may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
Illustratively, an embodiment of the present invention provides a server, including:
a first memory for storing executable information recommendation instructions;
the first processor is configured to implement the information recommendation method provided by the server side in the embodiment of the present invention when the executable information recommendation instruction stored in the first memory is executed.
Referring to fig. 3, fig. 3 is a schematic diagram of an alternative structure of a terminal 400 according to an embodiment of the present invention, where the terminal 400 shown in fig. 3 includes: at least one second processor 410, a second memory 450, at least one second network interface 420, and a second user interface 430. The various components in the terminal 400 are coupled together by a second bus system 440. It is understood that the second bus system 440 is used to enable connection communication between these components. The second bus system 440 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as the second bus system 440 in fig. 3.
The second Processor 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The second user interface 430 includes one or more second output devices 431, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The second user interface 430 also includes one or more second input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The second memory 450 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The second memory 450 described in the embodiments of the present invention is intended to comprise any suitable type of memory. The second memory 450 optionally includes one or more storage devices physically located remote from the second processor 410.
In some embodiments, the second memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
A second operating system 451 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a second network communication module 452 for communicating to other computing devices via one or more (wired or wireless) second network interfaces 420, the example second network interfaces 420 including: bluetooth, wireless-compatibility authentication (Wi-Fi), and Universal Serial Bus (USB), etc.;
a second display module 453 for enabling presentation of information (e.g., user interfaces for operating peripherals and displaying content and information) via one or more second output devices 431 (e.g., display screens, speakers, etc.) associated with the second user interface 430;
a second input processing module 454 for detecting one or more user inputs or interactions from one of the one or more second input devices 432 and translating the detected inputs or interactions.
In some embodiments, the presentation apparatus provided by the embodiments of the present invention may be implemented in software, and fig. 3 illustrates the presentation apparatus 455 stored in the second memory 450, which may be software in the form of programs and plug-ins, and the like, and includes the following software modules: a receiving module 4551 and a result presentation module 4552, and functions of the respective modules will be described below.
In other embodiments, the presentation apparatus provided by the embodiments of the present invention may be implemented in hardware, and by way of example, the presentation apparatus provided by the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the information recommendation method provided by the embodiments of the present invention, for example, the processor in the form of the hardware decoding processor may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
Illustratively, an embodiment of the present invention provides a terminal, including:
a second memory for storing executable information recommendation instructions;
and the second processor is used for implementing the information recommendation method provided by the terminal side in the embodiment of the invention when the executable information recommendation instruction stored in the second memory is executed.
In the following, the information recommendation method provided by the embodiment of the present invention will be described in conjunction with exemplary applications and implementations of the server and the terminal provided by the embodiment of the present invention.
Referring to fig. 4, fig. 4 is a first flowchart of an alternative information recommendation method according to an embodiment of the present invention, which will be described with reference to the steps shown in fig. 4.
S101, a server acquires at least one category center corresponding to at least one preset user category, feature weight information and attribute features corresponding to a target object; the feature weight information represents the importance degree of attribute features to user category classification; at least one class center is obtained by training the training sample data by the server.
The embodiment of the invention is realized in a scene that information recommendation is required to be carried out on a user. The server first needs to obtain an attribute feature corresponding to a target object, a preset category center corresponding to each user category in at least one user category, that is, at least one category center, and feature weight information used for indicating which features are important features when recommending information.
It should be noted that, at least one category center and feature weight information are obtained by learning with training sample data by the server before the information recommendation process is started, and are directly used in the information recommendation process. When learning training sample data, the server can determine a vector corresponding to the center of the user category according to the distribution of the training sample data, namely, determine the category center, and simultaneously determine which feature attributes are important for user category classification, and which feature attributes are unimportant or even have negative influence on the user category classification, namely, determine the importance degree of the feature attributes on the user category classification.
It is understood that the characteristic attributes include natural attributes and interest attributes of the user. The natural attribute refers to an attribute unrelated to the operation of the user on the media content, such as the gender, age, region and occupation of the user; the interest attribute refers to an attribute related to an operation of the user on the media content, for example, a tag of the media content frequently browsed by the user, an operation of the user on approval, forwarding, and the like of the media content, and the like. Of course, the characteristic attribute may also include other attributes, and the embodiment of the present invention is not limited herein.
In some embodiments of the present invention, the attribute feature of the target object may be in the form of a user representation, an attribute tag, or other forms, and the embodiments of the present invention are not limited in this respect.
It is understood that, in the embodiment of the present invention, the target object refers to any user registered in the server. When the target object is a newly registered user and has not been operated with respect to the media content, the server may recommend information to the target object only according to the natural attributes set by the target object at the time of registration.
It should be noted that, in the embodiment of the present invention, the specific number of user categories of at least one user category and the specific category may be set according to actual requirements, for example, the number of user categories may be set to 5, and respectively correspond to 5 user categories, namely, technical acquaintances, living at home, maka games, music fans, and short video fans, and the number of user categories may also be set to 20, and respectively correspond to various user categories in actual applications, which is not specifically limited herein.
It is understood that the server may start to acquire at least one of the category center, the feature weight information and the attribute feature of the target object to start the information recommendation process when the preset time is reached, for example, the above content is acquired at 12:00 of each day to start information recommendation; the server can also start to acquire the content after the target object finishes reading the information recommended by the information recommendation process of the previous round so as to start the information recommendation process of the new round. The specific manner for triggering the server to start information recommendation may be set according to actual requirements, and the embodiment of the present invention is not limited herein.
And S102, the server generates data to be clustered according to the attribute characteristics.
After the server obtains the attribute features corresponding to the target object, the server can digitize the attribute features to obtain a vector, and at the moment, the vector obtained by the server is the data to be clustered. In this way, the server can map the attribute features expressed by the natural language into the vector space, so as to facilitate the subsequent classification of the user categories.
It should be noted that, when the server digitizes the attribute feature, the server needs to store the attribute information of the target object as much as possible, so as to avoid that the generated data to be clustered lacks content corresponding to a certain important attribute, which affects the accuracy of information recommendation.
Furthermore, the attribute features of the target object have many sub-features, and the server can convert and digitize the sub-features one by one, that is, sub-data represents the corresponding sub-features, and the sub-data is used to generate the data to be clustered.
S103, the server determines data to be clustered with weight based on the data to be clustered and the characteristic weight information, and determines at least one category probability that the target object belongs to at least one user category according to the data to be clustered with weight and at least one category center.
After the server obtains the generated data to be clustered, and the previously obtained at least one category center and feature weight information, the feature weight information is firstly used for giving weights to all sub-data in the data to be clustered, so that the weight of the sub-data corresponding to the sub-features having larger influence on user category division in the data to be clustered is increased, the weight of the sub-data corresponding to the sub-features having negative influence on user category division in the data to be clustered is decreased, and the data to be clustered with the weights is obtained. And then, the server calculates distance information between each category center in at least one category center and the weighted data to be clustered after the weight is distributed, so that the probability that the target object belongs to each user category is obtained according to the distance information and is recorded as the category probability. In this way, the server can obtain at least one class probability.
It should be noted that the feature weight information refers to the importance degree of different feature categories for user category classification, and is unrelated to the feature values in specific feature categories. For example, when determining the user category, the user is important for the history reading record of the media content, and the region where the user is located is unimportant, so the feature weight information may assign a higher weight to the feature category of the history reading record, and assign a lower weight to the feature category of the region where the user is located, and these weights are unrelated to the history reading record and the specific content in the region where the user is located.
And S104, the server acquires recommendation information from the recommended content library according to at least one category probability.
After obtaining the category probability that the target object belongs to each user category, the server may obtain recommended contents to be recommended to the target object from a recommended content set corresponding to each user category in the recommended content library according to the category probabilities, and then sort the recommended contents to obtain recommendation information.
It should be noted that, since the category probability indicates the possibility that the target object belongs to the corresponding user category, the greater the category probability, the more likely the target object is to belong to the user category corresponding to the category probability, and the recommended content in the recommended content set corresponding to the user category will be interested in. Therefore, when the server acquires the recommendation information from the recommended content library according to at least one category probability, a few or no recommended contents are acquired from the recommended content set corresponding to the larger category probability, and a few or no recommended contents are acquired from the recommended content set corresponding to the smaller category probability.
Accordingly, when the server sorts the acquired recommended contents according to at least one category probability, the recommended contents corresponding to the higher category probability are ranked in front of the server, and the recommended contents corresponding to the lower category probability are ranked in the back of the server. Thus, the obtained recommendation information can be more suitable for the interest of the target object.
In some embodiments of the present invention, the server may directly use the category probability as an acquisition ratio of the recommended content, and acquire the recommended content from recommended content sets corresponding to different user categories according to the ratio. In other embodiments of the present invention, the server may obtain the recommended content only from the recommended content set corresponding to the category probability that exceeds the preset threshold, and does not obtain the recommended content from the recommended content set corresponding to the category probability that never reaches the preset threshold. Of course, the server may also obtain the recommended content in other ways, and the embodiment of the present invention is not limited herein.
S105, the terminal receives recommendation information sent by the server; the recommendation information is determined by the server according to the attribute characteristics of the target object.
After determining the recommendation information according to the attribute characteristics of the target object, the server sends the recommendation information to the terminal corresponding to the target object, so that the terminal presents the recommendation information and completes information recommendation for the target object.
It can be understood that the terminal corresponding to the target object refers to a terminal registered with the registration account of the target object. For example, when the server needs to recommend recommendation information of a certain social application to the target object, a recommendation result is sent to a terminal logged with a registered account of the target object in the social application.
And S106, when the terminal receives the recommended information browsing instruction, entering a recommended information presentation interface.
After receiving the recommendation information sent by the server, the terminal also needs to receive a recommendation information browsing instruction on a functional interface of the terminal, and after receiving the recommendation information browsing instruction triggered by the target object, the terminal knows that the target object has a demand for browsing the recommendation information, and at this time, the terminal jumps into a recommendation information presentation interface so as to present the recommendation information in the subsequent process.
It can be understood that the recommendation information presentation interface may be a floating display window arranged on the function interface, a display window occupying the whole display interface of the terminal, or other types of display windows. The specific recommended information presentation interface may be set according to actual conditions, and the embodiment of the present invention is not limited herein.
It should be noted that, in some embodiments of the present invention, after receiving the recommendation information, the terminal may further display a prompt identifier for the recommendation information on the functional interface to prompt that the target object has the recommendation information that is not browsed. Of course, the terminal may also prompt that the target object has unviewed recommendation information in other manners, and the embodiment of the present invention is not limited in detail herein.
Illustratively, the embodiment of the present invention provides a schematic diagram for displaying a prompt identifier on a functional interface. As shown in FIG. 5, four function options, namely, a social circle 5-11, a sweep 5-12, a see-at-a-glance 5-13 and a search 5-14, are presented in the function interface 5-1, and the target object can enter the corresponding function page by clicking on the 4 function options. After the terminal receives the recommendation information which looks at 5-13 at a glance, a prompt identifier, namely a red dot 5-2, is displayed at the function option which looks at 5-13 at a glance, so that the target object is reminded to look at 5-13 at the recommendation information which is not read.
And S107, the terminal presents the recommendation information on a recommendation information presentation interface to complete information recommendation for the target object.
After entering the recommendation information presentation interface, the terminal presents the recommendation information on the recommendation information presentation interface, so that the recommendation contents acquired by the server can be presented to the target object according to the arranged sequence. Therefore, the information recommendation process aiming at the target object is completed through the cooperative cooperation of the terminal and the server.
For example, the embodiment of the present invention provides a schematic diagram of recommendation information, and referring to fig. 6, in the recommendation 6-12 column of the recommendation information presentation interface 6-1, the recommendation contents 6-121 are respectively: significant instruction overview, recommended content 6-122: the most ball stars sandwiched by the inventory package, and recommended content 6-123: the three recommended contents of the 'no-moving' news are presented in sequence, so that the terminal finishes presenting the recommended information.
In the embodiment of the invention, the server can firstly acquire at least one category center, feature weight information and feature attributes corresponding to a target object, which are obtained by training sample data by the server, generate data to be clustered according to the feature attributes, then determine data to be clustered with weights based on the data to be clustered and the feature weight information, respectively determine at least one category probability that the target object belongs to at least one user category according to the data to be clustered with weights and the at least one category center, then acquire recommendation information according to the at least one category probability to obtain recommendation information, and send the recommendation information to a terminal corresponding to the target object, so that the terminal presents the recommendation information. Therefore, the server can eliminate the influence of the noise features in the feature attributes on the user category classification by using the feature weight information, and improve the accuracy of the user category classification, thereby improving the accuracy of information recommendation.
Referring to fig. 7, fig. 7 is a second optional flow chart of the information recommendation method according to the embodiment of the present invention, in some embodiments of the present invention, the server determines to-be-clustered data with a weight based on to-be-clustered data and the feature weight information, and determines at least one class probability that the target object belongs to at least one user class according to the to-be-clustered data with the weight and at least one class center, respectively, that is, a specific implementation process of S103 may include:
and S1031, the server distributes weights to each subdata in the data to be clustered by using the characteristic weight information to obtain the weighted data to be clustered.
Because the data to be clustered exists in a vector form, the characteristic weight information can exist in a diagonal matrix form, wherein elements on the diagonal line of the diagonal matrix represent the weight of each sub-characteristic in the attribute characteristics, and the sub-characteristics correspond to the sub-data in the data to be clustered.
For example, an exemplary schematic diagram that the server assigns weights to each sub-data in the data to be clustered is provided in the embodiment of the present invention, as shown in fig. 8, the sub-data corresponding to each sub-feature in the attribute features in the data to be clustered is presented in the display area 8-1. The sub-data 8-11, the sub-data 8-12 and the sub-data 8-13 correspond to three sub-characteristics with larger influence on user category division in the attribute characteristics, and the sub-data 8-14 and the sub-data 8-15 correspond to the attribute characteristics with influence on user category division in the attribute characteristicsHowever, the two sub-features with small influence degree, the sub-data 8-16, the sub-data 8-17 and the sub-data 8-18 respectively correspond to two sub-features which have no influence on the user category classification in the attribute features and one sub-feature which has negative influence on the user category classification. Before the server assigns a weight to each subdata in the data to be clustered, the weights of all subdata are theta, that is, the importance degrees of all subdata are the same. Then, the server multiplies the characteristic weight information in the form of the diagonal matrix with the attributes to be clustered, and at the moment, corresponding weights are distributed to each subdata, namely, the subdata 8-11, the subdata 8-12 and the subdata 8-13 are respectively distributed with weight values of theta1The sub-data 8-14 and the sub-data 8-15 are respectively assigned with a weight value theta2The sub-data 8-16, the sub-data 8-17 and the sub-data 8-18 are respectively assigned with weight values of theta3Wherein θ is1>θ2>θ>θ3Thus, all the subdata in the obtained weighted data to be clustered have different degrees of importance. In fig. 8, in combination with the level 8-31, the level 8-32, the level 8-33, and the level 8-34 of the sub-data importance degree presented in the display area 8-3, it can be seen that all the sub-data in the data to be clustered with weight in the display area 8-2 are divided into three levels according to the importance degree, that is, the sub-data 8-21, the sub-data 8-22, and the sub-data 8-23 all have the importance degree with the level 8-31, the sub-data 8-24 and the sub-data 8-25 respectively have the importance degree with the level 8-32, and the sub-data 8-26, the sub-data 8-27, and the sub-data 8-28 respectively have the importance degree with the level 8-34.
S1032, the server carries out distance calculation on the weighted data to be clustered and each category center in the at least one category center respectively to obtain at least one category distance information.
After the server obtains the data to be clustered with the weight, the server calculates the category distance between the data to be clustered with the weight and each category center, so that the server can obtain at least one category distance information corresponding to at least one category center one to one.
It should be noted that, in the embodiment of the present invention, the server may calculate an euclidean distance between the weighted data to be clustered and each class center, may also calculate a minkout distance, may also be a square of the euclidean distance, and the like, and the embodiment of the present invention is not limited specifically herein.
For example, an embodiment of the present invention provides a way to calculate category distance information from weighted data to be clustered to a category center, where equation (1) shows:
Figure BDA0002360786170000171
wherein, Θ x is to-be-clustered data with weight, x is to-be-clustered data, Θ is characteristic weight information, is a diagonal matrix, and m iscIs the c class center, lcAnd calculating the class distance information from the weighted data to be clustered to the c class. After the server obtains the specific values of the parameters, the server can substitute the specific values of the parameters into the formula (1) to calculate the category distance information. The above steps are repeated in a circulating way, so that the category distance information corresponding to each category center can be obtained, and at least one category distance information can be obtained.
S1033, the server normalizes each category distance information in the at least one category distance information to obtain a normalization result, and calculates at least one category probability by using the normalization result.
The server firstly accumulates all category distance information in at least one category distance information to obtain an accumulation result of the category distance information, then compares each category distance information with the accumulation result of the category distance information to obtain a normalization result corresponding to each category distance information, and takes the difference value between 1 and the normalization result as a category probability. In this way, the server can obtain the class probability corresponding to each class center, i.e. obtain at least one class probability.
It can be understood that, in practical applications, the weighted data to be clustered and the class center are both in the form of vectors, and in the vector space, the distance between two vectors indicates whether the two vectors are close to each other, so that the class distance information indicates how far the weighted data to be clustered is from the class center. When the weighted data to be clustered is closer to the category center, that is, the category distance information is smaller, it is described that the weighted data to be clustered is more likely to belong to the user category corresponding to the category center, whereas when the category distance information is larger, it is described that the weighted data to be clustered is less likely to belong to the user category corresponding to the category center, so that the server can normalize the category distance information, and then use 1 to make a difference with the normalized result, to obtain the category probability.
Illustratively, table 1 shows a first performance comparison result of the user category classification according to the embodiment of the present invention with the user category classification in the related art. Table 1 shows four user category classification methods in the related art, which are respectively a Joint Re-segmenting and sparse regression (JELSR) 1-1 based user category classification, a Robust Unsupervised Feature Selection (RUFS) 1-2 based user category classification, a Linear Discriminant Analysis (LDA) 1-3 based user category classification, and a Regular Linear Discriminant Analysis (RLDA) 1-4 based user category classification.
TABLE 1
User data set 1 User data set 2 User data set 3
JELSR1-1 57.87±4.34 63.17±2.58 59.29±3.1
RUFS1-2 78.65±5.90 63.93±2.57 54.64±2.86
LDA1-3 85.80±2.00 65.74±4.37 61.21±8.45
RLDA1-4 86.16±1.76 63.00±6.69 49.38±7.15
Examples of the invention 92.16±1.30 66.50±2.49 82.76±3.52
When the number of user categories is k, as can be seen from table 1, when on the user data set 1, the accuracy of JELSR1-1 is 57.87, the error is 4.34, the accuracy of RUFS1-2 is 78.65, the error is 5.90, the accuracy of LDA1-3 is 85.80, the error is 2.00, the accuracy of RLDA1-4 is 86.16, and the error is 1.76, the accuracy of the embodiment of the present invention is 92.16, and the error is 1.30; when the data is on the user data set 2, the accuracy of JELSR1-1 is 63.17, the error is 2.58, the accuracy of RUFS1-2 is 63.93, the error is 2.57, the accuracy of LDA1-3 is 65.74, the error is 4.37, the accuracy of RLDA1-4 is 63.00, the error is 6.69, the accuracy of the embodiment of the invention is 66.50, and the error is 2.49; when the data is on the user data 3, the accuracy of the JELSR1-1 is 59.29, the error is 3.1, the accuracy of the RUFS1-2 is 54.64, the error is 2.86, the accuracy of the LDA1-3 is 61.21, the error is 8.45, the accuracy of the RLDA1-4 is 49.38, the error is 7.15, the accuracy of the embodiment of the invention is 82.76, and the error is 3.52. It can be seen that, the accuracy of the user category classification in the embodiment of the present invention is the highest on the user data set 1, the user data set 2, or the user data set 3, meanwhile, the error of the user category classification in the embodiment of the present invention is the smallest on the user data set 1 and the user data set 2, and the error of the user category classification in the embodiment of the present invention is smaller on the user data set 3, although not the smallest. In summary, the performance of user category division in the embodiment of the present invention is generally superior to that of the four user category division methods in the related art, that is, the feature weight information is used to assign weights to each subdata in the data to be clustered, so as to achieve the effect of improving the accuracy of user category division.
It can be understood that the user category classification is essentially a clustering problem in which, in addition to accuracy, Normalized Mutual Information (NMI) can be used to measure the performance of the clustering, the higher the NMI, the better the performance of the clustering, i.e., the better the performance of the user category classification.
Illustratively, table 2 shows a performance comparison result two of the user category classification according to the embodiment of the present invention and the user category classification in the related art. Similar to table 1, four user classification methods in the related art are also shown in table 2, namely, user classification using JELSR1-1, user classification using RUFS1-2, user classification using LDA1-3, and user classification using RLDA 1-4.
TABLE 2
User data set 1 User data set 2 User data set 3
JELSR1-1 33.61±2.52 51.47±2.10 54.26±2.84
RUFS1-2 42.00±3.15 57.35±2.34 49.02±2.56
LDA1-3 86.32±6.86 62.69±1.98 64.64±7.39
RLDA1-4 85.92±5.60 63.11±2.60 48.71±11.78
Examples of the invention 75.75±4.40 66.89±1.94 82.53±1.19
When the number of user categories is k, as can be seen from table 2, on the user data set 1, the NMI of JELSR1-1 is 33.61, the error is 2.52, the NMI of RUFS1-2 is 42.00, the error is 3.15, the NMI of LDA1-3 is 86.32, the error is 6.86, the NMI of RLDA1-4 is 85.92, the error is 5.60, the NMI of the embodiment of the present invention is 75.75, and the error is 4.40; on user data set 2, the NMI of JELSR1-1 was 51.47 with an error of 2.10, the NMI of RUFS1-2 was 57.35 with an error of 2.34, the NMI of LDA1-3 was 62.69 with an error of 1.98, the NMI of RLDA1-4 was 63.11 with an error of 2.60, the NMI of the present example was 66.89 with an error of 1.94; on user data 3, the NMI of JELSR1-1 was 54.26 with an error of 2.84, the NMI of RUFS1-2 was 49.02 with an error of 2.56, the NMI of LDA1-3 was 67.64 with an error of 7.39, the NMI of RLDA1-4 was 48.71 with an error of 11.78, the NMI of the inventive example was 82.53 with an error of 1.19. Therefore, the NMI of the user category division of the embodiment of the present invention is the highest on both the user data set 2 and the user data set 3, and the error is also the smallest; on the user data set 1, the NMI of the user category classification of the embodiment of the present invention is at the upper-middle level, and the error is not very large. Therefore, the performance of the user class division of the embodiment of the invention is superior to that of the four user class division methods in the related technology, that is, the characteristic weight information is used for distributing the weight for each subdata in the data distribution to be clustered, and the effect of improving the normalized mutual information of the user class division is also achieved.
In the embodiment of the invention, the server firstly utilizes the characteristic weight information to distribute the weight to each subdata in the data to be clustered to obtain the data to be clustered with the weight, then calculates the category distance information between the data to be clustered with the weight and each category center, and finally calculates the category probability according to the category distance information. Therefore, the subdata corresponding to the noise characteristics in the data to be clustered can be reduced by utilizing the characteristic weight information, the influence brought by user category classification is provided, the accuracy of the user category classification is provided, and the accuracy of information recommendation is improved.
In some embodiments of the present invention, the obtaining, by the server, the recommendation information from the recommended content library according to the at least one category probability, that is, the specific implementation process of S104 may include: S1041-S1042, as follows:
s1041, the server takes each category probability in the at least one category probability as a content obtaining proportion corresponding to each user category, and obtains recommended content corresponding to each user category from a recommended content library according to the content obtaining proportion.
When the server acquires the recommended content from the recommended content library according to at least one category probability, each category probability is firstly used as a content acquisition proportion corresponding to each user category, and then the recommended content with corresponding quantity is acquired from a recommended content set corresponding to each user category in the recommended content library according to the content acquisition proportion.
It can be understood that, when the server recommends information, the total number of contents to be recommended in each information recommendation process can be specified, and at this time, the server can determine the number of recommended contents to be acquired from each recommended content set according to the content acquisition ratio and the total number of contents, and acquire recommendation information according to the number; when the server carries out information recommendation, the total content number is not specified, but the process of acquiring the recommended content is triggered by the sliding operation of the user, and the recommended content is acquired from the recommended content set according to the number of the recommended content which can be displayed on the page and the content acquisition ratio during each sliding operation.
S1042, the server sorts the recommended content corresponding to each user category according to the probability of each category to obtain recommended information.
After the server acquires the recommended content, the recommended content corresponding to the user category with the higher category probability can be arranged in front, that is, the recommended content corresponding to the user category with the higher category probability is displayed in the terminal first, and the recommended content corresponding to the user category with the lower category probability is arranged behind, so that the server can finish sequencing the recommended content corresponding to different user categories to obtain the recommended information.
It should be noted that, in some embodiments of the present invention, the server may obtain multiple pieces of recommended content for a certain user category, and at this time, the server needs to sort multiple pieces of recommended content in the same user category. When the server sorts a plurality of recommended contents in the same user category, the recommended contents may be sorted according to time of the recommended contents, or sorted according to popularity of the recommended contents, or further determine interest degrees of the target object for different recommended contents in the same user category, and then sort the recommended contents according to the interest degrees.
In the embodiment of the invention, the server can take each category probability as a content acquisition proportion, acquire the recommended content corresponding to each user category according to the content acquisition proportion, and sort the recommended information according to the probability of each category to obtain the recommendation result. In this way, the server can arrange the recommended content corresponding to the user category with higher similarity with the characteristic attribute of the target object in front, so that the target object can browse the recommended content interested by the target object in the terminal first.
In some embodiments of the invention, the attribute features include: one or more sub-features; the server generates the data to be clustered according to the attribute features, that is, the specific implementation process of S102 may include: S1021-S1022, as follows:
s1021, the server determines corresponding sub-data for each sub-feature in the one or more sub-features according to the preset corresponding relation between the sub-features and the sub-data, and then obtains the one or more sub-data.
The server firstly obtains the corresponding relation between the preset sub-characteristics and the subdata in the storage space of the server, wherein the corresponding relation between the preset sub-characteristics and the subdata expresses different values of the sub-characteristics by using different numerical values. And then, the server determines the subdata corresponding to each sub-characteristic according to the value of each sub-characteristic, so that the server can obtain one or more subdata.
For example, regarding the sub-feature of gender, in the preset corresponding relationship between the sub-feature and the sub-data, a male can be represented by 1, and a female can be represented by 0, so that when the server knows that the value of the sub-feature of gender of the target object is female, the server can determine the sub-data 0 corresponding to the sub-feature; for the interest-like sub-feature, in the preset corresponding relationship between the sub-feature and the sub-data, the game video can be represented by 0, the star entertainment can be represented by 1, and the science and technology interesting can be represented by 2, and when the server knows that the value of the interest-like sub-feature of the target object is the science and technology interesting, the sub-data 2 corresponding to the sub-feature can be determined.
S1022, the server integrates one or more subdata to obtain data to be clustered.
After the server obtains one or more subdata, the subdata can be combined into a vector according to the arrangement sequence of the sub-features in the attribute features, and thus the vector obtained by the server through combination is the data to be clustered.
In the embodiment of the invention, the server can determine corresponding sub-data for each sub-feature according to the preset corresponding relationship between the sub-features and the sub-data and the value of the sub-features to obtain one or more sub-data, and then, the server integrates the sub-data to obtain the data to be clustered. By the method, the server can obtain the data to be clustered, so that the data to be clustered with the weight can be obtained by subsequently utilizing the data to be clustered, and the class probability can be obtained.
Referring to fig. 9, fig. 9 is a schematic view illustrating an optional third flow chart of the information recommendation method according to the embodiment of the present invention. In some embodiments of the present invention, before the server obtains at least one category center corresponding to the preset at least one user category, the feature weight information, and the attribute feature corresponding to the target object, that is, before S101, the method may further include: S108-S112, as follows:
s108, the server acquires initial indication probability, initial characteristic weight information, penalty parameters and a plurality of training sample data; the indication probability characterizes the probability that the training sample data belongs to the user class.
Before the server acquires the at least one category center and the feature weight information, the server needs to train the at least one category center and the feature weight information. When training at least one category center and feature weight information, the server needs to first obtain training sample data, penalty parameters, initial indication probability and initial feature weight information used in the training process. The indicated probability is a probability representing that the training sample belongs to the user category, and is a parameter which is only needed in the training process.
It should be noted that the process of training at least one category center and feature weight information essentially refers to finding a set of category centers and a set of feature weight information, so that the cumulative result of the squares of the distances from the training sample data with weights to the respective category centers is minimized.
For example, a formula for training at least one category center and feature weight information is provided in the embodiment of the present invention, and see formula (2):
Figure BDA0002360786170000231
wherein m iscIs the category center of the c-th user category among the k category centers, M is a matrix composed of the respective category centers, xiIs the ith training sample data of the n training sample data,
Figure BDA0002360786170000232
is probability information, that is, the probability that the ith training data sample belongs to the c-th user class under the condition that the ambiguity of the user class is m, Y is a matrix formed by the probability information, theta is characteristic weight information in the form of a diagonal matrix, and theta is a vector formed by diagonal elements in the characteristic weight information. Y is not less than 0, Y1 is 1, thetaT1-1, theta ≧ 0 as a constraint condition, Y ≧ 0 indicating that each indication probability information needs to be 0 or more, Y1-1 indicating that the sum of all indication probability information needs to be 1, and theta ≧ 1T1-1 means that the sum of all diagonal elements in the feature weight information must be 1, and θ ≧ 0 means that all diagonal elements in the feature weight information must be 0 or greater.
Furthermore, in the training process, a matrix formed by the probability indication information needs to have a proper sparsity degree, so that when the training sample data is not obvious on the class boundary, a better training effect can be achieved, and more accurate class center and feature weight information can be obtained. To this end, the embodiment of the present invention introduces the F-norm of the matrix composed of the indicated probability information, that is, the F-norm of the indicated probability matrix, as a regular term into the training process, and sets the ambiguity m to 1. At this time, the process of training at least one class center and feature weight information becomes to find a group of class centers, one feature weight information and one indication probability matrix, so that the cumulative result of the squares of the distances from the training sample data with weights to the respective corresponding class centers is the minimum, and the square of the F-norm of the indication probability matrix of each training sample data is the minimum.
For example, an embodiment of the present invention provides a formula diagram for training at least one category center and feature weight information after introducing a regularization term, as shown in formula (3):
Figure BDA0002360786170000241
wherein m iscIs the class center of the c-th user class among the k class centers, M is a matrix composed of the class centers, xiIs the ith training sample data, y, of the n training sample dataicIs probability information indicating probability information, that is, the probability that the ith training data sample belongs to the c-th user category under the condition that the ambiguity of the user category is 1, Y is a probability matrix indicating probability, Θ is feature weight information in the form of a diagonal matrix, θ is a vector composed of diagonal elements in the feature weight information, | Y | survivalFIs an F-norm indicating a probability matrix, λ is a penalty parameter, Y ≧ 0, Y1 ≧ 1, θ T1 is equal to 1, and theta is more than or equal to 0 as a constraint condition. It is noted that, due to the above constraint, when training sample data is mapped to a user class,
Figure BDA0002360786170000242
when training sample data is assigned to a plurality of user classes,
Figure BDA0002360786170000243
is positive and much less than 1. Meanwhile, the penalty parameter λ is a hyperparameter in the training process, and is used to adjust the sparsity of the indicated probability matrix, for example, when λ is 0, only one element in the indicated probability vector composed of the indicated probability information of each training data sample is 1, and the others are 0, that is, the indicated probability vector is very sparse, and when λ is very large, the sparsity of the indicated probability vector is low, that is, the sparsity of the indicated probability matrix can be controlled by setting the value of the penalty parameter. Thus, introducing a regularization term enables finding a suitable sparsity for indicating the probability matrix.
It is understood that the initial indication probability and the initial feature weight information refer to indication probability and feature weight information respectively obtained through random initialization at the beginning of training. It should be noted that the initial indication probability and the initial feature weight information obtained by the random initialization both need to satisfy the above constraint condition. The penalty parameter is a hyper-parameter and is not updated during the training process.
S109, the server calculates a temporary category center corresponding to each user category in at least one user category based on the initial indication probability, the initial characteristic weight information and each training sample data in the training sample data.
S110, the server determines the temporary indication probability according to the temporary category center, the initial feature weight information, the initial indication probability, the penalty parameter and each training sample data.
After the server obtains the initial indication probability, the initial feature weight information and a plurality of training sample data, the server can calculate a category center corresponding to each user category in the current training round by using the initial indication probability and each training sample data, and the category center is marked as a temporary category center. And then, the server regards the temporary category center and the initial characteristic weight information as fixed values, and updates the indication probability in the current training turn by combining the penalty parameter, the initial indication probability obtained through initialization and training sample data to obtain the temporary indication probability.
It is understood that the server already knows the number of user categories of the preset at least one user category before the training is started, and thus, the server can calculate the number of user category temporary category centers when calculating the temporary category centers.
And S111, the server calculates temporary characteristic weight information by using the temporary indication probability, the initial characteristic weight information, the temporary category center and each training sample data.
Similarly, after the server obtains the temporary category center and the temporary indication probability through the above steps, the server calculates the feature weight information in the current training round by using the temporary category center and the temporary indication probability as fixed values, so as to obtain the temporary feature weight information.
And S112, the server repeats the processes of calculating the temporary category center, determining the temporary indication probability and calculating the temporary characteristic weight information, and stops training until the variation amplitude of the temporary indication probability is within a preset threshold value to obtain at least one category center and characteristic weight information.
After the server obtains the temporary category center, the temporary indication probability and the temporary feature weight information, the server performs the next training round by using the data, and repeats the processes of calculating the temporary category center, determining the temporary indication probability and calculating the temporary feature weight information in the steps. And the steps are repeated in a circulating mode until the server judges that the variation amplitude of the temporary indication probability is within the preset threshold value, namely the temporary indication probability is basically unchanged, the training is shown to be converged, and at the moment, the server respectively uses the calculated temporary category center and temporary characteristic weight information as final category center and characteristic weight information. The indication probability information is used for enabling the class center and feature weight information obtained by training to be more accurate, and the indication probability does not participate in operation in the actual information recommendation process, so that only the final class center and feature weight information needs to be output when the training is finished.
It should be noted that the preset threshold may be set according to actual situations, and the embodiment of the present invention is not limited herein. For example, the preset threshold may be set to 0.01, may also be set to 0.005, and the like.
It should be understood that, in the embodiment of the present invention, the server may further set other training stopping conditions to terminate the training, for example, set to stop the training when a certain number of training rounds are reached, and the embodiment of the present invention is not specifically limited herein.
It should be noted that, in other embodiments of the present invention, the sequence between S110 and S111 is not fixed, that is, the temporary feature weight information may be calculated according to the temporary category center, the initial indication probability, the initial feature weight information, and each training sample data, and then the temporary indication probability may be determined according to the temporary category center, the temporary feature weight information, the initial indication probability, the penalty parameter, and each training sample data.
In the embodiment of the invention, the server can firstly acquire the initial indication probability, the initial characteristic weight information, the penalty parameter and a plurality of training sample data, then calculate the temporary category center of each user category according to the acquired initial indication probability, the initial characteristic weight information and the plurality of training sample data, further calculate the temporary indication probability and the temporary characteristic weight information, and finally repeat the process of calculating the temporary category center, the temporary indication probability and the temporary characteristic weight information until reaching the preset training stopping condition to obtain at least one category center and characteristic weight information. Therefore, the server can obtain the category center and the characteristic weight information so as to facilitate the information recommendation process according to the category center and the characteristic weight information in the following.
In some embodiments of the present invention, the calculating, by the server, a temporary class center corresponding to each user class in the at least one user class based on the initial indication probability, the initial feature weight information, and each training sample data in the plurality of training sample data, that is, a specific implementation process of S109, may include: S1091-S1095, as follows:
s1091, the server distributes weights to the subdata in each training sample data by using the initial characteristic weight information to obtain the training sample data with the weights.
Similar to the characteristic weight information, the initial characteristic weight information is also a diagonal matrix, the server multiplies the initial characteristic weight information by each training sample data to assign a weight to each subdata in each training sample data, and the multiplication result is used as the weighted training sample data corresponding to each training sample data.
Illustratively, when training sample data with xiWhen representing, the initial characteristic weight information is represented by theta, the training sample data with weight is theta xi
S1092, the server divides the initial indication probability according to the user categories to obtain a category indication probability set corresponding to each user category; the class indication probability vector is characterized by a set of initial indication probabilities corresponding to each training sample data in a user class.
The server divides the initial indication probabilities belonging to the same user category in the initial indication probabilities together to obtain a category indication probability set corresponding to each user category one to one, and it is noted that when the server obtains the category indication probability set, the initial indication probabilities of the same user category can be spliced together in a vector form, that is, the category indication probability set can exist in a vector form.
Illustratively, the server sets the initial indication probability of each training sample data corresponding to the c-th user class in the initial indication probabilities, e.g. the initial indication probability y of the 1 st training sample data belonging to the c-th user class1cInitial probability of indication y that the 2 nd training sample data belongs to the c-th user class2c… …, initial probability of indication y of the nth training sample belonging to the c-th user classncAnd collecting to obtain a category indication probability set corresponding to the c-th user category.
S1093, the server calculates a first temporary center parameter corresponding to each user category according to the training sample data with the weight and each initial indication probability in the category indication probability set.
The server multiplies the training sample data with the weight by each initial indication probability in a class indication probability set corresponding to a certain user class to obtain a product result corresponding to each initial indication probability, then accumulates each product result, and takes the accumulated result as a first temporary center parameter corresponding to the user class. The server performs the operation on the category indication probability set corresponding to each user category to obtain a first temporary center parameter corresponding to each user category.
Illustratively, for the c-th user category, the server compares the initial indication probability y corresponding to the i-th training sample dataicAnd with weighted training sample data Θ xiMultiplying to obtain the product result corresponding to the ith training sample data, accumulating the product results corresponding to all the training sample data, and accumulating the accumulated results
Figure BDA0002360786170000281
As a first temporary center parameter.
S1094, accumulating the initial indication probabilities in the category indication probability set by the server to obtain a second temporary center parameter corresponding to each user category.
And the server accumulates all the initial indication probabilities in the class indication probability set corresponding to a certain user class and takes the obtained accumulation result as a second temporary center parameter corresponding to the user class. The server performs the operation on the class indication probability set corresponding to each user class to obtain a second temporary center parameter corresponding to each user class.
Illustratively, for the c-th user category, the server accumulates the initial indication probability corresponding to each training sample data, and accumulates the initial indication probability obtained by accumulation
Figure BDA0002360786170000282
As a second temporary center parameter for the c-th user category.
S1095, the server calculates the temporary category center corresponding to each user category according to the first temporary center parameter and the second temporary center parameter.
After obtaining the first temporary center parameter and the second temporary center parameter corresponding to each user category, the server may compare the first temporary center parameter and the second temporary parameter of each user category, and use the obtained ratio result as the temporary category center of each user category.
For example, the embodiment of the present invention provides a way to calculate the temporary category center of the c-th user category, as shown in equation (4):
Figure BDA0002360786170000283
wherein,
Figure BDA0002360786170000291
the first temporary center parameter for the c-th user category,
Figure BDA0002360786170000292
second temporary center parameter, y, for the c-th user categoryicInitial probability of indication, x, for the ith training sample data belonging to the c-th user classiFor the ith training sample data, Θ is the initial feature weight information. After the server obtains the specific values of the parameters, the values of the parameters can be substituted into equation (4) to obtain the temporary category center of the c-th user category.
Next, the derivation process of the temporary category center calculation method will be described by taking the c-th user category as an example. And (3) calculating the temporary class centers, namely after determining the initial indication probability and the initial characteristic weight information, minimizing the square of the distance from the training sample data with the weight to the corresponding class center and the square of the F-norm of the indication probability matrix of each training sample data, namely finding a group of class centers to enable the class centers to meet the formula (3). It should be noted that, since the indication probability does not need to be updated when determining the temporary category center, the regular term in equation (3) may not be considered, and the initial indication probability is already determined, so that the indication probability matrix Y composed of the initial indication probability is fixed, and similarly, the initial feature weight is also already determined, that is, the feature weight information Θ in the form of the diagonal matrix is not changed, at this time, only the change of the category center needs to be considered, that is, the variable is only the matrix composed of the temporary category centers. Accordingly, formula (3) can be rewritten as formula (5) as follows:
Figure BDA0002360786170000293
wherein m iscIs the temporary category center of the c-th user category among the k category centers, M is a matrix composed of the temporary category centers, xiIs the ith training sample data, y, of the n training sample dataicIs the initial indication probability, Y is the indication probability matrix composed of the initial indication probabilities, and Θ is the initial feature weight information in the form of a diagonal matrix. It is to be noted that, in the formula (5), yicAnd Θ are both fixed values determined well.
Further, since each class center is independent, weighted training sample data has the smallest sum of the squares of the distances from the weighted training sample data to the respective class center, and each tentative class center is essentially required to have the smallest square of the distance from the weighted training sample data belonging to the user class to which the tentative class center corresponds. At this time, with respect to the c-th temporary class center, equation (6) can be obtained:
Figure BDA0002360786170000301
wherein m iscIs the temporal class center, x, of the c-th user classiIs the ith training sample data, y, of the n training sample dataicIs the initial indicated probability.
Obviously, equation (6) is a convex function, and therefore, the derivation of equation (6) can be obtained by deriving equation (6), and equation (4) for calculating the temporary class center of the c-th user class can be obtained by making the derivation of equation (6) equal to 0 and performing a modification.
In the embodiment of the invention, the server can allocate weight to each subdata in each training sample data by using the initial characteristic weight information to obtain weighted training sample data, then divide the initial indication probability into a class indication probability set corresponding to each user class, then calculate a first temporary center parameter corresponding to each user class according to the weighted training sample data and each initial indication probability in the class indication probability, accumulate the initial indication probabilities in the class indication probability set to obtain a second temporary center parameter, and finally calculate the temporary class center corresponding to each user class by using the first temporary center parameter and the second temporary center parameter. Therefore, the server can complete the updating of the category centers, and then at least one category center is obtained in the follow-up process.
In some embodiments of the present invention, the server determines the temporary indication probability according to the temporary category center, the initial feature weight information, the initial indication probability, the penalty parameter, and each training sample data, that is, a specific implementation process of S110 may include: S1101-S1105, as follows:
s1101, the server divides the initial indication probability according to training sample data to obtain a sample data indication probability set corresponding to each training sample data; the sample data indication probability set represents a set of indication probabilities corresponding to training sample data and each user category.
When the server determines the temporary indication probability, all the initial indication probabilities belonging to the same training sample data need to be aggregated to obtain a sample indication probability set corresponding to each training sample data obtained for each user category. It can be seen that the set of sample data indication probabilities characterizes a set of initial indication probabilities of training sample data corresponding to each user class.
Illustratively, the server corresponds the ith training sample data to the initial indication probability y of the 1 st user classi1Corresponding the ith training sample data to the ithInitial probability of indication y for 2 user categoriesi2… …, corresponding the ith training sample data to the initial indication probability y of the kth user classikThe sample data are gathered together to obtain a sample data indication probability set yi1,yi2,…,yik]TIs denoted by yi*
S1102, the server constructs a category parameter vector by using the temporary category center, the initial feature weight information, the penalty parameter and each training sample data corresponding to each user category.
The server calculates the temporary category center of each user category and the distance from the temporary category center to each training sample data one by using the temporary category center corresponding to each user category, the initial characteristic weight and each training sample data, and then constructs a number of category parameter vectors of the training sample data by using the calculated distance and the penalty parameters, so as to calculate the parameters needed for determining the temporary indication probability by using the category parameter vectors subsequently.
S1103, the server calculates the distance between the class parameter vector and the sample data indication probability set to obtain a first indication probability parameter.
After constructing the number of class parameter vectors of training sample data, the server firstly makes one-to-one correspondence between the class parameter vectors and the sample data indication probability sets in the vector form, then calculates the distance between the class parameter vectors and the sample data indication probability sets corresponding to the class parameter vectors, and takes the square of the calculated distance as a first probability indication parameter.
It will be appreciated that the class parameter vector and the training sample data are in one-to-one correspondence, and the training sample data and the sample data indication probability set are in one-to-one correspondence, and thus the class parameter vector and the sample data indication probability set may also be in one-to-one correspondence.
It should be noted that, because the class parameter vector and the sample data indication probability set are in one-to-one correspondence, the server function calculates the number of first probability indication parameters of the training sample data, that is, the first probability indication parameters and the training sample data are in correspondence.
For example, for the ith training sample data, the class parameter vector may be represented as
Figure BDA0002360786170000311
When the sample data indicates that the probability set is denoted as yi*Then, the distance between the class parameter vector and the sample data indication probability set, i.e. the first indication probability parameter corresponding to the ith training sample data is
Figure BDA0002360786170000312
S1104, the server adjusts each initial indication probability in the sample data indication probability set once or for many times to obtain one or more adjusted sample data indication probability sets, and performs distance calculation on the category parameter vector and the one or more adjusted sample data indication probability sets respectively to obtain one or more second indication probability parameters.
After the server calculates the first indication probability parameter corresponding to each training sample data, each initial indication probability in the sample data indication probability set is adjusted, and an adjusted sample data indication probability set is obtained after each adjustment. The server may perform one or more adjustments on each initial indication probability in the sample data indication probability set, and may obtain one or more adjusted sample data indication probability sets. And then, the server uses each adjusted sample data indication probability set to respectively carry out distance calculation with the category parameter vector, and the calculation result is used as a second indication probability parameter, so that one or more second probability indication parameters can be obtained.
It should be noted that, the server adjusts the sample data indication probability set corresponding to each training sample data, so that one or more adjusted sample data indication probability sets, that is, one training sample data, can be obtained for each training sample data, corresponding to one or more adjusted sample data indication probability sets. Further, one or more second probability indicating parameters can be obtained for each training sample data.
It can be understood that, when the server performs one or more adjustments on each initial indication probability in the sample data indication probability set, the server may complete one or more adjustments at one time, or may perform one adjustment, and after calculating the second probability indication parameter, the server continues the adjustment, which is not limited herein.
In some embodiments of the present invention, the total number of times that the server adjusts the sample data indication probability set may be set according to actual situations, for example, the server may adjust the sample data indication probability set 100 times or 500 times, which is not limited herein.
S1105, the server takes the first indication probability parameter and the minimum indication probability parameter in the one or more second indication probability parameters as a temporary target comparison result, and obtains a temporary indication probability according to a sample data indication probability set corresponding to the temporary target comparison result.
And the server compares the first indication probability parameter and one or more second indication probability parameters of each training sample data, and selects the indication probability parameter with the minimum value as a temporary target comparison result for each training sample parameter. And then, finding a sample data indication probability set corresponding to the target comparison result of each training sample parameter, wherein the indication probability in the sample data indication probability set is the most suitable for the training sample data, and therefore, the server extracts the indication probability in the sample data indication probability set as the temporary indication probability corresponding to the training sample data.
For example, the embodiment of the present invention provides a formula for determining a temporary indication probability of the ith training sample data, as shown in equation (7):
Figure BDA0002360786170000331
wherein the sample data of the ith training sample data is indicated to a probability set,and the adjusted sample data indication probability set are all expressed as yi*
Figure BDA0002360786170000332
For the class parameter vector, y, of the ith training sample data i*1=1,yi*The constraint condition is that the sum of initial indication probabilities in a sample data indication probability set representing the ith training sample data and the sum of initial indication probabilities in an adjusted sample data indication probability set are both required to be 1; the initial indication probability in the sample data indication probability set of the ith training sample data and the initial indication probability in the adjusted sample data indication probability set are both required to be greater than or equal to 0.
Next, the derivation process of the calculation method of the tentative indication probability will be described by taking the ith training sample data as an example. When the temporary indication probability is determined, neither the initial feature weight information nor the temporary category center changes, that is, both the initial feature weight information Θ and the matrix M composed of the temporary category centers are fixed. In this case, the provisional indication probabilities are updated so that the square of the distances from the weighted training sample data to the respective class centers and the square of the F-norm of the indication probability matrix of each training sample data are minimized, that is, the indication probability matrix Y composed of the provisional indication probabilities is found so as to satisfy expression (3). Further, the F-norm indicative of the probability matrix is expanded to obtain equation (8):
Figure BDA0002360786170000333
wherein m iscIs the temporary category center, x, for the c-th user category among the k category centersiIs the ith training sample data, y, of the n training sample dataicThe temporary indication probability, lambda is a penalty parameter, Y is an indication probability matrix composed of initial indication probabilities, theta is initial characteristic weight information in a diagonal matrix form, Y is more than or equal to 0, and Y1 is 1 as a constraint condition. It is to be noted that, in the formula (8), mcAnd Θ are both fixed.
Since each training sample data is independent, equation (8) can be decomposed into n subproblems, where the subproblem corresponding to the ith training sample data can be described by equation (9):
Figure BDA0002360786170000341
wherein,
Figure BDA0002360786170000342
mcis the temporary class center, x, for the c-th user class of the k user classesiIs the ith training sample data, yicIs the initial indicator probability, λ is a penalty parameter, yiThe initial indication probability set corresponding to each user category is represented by ith training sample data, namely, the sample data indication probability set of the ith training sample data, and Θ is initial feature weight information in a diagonal matrix form.
For k user categories, the utilization is similar to
Figure BDA0002360786170000343
The formula (h) can be obtained by respectively calculating the square of the distance from the ith training sample data to the center of each temporary class of the k user classesi1,hi2,……,hikIs marked as hi*=[hi1,hi2,…,hik]T. According to hiRewriting formula (9) as follows:
Figure BDA0002360786170000344
due to hi*Fixed value, equation (11) can be constructed using equation (10) as a sum of squares construction, as follows:
Figure BDA0002360786170000345
further modified according to the L-2 norm to give formula (12):
Figure BDA0002360786170000346
at this time, if order
Figure BDA0002360786170000347
The formula (7) can be obtained.
In the embodiment of the invention, the server can divide the initial indication probability into sample data indication probability sets corresponding to each training sample data, construct a class parameter vector, further calculate each first indication probability parameter according to the class parameter vector and the sample data indication probability, then adjust the initial indication probability in the sample data indication probability sets to obtain one or more adjusted sample data indication probability sets, further obtain one or more second indication probability parameters, and finally select the smallest indication probability parameter from the first indication probability parameters and the one or more second indication probability parameters as a temporary target comparison result, and use the sample data indication probability in the sample data indication probability set corresponding to the temporary target comparison result as the temporary indication probability.
In some embodiments of the present invention, the server constructs a category parameter vector by using the temporary category center, the initial feature weight information, the penalty parameter, and each training sample data corresponding to each user category, that is, the specific implementation process of S1102 may include: s1102a-S1102d, as follows:
s1102a, the server distributes weights to the sub-data in each training sample data by using the initial characteristic weight information to obtain the training sample data with the weights.
It should be noted that, in the embodiment of the present invention, a process of obtaining training sample data with weights by a server is similar to the implementation process in S1091, and is not described herein again.
S1102b, the server calculates the distance between the weighted training sample data and the temporary class center to obtain the sample center distance corresponding to each user class.
The server calculates the distance between the weighted training sample data and the temporary category center, namely, the distance between one weighted training sample data and the temporary category center corresponding to each user category is calculated first, and the sample center distance corresponding to each user category is obtained for one weighted training sample data. When the server performs the operation on all the weighted training sample data, the center distance of the sample corresponding to each user category can be obtained for each weighted training sample data.
For example, the distance from the ith weighted training sample data to the center of the c-th temporary class may be represented as hic=||Θxi-mc||2At this time, the sample center distance corresponding to each user category is hi1,hi2,……,hin. Wherein m iscIs the temporal class center, x, of the c-th user classiIs the ith training sample data, and theta is the initial feature weight information in the form of a diagonal matrix.
S1102c, the server calculates category parameter elements corresponding to each user category according to the sample center distance and the penalty parameters.
After obtaining the sample center distance corresponding to each user category, the server compares the square of the sample center distance with the penalty parameter to obtain a ratio result, and calculates the opposite number of the comparison result, at this time, the result obtained by calculating the opposite number is the category parameter element corresponding to each user category for one weighted training sample data. The server performs the operation on all the training sample data with the weight to obtain the training sample data with the weight and the category parameter elements corresponding to each user category.
For example, for the ith weighted training sample data, the category parameter element corresponding to the c-th user category is
Figure BDA0002360786170000361
The category parameter element corresponding to each user category refers to
Figure BDA0002360786170000362
S1102d, the server uses the category parameter element corresponding to each user category to form a category parameter vector.
And the server splices the category parameter elements of each user category corresponding to the training sample data with the weight according to a vector form to obtain a category parameter vector corresponding to the training sample data with the weight. The server performs the operation on each weighted training sample data to obtain the category parameter vector corresponding to each weighted training sample data, namely the number of category parameter vectors of the training sample data.
Illustratively, the server compares the category parameter element corresponding to each user category of the ith weighted training sample data
Figure BDA0002360786170000363
Splicing according to the form of the vector to obtain a row vector
Figure BDA0002360786170000364
The row vector is the category parameter vector corresponding to the ith weighted training sample data.
In the embodiment of the invention, the server can firstly distribute the weight to each subdata in each training sample data by using the initial characteristic weight information to obtain the training sample data with the weight, then calculate the clustering of the training sample data with the weight and the temporary class center to obtain the sample center distance corresponding to each user class, then calculate the class parameter element corresponding to each user class according to the sample center distance corresponding to each user class and the penalty parameter, and further form the class parameter vector corresponding to each training sample data by using the class parameter elements, so that the server can obtain the class parameter vector so as to calculate the first indication probability parameter and the second indication probability parameter by using the class parameter vector in the subsequent process.
In some embodiments of the present invention, the server calculates the temporary feature weight information by using the temporary indication probability, the initial feature weight information, the temporary category center, and each training sample data, that is, a specific implementation process of S111 may include: S1111-S1116, as follows:
s1111, the server uses the initial feature weight information to form an initial feature weight vector.
The server extracts elements in the diagonal line from the initial characteristic weight information in the form of the diagonal matrix, and forms an initial characteristic weight vector by the elements according to the order of the elements on the diagonal line, so as to calculate a first characteristic weight parameter and a second characteristic weight parameter by using the initial characteristic weight.
Illustratively, when Θ is the initial feature weight information in the form of a diagonal matrix, the server extracts all diagonal elements in Θ to form an initial feature weight vector θ.
S1112, the server calculates a first feature weight parameter by using each training sample data and the initial feature weight vector.
After the server obtains the initial feature weight vector, each training sample data is multiplied by the transpose of each training sample data to obtain a product result corresponding to each training sample data. Then, a diagonal matrix is formed by using a product result corresponding to each training sample number to obtain a weight parameter matrix, and then, the transposition of the initial characteristic weight vector, the obtained diagonal matrix and the initial characteristic weight vector are multiplied to obtain a result, namely the first characteristic weight parameter.
Illustratively, the server records the weight parameter matrix as DxAt this time, the first feature weight parameter can be expressed as θTDxTheta. Where θ is the initial feature weight vector.
S1113, the server calculates a second feature weight parameter according to each training data sample, the temporary class center, the temporary indication probability and the initial feature weight vector.
The server continues to construct a construction matrix by using each training data sample, the temporary category center and the temporary indication probability, and then diagonal elements in the construction matrix are extracted to form a weight parameter vector. Then, the server multiplies the transpose of the initial feature weight vector by the weight parameter vector, and takes the resultant product as the second feature weight parameter.
For example, when the server constructs a construction matrix as a by using each training data sample, the temporary class center and the temporary indication probability, the weight parameter vector may be represented as a, and in this case, the second feature weight parameter is θTa。
S1114, the server performs difference on the first characteristic weight parameter and the second characteristic weight parameter to obtain an initial difference value result corresponding to the initial characteristic vector.
S1115, the server adjusts the initial feature weight information in the initial feature weight vector for one or more times to obtain one or more adjusted feature weight vectors, and further obtains one or more adjustment difference results corresponding to the one or more adjusted feature weight vectors.
The server subtracts the second characteristic weight parameter from the first characteristic weight parameter, and takes the difference result as an initial difference result. And then, the server adjusts the initial characteristic weight information in the initial characteristic weight vector, an adjusted characteristic weight vector is obtained every time of adjustment, and one or more adjusted characteristic weight vectors can be obtained after one or more times of adjustment. Then, the server calculates one or more adjustment difference results by using one or more adjusted feature weight vectors according to the processes of S1112-S1114.
S1116, the server takes the minimum difference result in the initial difference result and the one or more adjustment difference results as a temporary target difference result, and obtains temporary feature weight information according to the feature weight vector corresponding to the temporary target difference result.
The server selects the smallest difference result from the calculated initial difference results and one or more adjustment difference results, and takes the smallest difference result as a temporary target difference result. And finally, extracting each feature weight information in the feature weight vector to serve as final temporary feature weight information.
For example, an embodiment of the present invention provides a formula for calculating temporary feature weight information, where the formula (13) is shown as follows:
Figure BDA0002360786170000381
wherein the first characteristic weight parameter can be expressed as thetaTDxθ, θ is the initial feature weight vector, DxIs a weight parameter matrix, and the second characteristic weight parameter is θTa, a can be represented by a weight parameter vector. ThetaTAnd when theta is equal to or more than 0, the constraint condition is that the sum of all elements in theta is 1, and all elements in theta are non-negative numbers.
In some embodiments of the present invention, the formula for calculating the temporary feature weight information, that is, formula (3), may be further optimized, where the lagrangian function is constructed for formula (3), that is, the formula includes:
Figure BDA0002360786170000391
where θ is the initial feature weight vector, a is the weight parameter vector, DxFor the weight parameter matrix, η and α are lagrange multipliers.
Taking a derivative on θ, and taking the derivative function of the derivative equal to 0, we can obtain:
2Dxθ-a-η1-αT=0 (15)
further, for each element in θ, there is:
diiθi-ai-η-αi=0 (16)
wherein d isiiIs a weight parameter matrix DxThe ith diagonal element of (1), θiIs the ith element in θ. If make thetaiαiWhen 0, then equation (16) can be modified as:
Figure BDA0002360786170000392
at this time, after the value of the lagrangian multiplier η is determined by the newton iteration method, the temporary feature weight information can be directly obtained.
Next, the derivation process of the calculation method of the temporary feature weight information will be described by taking the ith training sample data as an example. When the temporary feature weight information is calculated, the temporary class center and the temporary indication probability are fixed values, that is, the matrix M composed of the temporary class center and the indication probability matrix Y composed of the temporary indication probability are fixed, and only the initial feature weight information Θ is updated so that the square of the distance from the training sample data with the weight to the respective corresponding class center is the minimum and the square of the F-norm of the indication probability matrix of each training sample data is the minimum. Note that, since the indication probability does not need to be updated when the temporary feature weight matrix is calculated, the regular term in equation (3) may not be considered, and in this case, equation (18) may be obtained for the ith training sample data as follows:
Figure BDA0002360786170000401
wherein m iscIs the category center, x, of the c-th user category among the k category centersiIs the ith training sample data, y, of the n training sample dataicIs a temporary indication probability, theta is temporary feature weight information, theta is a vector composed of diagonal elements in the temporary feature weight information, and theta is a vector composed of diagonal elements in the temporary feature weight information T1 is equal to 1, theta is more than or equal to 0 as a constraint condition, the sum of all elements in theta is represented as 1, and all elements in theta are non-negative numbers.
By modifying the formula (18), the following can be obtained (19):
Figure BDA0002360786170000402
at this time, since Θ is a diagonal matrix, x is a property of the trace of the matrixTy=Tr(xyT)=Tr(yxT) The transformation of formula (19) can be continued to give formula (20) as follows:
Figure BDA0002360786170000403
still further, with
Figure BDA0002360786170000404
As diagonal elements, a characteristic parameter matrix D is composedxBy using
Figure BDA0002360786170000405
As matrix elements, an n × k matrix is formed, diagonal elements of the matrix are used as characteristic parameter vectors, and the properties of the traces are combined to obtain equation (13).
In the embodiment of the invention, the server can firstly use initial feature weight information to form an initial feature weight vector, then combine each training sample data and the initial feature weight vector to calculate a first feature weight parameter, combine each training sample data, a temporary category center, a temporary indication probability and the initial feature weight vector to calculate a second feature weight parameter, then combine the first feature weight parameter and the second feature weight parameter to calculate an initial difference result, then the server adjusts the initial feature weight information in the initial feature weight vector to obtain one or more adjusted feature weight vectors and further obtain one or more adjusted difference results, then select the smallest difference result from the initial difference result and the one or more adjusted difference results as a temporary target difference result, and then use the feature weight information in the feature weight vector corresponding to the temporary target difference result, as temporary feature weight information. Therefore, the server can adjust the initial characteristic weight information to obtain temporary characteristic weight information so as to obtain the characteristic weight information in the subsequent process.
In some embodiments of the present invention, the server calculates a first feature weight parameter by using each training sample data and the initial feature weight vector, that is, the specific implementation process of S1112 may include: s1112a-S1112c, as follows:
s1112a the server multiplies each training sample data by the transposed correspondence of each training sample data to obtain a training data element corresponding to each training sample data.
S1112b, the server composes a weight parameter matrix using the training data elements.
The server firstly obtains the transpose of each training sample data, then multiplies each training sample data by the transpose of the corresponding training sample data, and uses the obtained multiplication result as the training data element corresponding to the training sample data. And after the server obtains the training data elements corresponding to each training sample data, taking the training data elements as diagonal elements according to the sequence of the training sample data to obtain a weight parameter matrix.
Illustratively, the server finds the ith training sample data xiIs transferred to
Figure BDA0002360786170000411
Then x is putiAnd
Figure BDA0002360786170000412
multiplying, multiplying the obtained product
Figure BDA0002360786170000413
As training data element corresponding to the ith training sample data, and then the server will use
Figure BDA0002360786170000414
And as the ith diagonal element of the matrix, the server can obtain the weight parameter matrix by analogy.
S1112c the server calculates the first feature weight parameter by using the initial feature weight vector, the weight parameter matrix, and the transposed vector of the initial feature weight vector.
And the server multiplies the transposed vector of the initial characteristic weight vector, the weight parameter matrix and the initial characteristic weight vector in sequence, and the obtained product result is the first characteristic weight parameter.
In the embodiment of the invention, the server can calculate the training data element corresponding to each training data by using each training data, further obtain the weight parameter matrix, and finally calculate the first characteristic weight parameter by using the initial characteristic weight vector, the weight parameter matrix and the transposed vector of the initial characteristic weight vector. Therefore, the server can obtain the temporary feature weight information by using the first feature weight parameter subsequently.
In some embodiments of the present invention, the calculating, by the server, the second feature weight parameter according to each training sample data, the temporary class center, the temporary indication probability, and the initial feature weight vector, that is, the specific implementation process of S1113 may include: s1113a-S1113b as follows:
s1113a, the server constructs a weight parameter vector by using each training data sample, the temporary class center and the temporary indication probability.
The server multiplies the result of multiplication by 2 times of certain training sample data and the transposition of the center of each temporary class, and then multiplies the result of multiplication by the temporary indication probability which belongs to each user class and corresponds to the training sample data to obtain the number of matrix elements of the user class corresponding to the training sample data. The server calculates the matrix elements of the number of the user types for each training sample data according to the process, and forms a matrix by using the matrix elements of the number of the user types corresponding to each training sample data, and then extracts the diagonal elements in the matrix to form a weight parameter vector.
Illustratively, if the c-th temporary class is centered at mcFor the ith training sample data xiIts provisionally indicated probability for the c-th user category is yicAt this time, the c matrix element of the ith training sample data may be written as
Figure BDA0002360786170000421
S1113b, the server multiplies the transposed vector of the initial feature weight vector by the weight parameter vector to obtain a second feature weight parameter.
After obtaining the weight parameter vector, the server may solve the transpose of the initial feature weight vector, and multiply the obtained transposed vector of the initial feature weight vector with the weight parameter vector, where the obtained product is the second feature weight parameter.
In the embodiment of the invention, the server can firstly construct the weight parameter vector by using each training data sample, the temporary category center and the temporary indication probability, and then calculate the second characteristic weight parameter by using the weight parameter vector and the transposed vector of the initial characteristic weight vector. In this way, the server can subsequently obtain the temporary feature weight information by using the second feature weight parameter.
In some embodiments of the present invention, after the server repeats the above processes of calculating the temporary category center information, determining the temporary indication probability, and calculating the temporary feature weight information until the change of the temporary indication probability is within the preset threshold, and stops the condition, and obtains at least one category center and feature weight information, that is, after S112, the method may further include: S201-S205, as follows:
s201, the server respectively carries out distance calculation on each training sample data and each category center of at least one category center to obtain at least one distance information corresponding to each training sample data.
S202, the server accumulates the distance information of the preset number of the at least one distance information to obtain a first punishment parameter factor of each training sample data.
The server calculates the distance from each training sample data to the center of each category respectively to obtain at least one distance information corresponding to each training sample data, then accumulates the distance information of the previous preset number in the distance information, and takes half of the accumulated result as a first punishment parameter factor of each training sample data.
It is understood that the preset number may be set according to actual situations, and the preset number may be 5 or 10, which is not limited herein in the embodiments of the present invention.
For example, when the preset number is s, the ith training sample data may be written as the corresponding first penalty parameter factor
Figure BDA0002360786170000431
S203, the server calculates a second punishment parameter factor of each training sample data according to the next distance information of the distance information with the first preset number and the preset number.
The server finds the next distance information of the distance information with the first preset number of each training sample data, then multiplies the next distance information by half of the preset number, and takes the multiplication result as a second punishment parameter factor.
For example, when the preset number is s, the ith training sample data to the corresponding second penalty parameter factor may be written as
Figure BDA0002360786170000432
S204, the server makes a difference between the second punishment parameter factor and the first punishment parameter factor to obtain a punishment sub-parameter of each training sample data.
S205, the server averages the punishment sub-parameters of each training sample data to obtain updated punishment parameters.
The server subtracts the first punishment parameter factor from the second punishment parameter factor, and uses the obtained difference value as a punishment sub-parameter, so that the server can obtain the punishment sub-parameter of each training sample data. And then, the server accumulates the punishment sub-parameters, compares the result obtained by accumulation with the number of the training sample data, and takes the ratio result as the updated punishment parameter so as to be convenient for training again by utilizing the updated punishment parameter.
For example, an embodiment of the present invention provides a formula for calculating a penalty parameter, see formula (21):
Figure BDA0002360786170000441
wherein n is the number of training sample data, s is the preset number, his+1Next distance information, h, of a preset number of distance information corresponding to the ith training sample dataicThe distance from the ith training sample data to the center of the c-th class. After obtaining the specific values of the parameters, the server may substitute the specific values of the parameters into equation (21) to calculate the penalty parameter.
Next, the derivation process of the calculation formula of the penalty parameter, i.e., the formula (21), will be described. Since the penalty parameter is used in updating the temporary indicated probability, the lagrangian function of equation (7) can be constructed, resulting in equation (22), as follows:
Figure BDA0002360786170000442
wherein, yi*Sample data representing the ith training sample data indicates a set of probabilities,
Figure BDA0002360786170000443
for the class parameter vector of the ith training sample data, γ and βiAre lagrange multipliers, and the values are all more than or equal to 0. Then, due to the KKT condition, the optimal solution of equation (7) can be written as:
Figure BDA0002360786170000444
wherein, (x)+=max(0,x),λiA penalty sub-parameter representing the ith training sample data. In fact, for training sample data xiOnly the nearest s class centers are expected to be associated with it. Suppose hi1,hi2,…,hikAlready arranged in the order from small to large when the ith training sample data xiIndicates a probability set of y for the sample data ofi*Only s elements other than 0, according to equation (23),can obtain yis> 0 and yis+10, further, one can obtain:
Figure BDA0002360786170000451
recombination constraint yi*When 1 is 1, the following components are present:
Figure BDA0002360786170000452
by combining the formulae (24) and (25), the values for lambda can be obtainediThe inequality of (1):
Figure BDA0002360786170000453
to make yi*Strictly having s non-zero elements, it is possible to make λiSatisfies formula (27):
Figure BDA0002360786170000454
therefore, the penalty sub-parameters for each training sample data are calculated by the equation (27), and then the penalty sub-parameters are averaged to obtain the equation (21).
In the embodiment of the invention, the server can also recalculate the updated punishment parameter according to at least one category center and the characteristic weight information, so that the training can be started again by using the updated punishment parameter after the training process is finished, more accurate category center and characteristic weight information can be obtained, the accuracy of user category classification can be further improved, and the accuracy of information recommendation can be finally improved.
In the following, an exemplary application of the embodiments of the present invention in a practical application scenario will be described.
The embodiment of the invention is realized based on the one-look-at-one function of the social application program. After the server obtains the clustering centers (at least one category center) of k user categories determined in the training process, the weight matrix (characteristic weight information) and the user image (attribute characteristics) of the user A (target object), the server can firstly utilize the natural attributes and the specific values (subdata) of the interest image (subdeatures) in the user image to generate the input data (to-be-clustered data) of the user A. Then, the server multiplies the input data by the feature matrix, calculates the obtained product (weighted data to be clustered) and Euclidean distance (class distance information) of each class center of k class centers, and finally obtains the probability (class probability) that the input data respectively belongs to the user class determined by the k class centers according to the class distance information.
When the server determines that the probability that the user A belongs to the user category 'technical destiny' is 0.6 and the probability that the user A belongs to the home fan is 0.4, recommended articles (recommended contents) are obtained from a database (recommended content library) according to the probability, wherein 3 articles are obtained from the 'technical destiny' category, 2 articles are selected from the 'home fan' category, then the articles in the 'technical destiny' category are arranged in the front, the articles in the 'home fan' category are arranged in the back, a sequencing result (recommended information) is obtained, and the sequencing result is sent to the terminal of the user A.
After receiving the ranking result sent by the server, the terminal of the user a receives a click operation (recommended information browsing instruction) triggered by the user a on an interface (functional interface) of the social application program, and then enters a main interface (recommended information presentation interface) to be seen at a glance. And then, the terminal displays the sequencing result on a main interface which is seen at a glance, and the information recommendation process aiming at the user A is completed.
Referring to fig. 10, fig. 10 is a schematic view of a recommendation result provided by an embodiment of the present invention. In the display area 10-1 of fig. 10, the titles of articles are displayed: how much the "12306" architecture is 10-11, and the category to which the article belongs, the technical reach 10-12; in the display area 10-2, the title of the article is displayed: a 46 square meter room, a comfort highlight 10-21, and home fans 10-22 of the category to which the article belongs (other articles in the recommendation are not shown). Thus, the user A can select the articles which are interested to read on the main interface which is watched at once.
Through the method, the server multiplies the feature matrix and the input data, and then calculates the distance from the multiplication result to the clustering center, so that the influence of noise features in the input data on user clustering is reduced, the clustering accuracy is improved, and the information recommendation accuracy is improved.
Continuing with the exemplary structure of the information recommendation device 255 provided by the embodiments of the present invention implemented as software modules, in some embodiments, as shown in fig. 2, the software modules stored in the information recommendation device 255 of the first memory 250 may include:
an obtaining module 2551, configured to obtain at least one category center corresponding to at least one preset user category, feature weight information, and an attribute feature corresponding to a target object; the characteristic weight information represents the importance degree of the attribute characteristics to the classification of the user categories; the at least one class center is obtained by training the training sample data by the server;
a data generating module 2552, configured to generate data to be clustered according to the attribute features;
a category determining module 2553, configured to determine to-be-clustered data with a weight based on the to-be-clustered data and the feature weight information, and determine at least one category probability that the target object belongs to the at least one user category according to the to-be-clustered data with a weight and the at least one category center, respectively;
a result generating module 2554, configured to obtain recommendation information from the recommended content library according to the at least one category probability;
a sending module 2555, configured to send the recommendation information to a terminal corresponding to the target object.
In some embodiments of the present invention, the category determining module 2553 is specifically configured to allocate a weight to each sub-data in the data to be clustered by using the characteristic weight information, so as to obtain the data to be clustered with a weight; respectively performing distance operation on the weighted data to be clustered and each category center in the at least one category center to obtain at least one category distance information; and normalizing each category distance information in the at least one category distance information to obtain a normalization result, and calculating the at least one category probability by using the normalization result.
In some embodiments of the present invention, the result generating module 2554 is specifically configured to use each category probability of the at least one category probability as a content obtaining ratio corresponding to each user category, and obtain, according to the content obtaining ratio, recommended content corresponding to each user category from the recommended content library respectively; and sequencing the recommended contents corresponding to each user category according to the probability of each category to obtain the recommendation result.
In some embodiments of the present invention, the data generating module 2552 is specifically configured to determine, according to a preset correspondence between sub-features and sub-data, corresponding sub-data for each sub-feature of the one or more sub-features, so as to obtain one or more sub-data; and integrating the one or more subdata to obtain the data to be clustered.
In some embodiments of the present invention, the recommending means 255 further comprises: a training module 2556;
the obtaining module 2551 is further configured to obtain an initial indication probability, initial feature weight information, a penalty parameter, and a plurality of training sample data; indicating the probability that the probability representation training sample data belongs to the user category;
the training module 2556 is configured to calculate a temporary class center corresponding to each user class in the at least one user class based on the initial indication probability, the initial feature weight information, and each training sample data in the plurality of training sample data; determining a temporary indication probability according to the temporary category center, the initial feature weight information, the initial indication probability, the penalty parameter and each training sample data; calculating temporary feature weight information by using the temporary indication probability, the initial feature weight information, the temporary category center and each training sample data; and repeating the processes of calculating the temporary category center, determining the temporary indication probability and calculating the temporary characteristic weight information, and stopping training until the variation amplitude of the temporary indication probability is within a preset threshold value to obtain the at least one category center and the characteristic weight information.
In some embodiments of the present invention, the training module 2556 is specifically configured to assign a weight to each subdata in each piece of training sample data by using the initial feature weight information, so as to obtain weighted training sample data; dividing the initial indication probability according to the user categories to obtain a category indication probability set corresponding to each user category; the class indication probability set represents a set of initial indication probabilities corresponding to each training sample data in a user class; calculating a first temporary center parameter corresponding to each user category according to the weighted training sample data and each initial indication probability in the category indication probability set; accumulating the initial indication probabilities in the category indication probability set to obtain a second temporary center parameter corresponding to each user category; and calculating the temporary category center corresponding to each user category according to the first temporary center parameter and the second temporary center parameter.
In some embodiments of the present invention, the training module 2556 is specifically configured to divide the initial indication probability according to training sample data to obtain a sample data indication probability set corresponding to each training sample data; the sample data indication probability set represents a set of initial indication probabilities of training sample data corresponding to each user category; constructing a category parameter vector by using the temporary category center, the initial feature weight information, the penalty parameter and each training sample data corresponding to each user category; calculating the distance between the category parameter vector and the sample data indication probability set to obtain a first indication probability parameter; adjusting each initial indication probability in the sample data indication probability set once or for multiple times to obtain one or more adjusted sample data indication probability sets, and respectively performing distance calculation on the category parameter vector and the one or more adjusted sample data indication probability sets to obtain one or more second indication probability parameters; and taking the first indication probability parameter and the minimum indication probability parameter in the one or more second indication probability parameters as a temporary target comparison result, and obtaining the temporary indication probability according to a sample data indication probability set corresponding to the temporary target comparison result.
In some embodiments of the present invention, the training module 2556 is specifically configured to assign a weight to each subdata in each piece of training sample data by using the initial feature weight information, so as to obtain weighted training sample data; calculating the distance between the training sample data with the weight and the temporary class center to obtain the sample center distance corresponding to each user class; calculating a category parameter element corresponding to each user category according to the sample center distance and the penalty parameter; and forming the category parameter vector by using the category parameter elements corresponding to each user category.
In some embodiments of the invention, the training module 2556 is specifically configured to utilize the initial feature weight information to form the initial feature weight vector; calculating a first characteristic weight parameter by using each training sample data and the initial characteristic weight vector; calculating a second feature weight parameter according to each training data sample, the temporary category center, the temporary indication probability and the initial feature weight vector; the first characteristic weight parameter and the second characteristic weight parameter are subjected to difference to obtain an initial difference value result corresponding to the initial characteristic weight vector; adjusting the initial feature weight information in the initial feature weight vector for one or more times to obtain one or more adjusted feature weight vectors, and further obtaining one or more adjustment difference results corresponding to the one or more adjusted feature weight vectors; and taking the minimum difference result in the initial difference result and the one or more adjustment difference results as a temporary target difference result, and obtaining the temporary feature weight information according to the feature weight vector corresponding to the temporary target difference result.
In some embodiments of the present invention, the training module 2556 is specifically configured to multiply each piece of training sample data by the transpose of each piece of training sample data correspondingly, so as to obtain a training data element corresponding to each piece of training sample data; forming a weight parameter matrix by using the training data elements; and calculating the first characteristic weight parameter by adopting the initial characteristic weight vector, the weight parameter matrix and the transposed vector of the initial characteristic weight vector.
In some embodiments of the present invention, the training module 2556 is specifically configured to construct a weight parameter vector using the each training data sample, the tentative class center, and the tentative indication probability; and multiplying the transposed vector of the initial characteristic weight vector by the weight parameter vector to obtain the second characteristic weight parameter.
In some embodiments of the present invention, the recommending means 255 further comprises: penalty parameter determination module 2557;
the penalty parameter determining module 2557 is configured to perform distance calculation on each training sample data and each category center of the at least one category center, respectively, to obtain at least one distance information corresponding to each training sample data; accumulating the distance information of the at least one distance information with the preset number to obtain a first punishment parameter factor of each training sample data; calculating a second punishment parameter factor of each training sample data according to the next distance information of the distance information with a first preset number and the preset number; making a difference between the second punishment parameter factor and the first punishment parameter factor to obtain a punishment sub-parameter of each training sample data; and averaging the punishment sub-parameters of each training sample data to obtain updated punishment parameters.
Continuing with the exemplary structure of the rendering device 455 provided by the embodiments of the present invention implemented as software modules, in some embodiments, as shown in fig. 3, the software modules stored in the rendering device 455 of the second memory 450 may include:
a receiving module 4551, configured to receive a recommendation result sent by the server; the recommendation result is determined by the server according to the attribute characteristics of the target object; when the function interface receives a recommended information browsing instruction, entering a recommended information presentation interface;
and the result presenting module 4552 is configured to present the recommendation result on the recommendation information presentation interface, so as to complete information recommendation for the target object.
Embodiments of the present invention provide a storage medium storing executable instructions, in which executable information recommendation instructions are stored, which, when executed by a first processor or a second processor, will cause the first processor or the second processor to execute an information recommendation method provided by embodiments of the present invention, for example, the method as shown in fig. 4, 7 and 9.
In some embodiments, the storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims (15)

1. An information recommendation method is applied to a server and comprises the following steps:
acquiring at least one category center corresponding to at least one preset user category, feature weight information and attribute features corresponding to a target object; the characteristic weight information represents the importance degree of the attribute characteristics to the classification of the user categories; the at least one class center is obtained by training the training sample data by the server;
generating data to be clustered according to the attribute characteristics;
determining data to be clustered with weight based on the data to be clustered and the characteristic weight information, and respectively determining at least one category probability that the target object belongs to the at least one user category according to the data to be clustered with weight and the at least one category center;
acquiring recommendation information from a recommended content library according to the at least one category probability;
and sending the recommendation information to a terminal corresponding to the target object.
2. The method according to claim 1, wherein the determining weighted data to be clustered based on the data to be clustered and the feature weight information, and determining at least one category probability that the target object belongs to the at least one user category according to the weighted data to be clustered and the at least one category center respectively comprises:
distributing weights to each subdata in the data to be clustered by using the characteristic weight information to obtain the data to be clustered with weights;
respectively performing distance operation on the weighted data to be clustered and each category center in the at least one category center to obtain at least one category distance information;
and normalizing each category distance information in the at least one category distance information to obtain a normalization result, and calculating the at least one category probability by using the normalization result.
3. The method according to claim 1 or 2, wherein the obtaining recommendation information from a recommended content library according to the at least one category probability comprises:
taking each category probability in the at least one category probability as a content acquisition proportion corresponding to each user category, and acquiring recommended content corresponding to each user category from the recommended content library according to the content acquisition proportion;
and sequencing the recommended contents corresponding to each user category according to the probability of each category to obtain the recommendation information.
4. The method of any of claims 1 to 3, wherein the attribute features comprise: one or more sub-characteristics; the generating of the data to be clustered according to the attribute features comprises:
determining corresponding sub-data for each sub-feature of the one or more sub-features according to a corresponding relation between preset sub-features and the sub-data, and further obtaining one or more sub-data;
and integrating the one or more subdata to obtain the data to be clustered.
5. The method according to any one of claims 1 to 4, wherein before the obtaining at least one category center corresponding to the preset at least one user category, the feature weight information, and the attribute feature corresponding to the target object, the method further comprises:
acquiring initial indication probability, initial characteristic weight information, penalty parameters and a plurality of training sample data; indicating the probability that the probability representation training sample data belongs to the user category;
calculating a temporary class center corresponding to each user class in the at least one user class based on the initial indication probability, the initial feature weight information and each training sample data in the plurality of training sample data;
determining a temporary indication probability according to the temporary category center, the initial feature weight information, the initial indication probability, the penalty parameter and each training sample data;
calculating temporary feature weight information by using the temporary indication probability, the initial feature weight information, the temporary category center and each training sample data;
and repeating the processes of calculating the temporary category center, determining the temporary indication probability and calculating the temporary characteristic weight information, and stopping training until the variation amplitude of the temporary indication probability is within a preset threshold value to obtain the at least one category center and the characteristic weight information.
6. The method according to claim 5, wherein the calculating a temporary class center corresponding to each of the at least one user class based on the initial indication probability, the initial feature weight information and each of the plurality of training sample data comprises:
distributing weights to each subdata in each piece of training sample data by using the initial characteristic weight information to obtain weighted training sample data;
dividing the initial indication probability according to the user categories to obtain a category indication probability set corresponding to each user category; the class indication probability set represents a set of initial indication probabilities corresponding to each training sample data in a user class;
calculating a first temporary center parameter corresponding to each user category according to the weighted training sample data and each initial indication probability in the category indication probability set;
accumulating the initial indication probabilities in the category indication probability set to obtain a second temporary center parameter corresponding to each user category;
and calculating the temporary category center corresponding to each user category according to the first temporary center parameter and the second temporary center parameter.
7. The method according to claim 5, wherein said determining a temporary indication probability according to the temporary class center, the initial feature weight information, the initial indication probability, the penalty parameter and the each training sample data comprises:
dividing the initial indication probability according to training sample data to obtain a sample data indication probability set corresponding to each training sample data; the sample data indication probability set represents a set of initial indication probabilities of training sample data corresponding to each user category;
constructing a category parameter vector by using the temporary category center, the initial feature weight information, the penalty parameter and each training sample data corresponding to each user category;
calculating the distance between the category parameter vector and the sample data indication probability set to obtain a first indication probability parameter;
adjusting each initial indication probability in the sample data indication probability set once or for multiple times to obtain one or more adjusted sample data indication probability sets, and respectively performing distance calculation on the category parameter vector and the one or more adjusted sample data indication probability sets to obtain one or more second indication probability parameters;
and taking the first indication probability parameter and the minimum indication probability parameter in the one or more second indication probability parameters as a temporary target comparison result, and obtaining the temporary indication probability according to a sample data indication probability set corresponding to the temporary target comparison result.
8. The method according to claim 7, wherein said constructing a class parameter vector using the temporary class center, the initial feature weight information, the penalty parameter and each training sample data corresponding to each user class comprises:
distributing weights to each subdata in each piece of training sample data by using the initial characteristic weight information to obtain weighted training sample data;
calculating the distance between the training sample data with the weight and the temporary class center to obtain the sample center distance corresponding to each user class;
calculating a category parameter element corresponding to each user category according to the sample center distance and the penalty parameter;
and forming the category parameter vector by using the category parameter elements corresponding to each user category.
9. The method according to claim 5, wherein said calculating temporary feature weight information using said temporary indication probability, said initial feature weight information, said temporary class center and said each training sample data comprises:
forming the initial feature weight vector by using the initial feature weight information;
calculating a first characteristic weight parameter by using each training sample data and the initial characteristic weight vector;
calculating a second feature weight parameter according to each training data sample, the temporary category center, the temporary indication probability and the initial feature weight vector;
the first characteristic weight parameter and the second characteristic weight parameter are subjected to difference to obtain an initial difference value result corresponding to the initial characteristic weight vector;
adjusting the initial feature weight information in the initial feature weight vector for one or more times to obtain one or more adjusted feature weight vectors, and further obtaining one or more adjustment difference results corresponding to the one or more adjusted feature weight vectors;
and taking the minimum difference result in the initial difference result and the one or more adjustment difference results as a temporary target difference result, and obtaining the temporary feature weight information according to the feature weight vector corresponding to the temporary target difference result.
10. The method according to claim 9, wherein said calculating a first feature weight parameter using said each training sample data and said initial feature weight vector comprises:
correspondingly multiplying each training sample data by the transpose of each training sample data to obtain a training data element corresponding to each training sample data;
forming a weight parameter matrix by using the training data elements;
and calculating the first characteristic weight parameter by adopting the initial characteristic weight vector, the weight parameter matrix and the transposed vector of the initial characteristic weight vector.
11. The method according to claim 9, wherein said calculating a second feature weight parameter according to said each training sample data, said tentative class center, said tentative indication probability and said initial feature weight vector comprises:
constructing a weight parameter vector by using each training data sample, the temporary category center and the temporary indication probability;
and multiplying the transposed vector of the initial characteristic weight vector by the weight parameter vector to obtain the second characteristic weight parameter.
12. The method according to claim 5, wherein after repeating the above processes of calculating the temporary class center information, determining the temporary indication probability and calculating the temporary feature weight information until the variation amplitude of the temporary indication probability is within a preset threshold, stopping training to obtain the at least one class center and the feature weight information, the method further comprises:
respectively performing distance calculation on each training sample data and each category center of the at least one category center to obtain at least one distance information corresponding to each training sample data;
accumulating the distance information of the at least one distance information with the preset number to obtain a first punishment parameter factor of each training sample data;
calculating a second punishment parameter factor of each training sample data according to the next distance information of the distance information with a first preset number and the preset number;
making a difference between the second punishment parameter factor and the first punishment parameter factor to obtain a punishment sub-parameter of each training sample data;
and averaging the punishment sub-parameters of each training sample data to obtain updated punishment parameters.
13. An information recommendation apparatus, comprising:
the acquisition module is used for acquiring at least one category center corresponding to at least one preset user category, characteristic weight information and attribute characteristics corresponding to a target object; the characteristic weight information represents the importance degree of the attribute characteristics to the classification of the user categories; the at least one class center is obtained by training the training sample data by the server;
the data generation module is used for generating data to be clustered according to the attribute characteristics;
the category determination module is used for determining data to be clustered with weights based on the data to be clustered and the characteristic weight information, and respectively determining at least one category probability that the target object belongs to the at least one user category according to the data to be clustered with weights and the at least one category center;
the result generation module is used for acquiring recommendation information from a recommended content library according to the at least one category probability;
and the sending module is used for sending the recommendation information to a terminal corresponding to the target object.
14. A server, comprising:
a first memory for storing executable information recommendation instructions;
a first processor configured to implement the method of any one of claims 1 to 12 when executing the executable information recommendation instructions stored in the first memory.
15. A storage medium having stored thereon executable information recommendation instructions for causing a first processor to perform the method of any of claims 1 to 12 when executed.
CN202010021144.0A 2020-01-09 2020-01-09 Information recommendation method, device, equipment and storage medium Active CN111241360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010021144.0A CN111241360B (en) 2020-01-09 2020-01-09 Information recommendation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010021144.0A CN111241360B (en) 2020-01-09 2020-01-09 Information recommendation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111241360A true CN111241360A (en) 2020-06-05
CN111241360B CN111241360B (en) 2023-03-21

Family

ID=70870525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010021144.0A Active CN111241360B (en) 2020-01-09 2020-01-09 Information recommendation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111241360B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971659A (en) * 2019-10-11 2020-04-07 贝壳技术有限公司 Recommendation message pushing method and device and storage medium
CN112000888A (en) * 2020-08-24 2020-11-27 北京达佳互联信息技术有限公司 Information pushing method and device, server and storage medium
CN114139044A (en) * 2021-10-27 2022-03-04 北京达佳互联信息技术有限公司 Account pushing method, device, server and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980202A (en) * 2010-11-04 2011-02-23 西安电子科技大学 Semi-supervised classification method of unbalance data
CN102609523A (en) * 2012-02-10 2012-07-25 上海视畅信息科技有限公司 Collaborative filtering recommendation algorithm based on article sorting and user sorting
CN103093376A (en) * 2013-01-16 2013-05-08 北京邮电大学 Clustering collaborative filtering recommendation system based on singular value decomposition algorithm
US20140337347A1 (en) * 2013-04-19 2014-11-13 Tencent Technology (Shenzhen) Company Limited Cluster method and apparatus based on user interest
CN106897292A (en) * 2015-12-17 2017-06-27 中国科学院深圳先进技术研究院 A kind of internet data clustering method and system
US20180137137A1 (en) * 2016-11-16 2018-05-17 International Business Machines Corporation Specialist keywords recommendations in semantic space
CN109613485A (en) * 2018-12-03 2019-04-12 中国人民解放军空军工程大学 A kind of Radar Signal Sorting Method based on support vector clustering and gray relation grades
CN109815338A (en) * 2018-12-28 2019-05-28 北京市遥感信息研究所 Relation extraction method and system in knowledge mapping based on mixed Gauss model

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980202A (en) * 2010-11-04 2011-02-23 西安电子科技大学 Semi-supervised classification method of unbalance data
CN102609523A (en) * 2012-02-10 2012-07-25 上海视畅信息科技有限公司 Collaborative filtering recommendation algorithm based on article sorting and user sorting
CN103093376A (en) * 2013-01-16 2013-05-08 北京邮电大学 Clustering collaborative filtering recommendation system based on singular value decomposition algorithm
US20140337347A1 (en) * 2013-04-19 2014-11-13 Tencent Technology (Shenzhen) Company Limited Cluster method and apparatus based on user interest
CN106897292A (en) * 2015-12-17 2017-06-27 中国科学院深圳先进技术研究院 A kind of internet data clustering method and system
US20180137137A1 (en) * 2016-11-16 2018-05-17 International Business Machines Corporation Specialist keywords recommendations in semantic space
CN109613485A (en) * 2018-12-03 2019-04-12 中国人民解放军空军工程大学 A kind of Radar Signal Sorting Method based on support vector clustering and gray relation grades
CN109815338A (en) * 2018-12-28 2019-05-28 北京市遥感信息研究所 Relation extraction method and system in knowledge mapping based on mixed Gauss model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ZHIQIANG ZHAO 等: "Semisupervised Discriminant Feature Learning for SAR Image Category via Sparse Ensemble", 《IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING》 *
张义: "基于深度学习的非受控场景下人耳检测和识别", 《中国博士学位论文全文数据库信息科技辑》 *
黄怡涓 等: "基于深度学习的人脸识别方法研究进展", 《现代计算机》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971659A (en) * 2019-10-11 2020-04-07 贝壳技术有限公司 Recommendation message pushing method and device and storage medium
CN112000888A (en) * 2020-08-24 2020-11-27 北京达佳互联信息技术有限公司 Information pushing method and device, server and storage medium
CN112000888B (en) * 2020-08-24 2024-02-02 北京达佳互联信息技术有限公司 Information pushing method, device, server and storage medium
CN114139044A (en) * 2021-10-27 2022-03-04 北京达佳互联信息技术有限公司 Account pushing method, device, server and storage medium

Also Published As

Publication number Publication date
CN111241360B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN111241360B (en) Information recommendation method, device, equipment and storage medium
CN110781391B (en) Information recommendation method, device, equipment and storage medium
CN111241311B (en) Media information recommendation method and device, electronic equipment and storage medium
CN106355449B (en) User selection method and device
CN105677715B (en) A kind of video recommendation method and device based on multi-user
US10372704B2 (en) Similarity metric relativized to a user's preferences
CN104182449A (en) System and method for personalized video recommendation based on user interests modeling
CN106228386A (en) A kind of information-pushing method and device
US9875294B2 (en) Method and apparatus for classifying object based on social networking service, and storage medium
CN110781377B (en) Article recommendation method and device
Himel et al. Weight based movie recommendation system using K-means algorithm
CN110232154B (en) Random forest-based product recommendation method, device and medium
Marie et al. Boosting schema matchers
CN115422452B (en) Smart home control method, device, equipment and storage medium based on big data
CN108205570A (en) A kind of data detection method and device
CN113536097A (en) Recommendation method and device based on automatic feature grouping
US20160086086A1 (en) Multi-media content-recommender system that learns how to elicit user preferences
CN113613081A (en) Program recommendation method and device based on target program recommendation model
CN111309608B (en) Test case selection method and device, electronic equipment and readable storage medium
Ben-Ameur Subset Selection and the Cone of Factor-Width-k Matrices
CN114971766A (en) Commodity recommendation method and device, equipment, medium and product thereof
CN113393303A (en) Article recommendation method, device, equipment and storage medium
Liu et al. Modeling the effects of individual and group heterogeneity on multi-aspect rating behavior
Zhang et al. Balancing diversity and accuracy of the recommendation system based on multi-objective optimization
CN104333777A (en) Radio and television program making system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40023262

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20221121

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518133

Applicant after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors

Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant