Method, device, storage medium and electronic device for generating a relationship topology graph
By generating a relational topology graph, calculating video similarity, and optimizing node positions, the problem of low recommendation accuracy and unintuitive display in existing technologies is solved, achieving accurate recommendation and intuitive display of user groups and similar videos.
Patent Information
- Application Number
- CN202211649236.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-12-21
AI Technical Summary
Existing recommendation methods cannot make accurate recommendations based on video characteristics and user preferences, resulting in low recommendation accuracy and abstract algorithm logic, which cannot intuitively show the relationship between user groups and similar videos.
By acquiring a collection of all videos rated by the target object, calculating video similarity, constructing a visual relationship topology graph, and using a graph layout algorithm to optimize node positions, the association between user groups and similar videos is displayed.
It improves the accuracy of recommendations, displays an intuitive relationship between user groups and similar videos, and solves the problems of low recommendation accuracy and abstract algorithm logic.
Smart Images

Figure CN115827914B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent recommendation, in particular to a method and device for generating a relationship topology graph, a storage medium and an electronic device. BACKGROUND
[0002] The recommendation method of the related art is completed by means of the collaborative idea, without the need to provide information of a recommended video to the system, but cannot make a recommendation directly according to the video characteristics and user preferences, thereby resulting in a low accuracy of the recommendation, and the algorithm logic is relatively abstract, and the association relationship between user groups and the similarity relationship between similar videos cannot be intuitively displayed.
[0003] In view of the above problems, no effective solution has been proposed so far. SUMMARY
[0004] The embodiments of the present application provide a method and device for generating a relationship topology graph, a storage medium and an electronic device, to at least solve the technical problem that the association relationship between user groups and the similarity relationship between similar videos cannot be intuitively displayed due to the fact that the related art cannot make a recommendation according to the video characteristics and user preferences, thereby resulting in a low accuracy of the recommendation, and the algorithm logic is relatively abstract.
[0005] According to an aspect of the embodiments of the present application, a method for generating a relationship topology graph is provided, comprising: obtaining a first video set of all scored target objects; calculating the similarity of each first video in the first video set to a target video, and finding a second video set of a predetermined number of videos from the first video set, which satisfy a preset requirement in terms of the similarity to the target video; obtaining a first relationship between each object in an object set and the target object, and a second relationship between the target video and the second video set; and constructing a visual relationship topology graph according to the first relationship and the second relationship, wherein the relationship topology graph at least includes a node corresponding to a video in the second video set with the highest similarity to the target video.
[0006] Optionally, after the visual relationship topology graph is constructed according to the first relationship and the second relationship, the method further comprises: determining the distribution positions of each node in the relationship topology graph, and calling a graph layout algorithm to simulate each node at each distribution position as a different atom to optimize the relationship topology graph, wherein the nodes and the atoms are in one-to-one correspondence.
[0007] Optionally, the graphical layout algorithm is called to simulate each node at each distribution position as a different atom to optimize the relationship topology of the different atoms, including: determining repulsion between two atoms in an iteration process, and attraction between two nodes connected to each other; synthesizing the repulsion and the attraction to determine the speed of each atom, and determining the distance each atom should move at each iteration in the iteration process through the speed; iterating a target number of times until the distance between each atom meets a preset condition.
[0008] Optionally, the similarity between each first video in the first video set and the target video is calculated, including: obtaining a historical period, and an object set that the first video in the first video set and the target video have evaluated together; determining a first evaluation value of a target object on the first video and a first average evaluation value, and a second evaluation value on the target video and a second average evaluation value; and determining the similarity between the first video and the target video according to the first evaluation value, the second evaluation value, the first average evaluation value, and the second average evaluation value.
[0009] Optionally, the similarity between the first video and the target video is determined according to the first evaluation value, the second evaluation value, the first average evaluation value, and the second average evaluation value, including: determining a first difference between the first evaluation value and the second average evaluation value, and a second difference between the second evaluation value and the second average evaluation value; and determining the similarity according to the first difference and the second difference.
[0010] Optionally, the similarity is determined according to the first difference and the second difference, including: obtaining a first product of the first difference and the second difference, and determining a first absolute value corresponding to the first difference and a second absolute value corresponding to the second difference; obtaining a second product of the first absolute value and the second absolute value; and obtaining the similarity according to a ratio of the first product and the second product, wherein the greater the ratio, the higher the similarity.
[0011] Optionally, the similarity between each first video in the first video set and the target video is calculated, including: obtaining a historical period, and an object set that the first video in the first video set and the target video have evaluated together; determining a first evaluation text content of a target object on the first video and a second evaluation text content on the target video; and determining the similarity based on the first evaluation text content and the second evaluation text content.
[0012] Optionally, the similarity is determined based on the first evaluation text content and the second evaluation text content, including: calling a text similarity recognition algorithm to convert the first evaluation text content and the second evaluation text content into a first vector and a second vector, respectively; calculating a cosine similarity between the first vector and the second vector, and determining the similarity based on the cosine similarity, wherein the greater the cosine similarity, the higher the similarity.
[0013] Optionally, the determining the similarity based on the first evaluation text content and the second evaluation text content comprises: segmenting the first evaluation text content and the second evaluation text content into a first sequence string and a second sequence string respectively, wherein the first sequence string comprises a plurality of first single character strings, and the second sequence string comprises a plurality of second single character strings; calculating a first hash value corresponding to each first single character string in the first sequence string to obtain a first hash value array; calculating a second hash value corresponding to each second single character string in the second sequence string to obtain a second hash value array; and determining a covariance between the first hash value array and the second hash value array, wherein the greater the absolute value of the covariance, the higher the similarity.
[0014] Optionally, the visualized relationship topology graph comprises a radar chart.
[0015] According to another aspect of the embodiments of the present application, a device for generating a relationship topology graph is further provided, comprising: a first obtaining module configured to obtain a first video set in which a target object has scored; a calculating module configured to calculate a similarity between each first video in the first video set and a target video, and find a second video set from the first video set, in which a predetermined number of videos satisfy a preset requirement in terms of the similarity to the target video; a second obtaining module configured to obtain a first relationship between each object in an object set and the target object, and a second relationship between the target video and the second video set; and a determining module configured to construct a visualized relationship topology graph based on the first relationship and the second relationship, wherein the relationship topology graph at least comprises a node corresponding to a video in the second video set having the highest similarity to the target video.
[0016] According to another aspect of the embodiments of the present application, a non-volatile storage medium is further provided, comprising: a storage medium comprising a stored program, wherein the program, when executed, controls a device in which the storage medium is located to perform any one of the methods for generating a relationship topology graph.
[0017] According to another aspect of the embodiments of the present application, an electronic device is further provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement any one of the methods for generating a relationship topology graph.
[0018] In the embodiment of the present application, the way of determining the video set according to the similarity, constructing the visual relationship topology graph is adopted, the first video set scored by all the target objects is obtained; the similarity of each first video in the first video set and the target video is calculated, the second video set with the similarity meeting the preset requirement is found out from the first video set; the first relationship between each object in the object set and the target object, and the second relationship between the target video and the second video set are obtained; the visual relationship topology graph is constructed according to the first relationship and the second relationship, the purpose of improving the accuracy of recommended videos is achieved, thereby realizing the technical effect of intuitively displaying the association relationship between the user groups and the similarity relationship between the similar videos, and further solving the technical problems of being unable to intuitively display the association relationship between the user groups and the similarity relationship between the similar videos due to the related technologies being unable to make recommendations according to the video characteristics and user preferences, and the algorithm logic being relatively abstract. BRIEF DESCRIPTION OF DRAWINGS
[0019] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0020] Figure 1 is a flow diagram of a method for generating a relationship topology graph according to an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a radar chart according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a device structure for generating a relationship topology graph according to an embodiment of the present application;
[0023] Figure 4 is a schematic block diagram of an example electronic device 400 according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and in the above description of the drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0026] According to an embodiment of the present application, a method for generating a relationship topology graph is provided. It should be noted that the steps shown in the flowchart of the 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 herein can be executed in an order different from that shown herein.
[0027] Figure 1 A method for generating a relationship topology graph according to an embodiment of the present application, as shown in Figure 1 includes the following steps:
[0028] Step S102, obtaining a first video set of all scored target objects;
[0029] Step S104, calculating the similarity of each first video in the first video set and the target video, and finding a second video set of a predetermined number of videos from the first video set that satisfy the preset requirements in similarity with the target video;
[0030] It should be noted that the preset rule means that the videos are sorted according to the similarity, and the predetermined number of videos are selected from high to low.
[0031] Step S106, obtaining the first relationship between each object in the object set and the target object, and the second relationship between the target video and the second video set;
[0032] Step S108, constructing a visual relationship topology graph according to the first relationship and the second relationship, wherein the relationship topology graph at least includes a node corresponding to the video in the second video set with the highest similarity to the target video.
[0033] It can be understood that when the predetermined number is K, the second video set can be represented by N(u, i) to represent the set of K videos.
[0034] In the embodiments of the present application, the video set is determined according to the similarity, so as to construct the relationship topology graph. The first video set scored by all the target objects is obtained. The similarity between each first video in the first video set and the target video is calculated. A second video set with a predetermined number of videos satisfying the preset requirement in similarity to the target video is found from the first video set. The first relationship between each object in the object set and the target object, and the second relationship between the target video and the second video set are obtained. The visual relationship topology graph is constructed according to the first relationship and the second relationship, so as to improve the accuracy of recommended videos, and to visually display the association relationship between the user groups and the similarity relationship between the similar videos, thereby solving the technical problems that the related technologies cannot make recommendations according to the video characteristics and user preferences, and the association relationship between the user groups and the similarity relationship between the similar videos cannot be visually displayed due to the low accuracy of recommendations and the abstract algorithm logic.
[0035] In some optional embodiments of the present application, after the visual relationship topology graph is constructed according to the first relationship and the second relationship, the method further includes: determining the distribution positions of each node in the relationship topology graph, calling a graph layout algorithm to simulate each node at each distribution position as different atoms to optimize the relationship topology graph, wherein the nodes and the atoms are one-to-one corresponding.
[0036] It should be noted that the graph layout algorithm is the FR algorithm.
[0037] As an optional implementation, calling the graph layout algorithm to simulate each node at each distribution position as different atoms to optimize the relationship topology graph includes: determining the repulsive force between two atoms in the iteration process and the attractive force between two nodes connected to each other; synthesizing the repulsive force and the attractive force to determine the speed of each atom, and determining the distance each atom should move at each iteration in the iteration process through the speed; iterating a target number of times until the distance between each atom satisfies a preset condition.
[0038] It should be noted that the preset condition is that the ideal layout effect is achieved between each atom.
[0039] It can be understood that the number of iterations is set according to the layout effect.
[0040] In an example embodiment of the present application, the similarity between each first video in the first video set and the target video is calculated by: obtaining a set of objects that are evaluated by both the first video and the target video in a historical period; determining a first evaluation value of the target object to the first video and a first average evaluation value, and a second evaluation value to the target video and a second average evaluation value; and determining the similarity between the first video and the target video according to the first evaluation value, the second evaluation value, the first average evaluation value and the second average evaluation value.
[0041] In an optional implementation, the similarity between the first video and the target video is determined according to the first evaluation value, the second evaluation value, the first average evaluation value and the second average evaluation value, including: determining a first difference between the first evaluation value and the second average evaluation value, and a second difference between the second evaluation value and the second average evaluation value; and determining the similarity according to the first difference and the second difference.
[0042] In an optional implementation, the similarity is determined according to the first difference and the second difference, including: obtaining a first product of the first difference and the second difference, and determining a first absolute value corresponding to the first difference and a second absolute value corresponding to the second difference; obtaining a second product of the first absolute value and the second absolute value; and obtaining the similarity according to a ratio of the first product and the second product, wherein the greater the ratio, the higher the similarity.
[0043] In some optional embodiments of the present application, the similarity between each first video in the first video set and the target video is calculated by: obtaining a set of objects that are evaluated by both the first video and the target video in a historical period; determining a first evaluation text content of the target object to the first video and a second evaluation text content to the target video; and determining the similarity based on the first evaluation text content and the second evaluation text content.
[0044] In some optional embodiments of the present application, the similarity is determined based on the first evaluation text content and the second evaluation text content, including: calling a text similarity recognition algorithm to convert the first evaluation text content and the second evaluation text content into a first vector and a second vector respectively; calculating a cosine similarity between the first vector and the second vector, and determining the similarity based on the cosine similarity, wherein the greater the cosine similarity, the higher the similarity.
[0045] It should be noted that the algorithm for converting text content into a vector includes but is not limited to the word2vec algorithm.
[0046] It can be understood that the similarity of the video can also be determined according to the text content of the video evaluation, and the text content is converted into a vector, so as to achieve the quantization of the text content according to the vector.
[0047] In some optional embodiments of the present application, the similarity is determined based on the first evaluation text content and the second evaluation text content, including: the first evaluation text content and the second evaluation text content are respectively divided into a first sequence string and a second sequence string, wherein the first sequence string includes a plurality of first single character strings, and the second sequence string includes a plurality of second single character strings; a first hash value corresponding to each first single character string in the first sequence string is calculated to obtain a first hash value array; a second hash value corresponding to each second single character string in the second sequence string is calculated to obtain a second hash value array; and a covariance between the first hash value array and the second hash value array is determined, wherein the greater the absolute value of the covariance, the higher the similarity.
[0048] It can be understood that the similarity of the video can also be determined according to the text content of the video evaluation, the text content is divided into a sequence string, the covariance between the hash value arrays is determined, and the similarity of the video is determined according to the covariance, so that the text content is quantified according to the covariance.
[0049] As an optional implementation, the visual relationship topology diagram includes a radar chart.
[0050] The principle of the FR algorithm is introduced as follows:
[0051] (1) Set the distribution position of the initial node;
[0052] (2) Calculate the repulsive force between two nodes in the local area at each iteration;
[0053] (3) Calculate the attractive force between the nodes connected by the edge at each iteration;
[0054] (4) After the repulsive force and the attractive force are integrated, the speed of each node is determined, and the distance that each node should move at each iteration is determined by the speed;
[0055] (5) Iteration target number, the distance that each node moves will gradually decrease until the ideal layout effect is achieved.
[0056] It should be noted that the number of iterations is set according to the layout effect, and the size of the moving distance and the length of the running time are respectively proportional to the ideal degree of the layout effect.
[0057] In the above steps, it is assumed that the height of the region is H, the width is W, the position of the initial node is G=(V, E), V represents the set of nodes, and E represents the edges between the nodes. Each node has two layout parameters, position pos and displacement affected by the resultant force. The calculation method of the parameter variables used by the algorithm is as follows:
[0058] The area of the display region is:
[0059] area=W*H;
[0060] wherein the height is H and the width is W.
[0061] Optimal distance between nodes:
[0062]
[0063] wherein |V| represents the number of nodes in the graph and area represents the area of the region.
[0064] Geometric distance between nodes u and v:
[0065]
[0066] wherein pos represents the position information and u and v represent the displacement information of nodes u and v, respectively.
[0067] Attractive force between adjacent nodes:
[0068]
[0069] wherein d represents the geometric distance between nodes u and v and k represents the optimal distance between nodes.
[0070] Repulsive force between nodes:
[0071]
[0072] wherein d represents the geometric distance between nodes u and v and k represents the optimal distance between nodes.
[0073] Based on the above, a relationship topology graph is obtained.
[0074] Figure 2 is a schematic diagram of a radar chart according to an embodiment of the present application, as shown in Figure 2 , the radar chart can be generated by using a radar chart visualization algorithm and a force guiding algorithm of network topology layout.
[0075] Figure 3 is a structural schematic diagram of a device for generating a relationship topology graph according to an embodiment of the present application, as shown in Figure 3 , the device comprises:
[0076] The first acquisition module 30 is configured to acquire a first video set in which all the target objects are scored.
[0077] The calculation module 32 is configured to calculate the similarity between each first video in the first video set and the target video, and find a second video set with a predetermined number of second videos from the first video set, wherein the similarity between the target video and each second video in the second video set meets a preset requirement.
[0078] The second obtaining module 34 is configured to obtain a first relationship between each object in the object set and the target object, and a second relationship between the target video and the second video set.
[0079] The determining module 36 is configured to construct a visual relationship topology graph according to the first relationship and the second relationship, wherein the relationship topology graph at least includes a node corresponding to a video in the second video set that has the highest similarity to the target video.
[0080] In the device, the first obtaining module 30 is configured to obtain a first video set in which all the first videos have been scored by the target object; the calculating module 32 is configured to calculate the similarity between each first video in the first video set and the target video, and find a second video set in which a predetermined number of videos have a similarity to the target video that meets a preset requirement; the second obtaining module 34 is configured to obtain a first relationship between each object in the object set and the target object, and a second relationship between the target video and the second video set; and the determining module 36 is configured to construct a visual relationship topology graph according to the first relationship and the second relationship. The above method achieves the purpose of improving the accuracy of recommended videos, and thus achieves the technical effects of intuitively displaying the association relationship between user groups and the similarity relationship between similar videos, and solves the technical problems of being unable to intuitively display the association relationship between user groups and the similarity relationship between similar videos due to the fact that related technologies cannot make recommendations according to video characteristics and user preferences, and the algorithm logic is relatively abstract.
[0081] According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, which includes a stored program. When the program is running, the non-volatile storage medium controls the device in which the non-volatile storage medium is located to perform any one of the methods for generating a relationship topology graph.
[0082] Specifically, the above storage medium is used to store program instructions of the following functions, to implement the following functions:
[0083] The first video set in which all the first videos have been scored by the target object is obtained; the similarity between each first video in the first video set and the target video is calculated, and a second video set in which a predetermined number of videos have a similarity to the target video that meets a preset requirement is found from the first video set; a first relationship between each object in the object set and the target object, and a second relationship between the target video and the second video set are obtained; and a visual relationship topology graph is constructed according to the first relationship and the second relationship.
[0084] Optionally, in the present embodiment, the storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the storage medium would include one or more lines of electrical connections, portable computer disks, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fiber, compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
[0085] In an example embodiment of the present application, a computer program product is also provided, comprising a computer program which, when executed by a processor, implements any of the above methods for generating a relationship topology graph.
[0086] Optionally, the computer program, when executed by the processor, can implement the following steps:
[0087] Obtaining a first video set of all scored videos of a target object; calculating the similarity of each first video in the first video set to a target video, and finding a second video set from the first video set, which has a predetermined number of videos satisfying a preset requirement in similarity to the target video; obtaining a first relationship between each object in the object set and the target object, and a second relationship between the target video and the second video set; and constructing a visual relationship topology graph according to the first relationship and the second relationship.
[0088] According to an embodiment of the present application, an electronic device is provided, comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the above methods for generating a relationship topology graph.
[0089] Optionally, the electronic device can further comprise a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0090] Figure 4is a schematic block diagram of an example electronic device 400 according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0091] As shown in Figure 4 The device 400 includes a computing unit 401 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 402 or a computer program loaded into a random access memory (RAM) 403 from a storage unit 408. Various programs and data required for the operation of the device 400 can also be stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0092] Various components in the device 400 are connected to the I / O interface 405, including an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; the storage unit 408, such as a magnetic disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0093] The computing unit 401 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs various methods and processes described above, such as the method of generating a relational topology graph. For example, in some embodiments, the method of generating a relational topology graph can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded onto the RAM 403 and executed by the computing unit 401, one or more steps of the method of generating a relational topology graph described above can be performed. Alternatively, in other embodiments, the computing unit 401 can be configured to perform the method of generating a relational topology graph by any other appropriate means, such as by means of firmware.
[0094] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0095] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0096] In the context of this application, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage medium can include but are not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0097] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0098] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0099] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0100] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0101] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0102] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the embodiment described above is only illustrative, and the division of units can be a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.
[0103] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0104] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0105] When the integrated unit is realized in the form of software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that makes a contribution to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for making a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, and various media that can store program codes.
[0106] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A method for generating a relational topology graph, characterized in that, include: Retrieve the first set of all videos of the target object that have been rated; Calculate the similarity between each first video in the first video set and the target video, and find a predetermined number of second videos from the first video set whose similarity to the target video meets preset requirements; Obtain the first relationship between each object in the object set and the target object, and the second relationship between the target video and the second video set; A visualized relationship topology graph is constructed based on the first relationship and the second relationship, wherein the relationship topology graph includes at least the node corresponding to the video in the second video set that has the highest similarity to the target video.
2. The method according to claim 1, characterized in that, After constructing a visualized relationship topology graph based on the first relationship and the second relationship, the method further includes: The distribution positions of each node in the relational topology graph are determined, and a graph layout algorithm is called to simulate each node at each distribution position as a different atom to optimize the relational topology graph, wherein each node corresponds one-to-one with the atom.
3. The method according to claim 2, characterized in that, The graph layout algorithm is invoked to simulate each node at each distribution location as a different atom to optimize the relational topology graph, including: Determine the repulsive force between two atoms and the attractive force between two connected nodes during the iteration process; By combining the repulsive force and the attractive force, the velocity of each atom is determined, and the distance that each atom should move in each iteration is determined by the velocity. The target number of iterations is repeated until the distance between the atoms meets the preset condition.
4. The method according to claim 1, characterized in that, Calculate the similarity between each first video in the first video set and the target video, including: Obtain the historical time period and the set of objects in the first video set that were jointly evaluated by the first video and the target video; Determine the first evaluation value and the first average evaluation value of the target object in the object set for the first video, and the second evaluation value and the second average evaluation value for the target video; The similarity between the first video and the target video is determined based on the first evaluation value, the second evaluation value, the first average evaluation value, and the second average evaluation value.
5. The method according to claim 4, characterized in that, Determining the similarity between the first video and the target video based on the first evaluation value, the second evaluation value, the first average evaluation value, and the second average evaluation value includes: Determine a first difference between the first evaluation value and the second average evaluation value, and a second difference between the second evaluation value and the second average evaluation value; The similarity is determined based on the first difference and the second difference.
6. The method according to claim 5, characterized in that, Determining the similarity based on the first difference and the second difference includes: Obtain the first product of the first difference and the second difference, and determine the first absolute value corresponding to the first difference and the second absolute value corresponding to the second difference; Obtain the second product of the first absolute value and the second absolute value; The similarity is obtained based on the ratio of the first product to the second product, wherein the larger the ratio, the higher the similarity.
7. The method according to claim 1, characterized in that, Calculate the similarity between each first video in the first video set and the target video, including: Obtain the set of objects in the first video set that were jointly evaluated by the first video and the target video in the first video set during a historical time period; Determine the first evaluation text content of the target object in the object set for the first video, and the second evaluation text content for the target video; The similarity is determined based on the content of the first evaluation text and the content of the second evaluation text.
8. The method according to claim 7, characterized in that, Determining the similarity based on the content of the first evaluation text and the content of the second evaluation text includes: The text similarity recognition algorithm is invoked to convert the first evaluation text content and the second evaluation text content into a first vector and a second vector, respectively. Calculate the cosine similarity between the first vector and the second vector, and determine the similarity based on the cosine similarity, wherein the larger the cosine similarity, the higher the similarity.
9. The method according to claim 7, characterized in that, Determining the similarity based on the content of the first evaluation text and the content of the second evaluation text includes: The first evaluation text content and the second evaluation text content are respectively divided into a first sequence string and a second sequence string, wherein the first sequence string includes multiple first single strings and the second sequence string includes multiple second single strings; Calculate the first hash value corresponding to each of the first individual strings in the first sequence string to obtain the first hash value array; Calculate the second hash value corresponding to each of the second individual strings in the second sequence string to obtain a second hash value array; Determine the covariance between the first hash value array and the second hash value array, wherein the larger the absolute value of the covariance, the higher the similarity.
10. The method according to any one of claims 1 to 9, characterized in that, The visualized relationship topology diagram includes: a radar diagram.
11. An apparatus for generating a relational topology graph, characterized in that, include: The first acquisition module is used to acquire the first set of all videos that have been rated by the target object; The calculation module is used to calculate the similarity between each first video in the first video set and the target video, and to find a predetermined number of second videos from the first video set whose similarity to the target video meets preset requirements. The second acquisition module is used to acquire the first relationship between each object in the object set and the target object, and the second relationship between the target video and the second video set; The determination module is used to construct a visualized relationship topology graph based on the first relationship and the second relationship, wherein the relationship topology graph includes at least the node corresponding to the video in the second video set that has the highest similarity to the target video.
12. A non-volatile storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the method for generating a relational topology graph as described in any one of claims 1 to 10.
13. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method for generating a relational topology graph as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device for analyzing detention house personnel relation and electronic equipment
CN109871456A
Course recommendation method based on association relationship analysis
CN113065342A