Data processing method, apparatus, and electronic device

Fine-grained locking using atomic operation instructions addresses contention issues in parallel community partitioning, enhancing efficiency and stability for large-scale network analysis.

JP2025079305APending Publication Date: 2025-05-21BEIJING VOLCANO ENGINE TECH CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024126495
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-09
Filing Date
2024-08-02
Publication Date
2025-05-21

AI Technical Summary

Technical Problem

Existing community partitioning algorithms for large-scale relationship networks are inefficient and unstable when executed in parallel due to contention issues among multiple threads, particularly when using traditional lock mechanisms, which can lead to interruptions and reduced efficiency.

Method used

Implementing fine-grained locking based on atomic operation instructions to control multiple threads for parallel community partitioning, encapsulating operations like take-value, add, and compare as indivisible instruction-level atomic operations to prevent thread interruptions.

Benefits of technology

This approach enhances the efficiency and stability of community partitioning, allowing for quick and accurate determination of node communities, thereby improving the performance of community partitioning on large-scale relationship networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025079305000001_ABST
    Figure 2025079305000001_ABST
Patent Text Reader

Abstract

To provide a method for facilitating understanding of network structures of networks.SOLUTION: A data processing method and apparatus, and an electronic device are provided. In a community division scene, a community division algorithm is performed in parallel, through a plurality of threads and using fine-grained locks implemented based on atomic operation instructions, on a relationship network to realize community division. Operations such as obtaining a value, accumulation, comparison, and replacement are packaged as instruction level atomic operations by fine-grained locks implemented with atomic operation instructions to give play to inseparability of the atomic operations for guaranteeing that threads having the fine-grained locks would not be interrupted during a process of performing corresponding operations, and the efficiency and stability of community division are thus improved.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] TECHNICAL FIELD The embodiments of the present disclosure relate to the technical fields of computers and big data processing, and in particular to data processing methods, apparatus and electronic devices. [Background technology]

[0002] With the development of modern information technology, different types of networks have emerged, such as the Internet of Things, urban traffic networks, medical networks, power networks, social networks, etc. These networks can be relationship networks. A community is a group of nodes in a network, and the relationships between these nodes are closer than those between other nodes in the network. By performing community partitioning on these networks, the network structure of these networks can be easily understood. Summary of the Invention [Means for solving the problem]

[0003] Embodiments of the present disclosure provide a data processing method, apparatus, and electronic device.

[0004] According to a first aspect, an embodiment of the present disclosure provides a data processing method, the method comprising: The method includes: obtaining a target relationship network related to the first object based on a first operation on the first object, the target relationship network representing association relationships among a plurality of objects through node network relationships; obtaining a plurality of first node communities, each of which includes at least one node in the target relationship network, by controlling a plurality of threads to perform community partitioning in parallel on the target relationship network using a lock realized based on an atomic operation instruction; and determining a first node community to which the first object belongs based on an association relationship between the first object and an object corresponding to each node in the target relationship network.

[0005] According to a second aspect, an embodiment of the present disclosure provides a data processing apparatus, the apparatus including: an obtaining unit, used for obtaining a target relationship network related to a first object based on a first operation on the first object, for representing association relationships among a plurality of objects through node network relationships; a processing unit, used for obtaining a plurality of first node communities, each of which includes at least one node in the target relationship network, by controlling a plurality of threads to perform community partitioning in parallel on the target relationship network using a lock realized based on an atomic operation instruction; and a determining unit, used for determining a first node community to which the first object belongs based on an association relationship between the first object and an object corresponding to each node in the target relationship network.

[0006] According to a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a processor and a memory, wherein computer executable instructions are stored in the memory, and wherein the processor executes the computer executable instructions stored in the memory to cause the at least one processor to perform the above first aspect, second aspect and various possible related methods of the first and second aspects.

[0007] According to a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, the computer-executable instructions being executed by a processor to implement the above-described first aspect, second aspect and various related possible methods of the first aspect and / or second aspect.

[0008] According to a fifth aspect, an embodiment of the present disclosure provides a computer program product including a computer program, the computer program being operable, when executed by a processor, to implement the above first aspect, second aspect and various related possible methods of the first aspect and / or second aspect.

[0009] According to the present embodiment, the data processing method, the apparatus, and the electronic device obtain a target relationship network related to the first object based on a first operation on the first object, for expressing the association relationship between a plurality of objects by a node network relationship, and obtain a plurality of first node communities, each including at least one node in the target relationship network, by controlling a plurality of threads to perform community partitioning on the target relationship network in parallel using a lock realized based on an atomic operation instruction, and determine a first node community to which the first object belongs based on the association relationship between the first object and an object corresponding to each node in the target relationship network. Since the community partitioning is performed on the target relationship network in parallel using a lock realized based on an atomic operation instruction, the efficiency and stability of performing community partitioning on a social network can be improved, and the node community to which an object belongs can be quickly and accurately determined.

[0010] In order to more clearly describe the embodiments of the present disclosure or the technical solutions of the prior art, the drawings necessary for describing the embodiments or the prior art are briefly described below, and it is obvious that the drawings described below are some embodiments of the present disclosure, and those skilled in the art can further obtain other drawings based on these drawings without requiring creative labor. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 is a schematic flow chart 1 of the data processing method according to the present disclosure. [Diagram 2] FIG. 2 is a schematic flow chart 2 of the data processing method according to the present disclosure. [Diagram 3] FIG. 3 is a schematic diagram of one application scenario. [Figure 4] FIG. 4 is a schematic diagram of one application scenario. [Diagram 5] FIG. 5 is a schematic diagram of one application scenario. [Figure 6] FIG. 6 is a schematic diagram of one application scenario. [Figure 7] FIG. 7 is a schematic structural block diagram of a data processing device according to the present disclosure. [Figure 8] FIG. 8 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] In order to make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings of the embodiments of the present disclosure, and it is obvious that the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without requiring creative labor all belong to the protection scope of the present disclosure.

[0013] Typically, a community partitioning (also called social discovery) algorithm is used to perform community partitioning on a topology map of a network. The community partitioning method may include Louvain algorithm, Leiden algorithm, etc. However, the community partitioning algorithm is usually executed in series, and is not efficient in performing community partitioning on a large-scale relationship network. In addition, the above community partitioning algorithm cannot be applied to a distributed relationship network in which nodes are distributed on different devices.

[0014] When performing community partitioning on a relationship network, since there is a limit on the number of nodes in the node community to be partitioned, a contention problem occurs when performing community partitioning on a relationship network in parallel using multiple threads. A lock mechanism may be used to solve the contention problem that occurs when performing community partitioning in parallel. However, when resolving contention using a lock mechanism, it is usually necessary to first acquire a lock and then perform a series of operations such as value take, addition, comparison, and substitution, and in this process, the thread that has acquired the lock may be interrupted, which requires a long time for this process, restricts the efficiency of performing community partitioning in parallel, and reduces the stability of community partitioning.

[0015] The solution disclosed herein uses fine-grained locking implemented based on atomic operation instructions in multiple threads to perform community partitioning on a relationship network in parallel, the fine-grained locking implemented based on atomic operation instructions encapsulates a series of operations such as take-value, add, compare and replace required to resolve races into instruction-level atomic operations, and due to the indivisibility of atomic operations, threads that have acquired the fine-grained lock will not be interrupted in the process of performing the series of operations, improving the efficiency and stability of community partitioning, and further enabling the node community corresponding to an object to be determined quickly and accurately.

[0016] 1, a schematic flow chart 1 of a data processing method according to the present disclosure is shown. As shown in FIG. 1, the method includes S101 to S103.

[0017] S101: Based on a first operation on a first object, obtain a target relationship network related to the first object and for representing association relationships among multiple objects by node network relationships.

[0018] S102: Obtain multiple first node communities by controlling multiple threads to perform community splitting in parallel on the target relationship network using a lock realized based on an atomic operation instruction, and each first node community includes at least one node in the target relationship network.

[0019] S103: Determine a first node community to which the first object belongs based on the association relationships between the first object and objects corresponding to each node in the target relationship network.

[0020] In this embodiment, the executing entity of the data processing method may be a server that provides a data service to a client.

[0021] The data processing method disclosed herein can be applied to recommendation service scenarios, financial service scenarios, etc. Recommendation service scenarios include social friend recommendation scenarios, product recommendation scenarios, etc. Financial service scenarios include intelligent risk control scenarios, fraud prevention identification scenarios, etc.

[0022] Taking a social friend recommendation scene as an example, a first user can use a client to perform a contact addition operation (first operation) on a second user (first object) on a social network page. The client can send information of the contact addition operation to a server. The server can obtain a target relationship network related to the second user. The target relationship network includes nodes corresponding to a plurality of users having an association relationship with the second user. A lock realized based on an atomic operation instruction is used to control multi-threads to perform community division in parallel on the target relationship network, and a plurality of first node communities are determined based on the result of the community division. Then, at least one other target user is determined based on the association relationship between each node in the plurality of first node communities and the second user. For example, a user whose association relationship strength is greater than a preset threshold is set as the other target user. Information of the other target user is recommended to the first user. Furthermore, social friend recommendation can be performed quickly and accurately.

[0023] Taking an intelligent risk control scene in the field of finance as an example, the server determines a first entity (first object) as a risk entity based on the evaluation result of risk control, and sets a risk entity label on the first entity (first operation). The server can obtain a target relationship network related to the first entity. The target relationship network may include nodes corresponding to a plurality of users having an association relationship with the first entity. A lock realized based on an atomic operation instruction is used to control multi-threads to perform community division in parallel on the target relationship network, and a plurality of first node communities are determined based on the result of the community division. Then, at least one third user is determined based on the association relationship between each node in the plurality of first node communities and the first entity. For example, a user whose association relationship strength is greater than a preset threshold is the third user. Furthermore, information that the third user is a risk user can be pushed to a financial institution. This allows the information of the risk user to be pushed to the financial institution quickly and accurately, and financial losses can be avoided.

[0024] Taking an item recommendation scene as an example, a user searches for a first item (first object) in a network platform that provides items (first operation). A server of the network platform can obtain a target relationship network related to the first item. The target relationship network includes nodes corresponding to multiple objects. A lock realized based on an atomic operation instruction is used to control multi-threads to perform community division in parallel on the target relationship network, and multiple first node communities are determined based on the results of the community division. Then, at least one second item is determined based on the association relationship between each node in the multiple first node communities and the first item. For example, an item whose association relationship strength is greater than a preset threshold is determined as the second item. Furthermore, the second item can be pushed to the user. As a result, an item that meets the user's needs can be quickly and accurately recommended to the user.

[0025] The first object may include a person, an object, a multimedia content, etc. The first operation may include an operation such as clicking, touching, browsing, searching, etc. performed on the information of the first object. If the first object is a person, the first operation may further include an operation of adding the first object as a contact. If the first object is an object, the first operation may further include an operation of adding to a pre-defined network object library. If the first object is a multimedia content, the first operation may further include an operation of following or adding the first object to a favorite.

[0026] The target relationship network may be a pre-created network, or it may be created in real-time based on association relationships between multiple objects.

[0027] In some embodiments, the first object may be the same as an object corresponding to a node in the target relationship network, ie, the first object is a node in the target relationship network.

[0028] In some embodiments, the first object may not be a node in the target relationship network, but the first object may have an association relationship with at least one node in the target relationship network.

[0029] Taking the first object as an example of a person, in these embodiments, the first object and the object serving as a node in the target relationship network have kinship relationships, social relationships, behavioral interrelationships, etc. Taking the first object as an example of an article, the first object and the object serving as a node in the target relationship network have association relationships such as same place of origin, same category, same function, etc.

[0030] The target relationship network includes nodes (also called vertices) each corresponding to a plurality of objects, and edges connecting the association relationships between any two objects. In the relationship network, both the nodes and edges may have corresponding attributes. The attributes of a node may include, for example, an object identifier, the number of objects corresponding to the node, a degree, etc. The degree of a node is the number of edges connected to the node. The attributes of an edge include the relationship type between the objects corresponding to the two nodes connected to the edge, and the strength of the relationship between the two nodes connected to the edge.

[0031] Usually, there is a maximum number limit for a node community, i.e., the number of nodes in each node community cannot exceed this maximum number.

[0032] In order to improve the efficiency of performing community partitioning on a large-scale relationship network, the community partitioning algorithm can be executed in parallel using multi-threading to achieve community partitioning of the relationship network.

[0033] Due to the limitation of the maximum number of node communities, a competition phenomenon occurs in the process of multi-threads executing the community partitioning algorithm in parallel to perform community partitioning on the target relationship network, i.e., different threads compete to move their corresponding nodes to the same node community.

[0034] By using a lock mechanism, the problem of multiple threads competing to add multiple nodes to the same node community can be solved. When using a normal lock, the thread that has acquired the lock can take the original number of nodes in the node community, i.e., take the original value, and then add the number of nodes that the thread wants to move to the node community to the original value to get the new number of nodes, and then compare whether the new number of nodes exceeds the maximum number of the node community. If the new number of nodes does not exceed the maximum number, the thread moves the nodes that the thread wants to move to the node community to the node community, and replaces the original number of nodes with the new number of nodes to become the number of nodes in the node community. If the new number of nodes exceeds the maximum number, the thread fails to add the corresponding node to the node community. A thread that has not acquired the lock cannot realize the corresponding node to be added to the community. Therefore, the process of the thread that has acquired the lock adding a node to the node community includes a series of operations such as taking the original value, adding, comparing, and replacing. In the process of the thread that has acquired the lock performing the series of operations, it may be interrupted to perform other tasks, which reduces the efficiency of parallel execution of community division.

[0035] In this embodiment, a lock implemented based on an atomic operation instruction is used to control multiple threads to perform community splitting in parallel on the target relation network.

[0036] The atomic operation instruction here may be a Compare and Swap (CAS) atomic operation instruction. The lock realized by the atomic operation instruction in this embodiment encapsulates a series of operations such as take value (take the original value, i.e., take the number of nodes in the original node community), add (add the number of nodes to be added to the node community to the original value to obtain a new value, i.e., the new number of nodes), compare (compare whether the new number of nodes exceeds the maximum number), and replace (replace the original value with the new value if the new value does not exceed the maximum number of the node community) as an instruction-level atomic operation. The instruction-level atomic operation is indivisible. Due to the indivisibility of the atomic operation instruction, the thread that has taken the lock is not interrupted in the process of performing the series of operations of take value, add, compare, and replace, and therefore the thread that has taken the lock can complete the corresponding community division operation within an extremely short time. Based on the results obtained by the multi-threads performing the community division operation, multiple first node communities can be determined.

[0037] Due to the indivisibility of the atomic operation instruction, the thread that acquires the lock can complete the corresponding community partitioning operation in a very short time, which improves the efficiency and stability of performing community partitioning on the target relation network, thereby quickly and accurately realizing the community partitioning of the target relation network.

[0038] In some embodiments, the lock may be a fine-grained lock. When using fine-grained locking, the second node community to which each node is to be added by the thread can be determined in advance. Then, the fine-grained locking realized based on the atomic operation instruction is used to perform community division. For each thread, the range locked by the fine-grained lock is controlled to the second node community to which the node in the thread is to be added. Multiple threads can add their corresponding nodes to different second node communities at the same time without interfering with each other, which can improve the performance of parallel execution.

[0039] After completing the community division of the target relationship network, a first node community corresponding to the first object can be determined. Specifically, if the first object is a node in the target relationship network, the first node community in which the first object is included can be the first node community to which the first node belongs. If the first object is not a node in the target relationship network, the strength of the association relationship between each node in the target relationship network and the first object can be determined, and the first node community to which the node with the largest association relationship strength belongs can be the first node community to which the first object belongs.

[0040] In this embodiment, a target relationship network related to the first object is obtained based on a first operation on the first object, the target relationship network is used to represent the association relationship between multiple objects by node network relationships, a plurality of first node communities are obtained by controlling a plurality of threads to perform community partitioning on the target relationship network in parallel using a lock realized based on an atomic operation instruction, each first node community includes at least one node in the target relationship network, and a first node community to which the first object belongs is determined based on the association relationship between the first object and an object corresponding to each node in the target relationship network. Since the lock realized based on the atomic operation instruction is used to perform community partitioning on the target relationship network in parallel, the efficiency and stability of performing community partitioning on the social network can be improved, and the node community to which the object belongs can be quickly and accurately determined.

[0041] Please refer to Fig. 2, which shows a schematic flow chart 2 of the data processing method according to the present disclosure. As shown in Fig. 2, the data processing method further includes the following S201 to S206.

[0042] S201: Based on a first operation on a first object, obtain a target relationship network related to the first object and for representing association relationships among multiple objects by node network relationships.

[0043] The relevant description of step S201 above may be referred to as step S101 in the embodiment shown in FIG. 1, and will not be repeated here.

[0044] S202: Each node in the target relation network is treated as a second node community including independent nodes.

[0045] S203: Obtain multiple third node communities by controlling multiple threads to perform local node move operations on nodes in multiple second node communities using a lock realized based on an atomic operation instruction, and the local node move operations are used to move independent nodes in the second node community to an adjacent second node community based on modularity.

[0046] S204: Partition the third node community to obtain multiple fourth node communities.

[0047] S205: Perform node fusion on a fourth node community including at least two nodes, and fuse the at least two nodes into one independent node; after performing node fusion, perform relationship network reconstruction on the independent nodes in all fourth node communities to obtain a reconstructed target relationship network; and repeatedly execute the above steps on the reconstructed target relationship network until a preset condition is satisfied; and finally, the obtained multiple fourth node communities are multiple first node communities.

[0048] S206: Determine a first node community to which the first object belongs based on the association relationships between the first object and objects corresponding to each node in the target relationship network.

[0049] Initially, each node in the target relationship network may be a second node community, i.e., the second node community is initially an independent node community. The second node community determined by the reconstructed target relationship network after at least one iteration is a pseudo-independent node community. The number of nodes in the relationship network corresponding to the pseudo-independent node can be recorded.

[0050] The multiple threads may be threads created for running a community discovery algorithm in parallel on multiple nodes in the target relationship network.

[0051] In some embodiments, each thread may be assigned a number of nodes in the target relationship network (where the number of nodes may correspond to a number of second node communities having independent nodes). Specifically, each thread may be randomly assigned a number of nodes in the target relationship network.

[0052] For each thread, the thread may first determine an adjacent second node community to which the node handled by the thread is to move. Specifically, for each node, the thread may determine at least one adjacent node of the node based on the edges connected to the node. Then, the thread calculates the modularity of the node after moving the node to a second node community with an adjacent node, and if it is determined that the modularity has increased, the adjacent second node community is the second node community to which the node is to move.

[0053] Then, the thread is controlled to perform a local node move operation using a lock (e.g., a fine-grained lock) implemented based on an atomic operation instruction. When a node moves to a second community with adjacent nodes, the second node community with the adjacent nodes is no longer a second node community with independent nodes. During the local node move operation, only nodes in the second node community with independent nodes are moved.

[0054] When each thread performs a local node move, a lock can be executed for each thread based on an atomic operation instruction. In this way, when multiple threads compete to move their respective nodes to the same second node community, the thread that has acquired the lock completes the take value, add, compare, and replace through indivisible instruction level operations, and the thread then completes the operation of adding the corresponding node to the second node community. In this process, the thread that has acquired the lock can quickly realize adding the corresponding node to the second node community. The second node community that is finally left after the local node move operation is called a third node community. The third node community may include an independent node community in which there is a node that is not moved during the local node move operation, and a community including multiple nodes.

[0055] There may be a phenomenon that occurs during local node movement that does not connect multiple third node communities.

[0056] In order to improve the disconnection phenomenon existing in the above third node community, a partitioning operation can be performed on the third node community that does not have an independent node.

[0057] Furthermore, the step of partitioning the third node community and obtaining a plurality of fourth node communities includes: The method includes controlling a plurality of threads to partition the plurality of third node communities, respectively, to obtain a plurality of fourth node communities.

[0058] For each third node community, one thread corresponding to the third node community can be assigned, and the thread performs partitioning of the third node community.

[0059] For the multiple third node communities, a partitioning operation can be performed in parallel by threads corresponding to the multiple third node communities, respectively.

[0060] A plurality of fourth node communities can be obtained quickly by having threads corresponding to the plurality of third node communities execute partitioning in parallel for the plurality of third node communities.

[0061] For multiple fourth node communities, a relationship network can be reconstructed with the fourth node community as one node. The above steps S202-S205 are repeated for the reconstructed target relationship network, and the above steps S202-S205 are repeated multiple times, and the iteration is stopped when a preset condition is satisfied. The finally obtained fourth node community is the first node community. As can be seen, the pseudo single node in each finally obtained fourth node community can be restored to the form of a node in the original target relationship network, thereby obtaining multiple first node communities.

[0062] The preset conditions include that the number of iterations meets a number threshold or that the modularity does not increase.

[0063] In this embodiment, for a target relationship network, multi-threads are controlled to perform local node movement operations on multiple nodes (each independent node corresponds to one second node community) using a lock realized based on an atomic operation instruction, thereby obtaining multiple third node communities, partitioning the third communities, and determining multiple first node communities based on the partitioning results, so that on the one hand, the community division of the target relationship network can be quickly realized, and on the other hand, a community division result with excellent connectivity can be obtained, and further, the accuracy of the first node community to which the determined first object belongs can be improved.

[0064] In some embodiments, multiple nodes in the target relationship network are distributed to different devices. Here, the nodes are in the respective devices, which means that the data of the nodes are distributed to the corresponding devices. For each device, the data of the nodes corresponding to the device can be stored. The data of the nodes includes, but is not limited to, the attributes of the nodes, the number of edges connected to the nodes, the attributes of each edge connected to the nodes, etc. The data processing method further includes the following steps:

[0065] First, based on modularity, each node in each device determines at least one target second node community to which it will respectively attempt to join.

[0066] Next, the devices are sorted according to a preset rule to obtain a first order. The method includes a step of controlling, for each device, in accordance with an order of the device in the first order, the device to execute a local node move operation on a plurality of nodes distributed to the device by a lock realized based on an atomic operation instruction using a plurality of threads, the local node move operation being used to move the plurality of nodes of the device to their corresponding adjacent target second node communities based on modularity.

[0067] In these embodiments, an electronic device corresponding to a server can be connected to the plurality of devices. For a plurality of nodes in the target relationship network, i.e., for the second node community having independent nodes in step S202, a target second node community to which the plurality of nodes are to move can be determined based on the rule of increasing modularity. Specifically, for a node, a candidate target second node community can be determined based on the connection relationship with other nodes. After the node is added to each candidate target second node community, the corresponding modularity is calculated. The candidate target second node community whose modularity increase value is greater than a preset threshold is taken as the target second node community. Or, the plurality of candidate target node communities whose modularity increases are sorted in descending order of increasing modularity value, and the plurality of candidate target second node communities whose numbers are less than a preset number threshold are selected as the target second node community.

[0068] The pre-set rules may include, for example, sorting each device in descending order of the amount of data of the stored node, or sorting according to the device number, and so on.

[0069] The execution subject can control each device in turn according to the first order to perform a local node move operation. Specifically, each device can use multithreading when performing a local node move operation and perform the local node move operation on multiple nodes corresponding to the device by a lock realized based on an atomic operation instruction.

[0070] After each device completes the local node movement operation, each resulting second node community can be a third node community. As can be understood, after a node in a second node community moves to a target second node community, the second node community may be deleted.

[0071] In some embodiments, the data processing method further includes synchronizing the results of the local node movement operations performed by each device to other devices. In these embodiments, for each device, after performing local node movement on the corresponding node in the device by a lock realized based on an atomic operation instruction, information of the multiple second node communities obtained after the local node movement operation is completed can be synchronized to other devices.

[0072] In these embodiments, multiple nodes in the target relationship network are distributed in different devices, and central scheduling can be performed for multiple devices, thereby realizing multiple devices to perform local node movement operations according to corresponding orders. A lock realized based on an atomic operation instruction in a single device is used to control multithreading to perform local node movement for multiple nodes. In a distributed environment, the contention of multiple nodes is restricted to a single device, and the lock operation is also restricted to a single device, and there is no need to use a distributed lock to resolve the contention. This is advantageous to reduce the amount of calculation required for community partitioning in a distributed environment, thereby efficiently realizing community partitioning of a target relationship network in a distributed environment.

[0073] Referring to FIG. 3, for example, data of nodes 0 and 1 are stored in device A, data of nodes 2 and 3 are stored in device B, and data of nodes 4 and 5 are stored in device C. There are second node communities C1, C2, and C3, and the maximum number of nodes in a node community is 2. When performing local node movement, for each node, calculate and record the modularity improvement value by adding to the adjacent second node community. For each node, sort each second node community to be added in descending order of modularity improvement value. A first order corresponding to three devices A, B, and C can be determined, for example, the first order is first device A, then device B, and then device C. Then, traverse each device in series according to the first order.

[0074] Within each device, multiple threads are still controlled, and locks implemented based on atomic operation instructions are used to enable multiple nodes to compete to add to the second node community, and changes in the second node community are synchronized to other devices in the form of broadcasting.

[0075] For device A, node 0 first competes to be added to the second node community C1, and if that fails, competes to be added to the second node device C2, and similarly, node 1 first competes to be added to the second node community C1, and if that fails, competes to be added to the second node community C2, and if that fails again, competes to be added to the second node community C3. Nodes 0 and 1 can be successfully added to the second node community C1.

[0076] Moving next to device B, node 2 first competes to be added to the second node community C1, and since there are two nodes in the second node community C1, node 2 fails to be added to the second community C1 and competes to be added to the second node community C2. Node 3 first competes to be added to the second node community C2, and nodes 2 and 3 can be successfully added to the second node community C2.

[0077] Next, moving to device C, node 4 fails to compete to be added to second node community C2, node 5 fails to compete to be added to second node community C1, and then nodes 4 and 5 successfully compete to be added to second node community C3. Finally, the resulting third node communities after the local node movement are {C1:[0,1]}, {C2:[2,3]}, {C3:[4,5]}.

[0078] In some embodiments, the second nodes in the third node community are distributed across different devices. The second nodes belong to nodes in the target relationship network.

[0079] For ease of understanding and simplicity of explanation, the node in the third node community is referred to as the second node. As can be understood, the second node in the third node community is still a node in the target relationship network.

[0080] The node data of the multiple second nodes of one or more third node communities in the multiple third node communities are distributed in different devices, that is, the multiple second nodes in the third node community correspond to different devices. Similarly, the second node corresponds to a device, which means that the data of the node is stored in the device. For each device, the device can store the data of the corresponding second node.

[0081] Referring to FIG. 4, FIG. 4 is an application scenario. As shown in FIG. 4, the third node community includes the second nodes 0, 1, and 2. If the original traversal order is from 0 to 1 and then to 2, at the start, each of the second nodes 0, 1, and 2 has a fourth node community to which it belongs, and traverses to node 0, and there is only one second node in the fourth node community in which node 0 is located, and the second node 0 is called an "independent node", and such a fourth node community may be called a fourth node community of independent nodes. The second node 0 can be tried to be added to the fourth node community in which the second node 1 is located, and when the modularity is large, the second node 0 can be added to the fourth node community in which the second node 1 is located through probability selection. In this way, the second nodes 1 and 0 are not independent nodes. In the process of the partitioning operation, only "independent nodes" are added to other fourth node communities. When traversing to the second node 1, the second node 1 is not an "independent node", so it is directly skipped. Finally, it traverses to the second node 2 and attempts to add the second node 2 to the fourth node community including the second node 1, and if the publication modularity does not increase, it decides not to add the second node 2 to the fourth node community including the second node 1. Therefore, it retains the fourth node community including the second node 2. Through the above process, the third node community is subdivided into a fourth node community including the second nodes 0 and 1, and a fourth node community including the second node 2.

[0082] Performing a partitioning operation on a third node community requires serially traversing all second nodes in one third node community, but the traversal order of these second nodes may be random. If the second nodes in one third node community are distributed across multiple devices, it requires high-frequency cross-device communication, and therefore the efficiency of the operation to partition the third node community is low.

[0083] Referring to FIG. 5, FIG. 5 is a schematic diagram of an application scenario. As shown in FIG. 5, according to the assumption, for the second nodes 0, 1, 2, and 3 in the third node community, the original traversal order is first the second node 0, then the second node 1, then the second node 2, and finally the second node 3. The second nodes 0 and 2 correspond to device A, and the second nodes 1 and 3 correspond to device B. If the partitioning is performed in the order of first the second node 0, then the second node 1, then the second node 2, and finally the second node 3, when the second node 0 is added to the fourth node community in which the second node 1 is located, the device A needs to perform information synchronization with the device. After the second node 2 is finished, the device B sends information to the device A, so that the device A partitions the second node 2. After the partitioning of the second node 2 is completed, the device A further sends information to the device B to partition the second node 3. In this way, multiple times of information exchange between devices are required.

[0084] In these embodiments, the data processing method further includes sorting each device according to a preset rule to obtain a second order, and the above step 204 includes: For each device, controlling the device to partition based on the multiple first nodes corresponding to the device using multiple threads in accordance with an order corresponding to the device in the second order.

[0085] Furthermore, the data processing method includes: The method further includes, for each device, synchronizing the result of the partitioning of the third community completed in the device to other devices, so that the other devices perform partitioning locally based on the result of the partitioning.

[0086] To solve the problem of needing frequent cross-device message synchronization when partitioning a third-node community, we can determine the order of each device and traverse each device serially (secondary nodes in the same device are also traversed serially), thus ensuring that the number of message synchronizations is consistent with the number of devices involved in the third-node community.

[0087] Referring to FIG. 5 and FIG. 6, FIG. 6 is a schematic diagram of an application scenario. For the second nodes 0, 1, 2, and 3 in the third node community, the second nodes 0 and 2 correspond to device A, and the second nodes 1 and 3 correspond to device B. For the problem of needing frequent communication between devices to traverse multiple second nodes in FIG. 5, partitioning can be performed using the solution shown in FIG. 6. First, determine the traversal order of device A and device B as A first, then B. For the second nodes 0 and 2 in device A, partitioning of the third node community can be performed in the order from second node 0 to second node 2. After the traversal of each second node in device A is completed, traverse further the second nodes 1 and 3 corresponding to device B. For the second nodes 1 and 3 in device B, partitioning of the third node community can be performed in the order from second node 1 to second node 3.

[0088] When device A partitions second node 0, it attempts to traverse the fourth node community in which the neighboring nodes are located with respect to second node 0. If it determines that adding second node 0 to fourth node community 1 in which second node 1 is located can increase modularity, it adds second node 0 to the fourth node community in which second node 1 is located through probability selection. Then it notifies all other devices of the partitioning result in a broadcast manner, i.e., synchronizes the partitioning result of adding second node 0 to the fourth node community in which second node 1 is located to device B.

[0089] Next, traverse second node 2, and if it is determined that adding second node 2 to the 4th node community with second node 1 or adding second node 2 to the 4th node community with second node 3 would not increase modularity, then do not add second node 2 to any other 4th node community and keep the original 4th node community of second node 2. At this time, all second nodes in device A have been traversed.

[0090] Alternatively, device B may be traversed, and if the number of 4th node communities 1 in which the second node 1 is located exceeds 1, it is directly skipped. Then, for the second node 3, each adjacent 4th node community is traversed, and an attempt is made to add the second node 3 to the adjacent 4th node community. If it is determined that the modularity can be increased by adding the second node 2 to a 4th node community, the second node 3 can be added to the 4th node community in which the second node 2 is located through probability selection. The partitioning result is notified to all other devices in a broadcasting manner, that is, the partitioning result of adding the second node 2 to the 4th node community in which the second node 2 is located after partitioning the second node 3 is synchronized to device A. In this manner, the partitioning operation is completed when all devices are traversed. In these embodiments, the order of partitioning each second node according to the corresponding device is adjusted, so that the number of synchronizations of partitioning result information between each device is proportional to the number of devices, reducing the number of cross-device communications, and further reducing communication overhead.

[0091] Corresponding to the data processing device of the embodiment shown in 1 above, Fig. 7 is a structural block diagram of an interactive device according to an embodiment of the present disclosure. For ease of explanation, only parts related to the embodiment of the present disclosure are shown. Referring to Fig. 7, the device 70 includes an acquisition unit 701, a processing unit 702 and a determination unit 703.

[0092] The obtaining unit 701 is used for obtaining, based on a first operation on a first object, a target relation network related to the first object and for representing association relations among a plurality of objects by node network relations.

[0093] The processing unit 702 is used to obtain multiple first node communities by controlling multiple threads to perform community splitting in parallel on the target relationship network using a lock realized based on an atomic operation instruction, where each first node community includes at least one node in the target relationship network.

[0094] The determining unit 703 is used for determining the first node community to which the first object belongs based on the association relationship between the first object and the object corresponding to each node in the target relationship network.

[0095] In one embodiment of the present disclosure, the processing unit 702 further comprises: Each node in the target relation network is classified into a second node community including independent nodes; Obtaining multiple third node communities by controlling multiple threads to perform local node move operations on nodes in multiple second node communities using a lock implemented based on an atomic operation instruction, where the local node move operations are used to move independent nodes in the second node community to an adjacent second node community based on modularity; partitioning the third node community to obtain a plurality of fourth node communities; performing node fusion on a fourth node community including at least two nodes, fusing the at least two nodes into one independent node, performing relationship network reconstruction on the independent nodes in all the fourth node communities after performing node fusion, obtaining a reconstructed target relationship network, repeatedly executing the above steps on the reconstructed target relationship network, and continuing until a preset condition is satisfied, and finally, the obtained multiple fourth node communities are multiple first node communities.

[0096] In some embodiments, the processing unit 702 may further include: It is used to control multiple threads to partition multiple third node communities respectively, and obtain multiple fourth node communities.

[0097] In some embodiments, the nodes in the target relationship network are distributed across different devices, and the apparatus 70 further includes a first sorting unit (not shown). The first sorting unit: It is used to sort the devices according to a pre-set rule to obtain a first order.

[0098] The processing unit 702 further comprises: For each device, a local node move operation is used to control the device to perform a local node move operation on a plurality of nodes distributed in the device by a lock realized based on an atomic operation instruction using a plurality of threads according to the order of the device in the first order, and the local node move operation is used to move the plurality of nodes of the device to their corresponding adjacent target second node communities based on modularity.

[0099] In some embodiments, the apparatus further includes a first synchronization unit (not shown), the first synchronization unit comprising: It is used to synchronize the results of local node movement operations performed by each device with other devices.

[0100] In some embodiments, the plurality of second nodes in the third node community are distributed across different devices, the second nodes belong to nodes in the target relationship network, and the apparatus 70 further includes a second sorting unit (not shown). The second sorting unit: The second order is obtained by sorting the devices according to a preset rule.

[0101] The processing unit 702 further comprises: For each device, the second ordering is used to control the device to partition based on the plurality of second nodes distributed to the device using multiple threads according to an order corresponding to the device in the second ordering.

[0102] In some embodiments, the apparatus further includes a second synchronization unit (not shown), the second synchronization unit comprising: For each device, the partitioning result completed in the device is synchronized to other devices, so that the other devices can perform partitioning locally based on the partitioning result.

[0103] To achieve the above embodiment, an embodiment of the present disclosure further provides an electronic device.

[0104] Referring to FIG. 8, a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiments of the present disclosure is shown, and the electronic device 800 may be a terminal device or a server. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (abbreviated as PDA), tablet computers (abbreviated as Portable Android Devices (abbreviated as PAD), portable multimedia players (abbreviated as PMP), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desk computers. The electronic device shown in FIG. 8 is merely illustrative and does not limit the functions and scope of use of the embodiments of the present disclosure.

[0105] 8, the electronic device 800 may include a processing unit (e.g., a central processor, a graphic processor, etc.) 801, which can execute various appropriate operations and processes based on a program stored in a read only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 further stores various programs and data required for the operation of the electronic device 800. The processing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0106] Typically, input devices 806 including, for example, a touch panel, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc., output devices 807 including, for example, a liquid crystal display (LCD), a speaker, an oscillator, etc., storage devices 808 including, for example, a magnetic tape, a hard disk, etc., and a communication device 809 can be connected to the I / O interface 805. The communication device 809 can allow the electronic device 800 to communicate wirelessly or wired with other devices to exchange data. Although FIG. 8 illustrates the electronic device 800 having various devices, it should be understood that the electronic device 800 is not required to execute or include all the devices shown. Instead, the electronic device 800 can execute or include more or fewer devices.

[0107] In particular, according to the embodiment of the present disclosure, the above process described with reference to the flowchart may be implemented as a computer software program. For example, the embodiment of the present disclosure includes a computer program product, the product includes a computer program stored in a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 809, or may be installed from the storage device 808, or may be installed from the ROM 802. When the computer program is executed by the processing device 801, it performs the above functions defined in the method of the embodiment of the present disclosure.

[0108] It should be noted that the computer-readable medium of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to, an electrical connection having one or more conductors, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact magnetic disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program (computer-executable instructions) may be used by or in combination with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may be a data signal, which may be included in baseband or propagated as part of a carrier wave, in which computer-readable program code is carried. Such propagated data signals may take a number of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted by any suitable medium, including, but not limited to, wire, optical cable, RF (radio frequency), etc., or any suitable combination thereof.

[0109] The computer-readable medium may be included in the electronic device, or may exist separately from the electronic device.

[0110] One or more programs are stored on the computer-readable medium, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0111] Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages ​​or combinations thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and even conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).

[0112] The flowcharts and block diagrams in the drawings show possible system configurations, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. Here, each box in the flowchart or block diagram can represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a certain logic function. It should be noted that in some alternative implementations, the functions illustrated in the boxes may occur in a different order from the order illustrated in the drawings. For example, two boxes shown in succession may actually be executed essentially in parallel, and they may be executed in the reverse order, as determined by the relevant functions. It should be noted that each box in the block diagram and / or flowchart, and combinations of boxes in the block diagram and / or flowchart may be implemented by a system based on dedicated hardware that executes a certain function or operation, or may be implemented by a combination of dedicated hardware and computer instructions.

[0113] The units described in the embodiments of the present disclosure may be implemented in the form of software or hardware. The names of the units may not limit the units themselves in some cases, for example, the acquisition unit may be further described as "a unit for acquiring a target relationship network related to a first object based on a first operation on the first object".

[0114] The functionality described herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0115] In the context of this disclosure, a machine-readable medium may be a tangible medium that contains or stores a program, which is used in or in combination with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0116] In a first aspect, in accordance with one or more embodiments of the present disclosure, there is provided a method of data processing, comprising: obtaining a target relationship network related to the first object based on the first operation on the first object and for representing association relationships among the plurality of objects by node network relationships; obtaining a plurality of first node communities, each of which includes at least one node in the target relationship network, by controlling a plurality of threads to perform a community partition on the target relationship network in parallel using a lock realized based on an atomic operation instruction; determining a first node community to which the first object belongs based on an association relationship between the first object and an object corresponding to each node in the target relationship network.

[0117] According to one or more embodiments of the present disclosure, the step of obtaining a plurality of first node communities by controlling a plurality of threads to perform community partitioning on a target relationship network in parallel using a lock implemented based on an atomic operation instruction includes: forming each node in the target relation network into a second node community including independent nodes; obtaining a plurality of third node communities by controlling a plurality of threads to perform local node move operations on nodes in a plurality of second node communities using a lock realized based on an atomic operation instruction, the local node move operations being used to move independent nodes in the second node communities to adjacent second node communities based on modularity; partitioning the third node community to obtain a plurality of fourth node communities; performing node fusion on a fourth node community including at least two nodes, fusing the at least two nodes into one independent node, performing relationship network reconfiguration on the independent nodes in all the fourth node communities after performing the node fusion, obtaining a reconfigured target relationship network, repeatedly executing the above steps on the reconfigured target relationship network, and continuing until a preset condition is satisfied, and finally, setting the obtained multiple fourth node communities as multiple first node communities.

[0118] According to one or more embodiments of the present disclosure, the step of partitioning the third node community to obtain a plurality of fourth node communities may include: The method includes controlling a plurality of threads to partition the plurality of third node communities, respectively, to obtain a plurality of fourth node communities.

[0119] According to one or more embodiments of the present disclosure, the nodes in the target relationship network are distributed across different devices, and the method includes: The method further includes the step of sorting the devices according to a preset rule to obtain a first order; The step of obtaining a plurality of third node communities by controlling a plurality of threads to perform local node movement operations on nodes in the plurality of second node communities using fine-grained locking implemented based on the atomic operation instruction includes: The method includes a step of controlling, for each device, in accordance with an order of the device in the first order, the device to execute a local node move operation on a plurality of nodes distributed to the device by a lock realized based on an atomic operation instruction using a plurality of threads, the local node move operation being used to move the plurality of nodes of the device to their corresponding adjacent target second node communities based on modularity.

[0120] According to one or more embodiments of the present disclosure, the method further includes synchronizing the results of the local node movement operations performed by each device to other devices.

[0121] In accordance with one or more embodiments of the present disclosure, the method includes: The method further includes the steps of: a plurality of second nodes in the third node community are distributed in different devices, and the second nodes belong to nodes in the target relationship network; and the method further includes the steps of: The method further includes sorting the devices according to a preset rule to obtain a second order. Partitioning the third-node community to obtain a plurality of fourth-node communities includes: For each device, controlling the device to partition based on a plurality of second nodes distributed to the device using multi-threading according to an order corresponding to the device in the second order.

[0122] In accordance with one or more embodiments of the present disclosure, a method includes: The method further includes, for each device, synchronizing the result of the partitioning of the third community completed in the device to other devices, so that the other devices perform partitioning locally based on the result of the partitioning.

[0123] In a second aspect, there is provided a data processing apparatus according to one or more embodiments of the present disclosure, comprising: an acquiring unit, which is used for acquiring a target relation network related to the first object according to a first operation on the first object, for representing an association relation between a plurality of objects by a node network relation; A processing unit is used for controlling a plurality of threads to perform community partitioning on the target relationship network in parallel using a lock realized based on an atomic operation instruction, thereby obtaining a plurality of first node communities, each of which includes at least one node in the target relationship network; and a determining unit, used for determining a first node community to which the first object belongs based on an association relationship between the first object and an object corresponding to each node in the target relationship network.

[0124] According to one or more embodiments of the present disclosure, the processing unit may further include: Each node in the target relation network is classified into a second node community including independent nodes; Obtaining multiple third node communities by controlling multiple threads to perform local node move operations on nodes in multiple second node communities using a lock implemented based on an atomic operation instruction, where the local node move operations are used to move independent nodes in the second node community to an adjacent second node community based on modularity; partitioning the third node community to obtain a plurality of fourth node communities; performing node fusion on a fourth node community including at least two nodes, fusing the at least two nodes into one independent node, performing relationship network reconstruction on the independent nodes in all the fourth node communities after performing node fusion, obtaining a reconstructed target relationship network, repeatedly executing the above steps on the reconstructed target relationship network, and continuing until a preset condition is satisfied, and finally, the obtained multiple fourth node communities are multiple first node communities.

[0125] According to one or more embodiments of the present disclosure, the processing unit may further include: It is used to control multiple threads to partition multiple third node communities respectively, and obtain multiple fourth node communities.

[0126] According to one or more embodiments of the present disclosure, a plurality of nodes in the target relationship network are distributed across different devices, and the apparatus further includes a first sorting unit, wherein the first sorting unit: Used for sorting the devices according to a preset rule to obtain a first order;

[0127] The processing unit further comprises: For each device, a local node move operation is used to control the device to perform a local node move operation on a plurality of nodes distributed in the device by a lock realized based on an atomic operation instruction using a plurality of threads according to the order of the device in the first order, and the local node move operation is used to move the plurality of nodes of the device to their corresponding adjacent target second node communities based on modularity.

[0128] According to one or more embodiments of the present disclosure, the apparatus further includes a first synchronization unit (not shown), the first synchronization unit comprising: It is used to synchronize the results of local node movement operations performed by each device with other devices.

[0129] According to one or more embodiments of the present disclosure, a plurality of second nodes in the third node community are distributed in different devices, and the second nodes belong to nodes in the target relationship network, and the apparatus further includes a second sorting unit, and the second sorting unit: and sorting the devices according to a preset rule to obtain a second order; The processing unit further comprises: For each device, the second ordering is used to control the device to partition based on the plurality of second nodes distributed to the device using multiple threads according to an order corresponding to the device in the second ordering.

[0130] According to one or more embodiments of the present disclosure, the apparatus further includes a second synchronization unit, and the second synchronization unit includes: For each device, the partitioning result completed in the device is synchronized to other devices, so that the other devices can perform partitioning locally based on the partitioning result.

[0131] In a third aspect, in accordance with one or more embodiments of the present disclosure, there is provided an electronic device, comprising at least one processor and a memory, The memory stores computer executable instructions; The at least one processor executes computer executable instructions stored in the memory to cause the at least one processor to perform the data processing generation method of the first aspect and the various possible designs of the first aspect above.

[0132] In a fourth aspect, in accordance with one or more embodiments of the present disclosure, a computer-readable storage medium is provided, having computer-executable instructions stored thereon, the computer-readable storage medium being adapted to, when executed by a processor, realise the data processing method of the first aspect above and various possible designs of the first aspect.

[0133] In a fifth aspect, there is provided a computer program product according to one or more embodiments of the present disclosure, comprising a computer program, which when executed by a processor realises the data processing method of the first aspect and various possible designs of the first aspect.

[0134] The above description is merely a description of the preferred embodiments of the present disclosure and the technical principles used. As can be understood by those skilled in the art, the scope of the disclosure of the present disclosure is not limited to the technical solution of the specific combination of the above technical features, but should include other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the idea of ​​the above disclosure. For example, the above features are technical solutions formed by substituting technical features having similar functions disclosed in the present disclosure (but not limited to them) with each other.

[0135] Also, although operations have been described in a particular order, it should not be understood that these operations are required to be performed in the particular order or sequence shown. In certain environments, multitasking and parallel processing may be advantageous. Similarly, the above description includes some specific implementation details, which should not be construed as limiting the scope of the disclosure. Certain features that are described in the context of a single embodiment may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented in multiple embodiments alone or in any suitable subcombination.

[0136] Although the present subject matter has been described in language specific to structural features and / or method logic acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example methods for implementing the claims.

Claims

1. 1. A data processing method comprising the steps of: obtaining a target relationship network related to the first object based on a first operation on the first object, the target relationship network being for representing association relationships among a plurality of objects by a node network relationship; obtaining a plurality of first node communities, each of which includes at least one node in the target relationship network, by controlling a plurality of threads to perform a community partition on the target relationship network in parallel using a lock realized based on an atomic operation instruction; and determining a first node community to which the first object belongs based on an association relationship between the first object and an object corresponding to each node in the target relationship network.

2. The step of obtaining a plurality of first node communities by controlling a plurality of threads to perform a community split on the target relation network in parallel using a lock realized based on an atomic operation instruction includes: forming each node in the target relationship network into a second node community including independent nodes; Obtaining a plurality of third node communities by controlling a plurality of threads to perform local node move operations on nodes in a plurality of second node communities using a lock implemented based on an atomic operation instruction, the local node move operations being used to move independent nodes in the second node community to an adjacent second node community based on modularity; partitioning the third node community to obtain a plurality of fourth node communities; 2. The method of claim 1, further comprising the steps of: performing node fusion for a fourth node community including at least two nodes, fusing the at least two nodes into one independent node; performing relationship network reconstruction for independent nodes in all fourth node communities after performing node fusion to obtain a reconstructed target relationship network; repeatedly performing the above steps on the reconstructed target relationship network until a preset condition is satisfied; and finally setting the obtained multiple fourth node communities as the multiple first node communities.

3. The step of partitioning the third node community to obtain a plurality of fourth node communities comprises:

3. The method of claim 2, further comprising controlling a plurality of threads to partition the plurality of third node communities, respectively, to obtain a plurality of fourth node communities.

4. The plurality of nodes in the target relationship network are distributed among different devices, and the method further comprises: The method further includes: sorting each device according to a preset rule to obtain a first order; The step of obtaining a plurality of third node communities by controlling a plurality of threads to perform local node move operations on nodes in a plurality of second node communities using fine-grained locking implemented based on an atomic operation instruction includes:

3. The method of claim 2, further comprising: for each device, controlling the device to execute a local node move operation on a plurality of nodes distributed to the device by a lock implemented based on an atomic operation instruction using a plurality of threads in accordance with an order of the device in the first order; wherein the local node move operation is used to move the plurality of nodes of the device to their corresponding adjacent target second node communities based on modularity.

5. 5. The method of claim 4, further comprising the step of synchronizing the results of the local node movement operations performed by each device to other devices.

6. A plurality of second nodes in the third node community are distributed in different devices, and the second nodes belong to nodes in the target relationship network, and the method includes: The method further includes: sorting the devices according to a preset rule to obtain a second order; The step of partitioning the third node community to obtain a plurality of fourth node communities comprises:

3. The method of claim 2, further comprising: for each device, controlling the device to partition based on a plurality of second nodes distributed to the device using multithreading in accordance with an order corresponding to the device in the second order.

7. The method comprises:

7. The method of claim 6, further comprising: for each device, synchronizing a result of partitioning of the third community completed in the device to other devices, such that the other devices perform partitioning locally based on the result of the partitioning.

8. 1. A data processing device, comprising: an acquiring unit, which is used for acquiring a target relation network related to the first object according to a first operation on the first object, for representing an association relation between a plurality of objects by a node network relation; A processing unit is used for controlling a plurality of threads to perform a community partition on the target relationship network in parallel using a lock realized based on an atomic operation instruction, thereby obtaining a plurality of first node communities, each of which includes at least one node in the target relationship network; a determining unit, used for determining a first node community to which a first object belongs based on an association relationship between the first object and an object corresponding to each node in the target relationship network.

9. An electronic device comprising a processor and a memory, The memory stores computer executable instructions; An electronic device, characterized in that the processor executes computer executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1 to 8.

10. A computer-readable storage medium having computer-executable instructions stored thereon, the computer-readable storage medium causing a processor to implement the method of any one of claims 1 to 8 when the processor executes the computer-executable instructions.

Citation Information

Patent Citations

  • Clustering device, clustering method, and clustering program

    JP2017204161A

  • Information processing device, information processing method, and information processing program

    JP2022116607A