Tag-based data recommendation method, device and equipment and storage medium
By constructing user interest vectors and topic tag vectors, calculating similarity and filtering recommended data, the problem of low recommendation accuracy caused by ignoring tag weights in existing technologies is solved, and higher data recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202310779698.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-06-28
AI Technical Summary
Existing data recommendation methods fail to effectively consider the weight of different tags when recommending insurance training texts to employee users, resulting in low recommendation accuracy.
By acquiring user behavior data and labeling it, user interest vectors and topic tag vectors of the data to be recommended are constructed. Vector similarity is calculated and data is filtered and recommended based on the recommendation coefficient.
It improves the accuracy of data recommendations such as insurance training texts by taking into account tag weights and vector similarity to more comprehensively measure the degree of matching between users and data.
Smart Images

Figure CN116775852B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence technology and financial technology, and in particular to a tag-based data recommendation method, apparatus, electronic device and storage medium. Background Technology
[0002] In the financial services sector, to enhance employees' interest in learning business training knowledge, it is necessary to recommend training materials and data that interest them. Therefore, data recommendation for employees is required.
[0003] Existing data recommendation methods, such as recommending insurance training texts to employee users, or recommending insurance training texts with the same tags as the user to employee users with the same tags, ignore the weight of different tags, resulting in low accuracy of data recommendations such as insurance training texts. Summary of the Invention
[0004] This invention provides a tag-based data recommendation method, apparatus, electronic device, and storage medium, the main purpose of which is to improve the accuracy of data recommendation such as insurance training texts.
[0005] The user's behavior data is obtained, and the user's behavior data is labeled with user interest tags based on a preset tag set to obtain the user's corresponding user interest tags and the user interest weight of each user interest tag.
[0006] When a dataset of a preset type is received, each piece of data to be recommended in the dataset is labeled with a data topic based on the label set, so as to obtain the topic label and the label weight of each topic label corresponding to each piece of data to be recommended.
[0007] A user interest vector is constructed based on the user interest weights of all the user interest tags, and a vector is constructed based on the tag weights of all the topic tags corresponding to each of the data to be recommended, so as to obtain the topic tag vector of each of the data to be recommended;
[0008] Calculate the vector similarity between the user interest vector and each topic tag vector to obtain the recommendation coefficient corresponding to each topic tag vector;
[0009] Based on the recommendation coefficient, all the data to be recommended are filtered, and the filtered data to be recommended is recommended to the user.
[0010] Optionally, the step of tagging the user behavior data with user interests based on a preset tag set to obtain user interest tags corresponding to the user and user interest weights for each user interest tag includes:
[0011] The user behavior data is preprocessed to obtain standard user behavior data;
[0012] The standard user behavior data is converted into a vector to obtain the user behavior vector;
[0013] Feature extraction is performed on the user behavior vector to obtain the user feature vector;
[0014] The first fully connected layer constructed based on the tag set performs feature mapping on the user feature vector to determine the first feature mapping value of each tag in the tag set;
[0015] The first feature mapping value of each label is normalized to obtain the user interest weight of each label;
[0016] The tags corresponding to user interest weights that are greater than a preset weight threshold are determined as the user interest tags.
[0017] Optionally, the step of tagging each piece of data to be recommended in the dataset based on the tag set to obtain the topic tag and the tag weight of each topic tag corresponding to each piece of data to be recommended includes:
[0018] The data to be recommended is converted into a vector to obtain the data vector to be recommended;
[0019] Feature extraction is performed on the data vector to be recommended to obtain a data topic feature vector;
[0020] The second fully connected layer constructed based on the tag set performs feature mapping on the data topic feature vector to determine the second feature mapping value of each tag in the tag set;
[0021] The second feature mapping value of each label is normalized to obtain the label weight of each label;
[0022] The tags with weights greater than the preset weight threshold are identified as the topic tags of the data to be recommended.
[0023] Optionally, constructing a user interest vector based on the user interest weights of all the user interest tags includes:
[0024] All user interest tags and all topic tags are aggregated, and duplicate tags are removed from the aggregated tags to obtain a standard tag set;
[0025] All tags in the standard tag set are combined into a sequence according to a preset tag order to obtain a tag sequence;
[0026] Construct a blank vector using the number of tags in the tag sequence as the vector dimension;
[0027] Obtain the order of each user interest tag in the tag sequence, fill the user interest weights of all user interest tags into the corresponding element positions in the blank vector, and obtain the initial user interest vector;
[0028] The user interest vector is obtained by filling in all missing elements in the initial user interest vector with preset values.
[0029] Optionally, the step of constructing a vector based on the tag weights of all topic tags corresponding to each piece of data to be recommended, to obtain a topic tag vector for each piece of data to be recommended, includes:
[0030] Obtain the order of each topic tag corresponding to the data to be recommended in the tag sequence, fill the tag weights of all topic tags corresponding to the data to be recommended into the corresponding element positions in the blank vector, and obtain the initial data topic vector of the data to be recommended;
[0031] The missing elements in the initial data topic vector are filled with the preset values to obtain the topic tag vector.
[0032] Optionally, calculating the vector similarity between the user interest vector and each of the topic tag vectors to obtain the recommendation coefficient corresponding to each topic tag vector includes:
[0033] The topic tag vector is determined as the target topic tag vector;
[0034] The target element position is obtained by acquiring the positions of elements in both the target topic tag vector and the user interest vector where all elements are zero.
[0035] Delete the elements at all target element positions in the target topic tag vector to obtain the aligned topic tag vector;
[0036] Delete all elements at the target element positions in the user interest vector to obtain the aligned interest tag vector;
[0037] Calculate the vector similarity between the aligned topic tag vector and the aligned interest tag vector to obtain the recommendation coefficient corresponding to the target topic tag vector.
[0038] Optionally, the step of filtering all the data to be recommended based on the recommendation coefficient and recommending the filtered data to the user includes:
[0039] The recommendation coefficient that is greater than the preset recommendation coefficient threshold is determined as the target recommendation coefficient;
[0040] The topic tag vector corresponding to the target recommendation coefficient is determined as the recommended topic tag vector;
[0041] All the recommended topic tag vectors and the corresponding data to be recommended are recommended to the user's preset terminal device.
[0042] To address the above problems, the present invention also provides a tag-based data recommendation device, the device comprising:
[0043] The tagging module is used to acquire user behavior data, tag the user behavior data with user interests based on a preset tag set, and obtain the user interest tags corresponding to the user and the user interest weight of each user interest tag; when receiving a dataset of a preset type to be recommended, the module tags each piece of data to be recommended in the dataset with a data topic based on the tag set, and obtains the topic tag corresponding to each piece of data to be recommended and the tag weight of each topic tag;
[0044] The tag matching module is used to construct a user interest vector based on the user interest weights of all the user interest tags, and to construct a vector based on the tag weights of all the topic tags corresponding to each of the data to be recommended, so as to obtain the topic tag vector of each of the data to be recommended; calculate the vector similarity between the user interest vector and each of the topic tag vectors, and obtain the recommendation coefficient corresponding to each of the topic tag vectors;
[0045] The data recommendation module is used to filter all the data to be recommended based on the recommendation coefficient, and recommend the filtered data to the user.
[0046] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:
[0047] Memory, storing at least one computer program; and
[0048] The processor executes the computer program stored in the memory to implement the tag-based data recommendation method described above.
[0049] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the tag-based data recommendation method described above.
[0050] This invention constructs a user interest vector based on the user interest weights of all user interest tags, and constructs a vector based on the tag weights of all topic tags corresponding to each piece of data to be recommended, thus obtaining a topic tag vector for each piece of data to be recommended. The vector similarity between the user interest vector and each topic tag vector is calculated to obtain a recommendation coefficient corresponding to each topic tag vector. Based on the recommendation coefficient, all the data to be recommended is filtered, and the filtered data is recommended to the user. Compared with the prior art that only uses tags for data recommendation, this invention, based on tags, uses tag weights to construct vectors and calculate vector similarity, which more comprehensively measures the matching degree between users and data, improving the accuracy of data recommendation such as insurance training texts. Therefore, the tag-based data recommendation method, device, electronic device, and readable storage medium proposed in this invention improve the accuracy of data recommendation such as insurance training texts. Attached Figure Description
[0051] Figure 1 This is a flowchart illustrating a tag-based data recommendation method according to an embodiment of the present invention.
[0052] Figure 2 This is a schematic diagram of a tag-based data recommendation device according to an embodiment of the present invention;
[0053] Figure 3 This is a schematic diagram of the internal structure of an electronic device that implements a tag-based data recommendation method according to an embodiment of the present invention;
[0054] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0055] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0056] This invention provides a tag-based data recommendation method. The execution entity of the tag-based data recommendation method includes, but is not limited to, at least one of the following: a server, a terminal, or an electronic device that can be configured to execute the method provided in this application embodiment. In other words, the tag-based data recommendation method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0057] Reference Figure 1 The diagram shown illustrates a flowchart of a tag-based data recommendation method according to an embodiment of the present invention. In this embodiment, the tag-based data recommendation method includes the following steps:
[0058] S1. Obtain user behavior data, and label the user behavior data with user interest tags based on a preset tag set to obtain the user interest tags corresponding to the user and the user interest weight of each user interest tag.
[0059] In this embodiment of the invention, the user can be an employee user who needs to recommend insurance training texts, and the user behavior data is the data of the user's preset operation behavior within a preset time interval.
[0060] Optionally, in this embodiment of the invention, the preset time interval is a time range that is a preset time interval from the current time. The preset operation can be reading, searching, liking, or saving different insurance training texts, and this embodiment of the invention does not limit this.
[0061] Furthermore, in order to determine the user's interests and facilitate data recommendation for the user, the user behavior data is labeled with user interest tags based on a preset tag set to obtain the user interest tags corresponding to the user and the user interest weight of each user interest tag.
[0062] In detail, the method of tagging user behavior data based on a preset tag set to obtain user interest tags corresponding to the user and user interest weights for each user interest tag in the embodiments of the present invention includes:
[0063] The user behavior data is preprocessed to obtain standard user behavior data;
[0064] The standard user behavior data is converted into a vector to obtain the user behavior vector;
[0065] Feature extraction is performed on the user behavior vector to obtain the user feature vector;
[0066] The first fully connected layer constructed based on the tag set performs feature mapping on the user feature vector to determine the first feature mapping value of each tag in the tag set;
[0067] The first feature mapping value of each label is normalized to obtain the user interest weight of each label;
[0068] The tags corresponding to user interest weights that are greater than a preset weight threshold are determined as the user interest tags.
[0069] Data preprocessing in this embodiment includes, but is not limited to, missing value imputation, outlier replacement, feature filtering, and other data preprocessing operations. Furthermore, this embodiment can utilize one-hot algorithms, bag-of-words models, and other methods to convert the data to be recommended into vectors. This embodiment does not limit the method of converting the data into vectors.
[0070] In this embodiment of the invention, deep learning models such as BERT model and convolutional neural network model can be used to extract features from the user behavior vector to obtain user feature vector. The number of output nodes of the first fully connected layer is the same as the number of labels in the label set, and each output node corresponds one-to-one with a label in the label set. After the user feature vector is input into the first fully connected layer, the output value of each output node of the first fully connected layer is the label weight of the corresponding label. In this embodiment of the invention, the SIGMOD function is used to normalize the first feature mapping value.
[0071] In this embodiment of the invention, the preset weight threshold is a real number in the range of (0,1), and preferably, the preset weight threshold is 0.5.
[0072] For example: There are four tags in the tag set: property insurance, life insurance, insurance application, and claim. The user interest weight corresponding to the property insurance tag is 0.8, the user interest weight corresponding to the life insurance tag is 0.3, the user interest weight corresponding to the insurance application tag is 0.6, and the user interest weight corresponding to the claim tag is 0.4. The preset weight threshold is 0.5. Then, the property insurance tag and the insurance application tag are determined as user interest tags.
[0073] S2. When receiving a dataset of a preset type to be recommended, label each piece of data to be recommended in the dataset with a data topic based on the label set, and obtain the topic label and the label weight of each topic label corresponding to each piece of data to be recommended.
[0074] In this embodiment of the invention, the data to be recommended is data that can be recommended to the user. The data to be recommended is of a preset type, which can be text or data type. The data to be recommended can be insurance training text. Furthermore, in order to determine the tag type of each data topic and whether it is suitable for recommendation to the user, each data item in the dataset to be recommended is tagged with a data topic based on the tag set, resulting in a topic tag and a tag weight corresponding to each data item.
[0075] In detail, in this embodiment of the invention, the step of tagging each piece of data to be recommended in the dataset based on the tag set to obtain the topic tag and the tag weight of each topic tag corresponding to each piece of data to be recommended includes:
[0076] The data to be recommended is converted into a vector to obtain the data vector to be recommended;
[0077] Feature extraction is performed on the data vector to be recommended to obtain a data topic feature vector;
[0078] The second fully connected layer constructed based on the tag set performs feature mapping on the data topic feature vector to determine the second feature mapping value of each tag in the tag set;
[0079] The second feature mapping value of each label is normalized to obtain the label weight of each label;
[0080] The tags with weights greater than the preset weight threshold are identified as the topic tags of the data to be recommended.
[0081] In this embodiment of the invention, the data to be recommended can be converted into vectors using methods such as one-hot algorithm and bag-of-words model. This embodiment of the invention does not limit the method of converting into vectors.
[0082] In this embodiment of the invention, deep learning models such as BERT model and convolutional neural network model can be used to extract features from the data vector to be recommended to obtain a data topic feature vector. The number of output nodes of the second fully connected layer is the same as the number of labels in the label set, and each output node corresponds one-to-one with a label in the label set. After the data topic feature vector is input into the second fully connected layer, the output value of each output node of the second fully connected layer is the label weight of the corresponding label. In this embodiment of the invention, the SIGMOD function is used to normalize the first feature mapping value.
[0083] S3. Construct a user interest vector based on the user interest weights of all the user interest tags, and construct a vector based on the tag weights of all the topic tags corresponding to each of the data to be recommended, to obtain the topic tag vector of each of the data to be recommended;
[0084] In order to better represent user interests, a user interest vector is constructed based on the user interest weights of all the user interest tags in this embodiment of the invention.
[0085] In detail, the construction of a user interest vector based on the user interest weights of all the user interest tags in this embodiment of the invention includes:
[0086] All user interest tags and all topic tags are aggregated, and duplicate tags are removed from the aggregated tags to obtain a standard tag set;
[0087] All tags in the standard tag set are combined into a sequence according to a preset tag order to obtain a tag sequence;
[0088] Construct a blank vector using the number of tags in the tag sequence as the vector dimension;
[0089] Obtain the order of each user interest tag in the tag sequence, fill the user interest weights of all user interest tags into the corresponding element positions in the blank vector, and obtain the initial user interest vector;
[0090] The user interest vector is obtained by filling in all missing elements in the initial user interest vector with preset values.
[0091] In this embodiment of the invention, the order of the labels is not limited, and the preset value is not limited to any real number. Preferably, the preset value is 0.
[0092] For example: if the label sequence is [label A, label B, label C, label D], the corresponding blank vector is... There are two user interest labels, A and D. The user interest weight for label A is 0.8, and the user interest weight for label D is 0.7. We fill the first and fourth element positions of the blank vector with 0.8 and 0.7 respectively to obtain the initial user interest vector. Fill the missing elements in the initial user interest vector with 0 to obtain the user interest vector as follows:
[0093] Further, in this embodiment of the invention, the method of constructing a vector based on the tag weights of all topic tags corresponding to each piece of data to be recommended, to obtain a topic tag vector for each piece of data to be recommended, includes:
[0094] Obtain the order of each topic tag corresponding to the data to be recommended in the tag sequence, fill the tag weights of all topic tags corresponding to the data to be recommended into the corresponding element positions in the blank vector, and obtain the initial data topic vector of the data to be recommended;
[0095] The missing elements in the initial data topic vector are filled with the preset values to obtain the topic tag vector.
[0096] For example: If the label sequence is [label A, label B, label C, label D], the corresponding blank vector is... The data A to be recommended has two topic tags, Tag A and Tag C. Tag A has a tag weight of 0.75, and Tag C has a tag weight of 0.85. We fill the first and third element positions of the blank vector with 0.75 and 0.85 respectively, to obtain the initial topic vector of the data A to be recommended. Fill the missing elements in the initial topic vector of the data to be recommended, A, with 0, to obtain the topic tag vector of the data to be recommended, A.
[0097] S4. Calculate the vector similarity between the user interest vector and each topic tag vector to obtain the recommendation coefficient corresponding to each topic tag vector;
[0098] In this embodiment of the invention, in order to measure the degree of fit between the user and the data to be recommended, the vector similarity between the user interest vector and each of the topic tag vectors is calculated to obtain the recommendation coefficient corresponding to each of the topic tag vectors.
[0099] In one embodiment of the present invention, to reduce the dimensionality of vector similarity calculation, it is necessary to compress the user interest vector and the topic tag vector to remove the influence of irrelevant elements. The calculation of the vector similarity between the user interest vector and each topic tag vector to obtain the recommendation coefficient corresponding to each topic tag vector includes:
[0100] The topic tag vector is determined as the target topic tag vector;
[0101] The target element position is obtained by acquiring the positions of elements in both the target topic tag vector and the user interest vector where all elements are zero.
[0102] Delete the elements at all target element positions in the target topic tag vector to obtain the aligned topic tag vector;
[0103] Delete all elements at the target element positions in the user interest vector to obtain the aligned interest tag vector;
[0104] Calculate the vector similarity between the aligned topic tag vector and the aligned interest tag vector to obtain the recommendation coefficient corresponding to the target topic tag vector.
[0105] For example: the target topic tag vector is The user interest vector is The element in both the target topic tag vector and the user interest vector that is zero is located at the second row of the first column. Deleting this element from the second row of the first column of the target topic tag vector yields the aligned topic tag vector. Delete the elements in the second row of the first column of the user interest vector to obtain the aligned interest tag vector. Calculate the aligned topic tag vector Aligning the interest tag vector The vector similarity is used to obtain the recommendation coefficient of the target topic tag vector.
[0106] Optionally, the method for calculating vector similarity in this embodiment of the invention is not limited. Algorithms such as cosine similarity algorithm and modified cosine similarity algorithm can be used to calculate vector similarity. This embodiment of the invention does not limit this method.
[0107] S5. Based on the recommendation coefficient, filter all the data to be recommended, and recommend the filtered data to the user.
[0108] In this embodiment of the invention, in order to select suitable data to recommend to the user, all the data to be recommended are filtered based on the recommendation coefficient, and the filtered data to be recommended is recommended to the user.
[0109] In detail, the step of filtering all the data to be recommended based on the recommendation coefficient and recommending the filtered data to the user in this embodiment of the invention includes:
[0110] The recommendation coefficient that is greater than the preset recommendation coefficient threshold is determined as the target recommendation coefficient;
[0111] The topic tag vector corresponding to the target recommendation coefficient is determined as the recommended topic tag vector;
[0112] All the recommended topic tag vectors and the corresponding data to be recommended are recommended to the user's preset terminal device.
[0113] For example, if the data to be recommended is insurance recommendation text, the insurance recommendation text corresponding to the recommendation topic tag vector is recommended to the user's preset terminal device.
[0114] In one embodiment of the present invention, filtering all the data to be recommended based on the recommendation coefficient and recommending the filtered data to the user includes:
[0115] Arrange all the topic tag vectors in descending order according to their corresponding recommendation coefficients to obtain a topic tag vector sequence;
[0116] The topic tag vectors within a preset first ranking range are filtered, and the data to be recommended corresponding to the filtered topic tag vectors is recommended to the user's preset terminal device.
[0117] In one embodiment of the present invention, filtering all the data to be recommended based on the recommendation coefficient and recommending the filtered data to the user includes:
[0118] The topic tag vector corresponding to the recommendation coefficient that is greater than the preset recommendation coefficient threshold is determined as the initial recommendation vector;
[0119] Arrange all the initial recommendation vectors in descending order of their corresponding recommendation coefficients to obtain the initial recommendation vector sequence;
[0120] The initial recommendation vectors within a preset second ranking range in the initial recommendation vector sequence are selected, and the data to be recommended corresponding to the selected initial recommendation vectors is recommended to the user's preset terminal device.
[0121] Optionally, the preset terminal device in this embodiment of the invention is a terminal device that can receive and display the data to be recommended, including but not limited to: mobile phones, computers, and tablets.
[0122] like Figure 2 The diagram shown is a functional block diagram of the tag-based data recommendation device of the present invention.
[0123] The tag-based data recommendation device 100 of the present invention can be installed in an electronic device. Depending on the functions implemented, the tag-based data recommendation device may include a tag marking module 101, a tag matching module 102, and a data recommendation module 103. The modules described in this invention can also be referred to as units, which are a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0124] In this embodiment, the functions of each module / unit are as follows:
[0125] The tagging module 101 is used to acquire user behavior data, tag the user behavior data with user interests based on a preset tag set, and obtain the user interest tags corresponding to the user and the user interest weight of each user interest tag; when receiving a dataset of a preset type to be recommended, it tags each piece of data to be recommended in the dataset with a data topic based on the tag set, and obtains the topic tag corresponding to each piece of data to be recommended and the tag weight of each topic tag;
[0126] The tag matching module 102 is used to construct a user interest vector based on the user interest weights of all the user interest tags, and to construct a vector based on the tag weights of all the topic tags corresponding to each of the data to be recommended, so as to obtain the topic tag vector of each of the data to be recommended; calculate the vector similarity between the user interest vector and each of the topic tag vectors, and obtain the recommendation coefficient corresponding to each of the topic tag vectors;
[0127] The data recommendation module 103 is used to filter all the data to be recommended based on the recommendation coefficient, and recommend the filtered data to the user.
[0128] In detail, each module in the tag-based data recommendation device 100 described in this embodiment of the invention employs the same methods as described above. Figure 1 The tag-based data recommendation method described herein uses the same technical means and can produce the same technical effect, so it will not be elaborated here.
[0129] like Figure 3 The diagram shown is a schematic representation of the structure of an electronic device that implements the tag-based data recommendation method of the present invention.
[0130] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a tag-based data recommendation program.
[0131] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as code for tag-based data recommendation programs, but also to temporarily store data that has been output or will be output.
[0132] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., tag-based data recommendation programs) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.
[0133] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to enable communication between the memory 11 and at least one processor 10, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus.
[0134] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0135] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault classification circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0136] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device and other electronic devices.
[0137] Optionally, the communication interface 13 may further include a user interface, which may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.
[0138] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0139] The tag-based data recommendation program stored in the memory 11 of the electronic device is a combination of multiple computer programs that, when run in the processor 10, can achieve the following:
[0140] The user's behavior data is obtained, and the user's behavior data is labeled with user interest tags based on a preset tag set to obtain the user's corresponding user interest tags and the user interest weight of each user interest tag.
[0141] When a dataset of a preset type is received, each piece of data to be recommended in the dataset is labeled with a data topic based on the label set, so as to obtain the topic label and the label weight of each topic label corresponding to each piece of data to be recommended.
[0142] A user interest vector is constructed based on the user interest weights of all the user interest tags, and a vector is constructed based on the tag weights of all the topic tags corresponding to each of the data to be recommended, so as to obtain the topic tag vector of each of the data to be recommended;
[0143] Calculate the vector similarity between the user interest vector and each topic tag vector to obtain the recommendation coefficient corresponding to each topic tag vector;
[0144] Based on the recommendation coefficient, all the data to be recommended are filtered, and the filtered data to be recommended is recommended to the user.
[0145] Specifically, the processor 10's implementation method of the above-mentioned computer program can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0146] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0147] Embodiments of the present invention may also provide a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:
[0148] The user's behavior data is obtained, and the user's behavior data is labeled with user interest tags based on a preset tag set to obtain the user's corresponding user interest tags and the user interest weight of each user interest tag.
[0149] When a dataset of a preset type is received, each piece of data to be recommended in the dataset is labeled with a data topic based on the label set, so as to obtain the topic label and the label weight of each topic label corresponding to each piece of data to be recommended.
[0150] A user interest vector is constructed based on the user interest weights of all the user interest tags, and a vector is constructed based on the tag weights of all the topic tags corresponding to each of the data to be recommended, so as to obtain the topic tag vector of each of the data to be recommended;
[0151] Calculate the vector similarity between the user interest vector and each topic tag vector to obtain the recommendation coefficient corresponding to each topic tag vector;
[0152] Based on the recommendation coefficient, all the data to be recommended are filtered, and the filtered data to be recommended is recommended to the user.
[0153] Furthermore, the computer's usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, applications required for at least one function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.
[0154] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0155] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0156] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0157] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0158] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0159] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0160] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0161] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The term "second class" is used to indicate names and does not indicate any specific order.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A tag-based data recommendation method, characterized in that, The method includes: The user's behavior data is obtained, and the user's behavior data is labeled with user interest tags based on a preset tag set to obtain the user's corresponding user interest tags and the user interest weight of each user interest tag. When a dataset of a preset type is received, each piece of data to be recommended in the dataset is labeled with a data topic based on the label set, so as to obtain the topic label and the label weight of each topic label corresponding to each piece of data to be recommended. A user interest vector is constructed based on the user interest weights of all the user interest tags, and a vector is constructed based on the tag weights of all the topic tags corresponding to each of the data to be recommended, so as to obtain the topic tag vector of each of the data to be recommended; Calculate the vector similarity between the user interest vector and each topic tag vector to obtain the recommendation coefficient corresponding to each topic tag vector; Based on the recommendation coefficient, all the data to be recommended are filtered, and the filtered data to be recommended is recommended to the user. The step of calculating the vector similarity between the user interest vector and each topic tag vector to obtain the recommendation coefficient corresponding to each topic tag vector includes: The topic tag vector is determined as the target topic tag vector; Obtain the positions of elements where all elements in the target topic tag vector and the user interest vector are zero, thus obtaining the target element positions. Delete all elements at the target element positions in the target topic tag vector to obtain the aligned topic tag vector. Delete all elements at the target element positions in the user interest vector to obtain the aligned interest tag vector; Calculate the vector similarity between the aligned topic tag vector and the aligned interest tag vector to obtain the recommendation coefficient corresponding to the target topic tag vector.
2. The tag-based data recommendation method as described in claim 1, characterized in that, The step of tagging user behavior data based on a preset tag set to obtain user interest tags corresponding to the user and user interest weights for each user interest tag includes: The user behavior data is preprocessed to obtain standard user behavior data; The standard user behavior data is converted into a vector to obtain the user behavior vector; Feature extraction is performed on the user behavior vector to obtain the user feature vector; The first fully connected layer constructed based on the tag set performs feature mapping on the user feature vector to determine the first feature mapping value of each tag in the tag set; The first feature mapping value of each label is normalized to obtain the user interest weight of each label; The tags corresponding to user interest weights that are greater than a preset weight threshold are determined as the user interest tags.
3. The tag-based data recommendation method as described in claim 1, characterized in that, The step of tagging each piece of data to be recommended in the dataset based on the tag set, to obtain the topic tag and the tag weight of each topic tag, includes: The data to be recommended is converted into a vector to obtain the data vector to be recommended; Feature extraction is performed on the data vector to be recommended to obtain a data topic feature vector; The second fully connected layer constructed based on the tag set performs feature mapping on the data topic feature vector to determine the second feature mapping value of each tag in the tag set; The second feature mapping value of each label is normalized to obtain the label weight of each label; The tags with weights greater than the preset weight threshold are identified as the topic tags of the data to be recommended.
4. The tag-based data recommendation method as described in claim 1, characterized in that, The construction of the user interest vector based on the user interest weights of all the user interest tags includes: All user interest tags and all topic tags are aggregated, and duplicate tags are removed from the aggregated tags to obtain a standard tag set; All tags in the standard tag set are combined into a sequence according to a preset tag order to obtain a tag sequence; Construct a blank vector using the number of tags in the tag sequence as the vector dimension; Obtain the order of each user interest tag in the tag sequence, fill the user interest weights of all user interest tags into the corresponding element positions in the blank vector, and obtain the initial user interest vector; The user interest vector is obtained by filling in all missing elements in the initial user interest vector with preset values.
5. The tag-based data recommendation method as described in claim 4, characterized in that, The step of constructing a vector based on the tag weights of all topic tags corresponding to each piece of data to be recommended, to obtain the topic tag vector of each piece of data to be recommended, includes: Obtain the order of each topic tag corresponding to the data to be recommended in the tag sequence, fill the tag weights of all topic tags corresponding to the data to be recommended into the corresponding element positions in the blank vector, and obtain the initial data topic vector of the data to be recommended; The missing elements in the initial data topic vector are filled with the preset values to obtain the topic tag vector.
6. The tag-based data recommendation method as described in any one of claims 1 to 5, characterized in that, The step of filtering all the data to be recommended based on the recommendation coefficient and recommending the filtered data to the user includes: The recommendation coefficient that is greater than the preset recommendation coefficient threshold is determined as the target recommendation coefficient; The topic tag vector corresponding to the target recommendation coefficient is determined as the recommended topic tag vector; All the recommended topic tag vectors and the corresponding data to be recommended are recommended to the user's preset terminal device.
7. A tag-based data recommendation apparatus for implementing the tag-based data recommendation method as described in any one of claims 1 to 6, characterized in that, The device includes: The tagging module is used to acquire user behavior data, tag the user behavior data with user interests based on a preset tag set, and obtain the user interest tags corresponding to the user and the user interest weight of each user interest tag; when receiving a dataset of a preset type to be recommended, the module tags each piece of data to be recommended in the dataset with a data topic based on the tag set, and obtains the topic tag corresponding to each piece of data to be recommended and the tag weight of each topic tag; The tag matching module is used to construct a user interest vector based on the user interest weights of all the user interest tags, and to construct a vector based on the tag weights of all the topic tags corresponding to each of the data to be recommended, so as to obtain the topic tag vector of each of the data to be recommended; calculate the vector similarity between the user interest vector and each of the topic tag vectors, and obtain the recommendation coefficient corresponding to each of the topic tag vectors; The data recommendation module is used to filter all the data to be recommended based on the recommendation coefficient, and recommend the filtered data to the user.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory that is communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the tag-based data recommendation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the tag-based data recommendation method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Content recommendation method and apparatus
CN104965889A