Similar resource identification method and device, equipment, medium and program product
By constructing the target graph data including resource nodes, label nodes and resource acquisition object nodes, using meta-path walk and node feature processing, the problem of low accuracy of similar resource recognition in the prior art is solved, and matching recognition of resources in the content and acquisition object is achieved.
Patent Information
- Application Number
- CN202510578952.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, the identification of similar resources mainly depends on the resource tag content, and the matching of resource acquisition objects cannot be effectively considered, resulting in low recognition accuracy.
By constructing target graph data, including resource nodes, label nodes and resource acquisition object nodes, metapathic walks and node feature processing, the similarity between resources is determined.
The accuracy of similar resource recognition is improved, so that the identified resources match both the content and the resource acquisition object, improving the recommendation effect.
Smart Images

Figure CN120492726A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, apparatus, device, medium, and program product for identifying similar resources. Background Art
[0002] In the field of resource recommendation, achieving effective recommendations generally requires recommending resources based on the recommended object. If a recommended object performs well for resource 1, and resource 1 and resource 2 are similar, then it can be assumed that the recommended object will also perform well for resource 2. Therefore, identifying similar resources is an urgent problem in this process. Summary of the Invention
[0003] In view of this, the present disclosure provides a method, apparatus, device, medium, and program product for identifying similar resources to solve the problem of identifying similar resources.
[0004] In a first aspect, the present disclosure provides a method for identifying similar resources, the method comprising:
[0005] Obtain target graph data corresponding to the resource recommendation platform, the target graph data including nodes, edges between the nodes, and weights of the edges, the types of the nodes including resource nodes, label nodes, and resource acquisition object nodes, and the resource acquisition objects including objects that have acquired resources on the resource recommendation platform;
[0006] Obtaining node pairs by walking in the target graph data based on the meta-path in the target graph data;
[0007] Processing the node pairs in the target graph data to obtain features of the nodes;
[0008] The similarity between resources in the resource recommendation platform is determined based on the characteristics of the resource nodes to obtain similar resources.
[0009] In a second aspect, the present disclosure provides a device for identifying similar resources, the device comprising:
[0010] An acquisition module is used to acquire target graph data corresponding to the resource recommendation platform, wherein the target graph data includes nodes, edges between the nodes, and weights of the edges. The types of the nodes include resource nodes, label nodes, and resource acquisition object nodes. The resource acquisition objects include objects that have acquired resources on the resource recommendation platform.
[0011] A walking module, configured to walk in the target graph data based on a meta-path in the target graph data to obtain node pairs;
[0012] A node pair processing module, configured to process the node pairs in the target graph data to obtain features of the nodes;
[0013] The similarity determination module is used to determine the similarity between resources in the resource recommendation platform based on the characteristics of the resource nodes to obtain similar resources.
[0014] In a third aspect, the present disclosure provides an electronic device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the method for identifying similar resources of the above-mentioned first aspect or any corresponding embodiment thereof.
[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for identifying similar resources of the above-mentioned first aspect or any corresponding embodiment thereof.
[0016] In a fifth aspect, the present disclosure provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the method for identifying similar resources of the first aspect or any corresponding embodiment thereof.
[0017] The method for identifying similar resources provided by the embodiment of the present disclosure uses the target graph data corresponding to the resource recommendation platform. The target graph data includes nodes, edges between nodes, and edge weights. The types of edges include resource nodes, label nodes, and resource acquisition object nodes. Resource nodes represent resource information in the resource recommendation platform, label nodes represent resource content, and resource acquisition object nodes represent object information associated with resources. Therefore, the target graph data contains both resource content and resource-related object information. After acquiring the target graph data, node pairs are obtained by wandering in the target graph data based on the meta-path in the target graph data, and the node pairs are processed to obtain the characteristics of the nodes. It is precisely because the target graph data contains both resource content and resource-related object information that similar resources determined based on the characteristics of resource nodes can be matched not only in content but also in resource acquisition objects, thereby improving the accuracy of identifying similar resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1is a schematic diagram of an application scenario according to an embodiment of the present disclosure;
[0020] Figure 2 is a flowchart of a method for identifying similar resources according to an embodiment of the present disclosure;
[0021] Figure 3 is a flowchart of another method for identifying similar resources according to an embodiment of the present disclosure;
[0022] Figure 4 is a schematic diagram of target graph data according to an embodiment of the present disclosure;
[0023] Figure 5 is a structural block diagram of a device for identifying similar resources according to an embodiment of the present disclosure;
[0024] Figure 6 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.
[0026] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0027] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0028] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0029] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0030] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0031] For the purpose of the following description, the terms involved in the embodiments of the present disclosure are explained as follows:
[0032] Resource recommendation platform: A platform used for resource recommendation, on which multiple resources can be recommended.
[0033] Resources: Objects used for promotion.
[0034] Resource acquisition object: used to represent the object that has obtained resources on the resource recommendation platform.
[0035] Resource provider: used to represent the object that provides resources on the resource recommendation platform.
[0036] In related technologies, similar resources are generally identified based on their tag content. Specifically, if the tag content is the same, two resources are considered similar. For example, if resource 1 and resource 2 are of the same type, resource 1 and resource 2 are considered similar. For example, if the resources are games, if game 1 and game 2 are of the same type, game 1 and game 2 are considered similar games.
[0037] However, this identification process is relatively coarse-grained and doesn't consider whether the resource acquisition objects associated with the resources match. Continuing with the above example, if Game 1 and Game 2 are of the same genre, but Game 1 is a large-scale game with a higher participation rate among Group 1 players, while Game 2 is a smaller game with a higher participation rate among Group 2 players, then the resource acquisition objects of these two games will differ. If Game 1 and Game 2 are still considered similar, accuracy may be limited.
[0038] Based on this, an embodiment of the present disclosure provides a method for identifying similar resources, including: obtaining target graph data corresponding to a resource recommendation platform, the target graph data including nodes, edges between nodes and edge weights, the types of nodes including resource nodes, label nodes and resource acquisition object nodes, resource acquisition objects including objects that have acquired resources on the resource recommendation platform; wandering in the target graph data based on the meta-path in the target graph data to obtain node pairs; processing the node pairs in the target graph data to obtain node features; determining the similarity between resources in the resource recommendation platform based on the features of the resource nodes to obtain similar resources.
[0039] The similar resources determined by this method can match not only in content but also in resource acquisition objects, thereby improving the recognition accuracy of similar resources.
[0040] As an optional application scenario of the embodiment of the present disclosure, Figure 1 As shown, a user browses resources or promotes resources on the resource recommendation platform through the application of the resource recommendation platform on terminal 101. Accordingly, the resource recommendation platform is deployed on server 102, and terminal 101 is in communication with server 102. Terminal 101 can be a mobile terminal, a computer, etc. Server 102 can be deployed in the cloud, a data center, or an edge computing node, etc. The specific deployment depends on actual needs and is not limited here.
[0041] The resources displayed on terminal 101 can be promoted via text and images, or through recommended objects, such as videos. Taking the promotion of recommended objects as an example, for resource 1 to be promoted, server 102 executes the similar resource identification method described in the embodiments of this disclosure to identify similar resources to resource 1, such as resource 2. It then determines the promotion objects corresponding to resource 2 and feeds these promotion objects to the resource provider of resource 1, prompting the resource provider to promote the resource.
[0042] According to an embodiment of the present disclosure, an embodiment of a method for identifying similar resources is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] In this embodiment, a method for identifying similar resources is provided, which can be used in a resource recommendation platform. Figure 2 is a flow chart of a method for identifying similar resources according to an embodiment of the present disclosure, such as Figure 2 As shown, the process includes the following steps:
[0044] Step S201: Obtain target graph data corresponding to the resource recommendation platform.
[0045] The target graph data includes nodes, edges between nodes, and edge weights. The types of nodes include resource nodes, label nodes, and resource acquisition object nodes. Resource acquisition objects include objects that have acquired resources on the resource recommendation platform.
[0046] The resource recommendation platform can be considered a promotion platform, used to promote resources. For resource providers, they promote their resources on the resource recommendation platform; for resource acquirers, they browse resources on the resource recommendation platform and acquire resources based on their needs.
[0047] The target graph data corresponds to the resource recommendation platform. Different resource recommendation platforms correspond to different target graph data. Of course, the target graph data of the resource recommendation platform will also be updated. Updates to the target graph data of the resource recommendation platform can be scheduled, based on demand, and so on, and there are no restrictions on this.
[0048] The target graph data includes nodes, edges between nodes, and edge weights. Specifically, node types include resource nodes, label nodes, and resource acquisition object nodes. Resource nodes represent resources on the resource recommendation platform. Resources promoted on the resource recommendation platform are labeled according to corresponding labeling rules and have corresponding labels. A resource can correspond to multiple labels, and multiple resources can also have the same label. There is no limitation on the correspondence between resources and labels.
[0049] For example, labeling rules can be determined based on the classification rules of the industry to which the resource belongs. For example, if the resource is a game, its industry is the game industry. Accordingly, the game industry can include three dimensions, namely, game category, game play, and game theme. For example, for Game 1, Game 1 can be labeled according to the above three dimensions, resulting in Label 1 for Game Category 1, Label 2 for Game Play 2, and Label 3 for Game Theme 3. In other words, Game 1 can be associated with multiple labels, and the content of each label is the specific value of the corresponding dimension.
[0050] Resource acquisition object nodes correspond to resource acquisition objects. Resource acquisition objects can be obtained by analyzing interaction data on the resource recommendation platform. Resource acquisition objects have unique identifiers on the resource recommendation platform, and this unique identifier can be used to identify objects that have acquired resources from the resource recommendation platform. After obtaining the resource acquisition object identifiers, the number of resource acquisition object nodes can be calculated based on the number of resource acquisition object identifiers.
[0051] Edges between nodes in the target graph data include edges between resource acquisition target nodes and resource nodes, as well as edges between resource nodes and label nodes. The resource nodes with which the resource acquisition target node has edges can be determined based on the interaction data of the resource acquisition target in the resource recommendation platform. The resource nodes with which the label nodes have edges can be determined based on the resource labels obtained according to labeling rules.
[0052] Edge weights can be determined based on weight setting rules. For example, the weight setting rules specify the weights of resources and tags, as well as the weights corresponding to different types of interaction data. Based on this, the weights of the edges between resource nodes and tag nodes, as well as the weights of the edges between resource acquisition object nodes and resource nodes, can be determined separately. The weights of edges in the target graph data are mainly used to determine the probability of subsequent walks. To strengthen a certain type of tag, the weight of the edge corresponding to that tag can be increased.
[0053] Step S202: Walk in the target graph data based on the meta-path in the target graph data to obtain node pairs.
[0054] The metapath in the target graph data may include a graph representing the relationship between a resource acquisition object node and a resource node, the relationship between a resource node and a tag node, and the relationship between a resource acquisition object node, a resource node, and a tag node. For example, the graph may include a two-step graph between a resource acquisition object node and a resource node, a two-step graph between a resource node and a tag node, and a two-step graph between a resource acquisition object node, a resource node, and a tag node.
[0055] Exemplarily, the meta-path includes: resource node-resource acquisition object node-resource node-resource acquisition object node-resource node; resource node-label node-resource node-label node-resource node; resource acquisition object node-resource node-label node-resource node-resource acquisition object node.
[0056] Of course, the above are only some examples of meta-paths and do not limit the scope of protection of the present disclosure. Optionally, the number of nodes included in the meta-path is not limited to the 5 nodes in the above example, and may also be more nodes, etc.
[0057] After determining the meta-path, we can walk the target graph data based on the meta-path to obtain node pairs. For example, we can walk the heterogeneous graph (target graph data) along the meta-path with a walk length of 10 to obtain node pairs.
[0058] The roaming method can be implemented based on metapath2vec or other methods. There is no limitation on the roaming method here, and it can be set according to actual needs.
[0059] Step S203: Process the node pairs in the target graph data to obtain node features.
[0060] After obtaining the node pairs, the words can be mapped into real-domain vectors based on word embedding to obtain the features of each node. In this step, the node pairs in the target graph data can be processed based on a skip-gram model to obtain the features of each node in the target graph data.
[0061] What needs to be utilized later is the characteristics of the resource nodes. Therefore, the characteristics of the resource nodes can be stored to facilitate the subsequent screening of similar resources.
[0062] It should be noted that the processing method for node pairs is not limited to the examples described above, and other word embedding methods can also be used to implement it, and no limitation is made here.
[0063] Step S204: determining the similarity between resources in the resource recommendation platform based on the characteristics of the resource nodes, and obtaining similar resources.
[0064] For resources in the resource recommendation platform, the characteristics of resource nodes can be obtained. Based on this, the similarity between resources can be calculated, and resources whose similarity meets the preset threshold conditions can be considered similar resources.
[0065] Regarding the calculation method of similarity, cosine distance can be used, or other methods can be used, and there is no limitation on them here.
[0066] The method for identifying similar resources provided in this embodiment uses the target graph data corresponding to the resource recommendation platform. The target graph data includes nodes, edges between nodes, and edge weights. The types of edges include resource nodes, label nodes, and resource acquisition object nodes. Resource nodes represent resource information in the resource recommendation platform, label nodes represent resource content, and resource acquisition object nodes represent object information associated with resources. Therefore, the target graph data contains both resource content and resource-related object information. After acquiring the target graph data, node pairs are obtained by wandering in the target graph data based on the meta-path in the target graph data, and the node pairs are processed to obtain the characteristics of the nodes. It is precisely because the target graph data contains both resource content and resource-related object information that similar resources determined based on the characteristics of resource nodes can be matched not only in content but also in resource acquisition objects, thereby improving the accuracy of identifying similar resources.
[0067] In this embodiment, a method for identifying similar resources is provided, which can be used in a resource recommendation platform. Figure 3 is a flow chart of a method for identifying similar resources according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:
[0068] Step S301: Obtain target graph data corresponding to the resource recommendation platform.
[0069] The target graph data includes nodes, edges between nodes, and edge weights. The types of nodes include resource nodes, label nodes, and resource acquisition object nodes. Resource acquisition objects include objects that have acquired resources on the resource recommendation platform.
[0070] Exemplarily, the above step S301 includes:
[0071] Step S3011: construct initial graph data based on the resources, resource tags, and resource acquisition objects in the resource recommendation platform.
[0072] The initial graph data is used to represent graph data of nodes and edges between nodes. The types of nodes include resource nodes, label nodes, and resource acquisition object nodes. The edges between nodes can be obtained through the association relationships between nodes.
[0073] In some optional implementations, the above step S3011 includes:
[0074] Step a1: Obtain resources and resource tags from the resource recommendation platform.
[0075] Step a2: Obtain an object that has obtained resources on the resource recommendation platform.
[0076] Step a3: Determine the nodes in the initial graph data based on the resources, resource tags, and resource acquisition objects in the resource recommendation platform.
[0077] Step a4: Based on the correspondence between resources and resource labels, and the correspondence between resources and resource acquisition objects, the connection relationship between nodes in the initial graph data is determined to obtain the initial graph data.
[0078] Before resources are promoted on the resource recommendation platform, they must be tagged according to the tagging rules. Accordingly, by recording the tagging information, the resources and their tags on the resource recommendation platform can be obtained. Of course, resources and their tags can also be obtained through other methods, which are not limited here.
[0079] Objects that have obtained resources on the resource recommendation platform can record interaction data on the resource recommendation platform. Since each object that has obtained resources has a unique identifier, the object that has obtained resources on the resource recommendation platform can be identified through the identifier.
[0080] For example, to ensure the richness of the target graph data, if the number of resource acquisition objects does not meet the preset number, objects that have interacted with the resource can also be used as resource acquisition objects, for example, objects that have only browsed but not acquired resources.
[0081] After obtaining the resources, resource labels, and resource acquisition objects from the resource recommendation platform, the nodes in the initial graph data can be determined.
[0082] Resources are associated with their corresponding tags, based on which we can determine the edges between resource nodes and tag nodes. Resources are also associated with resource acquisition objects, based on which we can determine the edges between resource nodes and resource acquisition object nodes. Therefore, we can determine the connection relationships between nodes in the initial graph data, that is, determine the edges between nodes.
[0083] After the above processing, the nodes in the initial graph data and the edges between the nodes can be determined, and accordingly, the initial graph data is determined.
[0084] For example, Figure 4 is a schematic diagram of target graph data according to an embodiment of the present disclosure. Figure 4 The target graph data shown has m resource acquisition object nodes, n resource nodes, and k label nodes. The specific values of m, n, and k depend on the resource recommendation platform and are not limited to them. Figure 4 It is only an example and does not limit the protection scope of the embodiments of the present disclosure.
[0085] The nodes in the initial graph data are obtained based on the resources in the resource recommendation platform, the labels of the resources, and the objects that have obtained the resources, which can ensure the comprehensiveness of the nodes. In addition, the edges between the nodes are determined based on the corresponding relationships between them, which can improve the accuracy of the edges, thereby improving the accuracy of the initial graph data.
[0086] Step S3012: Based on the nodes connected by the edges in the initial graph data, read the weights of the edges in the initial graph data from the graph data configuration file.
[0087] The edges in the initial graph data include a first edge between a resource node and a label node, and a second edge between a resource node and a resource acquisition object node. The graph data configuration file is used to indicate how the weights are determined.
[0088] The graph data configuration file indicates how weights are determined. As described above, the edges in the initial graph data include a first edge between a resource node and a label node, and a second edge between a resource node and a resource acquisition object node. The relationship between the two nodes connected by the first edge is fixed and generally does not change over time. The relationship between the two nodes connected by the second edge is related to the interaction data, which will change over time. Therefore, different weight determination methods can be set in the graph data configuration file to meet the needs of different edges.
[0089] In some optional implementations, step S3012 includes:
[0090] Step b1: Based on the node types of the two nodes connected by the first edge, query the graph data configuration file to obtain the weight of the first edge.
[0091] Step b2: Acquire interaction data corresponding to the two nodes connected by the second edge. The interaction data is used to represent data generated by the interaction between the resource acquisition object and the resource.
[0092] Step b3: query the graph data configuration file based on the interaction data to obtain the weight of the second edge.
[0093] The node type of the two nodes connected by the first edge represents the specific content of the nodes. For example, a resource node represents resource information, and a label node represents the content of the label. The weight mapping relationship between resource information and label content is described in the graph data configuration file. The weight of the first edge is obtained by querying the graph data configuration file.
[0094] The interaction data corresponding to the two nodes connected by the second edge represents the interaction between the resource acquisition target node and the resource node. The graph data configuration file describes the weights corresponding to different interaction situations. Therefore, querying the graph data configuration file based on the interaction data corresponding to the edge can determine the weight of the second edge.
[0095] Because the first and second edges represent different meanings, the first edge represents the relationship between a resource and a label, which can be fixed information, while the second edge represents the relationship between a resource and its acquisition target, which can be dynamic information. Therefore, using different weighting methods for the first and second edges in the graph data configuration file can improve the accuracy of edge weight determination.
[0096] In some optional implementations, the above step b3 includes:
[0097] Step b31: Determine the first interaction event in the interaction data.
[0098] Step b32: query the graph data configuration file to determine the weight corresponding to the first interaction event.
[0099] Step b33: If there are multiple first interaction events, the weights corresponding to the multiple first interaction events are screened to determine the weight of the second edge.
[0100] The interaction data includes first interaction events, including but not limited to browsing, clicking, downloading, and adding to favorites. Different interaction events correspond to corresponding weights. Therefore, the weight of the second edge is obtained by querying the weight corresponding to the first interaction event in the graph data configuration file.
[0101] Since multiple first interaction events occur between two nodes on the same edge during two consecutive target graph data updates, multiple first interaction events can be assigned multiple weights. In this case, the multiple weights can be screened to determine the weight of the second edge.
[0102] For example, if a query yields multiple weights for the same second edge, the maximum weight value can be used as the weight of the second edge. Alternatively, the interaction times of multiple first interaction events can be obtained, and the weight corresponding to the most recent first interaction event can be used as the weight of the second edge. Of course, other methods can also be used to filter the weights corresponding to multiple first interaction events, and this is not limited to any method.
[0103] For the same edge, when there are multiple first interaction events, the weights corresponding to the multiple first interaction events are screened to obtain the weight of the second edge, which can ensure the accuracy of the second edge weight.
[0104] Step S3013: Fuse the read edge weights with the initial graph data to obtain target graph data.
[0105] After determining the weights of the first and second edges, they can be fused with the initial graph data. For example, each weight can be added to the initial graph data after it is determined; alternatively, all weights can be added to the initial graph data all at once after all weights are determined. Alternatively, other methods can be used to fuse the read edge weights with the initial graph data. After fusion, the target graph data is obtained.
[0106] It should be noted that the nodes and edges in the initial graph data and the target graph data are the same. The difference is that the weights of the edges in the initial graph data are empty, while the edges in the target graph data have corresponding weights.
[0107] Step S302: Walk through the target graph data based on the meta-path in the target graph data to obtain node pairs. Figure 2 The description of step S202 of the illustrated embodiment will not be repeated here.
[0108] Step S303: Process the node pairs in the target graph data to obtain node features. Figure 2 The description of step S203 of the illustrated embodiment will not be repeated here.
[0109] Step S304: Determine the similarity between resources in the resource recommendation platform based on the characteristics of the resource nodes and obtain similar resources. Figure 2 The description of step S204 of the illustrated embodiment will not be repeated here.
[0110] The method for identifying similar resources provided in this embodiment constructs initial graph data based on the resources in the resource recommendation platform, the labels of the resources, and the resource acquisition objects. The graph data configuration file indicates the method for determining the weights. On this basis, the weights of the edges read from the graph data configuration file are fused with the initial graph data to obtain the target graph data. This method can improve the efficiency of determining the target graph data.
[0111] In some optional implementations, the above-mentioned method for identifying similar resources may further include:
[0112] Step c1: obtaining a second interaction event between a resource acquisition object and a resource in the resource recommendation platform.
[0113] Step c2: determining a weight corresponding to the second interaction event based on the relationship between the second interaction event and all interaction events between resource acquisition objects and resources in the resource recommendation platform.
[0114] Step c3: updating the graph data configuration file based on the weight corresponding to the second interaction event to obtain an updated configuration file.
[0115] In the graph data configuration file, the weight setting corresponding to the second edge can be set for different interaction events, for example, click corresponds to weight 1, download corresponds to weight 2, browse corresponds to weight 3, and so on. The specific values of weights 1 to 3 can be set based on empirical values, or determined based on the proportion of interaction events in all interaction events. Continuing with the above example, taking download as an example, for resource 1, all interaction events for resource 1 can be obtained, that is, the total number of interaction events and the number of each interaction event can be obtained. Accordingly, the proportion of the download interaction event in the total number of interaction events can be calculated, and this proportion can be used as the value of weight 2 corresponding to the download.
[0116] In a resource recommendation platform, interaction events can occur at any time, which means the proportion of different interaction events can change at any time. Therefore, the weight settings for the second edge in the graph data configuration file can be updated periodically or on demand.
[0117] For example, to obtain second interaction events between resource acquisition objects and resources in a resource recommendation platform, the total number of all second interaction events and the number of individual second interaction events can be counted. Based on this, the proportion of each second interaction event in the total number of second interaction events is calculated and used as the corresponding weight of the second interaction event. Based on this, the graph data configuration file is updated to obtain an updated configuration file.
[0118] It should be noted that, in addition to the proportion described above, the relationship between the second interaction event and all interaction events can also be achieved by other methods, such as adding an adjustment coefficient on the basis of the proportion, etc.
[0119] Since the interaction events between resource acquisition objects and resources may change with time, the weight corresponding to the second interaction event is obtained based on the relationship between the second interaction event and all interaction events. The graph data configuration file is updated on this basis, which can ensure the timeliness of the edge weights in the updated configuration file and further improve the accuracy of the edge weights.
[0120] In some optional implementations, the above-mentioned method for identifying similar resources may further include:
[0121] Step d1, read the configuration information of the meta path in the graph data configuration file.
[0122] Step d2: determining the meta-path in the target graph data based on the configuration information of the meta-path.
[0123] The graph data configuration file also describes meta-path configuration information, such as the number of nodes included in the meta-path, the relationships between nodes, etc. After the target graph data is determined, the meta-path in the target graph data can be determined by querying the configuration information in the graph data configuration file.
[0124] The meta-path in the target graph data is determined through the configuration information of the meta-path in the graph data configuration file, which simplifies the method of determining the meta-path and improves processing efficiency.
[0125] In some optional implementations, the above-mentioned method for identifying similar resources may further include: if the target graph data update timing is reached, updating the target graph data corresponding to the resource recommendation platform to obtain updated target graph data.
[0126] The target graph data update timing includes but is not limited to scheduled or on-demand, which is specifically set according to actual needs. After the target graph data update timing is reached, the target graph data is re-determined according to the description of step S301 above, that is, the updated target graph data is obtained.
[0127] For the target graph data of the resource recommendation platform, updating it according to the update timing can ensure the matching degree between the updated target graph data and the actual situation, so as to ensure the accuracy of subsequent similar resource identification.
[0128] In some optional implementations, the above-mentioned method for identifying similar resources may further include:
[0129] Step e1: receiving a promotion request for a first resource on a resource recommendation platform.
[0130] Step e2: determining a first similar resource of the first resource in the resource recommendation platform based on target graph data corresponding to the resource recommendation platform.
[0131] Step e3: Feedback the recommended objects of the first similar resource to the requester of the promotion request.
[0132] The requester of a promotion request promotes a first resource on the resource recommendation platform. Accordingly, upon receiving the promotion request, the resource recommendation platform can determine the characteristics of the first resource and the characteristics of the remaining resources on the target recommendation platform based on the target graph data. Based on this, the similarity between the characteristics of the first resource and each of the remaining resources can be determined in turn, thereby identifying a first similar resource. Alternatively, a preliminary screening of the resources on the target recommendation platform can be performed, including but not limited to industry, type, etc., to narrow the scope of the similarity calculation, and then the similarity calculation can be performed using the corresponding resource characteristics.
[0133] After similarity calculation, the resource with the highest similarity can be determined as the first similar resource, or there can be multiple first similar resources, for example, 5, 10, etc. After the first similar resource is determined, a recommended object for the first similar resource can be determined and the recommended object can be fed back to the requester.
[0134] It should be noted that, before the recommendation object is fed back, the recommended objects of the first similar resource may be screened and the recommended objects with better recommendation effects may be fed back to the requesting party. The recommendation effect may be determined based on the amount of resources acquired after the recommendation, etc., and this is not limited to any particular method.
[0135] In the application scenario of the resource recommendation platform, after obtaining the promotion request of the first resource, the first similar resource of the first resource is identified through the target graph data, so that the recommended object can be accurately located and the recommended object is fed back to the requester to improve the promotion effect of the first resource.
[0136] As a specific application example of the present disclosure, Figure 1As shown, the advertiser fills in the promotion request of the corresponding resource through the resource recommendation platform in the terminal 101. Correspondingly, after the resource recommendation platform deployed on the server 102 obtains the promotion request, it determines the resources that need to be promoted. The target graph data can be updated in the server 102 first. The resources that need to be promoted are added in this update. After the similar resource identification method shown above is used, the characteristics of the promoted resources and the characteristics of the remaining resources in the resource recommendation platform are obtained. On this basis, the feature similarity is calculated to screen out resources similar to the promoted resources. After the similar resources are determined, the recommendation objects of the similar resources are determined, the recommendation objects are screened, the target recommendation objects are obtained, and the target recommendation objects are fed back to the terminal 101. Correspondingly, the information of the target recommendation object can be displayed on the interface of the terminal 101, so that the advertiser can recommend the promoted resources on the resource recommendation platform through the target recommendation object.
[0137] In this embodiment, a similar resource identification device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details already described will not be repeated here. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0138] This embodiment provides a device for identifying similar resources, such as Figure 5 Shown, including:
[0139] Acquisition module 501 is used to obtain target graph data corresponding to the resource recommendation platform. The target graph data includes nodes, edges between nodes and edge weights. The types of nodes include resource nodes, label nodes and resource acquisition object nodes. Resource acquisition objects include objects that have acquired resources on the resource recommendation platform.
[0140] The walking module 502 is used to walk in the target graph data based on the meta-path in the target graph data to obtain node pairs.
[0141] The node pair processing module 503 is used to process the node pairs in the target graph data to obtain the features of the nodes.
[0142] The similarity determination module 504 is used to determine the similarity between resources in the resource recommendation platform based on the characteristics of the resource nodes, and obtain similar resources.
[0143] In some optional implementations, the acquisition module 501 includes:
[0144] The construction unit is used to construct initial graph data based on the resources, resource tags and resource acquisition objects in the resource recommendation platform.
[0145] A reading unit is used to read the weights of the edges in the initial graph data from a graph data configuration file based on the nodes connected by the edges in the initial graph data, where the edges in the initial graph data include a first edge between a resource node and a label node, and a second edge between a resource node and a resource acquisition object node, and the graph data configuration file is used to indicate a method for determining the weights.
[0146] The fusion unit is used to fuse the read edge weights with the initial graph data to obtain the target graph data.
[0147] In some optional embodiments, the building blocks include:
[0148] The first acquisition subunit is used to acquire resources and resource tags in the resource recommendation platform.
[0149] The second acquisition subunit is used to acquire objects that have acquired resources on the resource recommendation platform.
[0150] The node determination subunit is used to determine the nodes in the initial graph data based on the resources in the resource recommendation platform, the labels of the resources, and the resource acquisition objects.
[0151] The connection determination subunit is used to determine the connection relationship of nodes in the initial graph data based on the corresponding relationship between resources and resource labels, and the corresponding relationship between resources and resource acquisition objects, so as to obtain the initial graph data.
[0152] In some optional embodiments, the reading unit includes:
[0153] The first query subunit is used to query the graph data configuration file based on the node types of the two nodes connected by the first edge to obtain the weight of the first edge.
[0154] The interaction data acquisition subunit is used to acquire the interaction data corresponding to the two nodes connected by the second edge, where the interaction data is used to represent the data generated by the interaction between the resource acquisition object and the resource.
[0155] The second query subunit is used to query the graph data configuration file based on the interaction data to obtain the weight of the second edge.
[0156] In some optional implementations, the first query subunit includes:
[0157] The first interaction event determination subunit is configured to determine a first interaction event in the interaction data.
[0158] The third query sub-unit is used to query the graph data configuration file to determine the weight corresponding to the first interaction event.
[0159] The weight screening subunit is configured to screen the weights corresponding to the plurality of first interaction events to determine the weight of the second edge if there are a plurality of first interaction events.
[0160] In some optional implementations, the similar resource identification device further includes:
[0161] The interaction event acquisition module is used to acquire a second interaction event between a resource acquisition object and a resource in the resource recommendation platform.
[0162] The weight determination module is used to determine the weight corresponding to the second interaction event based on the relationship between the second interaction event and all interaction events between the resource acquisition object and the resource in the resource recommendation platform.
[0163] An updating module is used to update the graph data configuration file based on the weight corresponding to the second interaction event to obtain an updated configuration file.
[0164] In some optional implementations, the similar resource identification device further includes:
[0165] The configuration information reading module is used to read the configuration information of the meta path in the graph data configuration file.
[0166] The meta-path determination module is used to determine the meta-path in the target graph data based on the configuration information of the meta-path.
[0167] In some optional implementations, the similar resource identification device further includes:
[0168] The graph data updating module is used to update the target graph data corresponding to the resource recommendation platform if the target graph data updating timing is reached to obtain the updated target graph data.
[0169] In some optional implementations, the similar resource identification device further includes:
[0170] The request receiving module is used to receive a promotion request for the first resource on the resource recommendation platform.
[0171] The similar resource determination module is used to determine a first similar resource of the first resource in the resource recommendation platform based on target graph data corresponding to the resource recommendation platform.
[0172] The feedback module is used to feed back the recommended object of the first similar resource to the requester of the promotion request.
[0173] The device for identifying similar resources provided by the embodiments of the present disclosure can execute the method for identifying similar resources provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method. For example, since the target graph data contains both resource content and resource-related object information, it is ensured that similar resources determined based on the characteristics of resource nodes can be matched not only in content but also in resource acquisition objects, thereby improving the accuracy of identifying similar resources. The further functional description of each of the above modules and units is the same as that of the corresponding embodiments above, and will not be repeated here.
[0174] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
[0175] The following specific reference Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a memory 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processor 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0176] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a memory 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown, and more or fewer devices may be implemented or possessed instead.
[0177] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the memory 608, or installed from the ROM 602. When the computer program is executed by the processor 601, the above-mentioned functions defined in the method for identifying similar resources of the embodiment of the present disclosure are performed.
[0178] Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0179] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method for identifying similar resources shown in the above embodiment is implemented.
[0180] A portion of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes but is not limited to a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0181] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for identifying similar resources, characterized in that: The method comprises: Obtain target graph data corresponding to the resource recommendation platform, the target graph data including nodes, edges between the nodes, and weights of the edges, the types of the nodes including resource nodes, label nodes, and resource acquisition object nodes, and the resource acquisition objects including objects that have acquired resources on the resource recommendation platform; Obtaining node pairs by walking in the target graph data based on the meta-path in the target graph data; Processing the node pairs in the target graph data to obtain features of the nodes; The similarity between resources in the resource recommendation platform is determined based on the characteristics of the resource nodes to obtain similar resources.
2. The method according to claim 1, characterized in that The step of obtaining target graph data corresponding to the resource recommendation platform includes: Constructing initial graph data based on the resources in the resource recommendation platform, the labels of the resources, and the resource acquisition objects; Based on the nodes connected by the edges in the initial graph data, read the weights of the edges in the initial graph data from a graph data configuration file, wherein the edges in the initial graph data include a first edge between the resource node and the label node, and a second edge between the resource node and the resource acquisition object node, and the graph data configuration file is used to indicate a method for determining the weights; The read edge weights are fused with the initial graph data to obtain the target graph data.
3. The method according to claim 2, characterized in that The constructing of initial graph data based on the resources in the resource recommendation platform, the tags corresponding to the resources, and the resource acquisition object includes: Obtaining resources and tags of the resources in the resource recommendation platform; Obtaining an object that has obtained resources on the resource recommendation platform; Determining nodes in the initial graph data based on resources in the resource recommendation platform, tags of the resources, and resource acquisition objects; Based on the correspondence between the resources and the labels of the resources, and the correspondence between the resources and the resource acquisition objects, the connection relationship between the nodes in the initial graph data is determined to obtain the initial graph data.
4. The method according to claim 2, characterized in that The step of reading the weights of the edges between the directly connected nodes from a graph data configuration file based on the nodes connected by the edges in the initial graph data includes: Based on the node types of the two nodes connected by the first edge, query the graph data configuration file to obtain a weight of the first edge; Acquire interaction data corresponding to two nodes connected by the second edge, where the interaction data is used to represent data generated by the interaction between the resource acquisition object and the resource; The graph data configuration file is queried based on the interaction data to obtain the weight of the second edge.
5. The method according to claim 4, characterized in that The querying the graph data configuration file based on the interaction data to obtain the weight of the second edge includes: Determining a first interaction event in the interaction data; Querying the graph data configuration file to determine a weight corresponding to the first interaction event; If there are multiple first interaction events, the weights corresponding to the multiple first interaction events are screened to determine the weight of the second edge.
6. The method according to claim 5, characterized in that The method further comprises: Acquire a second interaction event between a resource acquisition object and a resource in the resource recommendation platform; determining a weight corresponding to the second interaction event based on a relationship between the second interaction event and all interaction events between resource acquisition objects and resources in the resource recommendation platform; The graph data configuration file is updated based on the weight corresponding to the second interaction event to obtain an updated configuration file.
7. The method according to claim 1, characterized in that The method further comprises: Read the configuration information of the meta path in the graph data configuration file; A meta-path in the target graph data is determined based on the configuration information of the meta-path.
8. The method according to claim 1, characterized in that The method further comprises: If the target graph data update timing is reached, the target graph data corresponding to the resource recommendation platform is updated to obtain updated target graph data.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: receiving a promotion request for the first resource on the resource recommendation platform; Determining, based on target graph data corresponding to the resource recommendation platform, a first similar resource to the first resource in the resource recommendation platform; Feedback the recommended objects of the first similar resource to the requester of the promotion request.
10. A device for identifying similar resources, characterized in that: The device comprises: An acquisition module is used to acquire target graph data corresponding to the resource recommendation platform, wherein the target graph data includes nodes, edges between the nodes, and weights of the edges. The types of the nodes include resource nodes, label nodes, and resource acquisition object nodes. The resource acquisition objects include objects that have acquired resources on the resource recommendation platform. A walking module, configured to walk in the target graph data based on a meta-path in the target graph data to obtain node pairs; A node pair processing module, configured to process the node pairs in the target graph data to obtain features of the nodes; The similarity determination module is used to determine the similarity between resources in the resource recommendation platform based on the characteristics of the resource nodes to obtain similar resources.
11. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the similar resource identification method according to any one of claims 1 to 9 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for identifying similar resources according to any one of claims 1 to 9.
13. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method for identifying similar resources according to any one of claims 1 to 9.