Equipment, devices, and methods for introducing resources and storage media.
Patent Information
- Application Number
- TH2301004351
- Authority / Receiving Office
- TH · TH
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-01-07
- Publication Date
- 2026-08-24
AI Technical Summary
Advertisers often encounter problems when advertising materials do not match the style of the ad slot, resulting in modification or reselection of ad slots, which increases the workload of tedious operations.
By obtaining the element collection of materials and advertising spaces, a node relationship diagram is constructed, matching items are found, and adapted resource identifiers are output, so that users can judge their suitability before uploading materials and avoid modification or reselection caused by incompatibility.
It improves the user's work efficiency, reduces modification or resource reselection problems caused by inappropriate materials, and simplifies the advertising space selection process.
Smart Images

Figure 00000001_0000 
Figure 00000038_0000 
Figure 00000038_0001
Abstract
Description
Resource recommendation method, device, equipment, and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese patent application with application number 202110051017.X and application date of January 14, 2021, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by introduction. Technical Field
[0003] The present application relates to the field of information processing, and is related to, but not limited to, a resource recommendation method and apparatus, device, and storage medium. Background Art
[0004] Currently, Internet websites generally place advertisements to increase their operating income. There are many ways to display advertisements, such as banners, floating animations, slideshows, etc. Advertising materials also have various forms of expression such as pictures, videos and animations. Moreover, advertising materials will also be dynamically adjusted according to schedules, customer requirements, or event arrangements.
[0005] Currently, when advertisers place ads, they need to first select an ad slot and then upload the ad creatives to the ad slot. However, they often encounter problems such as image size mismatch, video length being too long, bit rate mismatch, and other issues that prevent the ad creatives from meeting the style requirements of the ad slot. At this point, advertisers need to modify the creatives or revert to selecting the ad slot. Even after reverting to selecting the ad slot, the problem of the uploaded ad creatives not meeting the style requirements of the ad slot still exists. Therefore, this brings a large amount of tedious workload to advertisers.
[0006] Summary of the Invention
[0007] In view of this, the present application provides a resource recommendation method and apparatus, device, and storage medium to solve at least one problem existing in the related art, which can recommend advertising positions that are suitable for the material to users and improve the user's work efficiency.
[0008] In a first aspect, an embodiment of the present application provides a resource recommendation method, the method comprising:
[0009] Obtaining the elements included in the material to obtain a first element set, and obtaining the elements included in the resource to obtain a second element set;
[0010] Mapping each first element in the first element set to a first node, and mapping each second element in the second element set to a second node;
[0011] Connect an edge between the first node and the second node to construct a node relationship graph;
[0012] In the node relationship graph, searching for a match;
[0013] When a match is found, the resource is used as a resource to be recommended, and the resource identifier of the resource to be recommended is output.
[0014] In a second aspect, an embodiment of the present application provides a resource recommendation device, the device comprising:
[0015] an acquisition unit configured to acquire elements included in the material to obtain a first element set, and acquire elements included in the resource to obtain a second element set;
[0016] a mapping unit configured to map each first element in the first element set to a first node, and to map each second element in the second element set to a second node;
[0017] a construction unit configured to connect an edge between the first node and the second node to construct a node relationship graph;
[0018] A matching unit configured to search for a match in the node relationship graph;
[0019] The output unit is configured to, when a match is found, take the resource as a resource to be recommended and output a resource identifier of the resource to be recommended.
[0020] In a third aspect, an embodiment of the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned resource recommendation method when executing the computer program.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned resource recommendation method when executed by a processor.
[0022] In an embodiment of the present application, a resource recommendation method is provided, which obtains elements included in a material to obtain a first element set, and obtains elements included in a resource to obtain a second element set; maps each first element in the first element set to a first node, and maps each second element in the second element set to a second node; connects edges between the first node and the second node to construct a node relationship graph; in the node relationship graph, searches for a match; when a match is found, uses the resource as a resource to be recommended, and outputs a resource identifier of the resource to be recommended; in this way, before the user uploads the material, it is possible to effectively judge whether the material and the resource are compatible, and recommend the compatible resource to the user as a resource to be recommended, avoiding the user from blindly selecting resources, thereby avoiding the occurrence of material modification or resource reselection caused by the incompatibility of the selected resource with the material to be uploaded, thereby improving the user's work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] FIG1 is a schematic diagram of an optional structure of an information processing system provided in an embodiment of the present application;
[0024] FIG2 is a schematic diagram of an optional structure of an information processing system provided in an embodiment of the present application;
[0025] FIG3 is a schematic diagram of an optional flow chart of a resource recommendation method provided in an embodiment of the present application;
[0026] FIG4 is an optional structural diagram of a node relationship diagram provided in an embodiment of the present application;
[0027] FIG5 is a schematic diagram of an optional flow chart of a resource recommendation method provided in an embodiment of the present application;
[0028] FIG6 is a schematic diagram of an optional flow chart of a resource recommendation method provided in an embodiment of the present application;
[0029] FIG7 is a schematic diagram of an optional structure of a node relationship diagram provided in an embodiment of the present application;
[0030] FIG8 is a schematic diagram of an optional flow chart of a resource recommendation method provided in an embodiment of the present application;
[0031] FIG9 is a schematic diagram of an optional structure of a resource recommendation device provided in an embodiment of the present application;
[0032] FIG10 is a schematic diagram of an optional structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the application will be described in further detail below in conjunction with the accompanying drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but are not intended to limit the scope of the present application.
[0034] In order to better understand the present application, before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0035] 1) Online content consisting of materials, texts, pictures, videos, etc., such as advertising materials.
[0036] 2) Resources: the page display area that can carry materials, such as advertising space.
[0037] 3) Elements: A single piece of content within a resource or a resource. Elements can include text, images, video, audio, and more, depending on their type.
[0038] 4) Attributes, which can characterize the requirements of the elements included in the material, including: type, size, size, etc.
[0039] 5) Attribute requirements, which can characterize the capabilities of the elements that the resource can carry, including: type requirements, dimension requirements, size requirements, etc.
[0040] 5) Node relationship graph: A graph with elements as nodes, where edges connect a first node corresponding to a material element and a second node corresponding to a resource element. When an edge connects a first node and a second node, it indicates that the element corresponding to the first node is compatible with the element corresponding to the second node, meaning that the element corresponding to the second node can carry the element corresponding to the first node. For example, a bipartite graph.
[0041] 6) Bipartite graph: The two nodes associated with each edge in the graph belong to two different node sets.
[0042] 7) Matching, in a subgraph of a node relationship graph, if any two edges in the subgraph do not attach to the same node, the subgraph is called a matching.
[0043] The embodiments of the present application may provide a resource recommendation method, apparatus, device, and storage medium. In practical applications, the resource recommendation method may be implemented by a resource recommendation apparatus, and the functional entities in the resource recommendation apparatus may be collaboratively implemented by hardware resources of a computer device (such as a terminal device, server, or server cluster), such as computing resources such as a processor, and communication resources (such as those used to support various communication methods such as optical cables and cellular communications).
[0044] The resource recommendation method of the embodiment of the present application can be applied to the information processing system shown in FIG1 . The resource recommendation device in the information processing system can determine whether a resource is a resource to be recommended.
[0045] In one example, as shown in Figure 1, the information processing system includes a client 10 and a server 20. Client 10 is installed with an input application APP capable of receiving user input operations or a browser providing an input page. The user can receive user input materials through the input application APP or input page. Server 20 serves as a service for client 10. Server 20 includes resources and is capable of receiving materials sent by client 10, determining whether a resource is a resource to be recommended for the received material, and outputting the recommended resource to client 10. Client 10 and server 20 interact via network 30.
[0046] The server 20 can be implemented as a resource recommendation device that implements a resource recommendation method. The server 20 obtains the elements included in the material to obtain a first element set, and obtains the elements included in the resource to obtain a second element set; maps each first element in the first element set to a first node, and maps each second element in the second element set to a second node; connects edges between the first node and the second node to construct a node relationship graph; searches for a match in the node relationship graph; if a match is found, the resource is used as a resource to be recommended, and the resource identifier of the resource is output, and the resource identifier of the resource is output to the client 10. The client 10 can present the resource identifier of the resource to be recommended to the user through a display.
[0047] In one example, as shown in FIG. 2 , the information processing system only includes a client 40 , and the client 40 is implemented as a resource recommendation device for implementing the resource recommendation method.
[0048] The client receives the material input by the user through the input application APP or input page, and obtains the elements included in the material to obtain a first element set, and obtains the elements included in the resource to obtain a second element set; maps each first element in the first element set to a first node, and maps each second element in the second element set to a second node; connects the edge between the first node and the second node to construct a node relationship graph; searches for a match in the node relationship graph; when a match is found, uses the resource as a resource to be recommended, and presents the resource identifier of the resource to be recommended to the user through a display.
[0049] In combination with the above-mentioned information processing system, this embodiment proposes a resource recommendation method, which can recommend advertising positions that are suitable for the materials to users, thereby improving the user's work efficiency.
[0050] Below, various embodiments of the resource recommendation method, apparatus, device, and storage medium provided in the embodiments of the present application are described in conjunction with the schematic diagram of the information processing system shown in Figure 1 or Figure 2.
[0051] This embodiment provides a resource recommendation method, which is applied to a resource recommendation device, wherein the resource recommendation device may be a computer device or a distributed network of computer devices. The functions implemented by this method can be implemented by a processor in the computer device calling program code. Of course, the program code can also be stored in a computer storage medium. Therefore, the computer device includes at least a processor and a storage medium.
[0052] FIG3 is a schematic diagram of an implementation flow of a resource recommendation method according to an embodiment of the present application. As shown in FIG3 , the method may include the following steps:
[0053] S301. The resource recommendation device obtains elements included in the material to obtain a first element set, and obtains elements included in the resource to obtain a second element set.
[0054] The resource recommendation device receives the material input by the user, and parses the elements in the material to obtain the elements included in the material. Here, the elements in the material are referred to as first elements, and the set consisting of first elements is referred to as a first element set. In an embodiment of the present application, one material corresponds to one first element set. Among them, the type of the first element included in the material includes one or more combinations of the following types: text, picture, audio, video, etc. In one example, the first element set corresponding to material 1 is: text 1, text 2 and video 2. In one example, the first element set corresponding to material 2 is: text 1, text 2, picture 1, picture 2, picture 3, video 1 and video 2.
[0055] The resource recommendation device obtains the elements that the resource can carry and parses them to obtain the elements included in the resource. Here, the elements in the resource are referred to as second elements, and the set composed of second elements is referred to as a second element set. In an embodiment of the present application, one resource corresponds to one second element set. In one example, the second element set corresponding to resource 1 is: title 1, main image, sub-image and video 1. Among them, the type of title is text, the type of main image is picture, the type of sub-image is picture, and the type of video 1 is video. In one example, the first element set corresponding to material 2 is: text 1, text 2, picture 1, picture 2, picture 3, video 1 and video 2.
[0056] S302: The resource recommendation device maps each first element in the first element set to a first node, and maps each second element in the second element set to a second node.
[0057] For example, the first element set includes element 11, element 12, and element 13. Element 11, element 12, and element 13 are mapped one-to-one to first nodes: node s11, node s12, and node s13. Here, node s11, node s12, and node s13 constitute the first node set.
[0058] For example: the second element set includes: element 21, element 22, element 23, element 24 and element 25, and elements 21, element 22, element 23, element 24 and element 25 are mapped one-to-one to second nodes: node s21, node s22, node s23, node s24 and node s25. Here, node s21, node s22, node s23, node s24 and node s25 constitute the second node set.
[0059] S303: The resource recommendation device connects an edge between the first node and the second node to construct a node relationship graph.
[0060] An edge is connected between a first node of a first node set and a second node of a second node set, and the node relationship graph formed is a bipartite graph. In this case, there is no edge between the first node and any other first node, and there is no edge between the second node and any other second node.
[0061] In the embodiment of the present application, an edge is connected between a first node and a second node based on the relationship between the attributes of the element corresponding to the first node and the attribute requirements of the element corresponding to the second node. When the attributes of the element corresponding to the first node meet the attribute requirements of the element corresponding to the second node, an edge is connected between the first node and the second node; when the attributes of the element corresponding to the first node do not meet the attribute requirements of the element corresponding to the second node, an edge is not connected between the first node and the second node.
[0062] In one example, the constructed node relationship diagram is shown in Figure 4, where nodes s11, node s12 and node 13 constitute a first node set, and nodes s21, node s22, node s23, node s24 and node s25 constitute a second node set, and the connected edges include: edges between node s11 and nodes s21, node s23, node s24 and node s25, edges between node s12 and nodes s21, node s22, node s24 and node s25, and edges between node s13 and nodes s21, node s22, node s23, node s24 and node s25.
[0063] S304: The resource recommendation device searches for a match in the node relationship graph.
[0064] After obtaining the node relationship graph, a subgraph is searched in the node relationship graph based on a matching algorithm, so that any two edges in the searched subgraph are not attached to the same node. The subgraph is called a match.
[0065] In the embodiment of the present application, the matching algorithm used for searching for a match may include: Maximum Flow or Hungarian Algorithm.
[0066] In the embodiment of the present application, there is no limitation on the matching algorithm used for search and matching.
[0067] In one example, for the node relationship diagram shown in Figure 4, the first element set includes: element 11, element 12 and element 13, and the second element set includes: element 21, element 22, element 23, element 24 and element 25. Correspondingly, the first node in the first node set includes: node s11, node s12 and node 13, and the second node in the second node set includes: node s21, node s22, node s23, node s24 and node s25. The matches found include: node s11-node s23, node S12-node S25, node S13-node S21.
[0068] In one example, the first element set includes: element 11, element 12, and element 13. The second element set includes: element 21, element 22, element 23, element 24, and element 25. Correspondingly, the first nodes in the first node set include: node s11, node s12, and node 13, and the second nodes in the second node set include: node s21, node s22, node s23, node s24, and node s25. The matches found based on the node relationship graph composed of the first nodes in the first node set and the second nodes in the second node set include: node s11-node s23, node s13-node s25.
[0069] S305 : When a match is found, the resource recommendation device takes the resource as a resource to be recommended and outputs a resource identifier of the resource to be recommended.
[0070] When a match is found in the node relationship diagram corresponding to the resource, the resource recommendation device determines that the resource is the resource to be recommended, obtains the resource identifier of the resource, and outputs the resource identifier of the resource to be recommended to present to the user, so that the user can know that the presented resource can carry the material.
[0071] In actual applications, the resource recommendation device can implement steps S301 to S304 for a material and multiple resources, determine a recommendable resource from the multiple resources, and output the resource identifier of the determined recommendable resource to the user. Each resource corresponds to a node relationship graph. When a match is found in the node relationship graph, the resource corresponding to the node relationship graph is considered to be a resource to be recommended and can host the current material. When no match is found in the node relationship graph, the resource corresponding to the node relationship graph is considered not to be a resource to be recommended and cannot host the current material.
[0072] In one example, the material uploaded by the user is Material 1, and the resources provided by the resource provider include: Resource 1, Resource 2, and Resource 3. Based on the elements of Material 1 and the elements of Resource 1, Node Relationship Graph 1 is obtained, and a match is found in Node Relationship Graph 1: Match 1. Based on the elements of Material 1 and the elements of Resource 2, Node Relationship Graph 2 is obtained, and no match is found in Node Relationship Graph 2. Based on the elements of Material 1 and the elements of Resource 3, Node Relationship Graph 3 is obtained, and a match is found in Node Relationship Graph 3: Match 2. Therefore, it is considered that Resource 1 and Resource 3 can carry Material 1, and Resource 1 and Resource 3 can be recommended to the user.
[0073] When the user learns about resources that can carry the material, that is, can adapt to the material, and the resources include multiple resources, the user can select the target resource for displaying the material from the multiple resources based on resource information such as billing and location of each resource.
[0074] In actual applications, when the resources to be recommended determined by the resource recommendation device include multiple resources, the resource information such as billing and location of each resource to be recommended can be obtained, the recommendation degree of each resource can be calculated based on the resource information, and the recommendation degree of each resource to be recommended can be output at the same time as the resource identifier of the resource to be recommended.
[0075] The resource recommendation method provided in the embodiment of the present application obtains the elements included in the material to obtain a first element set, and obtains the elements included in the resource to obtain a second element set; maps each first element in the first element set to a first node, and maps each second element in the second element set to a second node; connects edges between the first node and the second node to construct a node relationship graph; searches for a match in the node relationship graph; when a match is found, uses the resource as a resource to be recommended, and outputs a resource identifier of the resource to be recommended; in this way, before the user uploads the material, it is possible to effectively judge whether the material and the resource are compatible, and recommend the compatible resource to the user as a resource to be recommended, avoiding the user from blindly selecting resources, thereby avoiding the occurrence of material modification or resource reselection caused by the incompatibility of the selected resource with the material to be uploaded, thereby improving the user's work efficiency.
[0076] In some embodiments, as shown in FIG5 , the implementation of S303 includes:
[0077] S3031. Obtain attributes of the first element and attribute requirements of the second element.
[0078] The attributes of the first element include type and element parameters. Type includes text, image, video, and other representations of the element's style, while element parameters represent the element's dimensions. For text, element parameters include length. For image, element parameters include one or more combinations of dimensions, size, and resolution. For video, element parameters include one or more combinations of aspect ratio, size, bitrate, and duration.
[0079] The attribute requirements for the second element include: type requirements and parameter requirements. Type requirements include: the style of elements that can be carried by resources such as books, pictures, and videos, and parameter requirements indicate the specific requirements for the style of the carried elements. When the type requirement is text, the parameter requirements include: length. When the type requirement is picture, the parameter requirements include: one or more combinations of dimensions, size, and resolution. When the type requirement is video, the parameter requirements include: one or more combinations of aspect ratio, size, bit rate, and duration.
[0080] S3032. According to the attribute requirements of the first element and the second element, establish a connection edge between the corresponding first node and the corresponding second node to construct the node relationship graph.
[0081] After determining the attributes of each first element in the material and the attribute requirements of each second element in the resource, determine whether each first element matches each second element, and connect edges between the first and second nodes corresponding to the matching first and second elements, respectively, to obtain a node relationship graph. In some embodiments, the implementation of S3032 includes: traversing the attributes of each first element and the attribute requirements of each second element, determining element pairs whose attribute requirements match the attributes; and connecting edges between the first and second nodes corresponding to the first and second elements in the element pairs, respectively, to obtain a node relationship graph.
[0082] In one example, for the node relationship diagram shown in FIG4 , the first element set includes: element 11, element 12, and element 13, and the second element set includes: element 21, element 22, element 23, element 24, and element 25. Correspondingly, the first node in the first node set includes: node s11, node s12, and node 13, and the second node in the second node set includes: node s21, node s22, node s23, node s24, and node s25. The attributes of element 11, element 12, and element 13 are respectively compared with the attribute requirements of element 21, the attribute requirements of element 22, the attribute requirements of element 23, the attribute requirements of element 24, and the attribute requirements of element 25 to determine element pairs whose attribute requirements match the attributes, wherein, The determined element pairs include: element 11 and element 21, element 11 and element 23, element 11 and element 24, element 11 and element 25, element 12 and element 21, element 12 and element 22, element 12 and element 24, element 12 and element 25, element 13 and element 21, element 13 and element 22, element 13 and element 23, element 13 and element 24, element 13 and element 25; the connected edges include: the edge between node s11 and node s21, node s23, node s24 and node s25, the edge between node s12 and node s21, node s22, node s24 and node s25, and the edge between node s13 and node s21, node s22, node s23, node s24 and node s25.
[0083] Here, first nodes corresponding to different first elements are not connected by edges, and second nodes corresponding to different second elements are not connected by edges, so that the obtained node relationship graph is a bipartite graph.
[0084] In some embodiments, the attributes of each first element and the attribute requirements of each second element are traversed to determine an element pair whose attribute requirements match the attributes, including: taking each first element as a reference element, performing the following processing: comparing the attributes of the reference element with the attribute requirements of each second element respectively; searching for the second element whose attribute requirements match the attributes of the reference element as a touch element, and obtaining an element pair including the reference element and the touch element.
[0085] Here, when traversing the attributes of each first element and the attribute requirements of each second element, each first element can be used as a reference element to determine the element pair corresponding to each reference element. Here, the other element in the element pair other than the reference element is called the reaching element.
[0086] In one example, for the node relationship diagram shown in Figure 4, the first element set includes: element 11, element 12 and element 13, and the second element set includes: element 21, element 22, element 23, element 24 and element 25. Correspondingly, the first nodes in the first node set include: node s11, node s12 and node 13, and the second nodes in the second node set include: node s21, node s22, node s23, node s24 and node s25; first, taking element 11 as the reference element, determine whether the attributes of element 11 are consistent with the attribute requirements of each second element: element 21, element 22, element 23, element 24 and element 25. After determining the element pair corresponding to element 11, then take element 12 as the reference element to determine the element pair corresponding to element 12, and so on, until all the first elements are used as reference elements and all the element pairs corresponding to the first elements are obtained.
[0087] In some embodiments, the attribute includes: type, and correspondingly, the attribute requirement includes: type requirement. At this time, the second element whose attribute requirement matches the attribute of the first element is the touch element, including: finding at least one target second element whose type requirement is the same as the type of the target first element; and determining the touch element among the at least one target second element.
[0088] In an embodiment of the present application, when the resource recommendation device determines the element pair corresponding to the reference element based on the reference element, it first searches for a second element that matches the reference element in type based on the type requirement of the second element. In one example, the first element set includes: element 11, element 12, and element 13, and the second element set includes: element 21, element 22, element 23, element 24, and element 25. When determining the element pair corresponding to element 11, based on the fact that the type of element 11 is text, the type requirement of element 21 is text, the type requirement of element 22 is text, the type requirement of element 23 is picture, the type requirement of element 24 is picture, and the type requirement of element 25 is video, the target second elements determined include: element 21 and element 22.
[0089] After determining the target second element, a reaching element is determined in at least one target second element. The method for determining the reaching element in at least one target element includes one of the following:
[0090] Determination method 1: Determine all target second elements as touch elements.
[0091] Determination method 2: The target second element that can completely carry the target first element is the reaching element.
[0092] In the case of determination method 1, all target second elements are directly determined as touch elements. In one example, as in the above example, the determined target second elements include: element 21 and element 22, and element 21 and element 22 are touch elements.
[0093] When the determination method is determination method two, the touch element is determined in the at least one target second element, including: calculating the fitness between the target first element and each target second element according to the element parameters of the target first element and the parameter requirements of each target second element in the at least one target second element; and determining the target second element whose fitness meets the set fitness range as the touch element.
[0094] Here, the degree of fit between the reference element and each target second element is determined based on the element parameter of the reference element and the parameter requirements of each target second element.
[0095] The calculation method of fitness may vary depending on the type.
[0096] In one example, when the type is text, the calculation formula for the adaptability is as shown in formula (1):
[0097] (1-(|length-avgLength| / avgLength))*100 Formula (1)
[0098] Where length is the length of the reference element (i.e., the text element in the source material), and avgLength represents the parameter requirements for the target second element. In practical applications, the parameter requirements for the target second element may include a minimum length and a maximum length. In this case, avgLength can be the midpoint between the minimum and maximum length requirements.
[0099] In one example, when the type is picture, if the element parameters of the reference element and the parameter requirements of the target second element are exactly the same, the adaptability is considered to be 100, otherwise it is 0. Here, strict requirements are imposed on the pictures in the material and the pictures in the resources, so that the resources can be effectively utilized while displaying the material.
[0100] In one example, when the type is picture, when the error between the element parameter of the reference element and the parameter requirement of the target second element is less than the set error, the adaptability is considered to be 100, otherwise it is 0.
[0101] In one example, when the type is video, the calculation formula for the adaptability is as shown in formula (2):
[0102] (bitRate / maxBitRate+size / maxSize+duration / maxDuration) / 3*100 formula (2);
[0103] Among them, bitRate is the bit rate of the reference element, i.e. the material element, maxBitRate is the maximum bit rate required by the target second element, size is the size of the reference element, i.e. the material element, maxSize is the maximum size required by the target second element, duration is the duration of the reference element, i.e. the material element, and maxDuration is the maximum duration required by the target second element.
[0104] In the embodiment of the present application, after calculating the degree of fit between the reference element and the target second element, a determination is made as to whether the degree of fit is within a set fit range. If the degree of fit is within the set fit range, the corresponding target second element is considered a reaching element, and the reference element and the target second element form an element pair.
[0105] The adaptability range may be greater than or equal to 20. In practical applications, the adaptability range may be set according to actual needs.
[0106] In an embodiment of the present application, when the first element and the second element are of different types, the two do not match, and the corresponding first node and the corresponding second node are unreachable. When the first element and the second element are of the same type and the fitness between the two does not satisfy the fitness range, the two do not match, and the corresponding first node and the corresponding second node are unreachable. When the first element and the second element are of the same type and the fitness between the two satisfies the fitness range, the two match, and the corresponding first node and the corresponding second node are reachable, connected as an edge.
[0107] In some embodiments, before S304, the method further includes:
[0108] The degree of fit between the first node and the second node connected by the edge, and the corresponding first element and the corresponding second element, is marked as the weight of the corresponding edge; correspondingly, the implementation of S304 includes: searching for a match in the node relationship graph according to the weight of the edge.
[0109] The resource recommendation device determines the degree of compatibility between the reference element and each target second element based on the element parameters of the reference element and the parameter requirements of each target second element. The calculation method for the degree of compatibility may vary depending on the type. The calculation of the degree of compatibility can be referred to the above description and will not be repeated here.
[0110] After obtaining the degree of fit between the elements corresponding to the two nodes connected by each edge, the degree of fit is marked as the weight of the edge. At this time, a match is found in the node relationship graph based on the edges between the nodes in the node relationship graph and the weights of each edge. The matching algorithms used to find matches based on edges and edge weights may include: Kuhn–Munkres (KM) algorithm, maximum flow algorithm, etc. In the embodiments of the present application, there is no limitation on the matching algorithm used to find matches.
[0111] In some embodiments, after S305, as shown in FIG6 , the process further includes:
[0112] S306, determining a target edge included in the matching;
[0113] S307 : Establish an association relationship between the first element represented by the first node connected by the target edge and the second element represented by the second node, and output the association relationship.
[0114] After finding a match in the node relationship graph, the resource recommendation device determines all the edges included in the match, establishes a connection relationship between the first element and the second element corresponding to the first node and the second node connected by each edge, and outputs the connection relationship so that the user can know which materials in the material can be displayed in a resource, and specifically where they are displayed in the resource.
[0115] Below, the resource recommendation method provided in the embodiment of the present application is further explained by taking an advertising scenario in which the resource is an advertising space as an example.
[0116] Here, we first introduce the KM algorithm.
[0117] The KM algorithm can be used to solve the optimal weighted matching problem of bipartite graphs.
[0118] A bipartite graph is a special type of graph whose vertices can be divided into two independent sets U and V, such that all edges connect a vertex in U and a vertex in V. In other words, edges originating from a vertex in U only connect to V, not to U itself. The same applies to V.
[0119] A matching is a subgraph M of a bipartite graph G where any two edges in the edge set of M do not have a common vertex. In other words, it is a set of edges that do not have a common vertex.
[0120] The optimal weighted matching of a bipartite graph is to find a matching on a given weighted bipartite graph so that the sum of the weights of all matching edges is maximized.
[0121] In one example, as shown in FIG7 , a weighted bipartite graph 701 includes two sets: U and V, where nodes A and B belong to set U, and nodes a and b belong to set V. The weights of the edges between the nodes are shown in FIG7 . The KM algorithm is used to find the best match for the weighted bipartite graph 301. The matching result is shown in FIG7 , including edge 702, where edge 702 includes the edge between Ab and the edge between Ba, and the maximum weight is 10 + 20 = 30. Here, the weight of the other matches (Aa, Bb, weight = 100 + (-101) = -1) in the weighted bipartite graph 701 shown in FIG7 is -1, which is less than 30.
[0122] The execution process of the KM algorithm used in the embodiment of the present application includes:
[0123] Initialize the value of the feasible top index, and for each vertex in set U, perform the following operations: a) Use the Hungarian algorithm to find a matching in the equal subgraph, b) If no augmenting path is found, modify the value of the feasible top index, and repeat steps a) and b) until a complete matching of the equal subgraph is found.
[0124] In the ad slot scenario, ad slot elements and material elements are abstracted as vertices in two sets: ad slot elements are in set U, and material elements are in set V. The edge between ad slot elements and material elements indicates whether the material element meets the requirements of the ad slot element. The weight of the edge represents the degree to which the material element meets the requirements of the ad slot element. The higher the requirements, the higher the weight. At the same time, there are no edges between ad slot elements or between material elements. This constructs a weighted bipartite graph between ad slots and materials. On this weighted bipartite graph, the KM algorithm can be used to find the matching with the highest weight, that is, to find the material element that best meets the requirements for each element in the ad slot.
[0125] The resource recommendation method provided in the embodiment of the present application may be shown in FIG8 , including:
[0126] S801 , user 81 submits material to resource recommendation device 82 .
[0127] Here, users submit a collection of materials to the resource recommendation device, which can be any number of text messages, pictures and videos (each text is considered a material element, and the same applies to pictures and videos).
[0128] S802 : The resource recommendation device 82 pulls advertisement slots from the advertisement slot pool 83 .
[0129] The resource recommendation device pulls a set of ad slots from the target ad slot pool. Each ad slot has a different style and is composed of one or more ad slot elements, including text fields, image fields, and video fields.
[0130] S803: The resource recommendation device 82 calculates the degree of adaptability.
[0131] The resource recommendation device 82 calculates the degree of compatibility between each element in the material and each element in the ad slot.
[0132] S804 : The resource recommendation device 82 constructs a weighted bipartite graph.
[0133] The resource recommendation device 82 outputs a weighted bipartite graph of material-advertising slots based on the calculated degree of suitability.
[0134] S805: The resource recommendation device 82 searches for a match.
[0135] The resource recommendation device performs KM matching on the weighted bipartite graph. If the match is successful, it means that there is a material element that is suitable for this ad position and it is the optimal match.
[0136] S806: The resource recommendation device 82 outputs a result set.
[0137] The resource recommendation device 82 outputs a combination of material element and advertisement slot element to the user 81 based on the matching.
[0138] Here, the resource recommendation device combines the matching material elements and ad slots into a result set and outputs the result set.
[0139] In the embodiment of the present application, the calculation rules for the weight corresponding to the edge connecting a material element and an ad slot element, that is, the degree of compatibility between the material element and the ad slot element, may include:
[0140] 1. The weight value is normalized between 0 and 100. An extremely small weight (for example, -2 to the power of 20) indicates that the corresponding material element does not meet the requirements of the ad slot element, and the two elements are unreachable.
[0141] 2. Different types of material elements and ad placement elements are UNREACHABLE.
[0142] 3. For elements of the same type, the attributes of elements that do not meet the attribute requirements are UNREACHABLE. The compatibility calculation method for elements that meet the requirements is as follows:
[0143] For text-type elements: the weight of a material element whose length is closer to the average value required by the ad slot element is higher. In one example, the calculation formula for the adaptability is shown in formula (1):
[0144] (1-(|length-avgLength| / avgLength))*100 formula (1);
[0145] Where length is the length of the text element in the material, and avgLength| is the middle value between the minimum and maximum lengths required for the text element in the ad slot.
[0146] For image elements: the width and height of the material element strictly meet the requirements of the ad slot element, and the adaptability is 100.
[0147] For video elements: The aspect ratio of the material element strictly meets the requirements of the ad slot element; the closer the material element's bit rate, size, and duration are to the maximum requirements of the ad slot element, the higher the score. At this time, the average of the scores of multiple different attributes is taken to obtain the final adaptability.
[0148] In actual applications, for image elements, when the aspect ratio of the material element and the advertising element is consistent, the material element can be considered to be consistent with the advertising element.
[0149] In one example, as shown in formula (2), the scores of different attributes are averaged to obtain the weight:
[0150] (bitRate / maxBitRate+size / maxSize+duration / maxDuration) / 3*100 formula (2);
[0151] Among them, bitRate is the bit rate of the material element, maxBitRate is the maximum bit rate required by the ad slot element, size is the size of the material element, maxSize is the maximum size required by the ad slot element, duration is the duration of the material element, and maxDuration is the maximum duration required by the ad slot element.
[0152] Based on the above rules, a weighted bipartite graph can be constructed for an ad slot and a material set. The KM algorithm can be run on the bipartite graph to obtain the matching result.
[0153] In one example, the elements of ad slot A are shown in Table 1, and the elements of the material uploaded by the user are shown in Table 2.
[0154] Table 1. Example of elements in Ad Space A
[0155]
[0156] Table 2. Example of elements of material a
[0157]
[0158] Taking each element in ad slot A as a vertex in the first set and each element in material a as a vertex in the second set, the weighted bipartite graph formed by the vertices in the first set and the vertices in the second set is shown in Table 3, where UN represents unreachable.
[0159] Table 3. Weighted bipartite graph composed of ad slot A and material a
[0160]
[0161] Using the KM algorithm, the maximum weight matching of the weighted bipartite graph shown in Table 3 is obtained as follows:
[0162] Main title - Text 2, Subtitle - Text 1, Main image - Picture 3, Sub image - Picture 1, Main video - Video 2.
[0163] FIG9 is a schematic diagram of an implementation flow of a resource recommendation device according to an embodiment of the present application. As shown in FIG9 , the device 900 includes:
[0164] The acquisition unit 901 is configured to acquire elements included in the material to obtain a first element set, and acquire elements included in the resource to obtain a second element set;
[0165] A mapping unit 902 is configured to map each first element in the first element set to a first node, and map each second element in the second element set to a second node;
[0166] A construction unit 903 is configured to connect an edge between the first node and the second node to construct a node relationship graph;
[0167] A matching unit 904 is configured to search for a match in the node relationship graph;
[0168] The output unit 905 is configured to, when a match is found, take the resource as a resource to be recommended and output a resource identifier of the resource to be recommended.
[0169] In some embodiments, the construction unit 903 is further configured to:
[0170] Obtaining attributes of the first element and attribute requirements of the second element;
[0171] According to the attribute requirements of the first element and the second element, a connection edge is established between the corresponding first node and the corresponding second node to construct the node relationship graph.
[0172] In some embodiments, the construction unit 903 is further configured to:
[0173] Traversing the attributes of each first element and the attribute requirements of each second element, and determining element pairs whose attribute requirements match the attributes;
[0174] Edges are connected between the first node and the second node corresponding to the first element and the second element in the element pair, respectively, to obtain a node relationship graph.
[0175] In some embodiments, the construction unit 903 is further configured to:
[0176] With the first element of each element as the reference element, perform the following processing:
[0177] Comparing the attributes of the reference element with the attribute requirements of each second element respectively;
[0178] The search attribute requirement is that the second element that matches the attribute of the reference element is a touch element, and an element pair including the reference element and the touch element is obtained.
[0179] In some embodiments, the construction unit 903 is further configured to:
[0180] Searching for at least one second target element whose type requirement is the same as that of the reference element; the attribute includes: the type, and the attribute requirement includes: the type requirement;
[0181] The reaching element is determined in the at least one second target element.
[0182] In some embodiments, the construction unit 903 is further configured to:
[0183] Calculating the degree of fit between the reference element and each second target element according to the element parameter of the reference element and the parameter requirement of each second target element in the at least one second target element; the attribute further includes: the element parameter, and the attribute requirement includes: the parameter requirement;
[0184] The second target element whose fitness meets the set fitness range is determined as the touched element.
[0185] In some embodiments, the apparatus 900 further includes: a marking unit configured to mark the degree of fit between the first node and the second node connected by the edge, and the first element and the second element corresponding thereto, as a weight of the corresponding edge;
[0186] Correspondingly, the matching unit 904 is further configured as follows:
[0187] According to the weight of the edge, a match is found in the node relationship graph.
[0188] In some embodiments, the apparatus 900 further includes an association unit configured to:
[0189] Determining a target edge included in the matching;
[0190] An association relationship is established between a first element represented by a first node connected by the target edge and a second element represented by a second node, and the association relationship is output.
[0191] It should be noted that the resource recommendation device provided in the embodiment of the present application includes the various units included, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0192] The description of the above device embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0193] It should be noted that, in the embodiment of the present application, if the above-mentioned resource recommendation method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the relevant technology. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0194] Correspondingly, an embodiment of the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the program, the steps of the resource recommendation method provided in the above embodiment are implemented. The electronic device can be either a client or a server.
[0195] Correspondingly, an embodiment of the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the resource recommendation method provided in the above embodiment are implemented.
[0196] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0197] It should be noted that Figure 10 is a schematic diagram of a hardware entity of an electronic device according to an embodiment of the present application. As shown in Figure 10, the electronic device 1000 includes: a processor 1001, at least one communication bus 1002, at least one external communication interface 1004, and a memory 1005. The communication bus 1002 is configured to enable connection and communication between these components. In one example, the electronic device 1000 also includes: a user interface 1003, wherein the user interface 1003 may include a display screen, and the external communication interface 1004 may include a standard wired interface and a wireless interface.
[0198] The memory 1005 is configured to store instructions and applications executable by the processor 1001, and can also cache data to be processed or processed by the processor 1001 and various modules in the electronic device (for example, image data, audio data, voice communication data and video communication data), which can be implemented through flash memory (FLASH) or random access memory (RAM).
[0199] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific properties, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific properties, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0200] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0201] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some attributes can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0202] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0203] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0204] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0205] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0206] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
DEPCT661. A method for resource recommendation comprising: obtaining elements included in the material to obtain the first set of elements, and obtaining elements included in the resource to obtain the second set of elements; mapping each first element in the first set of elements to the first node, and mapping each second element in the second set of elements to the second node; forming edges connecting the first and second nodes to construct a graph of nodes' relationship; querying the matches in the graph of nodes' relationship; and responding to the queryed matches, using the resource as the resource to be recommended, and outputting the resource identifier of the recommended resource.2.The method of claim 1, in which the formation of an edge connecting the first and second nodes to construct a graph of nodes, involves: obtaining the attributes of the first element and the attributes of the second element; and the formation of an edge connecting the first node and its corresponding second node based on the attributes of the first element and the attributes of the second element to construct a graph of nodes.The method of claim 2, which involves constructing edges connecting the first node and its corresponding second node based on the attributes of the first element and the attribute specifications of the second element to construct a graph of nodes, includes: transcribing the attributes of the first element and the attribute specifications of the second element to determine element pairs whose attribute specifications correspond to the attributes; and constructing edges connecting the first node corresponding to the first element in each element pair and the second node corresponding to the second element in each element pair to obtain a graph of nodes.The method of claim 3, which involves transcribing the attributes of the first element and the attribute specifications of the second element to determine element pairs whose attribute specifications correspond to the combined attributes; using each first element as a reference element to perform the following operations: comparing the attributes of the reference element with the attribute specifications of each second element; and querying for one or more second elements whose attribute specifications correspond to the attributes of the reference element as one or more accessible elements, to obtain each element pair consisting of the reference element and each accessible element.The method of claim 4, where attributes consist of types, and attribute specifications consist of type specifications, and a query for one or more second elements whose attribute specifications correspond to the attributes of the reference element as one or more accessible elements, consists of: a query for at least one second target element whose type specifications are the same as the type of the reference element; and the determination of at least one accessible element from among the second target elements.6.The method of claim 5, where the attribute is comprised of additional element parameters, and the attribute specification is comprised of parameter specifications; where the definition of an accessible element from among at least one second target element is comprised of: calculation, based on the element parameters of the reference element and the parameter specifications of each element of at least one second target element, the matching degree between the reference element and the second target element; the use of the second target element whose matching degree corresponds to the matching degree range defined as an accessible element.7.Any one of the methods of claims 1 through 6 that includes: annotating the level of the matching between each first element and each element of the second element as the weight of the edges connecting the first node corresponding to the first element and the second node corresponding to the second element; where the query for matching in the node relationship graph includes: overflow tracing for matching in the node relationship graph based on the weight of the edges.
8. Any one of the methods of claims 1 through 6 that includes: determining one or more target edges included in the matching; establishing a relation between the first and second elements represented by the first and second nodes connected by each target edge, respectively; and outputting the relation. 9.The resource recommendation machine comprises: a retrieval unit configured to obtain elements included in the material to obtain the first set of elements, and to obtain elements included in the resource to obtain the second set of elements; a mapping unit configured to map each first element in the first set of elements to the first node and to map each second element in the second set of elements to the second node; a constructing unit configured to create edges connecting the first and second nodes to construct a graph of nodes; a matching unit configured to query for matches in the graph of nodes; and an output unit configured to, in response to the query match, use the resource as the resource to be recommended and output the resource identifier of the recommended resource.10.The instrument of claim 9, in which the constructor is further configured to: obtain the attributes of the first element and the attribute specifications of the second element; and construct edges which connect the first node and its corresponding second node according to the attributes of the first element and the attribute specifications of the second element to construct a graph of relationships between nodes.
11. The instrument of claim 10, in which the constructor is further configured to: traverse the attributes of the first element and the attribute specifications of the second element to determine element pairs whose attribute specifications correspond to the attributes; and construct edges which connect the first node corresponding to the first element in each element pair and the second node corresponding to the second element in each element pair to obtain a graph of relationships between nodes.12.The instrument of claim 11, in which the constructor is further configured, shall: use each first element as a reference element to perform operations: comparing the attributes of the reference element with the attribute specifications of each second element; and search for one or more second elements whose attribute specifications correspond to the attributes of the reference element as one or more accessible elements, in order to obtain each pair of elements which comprises the reference element and each accessible element.
13. The instrument of claim 12, in which the constructor is further configured, shall: search for at least one second target element whose type specification is the same as the type of the reference element, where the attribute specification contains a type specification, and the attribute contains a type; and determine the accessible element from among at least one second target element.14.The instrument of claim 13, where the constructor is further configured to: calculate the matching degree between a reference element and a second target element, based on the element parameters of the reference element and the parameter specifications of at least one of the second target elements, where the attributes are further combined with the element parameters, and the attribute specifications are combined with the parameter specifications; and use the second target element whose matching degree corresponds to the defined matching degree range as the 15th accessible element.Any machine of claims 9 through 14 that includes, in addition, an annotation unit configured to annotate the level of matching between each first and second element as an edge weight connecting the first node corresponding to the first element and the second node corresponding to the second element; where the matching unit is further configured to query the matchings in the node relation graph based on edge weights.
16. Any machine of claims 9 through 14 that includes, in addition, a relation unit configured to: determine one or more target edges included in the matching; and create relational relationships between the first and second elements represented by the first and second nodes, respectively, connected by each target edge, and output relational relationships.17.A computer device which consists of memory, a processor, and computer programs stored in memory and executable on the processor, where the processor is configured to execute the computer programs to perform any of the methods for introducing resources under claims 1 through 8.
18. Storage media on which computer programs are stored which, when executed by the processor, perform any of the methods for introducing resources under claims 1 through 8;