CN114168805B - Data processing method, device, equipment and medium - Google Patents

Data processing method, device, equipment and medium Download PDF

Info

Publication number
CN114168805B
CN114168805B CN202210119110.4A CN202210119110A CN114168805B CN 114168805 B CN114168805 B CN 114168805B CN 202210119110 A CN202210119110 A CN 202210119110A CN 114168805 B CN114168805 B CN 114168805B
Authority
CN
China
Prior art keywords
directed
degree
target
subgraph
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210119110.4A
Other languages
Chinese (zh)
Other versions
CN114168805A (en
Inventor
李力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210119110.4A priority Critical patent/CN114168805B/en
Publication of CN114168805A publication Critical patent/CN114168805A/en
Application granted granted Critical
Publication of CN114168805B publication Critical patent/CN114168805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists

Landscapes

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

Abstract

The application discloses a data processing method, a data processing device, data processing equipment and a data processing medium, and relates to the field of data processing. The method comprises the following steps: acquiring a target directed weighted graph, wherein the target directed weighted graph comprises at least two data nodes, and a weighted directed edge is arranged between the at least two data nodes; determining the out-degree number and the in-degree number corresponding to at least two data nodes respectively based on the directional relation of the directed edge between the at least two data nodes; extracting a target subgraph in the directed weighted graph within a preset degree range on the basis of at least two data nodes; and determining the data association degree between at least two data nodes based on the directed edge distribution condition in the target subgraph. Through the method, the target directed weighted graph is analyzed in the range of the preset degree, and the condition that the data association degree in the global range is relatively high is determined by means of the weight of the directed edge. The method and the device can be applied to various scenes such as cloud technology, artificial intelligence and intelligent traffic.

Description

Data processing method, device, equipment and medium
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a data processing method, apparatus, device, and medium.
Background
The method is a basic and important technology in the field of data mining, and is used for finding the association relationship among data in a large database, so that the mutual relationship hidden in the data is mined, and the efficiency of data utilization is improved.
In the related art, correlation between data is usually analyzed by using methods such as graph analysis, covariance matrix, regression analysis, and the like, for example: and determining a regression coefficient according to the change condition between the two variable data by adopting a unitary regression method for the two variable data, and further analyzing the value of the variable data.
However, when the method is used for analyzing the relevance of data, the analysis result is greatly influenced by the number of the data, the relevance of the analyzed data is relatively fixed, and the relevance between the data cannot be accurately utilized to mine the data value.
Disclosure of Invention
The embodiment of the application provides a data processing method, a data processing device, data processing equipment and a data processing medium, which can avoid the limitation when only part of data nodes are analyzed. The technical scheme is as follows.
In one aspect, a data processing method is provided, and the method includes:
obtaining a target directed weighted graph, wherein the target directed weighted graph comprises at least two data nodes, a directed edge with a weight is arranged between the at least two data nodes, and the weight is used for indicating the directed association degree between the at least two data nodes;
determining the out degree number and the in degree number corresponding to the at least two data nodes respectively based on the directional relation of the directed edge between the at least two data nodes; the degree of in represents the number of directed edges pointing to the data node, and the degree of out represents the number of directed edges pointing from the data node;
extracting a target subgraph in the directed weighted graph within a range of a preset degree on the basis of the at least two data nodes;
and determining the data association degree between the at least two data nodes based on the directed edge distribution condition in the target subgraph.
In another aspect, a data processing method is provided, the method including:
constructing a role relationship graph, wherein at least two virtual roles are taken as nodes in the role relationship graph, directed edges with weights are included among the nodes, and the weights are used for indicating the directed affinity strength relationship between the at least two virtual roles;
determining an in degree number and an out degree number which correspond to the at least two virtual characters respectively based on the directional relation of the directional edges between the at least two virtual characters, wherein the in degree number is used for indicating the number of the directional edges pointing to the virtual characters, and the out degree number is used for indicating the number of the directional edges pointed out by the virtual characters;
extracting a target relation graph in the role relation graph within a preset degree range on the basis of the at least two virtual roles;
and determining the intimacy analysis result between the at least two virtual characters based on the directed edge distribution condition in the relationship graph.
In another aspect, there is provided a data processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a target directed weighted graph, the target directed weighted graph comprises at least two data nodes, a directed edge with a weight is included between the at least two data nodes, and the weight is used for indicating the directed association degree between the at least two data nodes;
the degree determining module is used for determining the out-degree number and the in-degree number corresponding to the at least two data nodes respectively based on the directional relation of the directed edge between the at least two data nodes; the degree of in represents the number of directed edges pointing to the data node, and the degree of out represents the number of directed edges pointing from the data node;
the extraction module is used for extracting a target subgraph in the directed weighted graph within a preset degree range on the basis of the at least two data nodes;
and the association degree determining module is used for determining the data association degree between the at least two data nodes based on the directed edge distribution condition in the target subgraph.
In another aspect, there is provided a data processing apparatus, the apparatus comprising:
the role relationship graph comprises a construction module, a calculation module and a display module, wherein the construction module is used for constructing a role relationship graph, at least two virtual roles are used as nodes in the role relationship graph, directed edges with weights are included among the nodes, and the weights are used for indicating the directed affinity strength relationship between the at least two virtual roles;
the degree determining module is used for determining an in degree and an out degree which correspond to the at least two virtual characters respectively based on the directional relation of the directional edges between the at least two virtual characters, wherein the in degree is used for indicating the number of the directional edges pointing to the virtual characters, and the out degree is used for indicating the number of the directional edges pointed out by the virtual characters;
the extraction module is used for extracting a target relation graph in the role relation graph within a preset degree range on the basis of the at least two virtual roles;
and the result analysis module is used for determining the intimacy degree analysis result between the at least two virtual roles based on the directed edge distribution condition in the relational graph.
In another aspect, a computer device is provided, which includes a processor and a memory, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the data processing method according to any one of the embodiments of the present application.
In another aspect, a computer readable storage medium is provided, in which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, which is loaded and executed by a processor to implement the data processing method as described in any of the embodiments of the present application.
In another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the data processing method described in any of the above embodiments.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
and determining the out-degree number and the in-degree number corresponding to each data node based on the directional relation of the directed edges in the target directed weighted graph, and determining a target subgraph with higher association degree between the data nodes from the target directed weighted graph within a preset degree range based on the data nodes corresponding to the target directed weighted graph. By the method, the target directed weighted graph can be analyzed more finely on the basis of keeping the data nodes unchanged by means of the weight and the direction of the directed edge in the target directed weighted graph. Meanwhile, the preset degrees comprise a preset output degree and a preset input degree, the target directed weighted graph is analyzed within the range of the preset degrees, and the process of analyzing each data node is facilitated. The target subgraph is determined based on the directed edges, and the target subgraph with relatively high association degree in the global range is determined by means of the weight of the directed edges, so that limitation when only partial data nodes are analyzed is avoided, the global association degree of the target subgraph is higher, data association degree between the data nodes in the target directed weighted graph is determined better, and data conversion rate and interaction proportion are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an implementation environment provided by an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a data processing method provided by an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of a directed ownership graph as provided by an exemplary embodiment of the present application;
FIG. 4 is a flow chart of a data processing method provided by another exemplary embodiment of the present application;
FIG. 5 is a sub-graph collection diagram provided by an exemplary embodiment of the present application;
FIG. 6 is a flow chart of a data processing method provided by another exemplary embodiment of the present application;
FIG. 7 is a schematic diagram of a role relationship provided by an exemplary embodiment of the present application;
FIG. 8 is a flow chart of a data processing method provided by another exemplary embodiment of the present application;
FIG. 9 is a flow diagram for analyzing player data as provided by an exemplary embodiment of the present application;
FIG. 10 is a schematic illustration of a game interface provided by an exemplary embodiment of the present application;
FIG. 11 is a schematic illustration of a game interface provided by another exemplary embodiment of the present application;
FIG. 12 is an interface schematic of a game action provided by an exemplary embodiment of the present application;
FIG. 13 is a schematic illustration of an interface for game play provided by another exemplary embodiment of the present application;
FIG. 14 is a schematic illustration of a game interface provided by another exemplary embodiment of the present application;
FIG. 15 is an interface schematic of a play object acquisition pathway provided in another exemplary embodiment of the present application;
FIG. 16 is a block diagram of a data processing apparatus provided in an exemplary embodiment of the present application;
fig. 17 is a block diagram of a data processing apparatus according to another exemplary embodiment of the present application;
fig. 18 is a block diagram of a data processing apparatus according to another exemplary embodiment of the present application;
fig. 19 is a block diagram of a server according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the related art, a correlation between data is usually analyzed by using a method such as graph analysis, covariance matrix, regression analysis, and the like, for example: and determining a regression coefficient according to the change condition between the two variable data by adopting a unitary regression method for the two variable data, and further analyzing the value of the variable data. However, when the method is used for analyzing the relevance of data, the analysis result is greatly influenced by the number of the data, the relevance of the analyzed data is relatively fixed, and the relevance between the data cannot be accurately utilized to mine the data value.
In the embodiment of the application, a data processing method is provided, and on the basis of keeping data nodes unchanged, the data association degree between the data nodes is better determined based on a target subgraph by means of the weight of a directed edge. The data processing method obtained by training in the application comprises at least one of the following scenes.
First, the method is applied to the game friend intimacy analysis scene
In a game scene, the interaction process among a plurality of players is often involved, and through the interaction in the virtual game scene, the interest of the game can be improved, and the activity of the game is enhanced. Schematically, by adopting the data processing method, virtual characters operated and controlled by a plurality of players are taken as data nodes, and the intimacy between different virtual characters is a directed edge with a weight, wherein the weight indicates the intimacy degree between the virtual characters; the directions indicate the intimacy between the virtual characters as: if player A likes player B, player A points to player B. Then, determining the degree of entry and the degree of exit corresponding to the virtual character according to the direction of the directed edges, wherein the degree of entry is the number of the directed edges pointing to the virtual character, such as: number of fans of virtual characters; the degree of occurrence is the number of directed edges indicated from the virtual character, such as: the number of people the virtual character is interested in, etc. Based on at least two data nodes, determining a target subgraph corresponding to the target directed weighted graph in a preset degree range, and further determining the association degree between virtual characters, so that the limitation possibly caused when only partial virtual characters are analyzed is avoided, and the relative affinity relationship between different players is analyzed from a more comprehensive angle. Optionally, the ranking list of the intimacy relationship determined based on the relative intimacy relationship is beneficial to promoting the interaction proportion and the conversion rate of friends, and further increasing the activity of the game.
Secondly, the method is applied to the scene of analyzing the event relevancy
In a market operating scenario, there are many cases where there is relevance but the overall relevance is less clear. For example: the multiple sub-events have certain relevance, but the multiple sub-events belong to different fields. Generally, to improve the accuracy of the correlation analysis, sub-events in the same domain are analyzed, and the cross-domain analysis process is less performed. Illustratively, by adopting the data processing method, a plurality of sub-events are taken as data nodes, the association degree between different sub-events is taken as a directed edge, after the input degree and the output degree corresponding to each sub-event are determined, at least two sub-events are taken as a basis, the target sub-graph corresponding to the target directed weighted graph is determined within the range of the preset degree, the association degree between the sub-events is further determined, and according to the association degree between the sub-events, different data can be observed more globally in a cross-field manner, so that a more valuable data processing result is obtained, so that the limitation when only sub-events in the same field are analyzed is avoided, the association between different sub-events in different fields can be analyzed in a multi-angle manner, and the data mining value is improved.
It should be noted that the above application scenarios are only illustrative examples, and the data processing method provided in this embodiment may also be applied to other scenarios, which are not limited in this embodiment.
It is understood that in the specific implementation of the present application, related data such as user information is involved, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of related data need to keep track of related laws and regulations and standards of related countries and regions.
Next, an implementation environment related to the embodiment of the present application is described, and please refer to fig. 1 schematically, in which a terminal 110 and a server 120 are related, and the terminal 110 and the server 120 are connected through a communication network 130.
In some embodiments, an application having a data acquisition function is installed in the terminal 110. In some embodiments, the terminal 110 is configured to transmit data to the server 120. The server 120 may perform relevance analysis on the data, determine a global relevance analysis result between the data through the data processing model 121, and feed back the relevance analysis result to the terminal 110 for display.
One exemplary application of the data processing model 121 is as follows: and acquiring a target directed weighted graph based on the data nodes and the directed edges by taking the data as the data nodes and the directed association degrees between the data as the directed edges with weights. And determining the out-degree number and the in-degree number of each data node based on the pointing condition of the directed edge between different data nodes. And on the basis of at least two data nodes, extracting corresponding target subgraphs from the target directed weighted graph in a preset degree range, and determining a global association analysis result between the data, namely obtaining a relative association analysis condition between the data nodes. The above process is an example of a non-exclusive case of the data processing model application process.
It should be noted that the above terminals include, but are not limited to, mobile terminals such as mobile phones, tablet computers, portable laptop computers, intelligent voice interaction devices, intelligent home appliances, and vehicle-mounted terminals, and can also be implemented as desktop computers; the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data and an artificial intelligence platform.
The Cloud technology (Cloud technology) is a hosting technology for unifying a series of resources such as hardware, application programs, networks and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied in the cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
In some embodiments, the servers described above may also be implemented as nodes in a blockchain system.
In conjunction with the above noun introduction and application scenario, the data processing method provided in the present application is described, taking the application of the method to a server as an example, as shown in fig. 2, the method includes the following steps 210 to 240.
Step 210, obtaining the target directed weighted graph.
The target directed weighted graph comprises at least two data nodes, and a weighted directed edge is arranged between the at least two data nodes.
Illustratively, "to" is used to indicate direction and "weight" is used to indicate weight. The direction is used to indicate a directional relationship between at least two data nodes, such as: meaning "like", "focus", etc.; the weights are used to indicate a degree of directional association between at least two data nodes.
As shown in fig. 3, the representation is a representation of a directed weighted graph, where the directed weighted graph includes three nodes (node 310, node 311, and node 312), and edges (edge 320, edge 321, edge 322, and edge 323) connected to the three nodes, where each edge has a corresponding direction and weight, and the direction is used to indicate the direction of association between the nodes, and appears as a direction between different nodes in fig. 3; the weight is used to indicate the degree of association between nodes, and is represented by the numerical size of the numbers in fig. 3. For example: there are two edges connecting between node 310 and node 311, including edge 321 pointing from node 310 to node 311 and having a weight of 7, and edge 320 pointing from node 311 to node 310 and having a weight of 6.
Optionally, in the directed weighted graph, the edges (including the direction and weight of the edges) corresponding to the nodes and the directed weighted graph have different expression meanings according to different meanings indicated by the nodes. Illustratively, the nodes are Identification (ID) data corresponding to different players in a game scenario, such as: player A, player B, player C, etc.; weighted directed edges of connections between nodes are degrees of closeness between players, such as: if the player A "likes" the player B (e.g., the number of message interactions between the player A and the player B is large, or the number of game team invitations sent by the player A to the player B is large), the player A points to the player B in the directed weighted graph, and the weighted value is large. Alternatively, for example, if the number of message interactions between the a player and the B player is the largest, or the number of times the a player sends the game team invitation to the B player is the largest, in the directed weighted graph, the "edge" pointed to by the a player to the B player is the largest among the "edges" pointed to by the a player (including the B player), and for example, the weight value is the largest.
Illustratively, the target directed weighted graph is a graph to be subjected to data association analysis, the target directed weighted graph includes data nodes to be subjected to data association analysis, and weighted directed edges are connected between different data nodes.
In an optional embodiment, at least two data nodes participating in association degree analysis are obtained; and determining directed edges corresponding to the at least two data nodes respectively based on the association degree relation between the at least two data nodes.
Illustratively, at least two data nodes are nodes with the same meaning, and a relationship of degree of association exists between at least two data nodes. For example: when the friend association degree in a social application program is analyzed, the data nodes represent friend names including friends 1, friends 2 and friends 3, association degree relations between at least two data nodes are comprehensively determined based on the chat frequency and the chat duration between the friends, and directed edges with weights respectively corresponding to the at least two data nodes are determined, wherein the stronger the association degree relation is, the larger the weight is. Optionally, the target directed weighted graph is constructed based on at least two data nodes and directed edges.
It should be noted that the above is only an illustrative example, and the present invention is not limited to this.
Step 220, determining the out degree and the in degree corresponding to the at least two data nodes respectively based on the directional relation of the directed edge between the at least two data nodes.
Wherein the in-degree number represents the number of directed edges pointing to the data node, and the out-degree number represents the number of directed edges pointing from the data node.
In an optional embodiment, after the target directed weighted graph is obtained, the out-degree number and the in-degree number corresponding to different data nodes may be different. Alternatively, there may be a case where one of the out-degree number or the in-degree number is 0, for example: the out degree is 0 and is used for indicating that the data node does not point to other data nodes; the number of entries is 0 to indicate that no other data node points to the data node.
Schematically, the directed weighted graph shown in fig. 3 is used as the obtained target directed weighted graph, and the relevance analysis is performed on the target directed weighted graph. For example, taking the node 310 as an example, the number of outgoing degrees and the number of incoming degrees corresponding to the node 310 are determined. The degree number indicates the number of directed edges pointing to the node 310, and as shown in fig. 3, the degree number corresponding to the node 310 is 1, and is used to indicate a directed edge pointing to the node 310 from the node 311; the degree of out indicates the number of directed edges pointed out from node 310. as shown in fig. 3, node 310 corresponds to a degree of out of 2, which indicates a directed edge pointing from node 310 to node 311, and a directed edge pointing from node 310 to node 312.
Illustratively, based on the above method, the out degree and the in degree corresponding to the node 311 and the node 312 respectively are determined, as shown in fig. 3, the in degree corresponding to the node 311 is 1 (for indicating a directed edge pointing from the node 310 to the node 311), and the out degree corresponding to the node 311 is 1 (for indicating a directed edge pointing from the node 311 to the node 312); node 312 corresponds to an in-degree of 2 (indicating a directed edge pointing from node 310 to node 312 and a directed edge pointing from node 311 to node 312), and node 312 corresponds to an out-degree of 0 (indicating that node 312 does not point to other nodes).
And step 230, extracting a target subgraph in the target directed weighted graph within a preset degree range on the basis of at least two data nodes.
Optionally, the at least two data nodes are used as a basis for indicating that the data nodes in the target directed weighted graph are reserved.
Illustratively, the preset degree includes a preset input degree and a preset output degree. The preset degree range is used for indicating a preset in-degree range and a preset out-degree range. And extracting a target subgraph in the target directed weighted graph in a preset degree range, and indicating a process of obtaining the target subgraph after processing directed edges between data nodes in the target directed weighted graph on the basis of reserving the data nodes in the target directed weighted graph.
In an optional embodiment, when the number of the directed edges corresponding to each data node in the target directed weighted graph meets the range of the preset degrees, the target directed weighted graph is taken as a sub-graph.
Illustratively, when the directed edges between the data nodes are cut based on the data nodes, a plurality of subgraphs corresponding to the target directed weighted graph are obtained, and the subgraph meeting the standard in the subgraphs is determined as the target subgraph. For example: and taking the weight of the directed edge as a judgment condition, and determining the subgraph as a target subgraph when the sum of the weights of the directed edges in the subgraph is maximum. Illustratively, the sum of the weights of the directed edges of the subgraph corresponding to the target subgraph is the largest, so as to indicate that the global relative relevance between the data nodes in the target subgraph is strong, which is beneficial to more accurately determining the relevance between the data nodes from a more comprehensive angle.
And 240, determining the data association degree between at least two data nodes based on the directed edge distribution condition in the target subgraph.
In an optional embodiment, the weights of the directed edges of the target subgraph corresponding to each data node in the target subgraph are sequenced, and a weight sequence is determined; and determining the data association degree between at least two data nodes based on the sorting condition of the weight value sequence.
And determining the sorting condition according to the directed edges corresponding to the data nodes.
Schematically, a data node is arbitrarily selected from a target subgraph for analysis, the degree of output of the data node 1 is 2, and relevance ranking is carried out on two directed edges according to the weight of the two directed edges indicated from the data node 1; or if the number of entries of the data node 1 is 3, performing relevance ranking on the three directed edges according to the weights of the three directed edges pointing to the data node 1; or comprehensively sorting the weight of the directed edge corresponding to the in-degree number and the weight of the directed edge corresponding to the out-degree number in the data node 1 to obtain the association degree sorting condition corresponding to the data node 1, and the like.
Optionally, the association analysis result may be the same or different for different data nodes. Illustratively, when the association degree analysis results are the same for different data nodes, for data node 1, data node 2 is the node with the highest association degree; for data node 2, data node 1 is also the node with the highest degree of association; or, when the association degree analysis results are different for different data nodes, for the data node 1, the data node 2 is the node with the highest association degree; however, as for the data node 2, the data node 1 is the node with the second highest degree of association, and the like.
It should be noted that the above is only an illustrative example, and the present invention is not limited to this.
In summary, according to the directional relationship of the directed edge in the target directed weighted graph, the outgoing number and the incoming number corresponding to each data node are determined, and based on the data node corresponding to the target directed weighted graph, a target subgraph is determined from the target directed weighted graph within a preset number range. By the method, the target directed weighted graph can be analyzed in detail on the basis of keeping the data nodes unchanged by means of the weight and the direction of the directed edge in the target directed weighted graph, meanwhile, the preset degree comprises the preset degree and the preset degree, the target directed weighted graph is analyzed within the range of the preset degree, and the analysis of the relation between each data node and other data nodes is facilitated. The target subgraph is determined based on the directed edges, and the condition of relatively high association degree in the global range is determined by means of the weight of the directed edges, so that the limitation when only partial data nodes are analyzed is avoided, the global association degree of the target subgraph is higher, the data association degree between the data nodes in the target directed weighted graph is further determined better, and the data conversion rate and the interaction proportion are improved.
In an alternative embodiment, the process of extracting the target subgraph in the directed weighted graph within a preset degree is realized by the weight of the directed edge in the directed weighted graph. Illustratively, as shown in fig. 4, step 230 in the embodiment shown in fig. 2 can also be implemented as the following steps 410 to 430.
And step 410, determining at least one subgraph corresponding to the target directed weighted graph within a preset degree range on the basis of at least two data nodes.
Illustratively, after determining the target directed weighted graph, when determining at least one sub-graph corresponding to the target directed weighted graph from the target directed weighted graph, data nodes constituting the target directed weighted graph are retained, that is: the data nodes corresponding to at least one sub-graph are the same as the data nodes corresponding to the target directed weighted graph.
Optionally, based on at least two data nodes, when at least one sub-graph is determined from the target directed weighted graph, processing directed edges between the at least two data nodes so that the number of the directed edges is within a preset degree range, that is: and the process of determining at least one sub-graph corresponding to the target directed weighted graph in the range of the preset degrees is realized.
In an optional embodiment, within a range of a preset degree, the directed edge corresponding to each data node in the at least two data nodes is cut to obtain a sub-graph directed edge corresponding to the at least one sub-graph.
Optionally, the directed edges corresponding to each data node are different, and each data node in the target directed weighted graph is taken as an analysis object, and the directed edges corresponding to the data node are determined, including the directed edge pointing to the data node and the directed edge indicating the data node.
Illustratively, the preset degree includes a preset output degree and a preset input degree, wherein the preset input degree and the preset output degree are preset values, and the preset input degree and the preset output degree can be the same or different. For example: setting the preset degree in and the preset degree out to be 4, wherein the range of the preset degree is used for indicating that the degree in corresponding to each data node is less than or equal to 4 (the preset degree in), the degree out corresponding to each data node is less than or equal to 4 (the preset degree out), if the degree in of one data node is 3 and the degree out is 2, the degree out corresponding to the data node and the degree in correspond to the range of the preset degree, and the number of directed edges corresponding to the data node corresponds to the condition corresponding to the range of the preset degree; or, setting the preset degree of entry to be 4 and the preset degree of exit to be 3, where the range of the preset degree is used to indicate that the degree of entry corresponding to each data node is less than or equal to 4 (the preset degree of entry), and the degree of exit corresponding to each data node is less than or equal to 3 (the preset degree of exit), and if the degree of entry of one data node is 4 and the degree of exit is 4, the degree of exit corresponding to the data node does not conform to the range of the preset degree. Optionally, in order to make the degree of out of the data node within the range of the preset degree, the directed edge indicating the data node is clipped.
In an optional embodiment, within a range of a preset number of degrees, the clipping a directed edge corresponding to each of at least two data nodes includes: within the range of the preset out degree, cutting the directed edges pointed out from the data nodes; and within the range of the preset input degree, cutting the directed edges pointing to the data nodes.
Illustratively, when the directed edges corresponding to the data nodes are clipped, at least one of the following methods may be adopted to implement the clipping process.
1. And adopting a greedy algorithm to cut the directed edges corresponding to the data nodes.
The greedy algorithm means that when solving a problem, the best choice in the current view is always made, that is: instead of considering the global optimum, a local optimum solution is made to some extent.
Optionally, the directed edge is clipped based on the weight condition corresponding to the directed edge. Schematically, sequencing the weights corresponding to the directed edges, keeping the directed edges with larger weights according with the preset degrees within the range of the preset degrees, and cutting other directed edges; alternatively, the directional edge with the largest weight is retained, and the directional edges with other weights are clipped, and the like. The directed edges are cut through a greedy algorithm, so that the cutting efficiency of the directed edges is improved, and the calculation burden of a server is reduced.
For example: and setting the preset input degree and the preset output degree to be 4, analyzing each data node, and sequencing the weight of the directed edge corresponding to each data node from large to small based on the weight corresponding to the directed edge. When the directed edges are cut, in a preset input degree range, the weights of the directed edges pointing to the data nodes and corresponding to each data node are sorted, and four directed edges corresponding to the first four weights in the weight sorting are reserved; and in a preset degree range, sorting the weight of the directed edge indicated by each data node corresponding to each data node, and reserving four directed edges corresponding to the first four weights in the weight sorting.
2. And cutting the directed edges corresponding to the data nodes by adopting a traversal method.
The traversal method is to sequentially make one-time and only one-time access to each data node in the target directed weighted graph along a certain search path.
Illustratively, any data node in the target directed weighted graph is taken as a starting point, and the target directed weighted graph is traversed according to directed edges between different data nodes, wherein the traversing direction is not interfered by the direction of the directed edges. Optionally, the end point of the traversal is the last traversed data node in the target directed weighted graph. When the directed edges corresponding to the data nodes are cut through the traversal method, the directed edges can be searched comprehensively and meticulously, and then various arrangement and combination conditions of the directed edges corresponding to the target directed weighted graph are obtained within the range of preset degrees.
The above description is only exemplary, and the present invention is not limited to the above description.
In an optional embodiment, at least one subgraph corresponding to the target directed weighted graph is obtained based on at least two data nodes and the subgraph directed edge.
Illustratively, all data nodes in the target directed weighted graph are used as nodes forming the subgraph, and at least one subgraph corresponding to the target directed weighted graph is obtained based on a result of cutting the directed edges within a preset degree range.
For example: the preset output degree and the preset input degree in the preset degrees are 4, and when a subgraph is formed, the output degree and the input degree of each data node are controlled not to be more than 4, namely: and controlling the out-degree number of each data node to be less than or equal to 4 and controlling the in-degree number of each data node to be less than or equal to 4. Optionally, there is a case where the outgoing number of the node data is 0 or the incoming number is 0 (the outgoing number is 0 and the incoming number is 0, there is no correlation between the data); or, the node data has the out degree of 3 and the in degree of 2; alternatively, the number of outgoing nodes of the node data may be 4, and the number of incoming nodes may be 4.
And step 420, determining global weights corresponding to at least one subgraph respectively based on the weights corresponding to the directed edges in the target directed weighted graph.
Illustratively, the weight is used to indicate a numerical value corresponding to the weight, and the global weight is obtained based on the weight corresponding to the sub-graph directed edge in the sub-graph.
In an alternative embodiment, the corresponding weight of the subgraph directed edge is determined based on the corresponding weight of the directed edge.
Illustratively, at least one subgraph corresponding to the target directed weighted graph is obtained based on at least two data nodes and the subgraph directed edge obtained after cutting, and the weight and the direction of the subgraph directed edge corresponding to the subgraph are the same as those of the corresponding directed edge in the target directed weighted graph.
In an optional embodiment, the weights corresponding to the directed edges of the ith sub-graph are summed, and the global weight corresponding to the ith sub-graph is determined. Wherein i is a positive integer.
Optionally, as shown in fig. 3, the preset input degree and the preset output degree are set to be 1, that is: the numerical value of the preset input degree and the preset output degree is less than or equal to 1. For example: keeping the data nodes in the target directed weighted graph unchanged, namely the data nodes 310, the data nodes 311 and the data nodes 312, and cutting the directed edges corresponding to each data node to make the outgoing degree and the incoming degree corresponding to each data node within a preset degree range. Schematically, as shown in fig. 5, after the directed edge of the target directed weighted graph is cut, three subgraphs are obtained, and the weight corresponding to the directed edge in the subgraph is the same as the weight corresponding to the directed edge in the target directed weighted graph.
Illustratively, summing weights corresponding to directed edges of the sub-graph 510 to obtain a global weight corresponding to the sub-graph 510, which is 15 (7 + 8); summing the weights corresponding to the directed edges of the subgraph 520 to obtain a global weight corresponding to the subgraph 520, which is 13 (5 + 8); and summing the weights corresponding to the directed edges of the sub-graph in the sub-graph 530 to obtain a global weight corresponding to the sub-graph 530, which is 14 (6 + 8).
Step 430, determining a target subgraph from the at least one subgraph based on the global weight.
In an alternative embodiment, from the global weights, a target global weight that meets a preset criterion is determined.
Illustratively, a plurality of subgraphs are determined from the target directed weighted graph, the global weight of each subgraph is solved to obtain the global weight corresponding to each subgraph, and the target subgraph is determined by taking the global weight as a judgment standard.
In an optional embodiment, the maximum weight of the global weights is taken as a target global weight; and determining the subgraph corresponding to the target global weight as a target subgraph.
Illustratively, after determining the global weight corresponding to each subgraph, the numerical values of the global weights are compared, the maximum weight in the global weights is determined, and the maximum weight is used as the target global weight. Illustratively, as shown in fig. 5, the global weight corresponding to the subgraph 510 is taken as the target global weight.
Optionally, the subgraph corresponding to the target global weight is determined as the target subgraph, that is, the subgraph 510 is determined as the target subgraph.
In an optional embodiment, in a plurality of subgraphs obtained from the target directed weighted graph, there is a case where global weights corresponding to the plurality of subgraphs are the same. Illustratively, at least one subgraph corresponding to the target global weight constitutes a candidate subgraph set.
For example: and after numerical comparison is carried out on the global weight corresponding to each subgraph, the target global weight is determined to be 18, a plurality of subgraphs corresponding to the target global weight exist, and the plurality of subgraphs form a candidate subgraph set.
Optionally, from the set of candidate subgraphs, a target subgraph is determined. Illustratively, from the candidate subgraph set, a candidate subgraph is randomly selected as a target subgraph, that is: determining a target subgraph from the candidate subgraph set in an equal probability mode; or, determining the subgraph with the largest number of directed edges from the candidate subgraph set as the target subgraph and the like.
It should be noted that the above is only an illustrative example, and the present invention is not limited to this.
In summary, the out-degree number and the in-degree number corresponding to each data node are determined based on the directional relationship of the directed edge in the target directed weighted graph, and a target subgraph with the maximum association degree between the data nodes is determined from the target directed weighted graph within a preset degree range based on the data nodes corresponding to the target directed weighted graph. By the method, the target directed weighted graph can be analyzed more finely on the basis of keeping the data nodes unchanged by means of the weight and the direction of the directed edge in the target directed weighted graph, and the target subgraph with relatively high association degree in the global range can be determined by means of the weight of the directed edge, so that the limitation when only part of the data nodes are analyzed is avoided, and the global association degree of the target subgraph is higher.
In the embodiment of the application, at least one subgraph corresponding to a target directed weighted graph is determined within a range of preset degrees on the basis of at least two data nodes, weights corresponding to directed edges in the target directed weighted graph are summed up according to the weights corresponding to the directed edges in the subgraph, a global weight corresponding to each subgraph is determined, and a target subgraph is determined from at least one subgraph according to the global weight. By reserving the data nodes and cutting the directed edges in the target directed weighted graph, the data association degree between the data nodes in the target directed weighted graph can be better determined, so that the relative association degree of the data can be more accurately divided on the whole, and the data conversion rate and the interaction proportion are improved.
In an alternative embodiment, the data processing method is applied to a game application scenario, and schematically, as shown in fig. 6, the steps in the embodiment shown in fig. 2 can also be implemented as the following steps 610 to 640.
Step 610, constructing a role relationship diagram.
The role relationship graph takes at least two virtual roles as nodes, directed edges with weights are included among the nodes, and the weights are used for indicating the directed affinity strength relationship among the at least two virtual roles.
The virtual character refers to a movable object in a virtual world, the movable object can be a virtual character, a virtual animal, an animation character and the like, and optionally, the virtual character is a three-dimensional stereo model created based on an animation skeleton technology. When the virtual character is taken as a node in the character relationship diagram, the ID corresponding to the virtual character may be taken as the node, the character image corresponding to the virtual character may be taken as the node, the avatar corresponding to the virtual character may be taken as the node, and the like, that is: and taking the characteristic capable of distinguishing at least two virtual roles as a node in the role relationship graph.
Schematically, as shown in fig. 7, a schematic role relationship diagram is shown. Where node a710 is used to indicate player a, node B720 is used to indicate player B, and node C730 is used to indicate player C.
Optionally, the nodes include directed edges with weights therebetween, and the weights are used to indicate directional affinity strength relationships between the at least two virtual characters.
As shown in fig. 7, the weights are represented by arabic numerals, and the larger the number is, the higher the weight is, the stronger the relationship of directional intimacy strength between the two virtual characters is represented; the smaller the number, the lower the weight, and the lower the intimacy-strength relationship that indicates directionality between two avatars. Directions are used to indicate directions of intimacy between two virtual characters, such as: node a710 points to node C730 for indicating that player a "likes" player C, etc.
Schematically, in the role relationship diagram, the direction and the weight of the node and the directed edge are integrated, so that it can be determined that the player B "likes" the player A, and the intimacy degree is 9; player a "likes" player C, and the degree of intimacy is 11.
And step 620, determining the degree of entry and the degree of exit corresponding to the at least two virtual characters respectively based on the directional relation of the directional edge between the at least two virtual characters.
The in-degree number is used to indicate the number of directed edges pointing to the virtual character, and the out-degree number is used to indicate the number of directed edges pointing from the virtual character.
Illustratively, each virtual character is analyzed. For example: in fig. 7, the degree of entry corresponding to the node a710 is 3, and the degree of exit is 3; the corresponding degree of entry of the node B720 is 0 and the degree of exit is 2; the node C730 corresponds to an in degree of 2, an out degree of 0, and so on. By determining the number of entries and the number of exits of each virtual character, the relationship between different virtual characters and other virtual characters can be known, so that when one virtual character is analyzed, other virtual characters related to the virtual character, information such as the related direction and the intimacy degree between the virtual character and other virtual characters can be determined more efficiently.
Step 630, based on at least two virtual roles, extracting a target relationship diagram in the role relationship diagram within a preset degree range.
Illustratively, each virtual character in the character relationship diagram is kept unchanged, and the character relationship diagram is cut within the range of the preset out degree and the preset in degree to obtain a plurality of sub relationship diagrams.
For example: the preset output degree and the preset input degree are 4, and the cutting result of the character relation graph needs to meet the following conditions:
1. the out degree number of each node is less than or equal to 4, and the in degree number of each node is more than or equal to 4;
2. each sub-relational graph comprises a plurality of directed edges, and the directed edges cover all nodes.
In an optional embodiment, based on a plurality of sub-relationship graphs, a global weight corresponding to each sub-relationship graph is determined, and the global weight is used for indicating the sum of numerical values of weights corresponding to directed edges in the sub-relationship graphs.
Optionally, a sub-relationship graph with the largest global weight is determined from the plurality of sub-relationship graphs, and the sub-relationship graph is determined as the target relationship graph. Illustratively, the target relationship graph with the maximum global weight can better reflect the global relative intimacy degree between different virtual characters, and further more uniformly recommend other players with high intimacy degree and better interactivity to different players.
And step 640, determining an affinity analysis result between the at least two virtual roles based on the directed edge distribution condition in the target relationship graph.
Illustratively, the target relationship graph is obtained from the character relationship graph, and is used to reflect the degree of relationship of overall relative closeness among different players, for example: after the target relationship graph is determined, according to the directing condition of the directed edge, determining the ranking list of each virtual character relative to the close friends, and perfecting the game interaction process based on the ranking list, or prompting the player to perform game interaction based on the ranking list.
In summary, the out-degree number and the in-degree number corresponding to each data node are determined based on the directional relationship of the directed edge in the target directed weighted graph, and a target subgraph with the maximum association degree between the data nodes is determined from the target directed weighted graph within a preset degree range based on the data nodes corresponding to the target directed weighted graph. By the method, the target directed weighted graph can be analyzed more finely on the basis of keeping the data nodes unchanged by means of the weight and the direction of the directed edge in the target directed weighted graph, and the situation that the association degree in the global range is relatively high is determined by means of the weight of the directed edge, so that the limitation when only part of the data nodes are analyzed is avoided, and the global association degree of the target subgraph is higher.
In the embodiment of the application, the data processing method is applied to a game application scene. Establishing a role relationship graph based on at least two virtual roles and the intimacy relationship between the at least two virtual roles, determining the degree of approach and the degree of exit corresponding to the at least two virtual roles respectively based on the directional relationship of the directed edges, and determining other virtual roles related to any one virtual role according to the degree of approach and the degree of exit, and information such as the related directions and intimacy degrees between the other virtual roles and the virtual roles. Within a preset degree range, extracting a target relation diagram from the role relation diagram, and determining the intimacy analysis result among different virtual roles through the target relation diagram, for example: a ranking list of relative density, etc. By the method, the intimacy relationship among different players can be analyzed more globally, so that other players suitable for playing with the player can be recommended more uniformly and effectively, the interactivity of the player in the game is increased, and the interest of the game is improved.
In an alternative embodiment, the data processing method is applied to a card game scene, schematically, as shown in fig. 8, a data analysis process in a card game is described, and the analysis process includes the following steps 810 to 840.
At step 810, player data items are computed.
Alternatively, based on the amount of player game data, the value of affinity of each player for a period of time in the game, the data of each card held, and the like are calculated, and the calculated data are used as the basic data for each user.
Illustratively, as shown in fig. 9, the data items of player a, player B, player C, player D, and the like are calculated.
Step 820, generate a card pool.
Illustratively, for the case of player A, the card pool includes a personal draw card pool 910 and a gift card pool 920, as shown in FIG. 9. The personal self-drawing card pool 910 is a collection of cards obtained according to personal data of player a, wherein the personal data includes at least one of the following cards: (1) a player slot; (2) player competition; (3) the number of player races, etc. Optionally, the personal self-drawing card pool 910 includes a personal setting card, a personal privacy card, and a friend relationship card.
Optionally, the gift card pool 920 is obtained based on the data processing method, where players are used as nodes of a character relationship diagram, intimacy between different players is used as an edge, an overall character relationship diagram is generated, a target relationship diagram with the largest global weight is obtained on the premise that the outgoing degree and the incoming degree of each player are limited, and then an intimacy ranking list of each player is obtained, so that the relatively best friend of each person is constructed in a globally optimal angle.
Step 830, determine whether the card may be converted into a friend's card for presentation.
Illustratively, the nature of the gift card is that the personal of the friend sets up the card and the friend relationship card, that is: the personal setting card and the friend relationship card can be converted into a presentation card and presented to the friend.
Schematically, displaying the corresponding intimacy ranking list to each player, and selecting whether to present cards to friends or not by the player; or sending the present cards to part or all of the friends in the intimacy ranking list by the system according to the intimacy ranking list corresponding to each player.
Optionally, the determining the card presentation mode includes: whether the number of the personal setting card and the friend relationship card accords with the presentation condition or not; whether the given friends are friends in the intimacy ranking list or not.
At step 840, the pool of player cards is placed.
Optionally, as shown in fig. 9, under the condition that it is determined that the cards can be converted into friend present cards, the present cards are put into the present card pool of the player selected by the player according to the relation chain and the preset proportion, for example, the present cards are put into the present card pool of the player B, the player C or the player D; or put in pools of bonus cards for player B, player C, and player D, etc.
At step 850, the number of individual cards is determined.
Schematically, after partial cards in the cards set by the personal and the friend relationship cards are converted into presentation cards and put into a pool of the presentation cards presented to the friends, the number of the personal cards is judged. When the number of the personal cards is less than the lower limit, the large disc card needs to be supplemented to the lower limit, so that the number of the personal cards reaches the lower limit (as shown in fig. 9, M is the lower limit); when the number of the personal cards is larger than the lower limit, cards smaller than the upper limit number are randomly selected from the personal cards, or cards smaller than the upper limit number (as shown in fig. 9, N are numerical values of the upper limit or smaller than the upper limit) are randomly selected from the personal cards based on the sequence of the cards, and the like, so that the best friend recommendation is given through the data processing method on the premise that the personal cards are sufficient and cannot exceed the upper limit, and on the basis that the player A gives the card to the player B, the probability of the player B giving back is higher, so that the effects of the global maximum interaction rate and the transfer rate are achieved.
In an alternative embodiment, as shown in FIG. 9, the pool of bonus cards for Player A includes personalized cards and relationship cards for a plurality of players, such as Player B, Player C, and Player D. Illustratively, the number of cards in the pool of cards given by player A is checked in a periodic checking mode; or, the number of cards in the card pool given by the player A is checked in a real-time checking mode, and the like. When the number of cards in the card-presenting pool of the player A exceeds the upper limit, screening the cards in the card-presenting pool of the player A based on the intimacy relationship, for example: the method includes the steps of reserving bonus cards of players with high intimacy, filtering bonus cards of players with low intimacy, and the like. Alternatively, when the A-player does not have a relationship chain, the number of cards in the pool of complimentary cards may be 0, for example: player a does not have a game friend.
Alternatively, the card game is a stand-alone game, or the card game is a small game block in a large game. Illustratively, as shown in fig. 10, which is a game interface diagram of a built-in card game, a player can enter the card game by triggering an "XX pick" control 1010 on the game interface. Illustratively, the opening video is played when the player enters the card game for the first time, and is automatically closed after the opening video is played.
Alternatively, after entering the card game, the interface shown in fig. 11 is displayed, and the player can enter the card drawing interface shown in fig. 12 by triggering the "drawing" control 1110 on the interface, in the card drawing interface, the lens advances forward, and the player can click the return control 1210 at the upper left corner to return to the main page of the card drawing activity shown in fig. 11, or can click on the drum on the card drawing interface, so as to realize the process of charging the virtual model 1220 (the tiger expression shown in fig. 12), and when the energy is fast filled, the cards in the hand of the virtual model 1220 are shaken.
Illustratively, as the player strikes the drum surface, the special effects of tapping and flying in are displayed in the interface. For example: when a player knocks the drumhead, the drumhead emits light, or a special effect of 'note' is displayed on the interface; illustratively, the "note" effect displayed on the interface flies toward virtual model 1220 to indicate the process of charging virtual model 1220. Illustratively, during the tapping process, while the "note" effect flies toward the virtual model 1220, the virtual model 1220 becomes brighter and presents an animated feedback when it is brightest, appearing as an unexpected shake from the hand of the virtual model 1220, and finally flying away from the hand of the virtual model 1220, as shown in fig. 13, with the card 1310 in the hand of the virtual model flying toward the center of the interface.
Illustratively, when the player hits the drum surface, the corresponding sound effect is fed back in the interface, such as: the terminal corresponding to the game makes a sound for knocking the drumhead, or the terminal corresponding to the game generates vibration corresponding to knocking, and the like. Alternatively, different sound effects may be produced by tapping on different drums, as shown in FIG. 14, which is a combination drum, where different drums or drum positions correspond to different sound effects. For example, the shelf of assembled drums includes 6 timbres, 3 small drums 1410, one big drum 1420, one drum edge 1430, and one gong 1440. After any one of the combined drums is pressed for a long time, a complete piece of music is played, such as: the sound which accords with the scene atmosphere (such as a new year scene and a birthday scene) and the like such as celebration, joy and the like is generated after the different drums are knocked; or, if different drums are pressed for a long time at the same time, the music of the two musical instruments superposed is played, and the like. Illustratively, the duration of the music is the same as the duration of the progress of the calling card, for example: preset to 6 seconds, etc.
Optionally, in the interface shown in fig. 11, when the obtaining control 1120 in the interface is triggered, the interface appears as the obtaining route interface shown in fig. 15, and is used for indicating the obtaining route 1510 of the cards. For example: accumulating and logging in one day, and getting a corresponding number of cards; the friends can be shared with the cards, and the cards with corresponding number can be obtained.
In an alternative embodiment, the data processing method is called "global Maximum Weight subgraph matching algorithm with limited degree in weighted band diagram" (MWMG, Maximum Weight Graph Match Graph of direct weighted Graph with limited degree), and the algorithm belongs to the field of Graph computing science. Illustratively, the algorithm is applied to the card presentation interaction process, and the target subgraph with the highest presentation rate can be extracted under the requirement of limiting a certain number of mutual presentation cards.
Schematically, the principle of the algorithm is described.
Firstly, a target directed weighted graph is defined as G, the out-degree of each node needing to be cut is m, the in-degree is n, namely: and ensuring that the out-degree number of each node is less than or equal to m and the in-degree number is less than or equal to n. Edges between nodes have a direction and a weight, which may be some key feature, for example: matching times, game duration, affinity relationship, etc. And then, when an object graph with the maximum global weight is determined from the object directed weighted graph, each node in the object directed weighted graph G is reserved, edges in the object directed weighted graph G are cut, N friends with relative intimacy of players are extracted, and the maximum intimacy relation of the whole is determined based on the maximum global weight.
Step 1: constructing two node sets for all the point sets Vall, namely an in-degree set Vin and a Vout, wherein:
1. the in-degree set Vin = Map (nid, n), id ∈ Vall
2. Out-of-range set Vout = Map (nid, m), id ∈ Vall
3. Construct the target edge set E final = EmptyList [ ].
Step 2: traverse all edges from big to small, let current edge ecur = < nin, nout >
If Vin [ nin ] >0 and Vout [ nout ] >0 [ boundary condition ]
1. E final.append(ecur)
2. Vin[nin]-=1
3. Vout[nout]-=1。
Wherein, Vall represents the set representing all data nodes in the whole target directed weighted graph; vin represents a starting data node set of each directed edge in the current target directed weighted graph; vout represents the end point data node set of each directed edge in the current target directed weighted graph; nid represents the id of the current data node; e finel represents a set of edges needing to be reserved in the subgraph and finally obtained through the algorithm; nin represents the starting node id of the current directed edge; nout represents the current termination node id; ecur represents the currently traversed edge.
In an optional embodiment, the obtained cards are used as individual cards, the global maximum weight subgraph matching algorithm with the definition degree in the weighted zone graph is adopted based on the individual cards, the intimacy ranking list of the player is determined, and the global optimal presentation scheme is calculated, so that in the process of presenting the cards by the player, an interaction suggestion is provided for the player, the player can obtain the cards given back by other friends after presenting the cards to the other friends as far as possible, the interaction efficiency of the game is improved, and the global presentation proportion is improved.
In summary, the out-degree number and the in-degree number corresponding to each data node are determined based on the directional relationship of the directed edge in the target directed weighted graph, and a target subgraph with the maximum association degree between the data nodes is determined from the target directed weighted graph within a preset degree range based on the data nodes corresponding to the target directed weighted graph. By the method, the target directed weighted graph can be analyzed more carefully on the basis of keeping the data nodes unchanged by means of the weight and the direction of the directed edges in the target directed weighted graph, the method is also favorable for determining the relative high intimacy ranking list of the intimacy relationship among the players in the global range by means of the weight of the directed edges, and recommending other game players who may give back cards to the players, so that the mutual giving probability among the cards is improved, the interactivity of the players in the game is increased, and the interest of the game is enhanced.
Fig. 16 is a block diagram of a data processing apparatus according to an exemplary embodiment of the present application, and as shown in fig. 16, the apparatus includes the following components:
an obtaining module 1610 configured to obtain a target directed weighted graph, where the target directed weighted graph includes at least two data nodes, where at least two data nodes include a weighted directed edge therebetween, and the weight is used to indicate a directed association degree between the at least two data nodes;
a degree determining module 1620, configured to determine, based on a directional relationship between the directed edge and the at least two data nodes, an out-degree number and an in-degree number corresponding to the at least two data nodes, respectively; the degree of in represents the number of directed edges pointing to the data node, and the degree of out represents the number of directed edges pointing from the data node;
an extracting module 1630, configured to extract, based on the at least two data nodes, a target subgraph in the directed weighted graph within a preset degree range;
the relevance determining module 1640 is configured to determine data relevance between the at least two data nodes based on a directed edge distribution in the target subgraph.
As shown in fig. 17, in an alternative embodiment, the extracting module 1630 includes:
a subgraph determining unit 1631, configured to determine, based on the at least two data nodes, at least one subgraph corresponding to the target directed weighted graph within the preset degree range;
a weight determining unit 1632, configured to determine, based on weights corresponding to directed edges in the target directed weighted graph, global weights corresponding to the at least one subgraph respectively;
a target subgraph determining unit 1633, configured to determine a target subgraph from the at least one subgraph based on the global weight.
In an optional embodiment, the subgraph determining unit 1631 is further configured to cut the directed edge corresponding to each data node of the at least two data nodes within the range of the preset degree, so as to obtain a subgraph directed edge corresponding to the at least one subgraph; and obtaining the at least one subgraph corresponding to the target directed weighted graph based on the at least two data nodes and the subgraph directed edge.
In an optional embodiment, the preset degrees comprise a preset outgoing degree and a preset incoming degree;
the subgraph determining unit 1631 is further configured to clip the directed edge indicated by the data node within the preset degree; and within the range of the preset input degree, cutting the directed edges pointing to the data nodes.
In an optional embodiment, the weight determining unit 1632 is further configured to determine, based on the weight corresponding to the directed edge in the target directed weighted graph, the weight corresponding to the sub-graph directed edge; and summing weights corresponding to directed edges of subgraphs in the ith subgraph, and determining a global weight corresponding to the ith subgraph, wherein i is a positive integer.
In an optional embodiment, the relevance determining module 1640 is further configured to sort the weights of the target sub-graph directed edges corresponding to each data node in the target sub-graph, and determine a weight sequence; and determining the data association degree between the at least two data nodes based on the sorting condition of the weight value sequence.
In an optional embodiment, the obtaining module 1610 is further configured to obtain at least two data nodes participating in association analysis; determining directed edges corresponding to the at least two data nodes respectively based on the association degree relation between the at least two data nodes; and constructing the target directed weighted graph based on the at least two data nodes and the directed edges.
In an optional embodiment, the target subgraph determining unit 1633 is further configured to determine a target global weight meeting a preset criterion from the global weights; and determining the subgraph corresponding to the target global weight as the target subgraph.
In an optional embodiment, the target subgraph determining unit 1633 is further configured to use the largest weight of the global weights as the target global weight.
In an optional embodiment, the target subgraph determining unit 1633 is further configured to construct at least one subgraph corresponding to the target global weight into a candidate subgraph set; determining the target subgraph from the candidate subgraph set.
In an optional embodiment, the target subgraph determining unit 1633 is further configured to randomly select one of the candidate subgraphs from the candidate subgraph set as the target subgraph.
Fig. 18 is a block diagram of a data processing apparatus according to another exemplary embodiment of the present application, and as shown in fig. 18, the apparatus includes the following components:
a building module 1810, configured to build a role relationship graph, where at least two virtual roles are used as nodes in the role relationship graph, where the nodes include directed edges with weights, and the weights are used to indicate directional affinity strength relationships between the at least two virtual roles;
a degree determining module 1820, configured to determine, based on the directional relationship between the at least two virtual roles, an in degree and an out degree corresponding to each of the at least two virtual roles, where the in degree represents the number of directional edges pointing to the virtual role, and the out degree represents the number of directional edges pointed out by the virtual role;
an extracting module 1830, configured to extract, based on the at least two virtual roles, a target relationship diagram in the role relationship diagram within a range of a preset degree;
a result analysis module 1840, configured to determine an affinity analysis result between the at least two virtual roles based on a directional edge distribution condition in the role relationship graph.
In summary, the outgoing degree and the incoming degree corresponding to each data node are determined based on the directional relationship of the directed edge in the target directed weighted graph, and the target subgraph with the largest association degree between the data nodes is determined from the target directed weighted graph within a preset degree range based on the data nodes corresponding to the target directed weighted graph. By the aid of the device, the target directed weighted graph can be analyzed in more detail on the basis of keeping the data nodes unchanged by means of the weight and the direction of the directed edge in the target directed weighted graph. Meanwhile, the preset degrees comprise a preset output degree and a preset input degree, the target directed weighted graph is analyzed within the range of the preset degrees, and the process of analyzing each data node is facilitated. The target subgraph is determined based on the directed edges, and the situation that the association degree in the global range is relatively high is determined by means of the weight of the directed edges, so that the limitation when only part of data nodes are analyzed is avoided, the global association degree of the target subgraph is higher, the data association degree between the data nodes in the target directed weighted graph is further determined better, and the data conversion rate and the interaction proportion are improved.
It should be noted that: the data processing apparatus provided in the foregoing embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the data processing apparatus and the data processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 19 shows a schematic structural diagram of a server according to an exemplary embodiment of the present application. The server 1900 includes a Central Processing Unit (CPU) 1901, a system Memory 1904 including a Random Access Memory (RAM) 1902 and a Read Only Memory (ROM) 1903, and a system bus 1905 connecting the system Memory 1904 and the CPU 1901. The server 1900 also includes a mass storage device 1906 for storing an operating system 1913, application programs 1914, and other program modules 1915.
The mass storage device 1906 is connected to the central processing unit 1901 through a mass storage controller (not shown) connected to the system bus 1905. The mass storage device 1906 and its associated computer-readable media provide non-volatile storage for the server 1900. That is, the mass storage device 1906 may include a computer-readable medium (not shown) such as a hard disk or Compact disk Read Only Memory (CD-ROM) drive.
Without loss of generality, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash Memory or other solid state Memory technology, CD-ROM, Digital Versatile Disks (DVD), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage, or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 1904 and mass storage device 1906 described above may be collectively referred to as memory.
According to various embodiments of the application, the server 1900 may also operate with remote computers connected to a network through a network, such as the Internet. That is, the server 1900 may be connected to the network 1912 through the network interface unit 1911 connected to the system bus 1905, or the network interface unit 1911 may be used to connect to other types of networks or remote computer systems (not shown).
The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.
Embodiments of the present application further provide a computer device, which includes a processor and a memory, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the data processing method provided by the foregoing method embodiments.
Embodiments of the present application further provide a computer-readable storage medium, on which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the data processing method provided by the above-mentioned method embodiments.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the data processing method described in any of the above embodiments.
Optionally, the computer-readable storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a Solid State Drive (SSD), or an optical disc. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended only to illustrate the alternative embodiments of the present application, and should not be construed as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A method of data processing, the method comprising:
obtaining a target directed weighted graph, wherein the target directed weighted graph comprises at least two data nodes, a directed edge with weight is included between the at least two data nodes, and the weight is used for indicating the directed association degree between the at least two data nodes;
determining the out degree number and the in degree number corresponding to the at least two data nodes respectively based on the directional relation of the directed edge between the at least two data nodes; the degree of in represents the number of directed edges pointing to the data node, and the degree of out represents the number of directed edges pointing from the data node;
based on the at least two data nodes, sequencing the weights corresponding to the directed edges, reserving the directed edge with the largest weight according with the preset degree in a preset degree range, cutting other directed edges, and determining at least one sub-graph;
determining global weights corresponding to the at least one subgraph respectively based on weights corresponding to directed edges in the target directed weighted graph, and determining a target subgraph from the at least one subgraph based on the global weights;
and determining the data association degree between the at least two data nodes based on the directed edge distribution condition in the target subgraph.
2. The method according to claim 1, wherein the step of retaining the directional edge with the largest weight according to the preset degree in a preset degree range, and clipping other directional edges to determine at least one subgraph comprises:
within the range of the preset degree, reserving a directed edge which has the maximum weight and accords with the preset degree and corresponds to each data node in the at least two data nodes, and cutting other directed edges to obtain a sub-graph directed edge corresponding to the at least one sub-graph;
and obtaining the at least one subgraph corresponding to the target directed weighted graph based on the at least two data nodes and the subgraph directed edge.
3. The method of claim 2, wherein the predetermined number of degrees comprises a predetermined number of degrees out and a predetermined number of degrees in;
the cutting other directed edges includes:
clipping directed edges indicated from the data nodes;
and clipping the directed edges pointing to the data nodes.
4. The method according to claim 1, wherein the determining global weights corresponding to the at least one subgraph respectively based on the weights corresponding to the directed edges in the target directed weighted graph comprises:
determining the weight corresponding to the sub-graph directed edge based on the weight corresponding to the directed edge in the target directed weighted graph;
and summing the weights corresponding to the directed edges of the subgraphs in the ith subgraph to determine the global weight corresponding to the ith subgraph, wherein i is a positive integer.
5. The method of claim 4, wherein determining the degree of data relevance between the at least two data nodes based on the directed edge distribution in the target subgraph comprises:
sorting the weights of the directed edges of the target subgraph corresponding to each data node in the target subgraph, and determining a weight sequence;
and determining the data association degree between the at least two data nodes based on the sorting condition of the weight value sequence.
6. The method of any of claims 1 to 5, wherein the obtaining the target directed weighted graph comprises:
acquiring at least two data nodes participating in association degree analysis;
determining directed edges corresponding to the at least two data nodes respectively based on the association degree relation between the at least two data nodes;
and constructing the target directed weighted graph based on the at least two data nodes and the directed edges.
7. The method of any of claims 1 to 5, wherein the determining a target subgraph from the at least one subgraph based on the global weight comprises:
determining a target global weight which meets a preset standard from the global weights;
and determining the subgraph corresponding to the target global weight as the target subgraph.
8. The method according to claim 7, wherein the determining a target global weight meeting a preset criterion from the global weights comprises:
and taking the maximum weight value in the global weight values as the target global weight value.
9. The method of claim 7, wherein the determining the subgraph corresponding to the target global weight as the target subgraph comprises:
at least one subgraph corresponding to the target global weight is formed into a candidate subgraph set;
determining the target subgraph from the candidate subgraph set.
10. The method of claim 9, wherein the determining the target subgraph from the set of candidate subgraphs comprises:
and randomly selecting one candidate subgraph from the candidate subgraph set as the target subgraph.
11. A method of data processing, the method comprising:
constructing a role relationship graph, wherein at least two virtual roles are taken as nodes in the role relationship graph, directed edges with weights are included among the nodes, and the weights are used for indicating the directed affinity strength relationship between the at least two virtual roles;
determining an in degree number and an out degree number which correspond to the at least two virtual characters respectively based on the directional relation of the directional edges between the at least two virtual characters, wherein the in degree number represents the number of the directional edges pointing to the virtual characters, and the out degree number represents the number of the directional edges pointed out by the virtual characters;
based on the at least two virtual roles, sequencing the weights corresponding to the directed edges, reserving the directed edge with the largest weight according with the preset degrees in a preset degree range, cutting other directed edges, and determining at least one sub-graph;
determining global weights corresponding to the at least one subgraph respectively based on weights corresponding to directed edges in the role relationship graph, and determining a target relationship graph from the at least one subgraph based on the global weights;
and determining an affinity analysis result between the at least two virtual roles based on the directional edge distribution condition in the role relationship graph.
12. A data processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a target directed weighted graph, the target directed weighted graph comprises at least two data nodes, a directed edge with a weight is included between the at least two data nodes, and the weight is used for indicating the directed association degree between the at least two data nodes;
the degree determining module is used for determining the out-degree number and the in-degree number corresponding to the at least two data nodes respectively based on the directional relation of the directed edge between the at least two data nodes; the degree of in represents the number of directed edges pointing to the data node, and the degree of out represents the number of directed edges pointing from the data node;
an extraction module comprising:
a subgraph determining unit, configured to rank the weights corresponding to the directed edges based on the at least two data nodes, reserve the directed edge with the largest weight according to a preset degree within a preset degree range, and cut other directed edges to determine at least one subgraph;
a weight determining unit, configured to determine, based on weights corresponding to directed edges in the target directed weighted graph, global weights corresponding to the at least one subgraph respectively;
a target subgraph determining unit, configured to determine a target subgraph from the at least one subgraph based on the global weight;
and the association degree determining module is used for determining the data association degree between the at least two data nodes based on the directed edge distribution condition in the target subgraph.
13. A data processing apparatus, characterized in that the apparatus comprises:
the role relationship graph comprises a construction module, a calculation module and a display module, wherein the construction module is used for constructing a role relationship graph, at least two virtual roles are used as nodes in the role relationship graph, directed edges with weights are included among the nodes, and the weights are used for indicating the directed affinity strength relationship between the at least two virtual roles;
the degree determining module is used for determining the degree of entry and the degree of exit which correspond to the at least two virtual characters respectively based on the directional relation of the directional edges between the at least two virtual characters, wherein the degree of entry represents the number of the directional edges pointing to the virtual characters, and the degree of exit represents the number of the directional edges pointed out by the virtual characters;
the extraction module is used for sequencing the weights corresponding to the directed edges on the basis of the at least two virtual roles, reserving the directed edge with the largest weight according with the preset degrees in a preset degree range, cutting other directed edges and determining at least one sub-graph; determining global weights corresponding to the at least one subgraph respectively based on weights corresponding to directed edges in the role relationship graph, and determining a target relationship graph from the at least one subgraph based on the global weights;
and the result analysis module is used for determining the intimacy analysis result between the at least two virtual roles based on the directed edge distribution condition in the role relationship diagram.
14. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes or set of instructions, which is loaded and executed by the processor to implement a data processing method according to any one of claims 1 to 11.
15. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement a data processing method according to any one of claims 1 to 11.
CN202210119110.4A 2022-02-08 2022-02-08 Data processing method, device, equipment and medium Active CN114168805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210119110.4A CN114168805B (en) 2022-02-08 2022-02-08 Data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210119110.4A CN114168805B (en) 2022-02-08 2022-02-08 Data processing method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN114168805A CN114168805A (en) 2022-03-11
CN114168805B true CN114168805B (en) 2022-05-20

Family

ID=80489508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210119110.4A Active CN114168805B (en) 2022-02-08 2022-02-08 Data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114168805B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193896A (en) * 2017-05-09 2017-09-22 华中科技大学 A kind of diagram data division methods based on cluster
WO2018149292A1 (en) * 2017-02-14 2018-08-23 腾讯科技(深圳)有限公司 Object clustering method and apparatus
CN112990987A (en) * 2021-05-11 2021-06-18 腾讯科技(深圳)有限公司 Information popularization method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11227190B1 (en) * 2021-06-29 2022-01-18 Alipay (Hangzhou) Information Technology Co., Ltd. Graph neural network training methods and systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018149292A1 (en) * 2017-02-14 2018-08-23 腾讯科技(深圳)有限公司 Object clustering method and apparatus
CN107193896A (en) * 2017-05-09 2017-09-22 华中科技大学 A kind of diagram data division methods based on cluster
CN112990987A (en) * 2021-05-11 2021-06-18 腾讯科技(深圳)有限公司 Information popularization method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
加权有向网络中心节点识别的分解算法研究;刘臣 等;《计算机应用研究》;20190131;第36卷(第1期);第37-40页 *

Also Published As

Publication number Publication date
CN114168805A (en) 2022-03-11

Similar Documents

Publication Publication Date Title
CN107977411B (en) Group recommendation method, device, storage medium and server
US11200247B2 (en) Method and system for keyword search using messaging service
KR102489339B1 (en) Method and system for recommendation using content with location data
CN110287399B (en) Live broadcast information processing method and device, electronic equipment and storage medium
CN112035549B (en) Data mining method, device, computer equipment and storage medium
CN110061908A (en) Application program recommendation, device, electronic equipment and medium
WO2018196553A1 (en) Method and apparatus for obtaining identifier, storage medium, and electronic device
JP7273100B2 (en) Generation of text tags from game communication transcripts
CN109729377B (en) Anchor information pushing method and device, computer equipment and storage medium
CN113779381B (en) Resource recommendation method, device, electronic equipment and storage medium
CN111435369B (en) Music recommendation method, device, terminal and storage medium
TW202016769A (en) Method and system for collecting unanswered messages and non-transitory computer-readable recording medium including a selection step, a collection step and a processing step
JP7202386B2 (en) Method and system for providing multiple profiles
US20190089765A1 (en) Computer system for network node review for actionable item
US9058090B1 (en) Collaborative information sharing in a virtual world
CN113343089A (en) User recall method, device and equipment
KR101929649B1 (en) System and method for recommendation of open chat room through chat log keyword extraction
CN111159382A (en) Method and device for constructing and using session system knowledge model
CN105099727B (en) Add the method and device of group member
CN110188123A (en) User matching method and equipment
CN114168805B (en) Data processing method, device, equipment and medium
CN111918104A (en) Video data recall method and device, computer equipment and storage medium
KR101383695B1 (en) Method and apparatus for creating game room automatically
CN111767473B (en) Object selection method and computer readable storage medium
CN114418120A (en) Data processing method, device, equipment and storage medium of federal tree model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant