WO2023011237A1 - 业务处理 - Google Patents

业务处理 Download PDF

Info

Publication number
WO2023011237A1
WO2023011237A1 PCT/CN2022/107679 CN2022107679W WO2023011237A1 WO 2023011237 A1 WO2023011237 A1 WO 2023011237A1 CN 2022107679 W CN2022107679 W CN 2022107679W WO 2023011237 A1 WO2023011237 A1 WO 2023011237A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
operator
point set
points
bit
Prior art date
Application number
PCT/CN2022/107679
Other languages
English (en)
French (fr)
Inventor
张国威
刘永超
何昌华
Original Assignee
支付宝(杭州)信息技术有限公司
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 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2023011237A1 publication Critical patent/WO2023011237A1/zh

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the embodiments of this specification relate to the field of Internet technologies, and in particular, to a service processing method, device, and electronic equipment.
  • Graph neural network is a kind of neural network. GNN not only uses the characteristic information of the sample itself, but also uses the relationship between samples and samples. GNN is oriented to complex and general-purpose graph data structures. The training and prediction of the graph neural network is supported by the graph neural network system.
  • the graph neural network system is a distributed graph computing engine.
  • the training strategy includes: full-batch (full-batch) training and/or mini-batch (mini-batch) training. batch) training, etc.
  • the embodiments of this specification provide a business processing method, device, and electronic equipment, so as to determine the points that need to be calculated currently through the activation point set, eliminate redundant calculations, and improve the processing speed of the graph neural network model.
  • the embodiment of this specification provides a business processing method, including: obtaining data and operators to be calculated currently in the graph neural network model; wherein, the data includes label points, neighbor nodes of the label points, and The connection relationship between the label point and the neighbor node; obtain the activation point set corresponding to the operator; determine the point in the data that needs to be calculated according to the activation point set; according to the operator , calculate the points that need to be calculated currently; process the business according to the calculation results.
  • the above business processing method obtain the data and the operator currently to be calculated in the graph neural network model, obtain the activation point set corresponding to the above operator, and determine the current point in the above data that needs to be calculated according to the above activation point set, and then, According to the above operator, calculate the points that need to be calculated currently. Therefore, the points that need to be calculated can be determined through the activation point set, redundant calculations can be eliminated, and the processing speed of the graph neural network model can be improved.
  • the obtaining the activation point set corresponding to the operator includes: indexing according to the name of the operator to obtain the activation point set corresponding to the operator; or, according to the operator The layer where the operator is located is indexed to obtain the activation point set corresponding to the operator.
  • the data structure of the activation point set is a bit set, and each bit in the bit set corresponds to a point in the data; according to the activation point set, determining the data
  • the point that needs to be calculated currently includes: obtaining the value of each bit in the bit set; when the value of the bit is a predetermined value, determining that the point corresponding to the bit is the point that needs to be calculated currently.
  • the activation point set corresponding to the operator before obtaining the activation point set corresponding to the operator, it also includes: obtaining the network structure and data of the graph neural network model; obtaining the graph neural network model according to the network structure The data dependencies between the operators; according to the data dependencies, a data flow graph is generated; according to the data and the data flow graph, each level or each layer of the graph neural network model is respectively generated.
  • the activation point set corresponding to the operator before obtaining the activation point set corresponding to the operator, it also includes: obtaining the network structure and data of the graph neural network model; obtaining the graph neural network model according to the network structure The data dependencies between the operators; according to the data dependencies, a data flow graph is generated; according to the data and the data flow graph, each level or each layer of the graph neural network model is respectively generated.
  • the activation point set corresponding to the operator before obtaining the activation point set corresponding to the operator, it also includes: obtaining the network structure and data of the graph neural network model; obtaining the graph
  • the embodiment of this specification provides a business processing device, including: an acquisition module, configured to acquire data and operators to be calculated currently in the graph neural network model; wherein, the data includes label points, the label points Neighbor nodes, and the connection relationship between the label point and the neighbor nodes; and obtaining the activation point set corresponding to the operator; the composition module is used to determine the current in the data according to the activation point set The points that need to be calculated; the calculation module is used to calculate the current points that need to be calculated according to the operator; the processing module is used to process the business according to the calculation results.
  • the obtaining module is specifically configured to perform indexing according to the name of the operator, and obtain the activation point set corresponding to the operator; or, perform indexing according to the level where the operator is located , to obtain the activation point set corresponding to the operator.
  • the data structure of the active point set is a bit set, and each bit in the bit set corresponds to a point in the data;
  • the value of each bit of the bit when the value of the bit is a predetermined value, determine that the point corresponding to the bit is the point that needs to be calculated currently.
  • the device further includes: a generating module; the obtaining module is further configured to obtain the network structure and data of the graph neural network model before obtaining the activation point set corresponding to the operator; And according to the network structure, obtain the data dependency between the operators of the graph neural network model; the generation module is used to generate a data flow graph according to the data dependency; and according to the data and The data flow graph respectively generates an activation point set corresponding to each level or each operator of the graph neural network model.
  • the embodiment of this specification provides an electronic device, including: at least one processor; and at least one memory connected in communication with the processor, wherein: the memory stores a program executable by the processor Instructions, the processor invokes the program instructions to execute the method provided in the first aspect.
  • the embodiment of this specification provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the method provided in the first aspect.
  • FIG. 1 is a schematic diagram of a graph topology provided by an embodiment of this specification
  • Fig. 2 is a data flow diagram provided by an embodiment of this specification.
  • FIG. 3 is a schematic diagram of a multi-layer activation point set provided by an embodiment of this specification.
  • FIG. 4 is a flowchart of a business processing method provided by an embodiment of this specification.
  • Fig. 5 is a flowchart of a business processing method provided by another embodiment of this specification.
  • Fig. 6 is a flow chart of a business processing method provided by another embodiment of this specification.
  • Fig. 7 is a schematic structural diagram of a service processing device provided by an embodiment of this specification.
  • Fig. 8 is a schematic structural diagram of a service processing device provided by another embodiment of this specification.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of this specification.
  • Graph It is composed of point set and edge set (edge set&node set). There can be various attributes and characteristics on the points and edges. Each edge in the edge set has a unique departure point and a unique arrival point. Both departure and arrival points are members of the graph point set.
  • ANN Artificial neural network
  • NN neural network
  • ANN is a mathematical model or computational model that imitates the structure and function of biological neural networks, and is used to estimate or approximate functions.
  • Graph neural network is also an artificial neural network algorithm.
  • the training data of GNN is a graph, and the topological information and feature information on the graph are learned to do classification or prediction problems. For example, based on the user's social network, capital network and other graph data, it can predict whether a user's credit is good or bad, and whether there is some risk of default.
  • the graph neural network system is a computing framework, or called a computing engine.
  • the graph neural network system trains the graph neural network according to the model designed by the user and the data input by the user. ; or, make predictions on unknown data based on an existing model.
  • TensorFlow and/or PyTorch in the current industry can train neural networks very well, but the support for graph neural networks is not friendly.
  • Active set In the graph neural network system, it is a data structure used to indicate whether the points in the graph are activated.
  • graphs Compared with relational data, graphs have more abstract and universal data expression capabilities, and a large amount of data in real life can form graphs. For example, each user is used as a point, and various relationships between users (including friend relationship, transfer relationship, kinship relationship and/or colleague relationship, etc.) can be used as edges, so that all data can be organized into a large graph. When more mining of this graph data is required, various graph neural network systems will be applied for calculation.
  • Graph neural network has become a current research hotspot, and at the same time, graph neural network is gradually landing in the industry, for example, in the field of search recommendation and/or risk control. At present, the industry still does not have a universal neural network training and prediction system that can handle very large-scale graph data. Given the particularity of graph data, all graph neural network systems should address the problem of inconsistent computation at each point.
  • the embodiment of this specification adopts a "multi-layer activation point set" data structure, and the "multi-layer activation point set” can quickly realize the filtering of points and edges, so that the graph neural network can minimize the calculation and effectively improve the processing performance, helping the industrialization of graph neural networks.
  • FIG. 1 is a schematic diagram of a graph topology provided by an embodiment of this specification.
  • points 1, 2, and 3 are label points with labels.
  • Points 4, 5, 6, 7, and 8 do not have labels, but during the training process of label points, because label points need to obtain neighbor data, points 4, 5, 6, 7, and 8 also need to participate calculate.
  • the graph neural network model running on the graph is a 5-layer model, in which: the second layer and the fourth layer need to get the neighbor's representation or feature for calculation (whether it includes edge representation or feature can be used), The rest of the layers do not need neighbor information, but only need their own information to calculate.
  • the horizontal direction represents the extension of the graph, where the first column represents the label point, that is, the training target (target); the second column represents the one-degree neighbor 1-hop ( 1 hop); the third column indicates the second-degree neighbor 2-hop (2 hops) obtained from the target point along the edge of the graph, which is equivalent to the first-degree neighbor diffused from the 1-hop point.
  • the vertical direction represents the calculation direction of the graph neural network model, and it is also the flow direction of data at each point.
  • the input (input) represents the point or the original feature on the point
  • layer 1 (layer1) represents the first layer of the model, in the forward calculation, only the input data needs to be used for calculation
  • layer 2 represents the model
  • the second layer in the forward calculation, needs to combine the characteristics (embedding) of the first layer and the first layer embedding of the neighbor 1-hop for calculation
  • layer 3 (layer3) represents the third layer of the model, in the forward direction In the calculation, only the embedding of the second layer needs to be used for calculation
  • layer 4 (layer4) represents the fourth layer of the model, which is similar to layer2 and needs to be calculated in combination with the embedding of itself and one-time neighbors
  • layer 5 (layer5) represents the model's Layer 5, similar to layer 1, requires only its own data for computation.
  • the computation proceeds in the opposite direction of the forward computation.
  • the rectangular box in Figure 2 represents the operator of each layer. It can be seen from Figure 2 that the target point needs to be fully calculated; 1-hop only needs to be calculated up to layer3, because the results of layer4 and layer5 are useless even if they are calculated. It belongs to redundant calculation; while 2-hop only needs to be calculated to layer1. If there is no effective mechanism to judge and filter points, treat all points equally, and perform full calculations, it will bring a lot of redundant calculations, which will greatly affect the performance of the graph neural network model.
  • the embodiment of this specification proposes a service processing method, which solves the problem of redundant calculation through the data structure of "multi-layer activation point set".
  • Fig. 3 is a schematic diagram of a multi-layer activation point set provided by an embodiment of the present specification.
  • the left part of Figure 3 is still an illustration of the amount of computation and data flow in a simple graph neural network, and the right part is a graphical display of the multi-layer activation point set mentioned in the embodiment of this specification.
  • the multi-layer activation point set is a multi-level data structure, each layer of which is a bit set (bitset), the value of each bit in the bit set represents the state of the point corresponding to this bit, the value is 1 for activation, and the value is 0 means inactive.
  • bitset a bit set
  • the organization manner of the bit set may include an array, a dictionary, or a linked list, and the like.
  • the activation point set of layer1 is all points, so layer1 corresponds to the activation point set 1 on the right side of Figure 3, and the activation point set 1 uses the ratio
  • the special set can be expressed as: ⁇ 1,1,1,1,1,1,1 ⁇ ; in Figure 3, only target points and 1-hop points need to be calculated for layer2 and layer3, so these two layers correspond to the right side of Figure 3
  • the activation point set 2 of the side part, the activation point set 2 can be expressed as a bit set: ⁇ 1,1,1,1,1,0,0 ⁇ ; in Figure 3, only the target point needs to be calculated for layer4 and layer5 , so these two layers correspond to the activation point set 3 in the right part of Figure 3, and the activation point set 3 can be expressed as: ⁇ 1,1,1,0,0,0,0 ⁇ in the bit set; in this example , the multi-layer activation point set just corresponds to the hop relationship in the figure, that is, activation point set 1 corresponds
  • the multi-layer activation point set After defining the activation point set of each layer, the multi-layer activation point set organizes these layers and gives an index.
  • the construction and application process of the multi-layer activation point set can be as follows: After the user completes the definition of the graph neural network model, the graph neural network system can analyze the graph neural network model to obtain the data dependence between operators of the graph neural network model relation. After the training strategy is determined, it is possible to determine which points are to be calculated for this training, and a data flow diagram similar to the left part of Figure 3 is obtained. After the data flow diagram is obtained, the multi-layer activation point set can be obtained. Then the graph neural network system needs to construct a multi-level activation point set in a distributed computing unit (worker).
  • a distributed computing unit worker
  • each time the current activation point set can be indexed according to the calculation level or the name of the current operator, and each calculation unit can be based on the current activation point set for each Points are quickly filtered to eliminate redundant calculations.
  • Fig. 4 is a flowchart of a service processing method provided by an embodiment of this specification. As shown in Fig. 4, the above service processing method may include the following steps.
  • Step 402 obtaining data and operators to be calculated currently in the graph neural network model.
  • the above-mentioned data includes the label point, the neighbor nodes of the above-mentioned label point, and the connection relationship between the above-mentioned label point and the above-mentioned neighbor nodes.
  • the above data can include points 1, 2, 3, 4, 5, 6, 7 and 8, where points 1, 2 and 3 are label points, and points 4, 5, 6, 7 and 8 are neighbor nodes , the above data may also include connection relationships between points 1, 2, 3, 4, 5, 6, 7 and 8.
  • Step 404 acquiring the activation point set corresponding to the above operator.
  • Step 406 according to the above-mentioned active point set, determine the points in the above-mentioned data that need to be calculated currently.
  • the data structure of the above-mentioned activation point set can be a bit set, and each bit in the above-mentioned bit set corresponds to a point in the data; wherein, the organization mode of the above-mentioned bit set can be an array, a dictionary, or a linked list, etc., the present embodiment There is no limit to this.
  • determining the point that currently needs to be calculated in the above-mentioned data can be: obtaining the value of each bit in the above-mentioned bit set; when the value of the above-mentioned bit is a predetermined value, determining the corresponding The point is the point that needs to be calculated currently.
  • the size of the above-mentioned predetermined value can be set by itself during specific implementation, and the size of the above-mentioned predetermined value is not limited in this embodiment, for example, the above-mentioned predetermined value can be 1.
  • the active point set corresponding to the operator to be calculated is active point set 1
  • the current points to be calculated are points 1, 2, 3, 4, 5, 6, 7 and 8.
  • the value of each bit can be obtained by batch (batch), for example: the value of 64 bytes can be obtained at one time, so that the graph neural network The processing speed of the model is faster.
  • Step 408 calculate the points that need to be calculated currently.
  • Step 410 process the business according to the calculation result.
  • the above business processing method obtain the data and the operator currently to be calculated in the graph neural network model, obtain the activation point set corresponding to the above operator, and determine the current point in the above data that needs to be calculated according to the above activation point set, and then, According to the above operator, calculate the points that need to be calculated currently. Therefore, the points that need to be calculated can be determined through the activation point set, redundant calculations can be eliminated, and the processing speed of the graph neural network model can be improved.
  • the business processing method provided by the embodiment of this specification can not only be applied to the training of the graph neural network model, but also can be applied to the verification and testing of the graph neural network model and the prediction after the graph neural network model is obtained.
  • Fig. 5 is a flowchart of a business processing method provided by another embodiment of this specification.
  • step 404 may be: step 502, perform indexing according to the name of the operator , to obtain the activation point set corresponding to the above operator; or, index according to the level where the above operator is located, to obtain the activation point set corresponding to the above operator.
  • the activation point set can be indexed according to the name of the operator or the level of the operator, but this embodiment is not limited to this, and the activation point set can also be indexed according to other identifiers.
  • the indexing method of the point set is not limited.
  • FIG. 6 is a flow chart of a service processing method provided by another embodiment of this specification. As shown in FIG. 6 , in the embodiment shown in FIG. 4 of this specification, before step 404 , the following steps may also be included.
  • Step 602 acquiring the network structure and data of the graph neural network model.
  • Step 604 according to the above-mentioned network structure, obtain the data dependency among the operators of the graph neural network model.
  • Step 606 Generate a data flow graph according to the above data dependencies.
  • Step 608 according to the above-mentioned data and the above-mentioned data flow graph, respectively generate an activation point set corresponding to each level or each operator of the graph neural network model.
  • the problem with the solution provided by the existing related technologies is that all points in the whole image need to be traversed in each composition phase, forward calculation phase and/or backward calculation phase.
  • the scale of the graph is very large, and it is generally distributed in memory, or uses external storage such as disk, or adopts an architecture that separates computing and storage. Traversing all points will cause a lot of memory access, or disk access, or network access, resulting in a large number of cache misses, resulting in performance degradation.
  • the solution provided by the embodiment of this specification uses a multi-level activation point set to store the subgraphs to be calculated at each level, and the basic data structure of each level is a bit set (bitset).
  • bitset Each bit in the bitset can represent a point, and each calculation unit only needs to maintain the set of points that the unit is responsible for.
  • the number of points that a computing unit is responsible for will not be too large, generally not more than 100 million points, and most of them are at the level of one million to tens of millions.
  • the bitset required for each layer is only 12MB.
  • most graph neural networks only access one-degree neighbors, which means that the multi-layer activation point set only contains 2 basic bitsets, and the storage is less than 24MB.
  • only 3 basic bitsets are needed to visit the second-degree neighbors, and the storage is less than 36MB.
  • the storage required for the corresponding multi-layer activation point set will basically not exceed 100MB.
  • the data structure of this order of magnitude can basically be stored in the cache (cache), which means that in the composition, forward calculation and/or backward calculation, most of the filtering points only need to access the cache.
  • the speed is several orders of magnitude faster than memory, disk or network, which can lead to huge performance gains.
  • the performance of the corresponding part can be improved by more than 10 times.
  • the embodiment of this specification designs a data structure with a very small size - multi-layer activation Point set to quickly determine whether a point needs to be calculated.
  • This data structure can basically be stored in the cache, making each data access extremely fast, eliminating redundant calculations in a high-performance manner.
  • Fig. 7 is a schematic structural diagram of a business processing device provided by an embodiment of this specification.
  • the above business processing device may include: an acquisition module 71, a composition module 72, a calculation module 73, and a processing module 74; the acquisition module 71, It is used to obtain the data and the operator to be calculated currently in the graph neural network model; wherein, the above-mentioned data includes the label point, the neighbor nodes of the above-mentioned label point, and the connection relationship between the above-mentioned label point and the neighbor nodes; and obtain the above-mentioned operator
  • the composition module 72 is used to determine the points that need to be calculated in the above data according to the above activation point set
  • the calculation module 73 is used to calculate the points that need to be calculated currently according to the above operator
  • the processing module 74 is configured to process the business according to the calculation result.
  • the service processing device provided by the embodiment shown in FIG. 7 can be used to execute the technical solutions of the method embodiments shown in FIGS. 1 to 4 in this specification.
  • Fig. 8 is a schematic structural diagram of a business processing device provided by another embodiment of this specification.
  • the obtaining module 71 is specifically configured to perform indexing according to the name of the above-mentioned operator, and obtain the activation point set corresponding to the above-mentioned operator; or , index according to the level where the above operator is located, and obtain the activation point set corresponding to the above operator.
  • the data structure of the above-mentioned activation point set is a bit set, and each bit in the above-mentioned bit set corresponds to a point in the data; thus, the composition module 72 is specifically used to obtain the value of each bit in the above-mentioned bit set value, when the value of the above-mentioned bit is a predetermined value, it is determined that the point corresponding to the above-mentioned bit is the point that needs to be calculated currently.
  • the above-mentioned business processing device may also include: a generating module 75; an obtaining module 71, which is also used to obtain the network structure and data of the graph neural network model before obtaining the activation point set corresponding to the above-mentioned operator; and according to the above-mentioned network structure , to obtain the data dependencies between operators of the graph neural network model; the generation module 75 is used to generate a data flow graph according to the above data dependencies; and generate a graph neural network according to the above data and the above data flow graph respectively The set of activation points corresponding to each level of the model or each operator.
  • the service processing device provided by the embodiment shown in FIG. 8 can be used to implement the technical solutions of the method embodiments shown in FIGS. 1 to 6 in this specification.
  • the implementation principles and technical effects please refer to the relevant descriptions in the method embodiments.
  • Fig. 9 is a schematic structural diagram of an electronic device provided by an embodiment of this specification.
  • the above-mentioned electronic device may include at least one processor; and at least one memory communicated with the above-mentioned processor, wherein:
  • the program instructions executed by the processor, the processor calling the program instructions can execute the service processing method provided by the embodiments shown in FIGS. 1 to 6 of this specification.
  • the above-mentioned electronic device may be a server, for example, a cloud server or a graph computing server, and the form of the above-mentioned electronic device is not limited in this embodiment.
  • FIG. 9 shows a block diagram of an exemplary electronic device suitable for implementing embodiments of the present specification.
  • the electronic device shown in FIG. 9 is only an example, and should not limit the functions and scope of use of the embodiments of this specification.
  • the electronic device takes the form of a general-purpose computing device.
  • Components of the electronic device may include, but are not limited to: one or more processors 910, communication interface 920, memory 930, and communication bus 940 connecting different components (including memory 930, communication interface 920, and processor 910).
  • Communication bus 940 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, or a local bus using any of a variety of bus structures.
  • the communication bus 940 may include but not limited to an industry standard architecture (industry standard architecture, ISA) bus, a micro channel architecture (micro channel architecture, MAC) bus, an enhanced ISA bus, a video electronics standards association (video electronics standards association (VESA) local bus and peripheral component interconnection (PCI) bus.
  • Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device and include both volatile and nonvolatile media, removable and non-removable media.
  • the memory 930 may include computer system readable media in the form of volatile memory, such as random access memory (random access memory, RAM) and/or cache memory.
  • the memory 930 may include at least one program product, and the program product has a group (for example, at least one) of program modules configured to execute the functions of the embodiments shown in FIGS. 1 to 6 of this specification.
  • a program/utility having a set (at least one) of program modules may be stored in memory 930, such program modules including - but not limited to - an operating system, one or more application programs, other program modules, and program data , each or some combination of these examples may include implementations of network environments.
  • the program modules generally execute the functions and/or methods in the embodiments described in FIGS. 1 to 6 of this specification.
  • the processor 910 executes various functional applications and data processing by running the programs stored in the memory 930 , for example, implementing the business processing method provided by the embodiments shown in FIGS. 1 to 6 of this specification.
  • the embodiment of this specification provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the embodiments shown in Figures 1 to 6 of this specification Provided business processing methods.
  • the computer readable medium may be a computer readable signal medium or a computer readable storage medium.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including - but not limited to - electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .
  • Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including - but not limited to - wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
  • RF radio frequency
  • Computer program code for carrying out the operations described herein can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • first and second are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features.
  • the features defined as “first” and “second” may explicitly or implicitly include at least one of these features.
  • “plurality” means at least two, such as two, three, etc., unless otherwise specifically defined.
  • the word “if” as used herein may be interpreted as “at” or “when” or “in response to determining” or “in response to detecting”.
  • the phrases “if determined” or “if detected (the stated condition or event)” could be interpreted as “when determined” or “in response to the determination” or “when detected (the stated condition or event) )” or “in response to detection of (a stated condition or event)”.
  • terminals involved in the embodiments of this specification may include, but are not limited to, personal computers (personal computers, PCs), personal digital assistants (personal digital assistants, PDAs), wireless handheld devices, tablet computers (tablet computers), Mobile phones, MP3 players, MP4 players, etc.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined Or it can be integrated into another system, or some features can be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • each functional unit in each embodiment of this specification may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
  • the above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium.
  • the above-mentioned software functional units are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or processor (processor) to execute the methods described in the various embodiments of this specification. partial steps.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various media capable of storing program codes.

Abstract

本说明书实施例提出了一种业务处理方法、装置和电子设备,其中,上述业务处理方法中,获取数据和图神经网络模型中当前待计算的算子,获取上述算子对应的激活点集,根据上述激活点集,确定上述数据中当前需要进行计算的点,然后,根据上述算子,对当前需要进行计算的点进行计算。从而可以通过激活点集确定当前需要进行计算的点,消除冗余计算,提升图神经网络模型的处理速度。

Description

业务处理 技术领域
本说明书实施例涉及互联网技术领域,尤其涉及一种业务处理方法、装置和电子设备。
背景技术
图神经网络(graph neraul network,GNN)是一种神经网络。GNN不仅使用了样本自身的特征信息,还使用了样本与样本之间的关系,GNN面向的是复杂且具有一般意义的图数据结构。图神经网络的训练和预测由图神经网络系统支持,图神经网络系统是一个分布式的图计算引擎,训练的策略包含:全批次(full-batch)训练和/或小批次(mini-batch)训练等。在应用这些训练策略的时候,由于具体模型的区别(例如:有的模型只需要访问点的一度邻居,有的需要访问多度),或者训练样本中点的类型区别(例如:训练图中只有部分是含有标签的点,其他则是提供数据的点),或者其他原因,导致每次训练,发生在每个点或者边上的计算量是不同的。举例如:针对某3层模型,带标签的点需要进行完整的3层计算;标签点的一度邻居需要进行2层计算,而标签点的二度邻居只需要提供原始特征,不需要进行任何计算。
对于这种情况,现有相关技术中并没有什么手段能进行快速而有效的区分,而是每个点都进行全量计算,或者采用一些其他影响性能的方法来判断计算量。这会对模型的训练速度造成较大的影响。
发明内容
本说明书实施例提供了一种业务处理方法、装置和电子设备,以实现通过激活点集确定当前需要进行计算的点,消除冗余计算,提升图神经网络模型的处理速度。
第一方面,本说明书实施例提供一种业务处理方法,包括:获取数据和图神经网络模型中当前待计算的算子;其中,所述数据包括标签点、所述标签点的邻居节点,以及所述标签点和所述邻居节点之间的连接关系;获取所述算子对应的激活点集;根据所述激活点集,确定所述数据中当前需要进行计算的点;根据所述算子,对当前需要进行计算的点进行计算;根据计算结果对业务进行处理。
上述业务处理方法中,获取数据和图神经网络模型中当前待计算的算子,获取上述算子对应的激活点集,根据上述激活点集,确定上述数据中当前需要进行计算的点,然后,根据上述算子,对当前需要进行计算的点进行计算。从而可以通过激活点集确定当 前需要进行计算的点,消除冗余计算,提升图神经网络模型的处理速度。
其中一种可能的实现方式中,所述获取所述算子对应的激活点集包括:根据所述算子的名称进行索引,获取所述算子对应的激活点集;或者,根据所述算子所在的层级进行索引,获取所述算子对应的激活点集。
其中一种可能的实现方式中,所述激活点集的数据结构为比特集,所述比特集中的每个比特位对应数据中的一个点;所述根据所述激活点集,确定所述数据中当前需要进行计算的点包括:获取所述比特集中的每个比特位的值;当所述比特位的值为预定值时,确定所述比特位对应的点为当前需要进行计算的点。
其中一种可能的实现方式中,所述获取所述算子对应的激活点集之前,还包括:获取图神经网络模型的网络结构和数据;根据所述网络结构,获得所述图神经网络模型的各算子之间的数据依赖关系;根据所述数据依赖关系,生成数据流动图;根据所述数据和所述数据流动图,分别生成与所述图神经网络模型的每个层级或每个算子对应的激活点集。
第二方面,本说明书实施例提供一种业务处理装置,包括:获取模块,用于获取数据和图神经网络模型中当前待计算的算子;其中,所述数据包括标签点、所述标签点的邻居节点,以及所述标签点和所述邻居节点之间的连接关系;以及获取所述算子对应的激活点集;构图模块,用于根据所述激活点集,确定所述数据中当前需要进行计算的点;计算模块,用于根据所述算子,对当前需要进行计算的点进行计算;处理模块,用于根据计算结果对业务进行处理。
其中一种可能的实现方式中,所述获取模块,具体用于根据所述算子的名称进行索引,获取所述算子对应的激活点集;或者,根据所述算子所在的层级进行索引,获取所述算子对应的激活点集。
其中一种可能的实现方式中,所述激活点集的数据结构为比特集,所述比特集中的每个比特位对应数据中的一个点;所述构图模块,具体用于获取所述比特集中的每个比特位的值,当所述比特位的值为预定值时,确定所述比特位对应的点为当前需要进行计算的点。
其中一种可能的实现方式中,所述装置还包括:生成模块;所述获取模块,还用于在获取所述算子对应的激活点集之前,获取图神经网络模型的网络结构和数据;以及根据所述网络结构,获得所述图神经网络模型的各算子之间的数据依赖关系;所述生成模块,用于根据所述数据依赖关系,生成数据流动图;以及根据所述数据和所述数据流动图,分别生成与所述图神经网络模型的每个层级或每个算子对应的激活点集。
第三方面,本说明书实施例提供一种电子设备,包括:至少一个处理器;以及与所述处理器通信连接的至少一个存储器,其中:所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行第一方面提供的方法。
第四方面,本说明书实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行第一方面提供的方法。
应当理解的是,本说明书实施例的第二~四方面与本说明书实施例的第一方面的技术方案一致,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
附图说明
为了更清楚地说明本说明书实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本说明书一个实施例提供的图拓扑示意图;
图2为本说明书一个实施例提供的数据流动图;
图3为本说明书一个实施例提供的多层激活点集的示意图;
图4为本说明书一个实施例提供的业务处理方法的流程图;
图5为本说明书另一个实施例提供的业务处理方法的流程图;
图6为本说明书再一个实施例提供的业务处理方法的流程图;
图7为本说明书一个实施例提供的业务处理装置的结构示意图;
图8为本说明书另一个实施例提供的业务处理装置的结构示意图;
图9为本说明书一个实施例提供的电子设备的结构示意图。
具体实施方式
为了更好的理解本说明书的技术方案,下面结合附图对本说明书实施例进行详细描述。
应当明确,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本说明书保护的范围。
在本说明书实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书。在本说明书实施例和所附权利要求书中所使用的单数形式的“一种”、“所述” 和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
下面对本说明书实施例中提到的术语进行解释。
1)图(graph):由点集合和边集合(edge set&node set)构成,点和边上可以有各种属性和特征。边集合中的每一条边都有唯一的出发点、唯一的到达点。出发点和到达点都是该图点集合的成员。
2)人工神经网络(artificial neural network,ANN):简称神经网络(neural network,NN)或类神经网络,是当前人工智能领域的研究热点。ANN是一种模仿生物神经网络的结构和功能的数学模型或计算模型,用于对函数进行估计或近似。
3)图神经网络(graph neural network,GNN):图神经网络也是一种人工神经网络算法。GNN的训练数据是图,学习图上的拓扑信息和特征信息来做分类或者预测问题。例如根据用户的社交网络,资金网络等图数据,来预测一个用户的信用好坏,是否存在一些违约风险。
4)图神经网络系统(graph neural network system):图神经网络系统是一个计算框架,或称之为计算引擎,图神经网络系统根据用户设计的模型和用户输入的数据,对图神经网络进行训练;或者,根据现有模型对未知数据进行预测。当前工业界的TensorFlow和/或PyTorch等可以很好的训练神经网络,但对图神经网络的支持并不友好。
5)激活点集(active set):在图神经网络系统中,用来表示图中的点是否激活的一种数据结构。
图相比于关系型数据具有更抽象和普遍的数据表达能力,现实生活中大量数据都可以构成图。比如每个用户作为点,用户之间的各种关系(包括好友关系、转账关系、亲属关系和/或同事关系等等)都可以作为边,从而将所有数据组织成为一张大图。当需要对这张图数据进行更多挖掘的时候,就会应用各种各样的图神经网络系统来进行计算。
图神经网络已经成为了当前的研究热点,同时在工业界图神经网络也开始逐渐落地,例如:搜索推荐领域和/或风控领域等。当前业界仍然没有一种普适的,能处理超大规模图数据的神经网络训练和预测系统。鉴于图数据的特殊性,所有图神经网络系统都应该解决每个点上计算量不一致的问题。
本说明书实施例采用了一种“多层激活点集”的数据结构,通过“多层激活点集”可以快速实现点和边的过滤,从而使得图神经网络能实现最小化计算,有效提升处理性能,帮助图神经网络实现产业化。
图1为本说明书一个实施例提供的图拓扑示意图。参见图1,假设在这个图拓扑结构中,点1,2,3是带有标签的标签点。而点4,5,6,7,8都不带有标签,但是在对 标签点的训练过程中,由于标签点需要获取邻居的数据,因此点4,5,6,7,8也需要参与计算。
另外,假设运行在该图上的图神经网络模型是一个5层的模型,其中:第二层和第四层需要拿到邻居的表征或者特征进行计算(是否包含边表征或特征都可以),其余层则不需要邻居信息,只需要自身信息计算。
基于当前假设,可以得到图1中每个点的“计算量”,如图2所示,图2为本说明书一个实施例提供的数据流动图。
图2中,横向表示图的扩展,其中第一列表示标签点,即训练的目标(target);第二列表示从target点出发,在图上沿着边扩展得到的一度邻居1-hop(1跳);第三列表示从target点在图上沿着边扩展得到的二度邻居2-hop(2跳),等同于从1-hop点扩散的一度邻居。
竖向则代表图神经网络模型的计算方向,也是每个点上数据的流动方向。其中,输入(input)代表点或者点上的原始特征;层1(layer1)表示模型的第一层,在前向计算中,只需要拿input的数据进行计算;层2(layer2)表示模型的第二层,在前向计算中,需要结合自己第1层的特征(embedding)以及一度邻居1-hop的第1层embedding进行计算;层3(layer3)表示模型的第三层,在前向计算中,仅需要拿自己第2层的embedding进行计算;层4(layer4)表示模型的第四层,与layer2类似,需要结合自身以及一度邻居的embedding进行计算;层5(layer5)表示模型的第5层,与第1层类似,仅需要自己的数据进行计算。
反向传播的时候计算沿着前向计算的反方向进行。
注意:图2中没有加入边的数据,表示这个模型不需要用到边上的特征。但是本说明书实施例提供的方法同样适用于使用边特征的情况。
图2中的矩形框表示每一层的算子,从图2中可以看出target点需要进行全量计算;1-hop仅需要计算到layer3,因为layer4和layer5的结果即使算出来也没有用,属于冗余计算;而2-hop仅需要计算到layer1。如果没有一种有效的机制来判断和过滤点,把所有点一视同仁,进行全量计算,那么会带来很多的冗余计算,极为影响图神经网络模型的性能。
针对上述问题,现有相关技术中提供了一种方案:将每个点需要计算到第几层这个数据写到点的属性中,每次计算时根据该属性来判断这个点是否要进行当前计算。但是,这种方案有两个明显的缺点:1、需要将每个点算到第几层这个信息写到点的属性中,那么势必在前期构图的过程中遍历所有的点,并将该信息写入。遍历所有点是一个性能 较差的行为,因为:1)如果所有数据存储在内存中,该操作会导致大量访存和缓存缺失(cache miss);2)如果图规模很大,是存储计算分离架构或者外存架构,那么每次都需要读磁盘/固态硬盘(solid state disk,SSD)/网络,其性能更差;2、在真正计算过程中,同样要遍历图中的所有点,来判断该点是否要进行计算。由于和第1点同样的原因,这也是一种性能很差的方式。
注意:在计算过程中,会包含前向(Forward)和后向(Backward)两个阶段,两个阶段都需要解决冗余计算的问题。因此上述方案对性能的影响是分布在整个计算过程中的。
本说明书实施例提出了一种业务处理方法,通过“多层激活点集”的数据结构来解决冗余计算的问题。
图3为本说明书一个实施例提供的多层激活点集的示意图。图3左侧部分仍然是一个简单图神经网络中的计算量和数据流动的说明,右侧部分是本说明书实施例中提到的多层激活点集的一种图形化展示。
多层激活点集是一个多层次的数据结构,其每一层是一个比特集(bitset),比特集中每一位的值表示这个比特位对应的点的状态,值为1表示激活,值为0表示不激活。本说明书实施例中,比特集的组织方式可以包括数组、字典或链表等。
如图3所示,图3中的所有点都要进行layer1的计算,意味着layer1的激活点集是所有点,因此layer1对应图3右侧部分的激活点集1,激活点集1用比特集可以表示为:{1,1,1,1,1,1,1,1};图3中只有target点和1-hop点需要进行layer2和layer3的计算,因此这两层对应图3右侧部分的激活点集2,激活点集2用比特集可以表示为:{1,1,1,1,1,1,0,0};图3中只有target点需要进行layer4和layer5的计算,因此这两层对应图3右侧部分的激活点集3,激活点集3用比特集可以表示为:{1,1,1,0,0,0,0,0};在该例子中,多层激活点集正好和图中的hop关系对应,即激活点集1对应:target点+1-hop点+2-hop点;激活点集2对应:target点+1-hop点;激活点集3对应:target点。本说明书实施例中,激活点集可以通过模型层数和/或模型中算子名称等方式来索引。
在明确每一层激活点集后,多层激活点集对这些层次进行组织,并给出一个索引。
多层激活点集的构造和应用过程可以如下:在用户完成图神经网络模型的定义之后,图神经网络系统解析图神经网络模型即可得到该图神经网络模型的各算子之间的数据依赖关系。在确定训练策略后,即可确定本次训练哪些点要进行哪些计算,即得到了类似于图3左侧部分的数据流动图。在得到数据流动图之后,即可得到多层激活点集。然后图神经网络系统需要在分布式的计算单元(worker)中构造好多层次激活点集。
在前向计算和反向计算中,每次都可以根据计算的层级或者当前算子的名称等信息来索引到当前的激活点集,则每一个计算单元都可以根据当前激活点集对每个点进行快速的过滤,来消除冗余计算。
下面结合图1~图3对本说明书实施例提供的业务处理方法进行说明。图4为本说明书一个实施例提供的业务处理方法的流程图,如图4所示,上述业务处理方法可以包括以下步骤。
步骤402,获取数据和图神经网络模型中当前待计算的算子。
其中,上述数据包括标签点、上述标签点的邻居节点,以及上述标签点和上述邻居节点之间的连接关系。
参见图1,上述数据可以包括点1、2、3、4、5、6、7和8,其中,点1、2和3为标签点,点4、5、6、7和8为邻居节点,上述数据还可以包括点1、2、3、4、5、6、7和8之间的连接关系。
步骤404,获取上述算子对应的激活点集。
步骤406,根据上述激活点集,确定上述数据中当前需要进行计算的点。
具体地,上述激活点集的数据结构可以为比特集,上述比特集中的每个比特位对应数据中的一个点;其中,上述比特集的组织方式可以是数组、字典或链表等,本实施例对此不作限定。
这样,根据上述激活点集,确定上述数据中当前需要进行计算的点可以为:获取上述比特集中的每个比特位的值;当上述比特位的值为预定值时,确定上述比特位对应的点为当前需要进行计算的点。其中,上述预定值的大小可以在具体实现时自行设定,本实施例对上述预定值的大小不作限定,举例来说,上述预定值可以为1。
举例来说,参见图3,假设当前待计算的算子对应的激活点集为激活点集1,那么可以确定当前需要计算的点为点1、2、3、4、5、6、7和8。
另外,具体实现时,获取上述比特集中的每个比特位的值时,可以按批(batch)获取每个比特位的值,例如:可以一次性获取64字节的值,从而使图神经网络模型的处理速度更加快速。
步骤408,根据上述算子,对当前需要进行计算的点进行计算。
步骤410,根据计算结果对业务进行处理。
上述业务处理方法中,获取数据和图神经网络模型中当前待计算的算子,获取上述算子对应的激活点集,根据上述激活点集,确定上述数据中当前需要进行计算的点,然后,根据上述算子,对当前需要进行计算的点进行计算。从而可以通过激活点集确定当 前需要进行计算的点,消除冗余计算,提升图神经网络模型的处理速度。
本说明书实施例提供的业务处理方法不仅可以应用于图神经网络模型的训练,也可以应用于图神经网络模型的验证、测试以及得到图神经网络模型后的预测。
图5为本说明书另一个实施例提供的业务处理方法的流程图,如图5所示,本说明书图4所示实施例中,步骤404可以为:步骤502,根据上述算子的名称进行索引,获取上述算子对应的激活点集;或者,根据上述算子所在的层级进行索引,获取上述算子对应的激活点集。
需要说明的是,激活点集可以根据算子的名称或算子所在的层级进行索引,但本实施例并不仅限于此,激活点集还可以根据其他的标识符进行索引,本实施例对激活点集的索引方式不作限定。
图6为本说明书再一个实施例提供的业务处理方法的流程图,如图6所示,本说明书图4所示实施例中,步骤404之前,还可以包括以下步骤。
步骤602,获取图神经网络模型的网络结构和数据。
步骤604,根据上述网络结构,获得图神经网络模型的各算子之间的数据依赖关系。
步骤606,根据上述数据依赖关系,生成数据流动图。
具体地,生成数据流动图的具体实现方式可以参见图2所示实施例的描述,在此不再赘述。
步骤608,根据上述数据和上述数据流动图,分别生成与图神经网络模型的每个层级或每个算子对应的激活点集。
本实施例中,生成激活点集的具体实现方式可以参见图3所示实施例的描述,在此不再赘述。需要说明的是,不同层级或者不同算子可以共享同一个激活点集。
在图神经网络中,一旦一个点需要访问其邻居(绝大多数情况),就存在类似的冗余计算。如果不做任何处理,每次计算所有点都进行全量的计算,那么必然导致性能下降。
而现有相关技术提供的方案,问题在于,每次构图阶段、前向计算阶段和/或后向计算阶段,都需要遍历全图所有点。在工业界的图神经网络中,图的规模是很大的,一般分布式存在内存中、或者利用磁盘等外部存储、或者采用计算存储分离的架构。遍历所有的点会造成大量的内存访问、或者磁盘访问、或者网络访问,带来大量的缓存缺失,导致性能下降。
本说明书实施例提供的方案,利用多层次激活点集来存储每一层需要计算的子图,每一层的基本数据结构是比特集(bitset)。bitset中的每一个比特就可以代表一个点, 每一个计算单元仅需要维护本单元负责的点的集合。
在当下绝大多数应用场景中,一个计算单元负责的点数不会过大,一般不会超过1亿个点,绝大多数是百万到千万级别的点。以1亿个点计算,需要的每一层bitset仅仅12MB。目前绝大多数图神经网络仅访问一度邻居,意味着多层激活点集仅包含2个基本的bitset,存储小于24MB。上文例子中的情况,访问了二度邻居,也仅需要3个基本bitset,存储小于36MB。即使更复杂的模型,对应的多层激活点集需要的存储也基本不会超过100MB。
可以看到,这个数量级的数据结构基本可以存储在缓存(cache)中,这意味着在构图、前向计算和/或后向计算中,过滤点大部分情况仅需要访问cache即可,cache的速度相比内存、磁盘或者网络有几个数量级的优势,这可以带来极大的性能提升。在当前的场景实测中,采用了多层激活点集去除冗余计算后,对应部分的性能可以提升10倍以上。
基于当下某些图神经网络系统中存在的冗余计算问题(采用分布式图计算框架的系统基本都会面对该问题),本说明书实施例设计了一个尺寸极小的数据结构——多层激活点集来快速判断一个点是否要进行计算。这个数据结构基本可以存储在cache中,使得每次访问数据极快,以一种高性能的方式消除了冗余计算。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
图7为本说明书一个实施例提供的业务处理装置的结构示意图,如图7所示,上述业务处理装置可以包括:获取模块71、构图模块72、计算模块73和处理模块74;获取模块71,用于获取数据和图神经网络模型中当前待计算的算子;其中,上述数据包括标签点、上述标签点的邻居节点,以及上述标签点和邻居节点之间的连接关系;以及获取上述算子对应的激活点集;构图模块72,用于根据上述激活点集,确定上述数据中当前需要进行计算的点;计算模块73,用于根据上述算子,对当前需要进行计算的点进行计算;处理模块74,用于根据计算结果对业务进行处理。
图7所示实施例提供的业务处理装置可用于执行本说明书图1~图4所示方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。
图8为本说明书另一个实施例提供的业务处理装置的结构示意图,本实施例中,获 取模块71,具体用于根据上述算子的名称进行索引,获取上述算子对应的激活点集;或者,根据上述算子所在的层级进行索引,获取上述算子对应的激活点集。
本实施例中,上述激活点集的数据结构为比特集,上述比特集中的每个比特位对应数据中的一个点;这样,构图模块72,具体用于获取上述比特集中的每个比特位的值,当上述比特位的值为预定值时,确定上述比特位对应的点为当前需要进行计算的点。
进一步地,上述业务处理装置还可以包括:生成模块75;获取模块71,还用于在获取上述算子对应的激活点集之前,获取图神经网络模型的网络结构和数据;以及根据上述网络结构,获得图神经网络模型的各算子之间的数据依赖关系;生成模块75,用于根据上述数据依赖关系,生成数据流动图;以及根据上述数据和上述数据流动图,分别生成与图神经网络模型的每个层级或每个算子对应的激活点集。
图8所示实施例提供的业务处理装置可用于执行本说明书图1~图6所示方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。
图9为本说明书一个实施例提供的电子设备的结构示意图,如图9所示,上述电子设备可以包括至少一个处理器;以及与上述处理器通信连接的至少一个存储器,其中:存储器存储有可被处理器执行的程序指令,上述处理器调用上述程序指令能够执行本说明书图1~图6所示实施例提供的业务处理方法。
其中,上述电子设备可以为服务器,例如:云服务器或图计算服务器,本实施例对上述电子设备的形式不作限定。
图9示出了适于用来实现本说明书实施方式的示例性电子设备的框图。图9显示的电子设备仅仅是一个示例,不应对本说明书实施例的功能和使用范围带来任何限制。
如图9所示,电子设备以通用计算设备的形式表现。电子设备的组件可以包括但不限于:一个或者多个处理器910,通信接口920,存储器930,以及连接不同组件(包括存储器930、通信接口920和处理器910)的通信总线940。
通信总线940表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,或者使用多种总线结构中的任意总线结构的局域总线。举例来说,通信总线940可以包括但不限于工业标准体系结构(industry standard architecture,ISA)总线,微通道体系结构(micro channel architecture,MAC)总线,增强型ISA总线、视频电子标准协会(video electronics standards association,VESA)局域总线以及外围组件互连(peripheral component interconnection,PCI)总线。
电子设备典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
存储器930可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(random access memory,RAM)和/或高速缓存存储器。存储器930可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本说明书图1~图6所示实施例的功能。
具有一组(至少一个)程序模块的程序/实用工具,可以存储在存储器930中,这样的程序模块包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块通常执行本说明书图1~图6所描述的实施例中的功能和/或方法。
处理器910通过运行存储在存储器930中的程序,从而执行各种功能应用以及数据处理,例如实现本说明书图1~图6所示实施例提供的业务处理方法。
本说明书实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行本说明书图1~图6所示实施例提供的业务处理方法。
上述非暂态计算机可读存储介质可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(read only memory,ROM)、可擦式可编程只读存储器(erasable programmable read only memory,EPROM)或闪存、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、射频(radio frequency,RF)等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本说明书操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(local area network,LAN)或广域网(wide area network,WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本说明书的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本说明书的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本说明书的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本说明书的实施例所属技术领域的技术人员所理解。
取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈 述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
需要说明的是,本说明书实施例中所涉及的终端可以包括但不限于个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、无线手持设备、平板电脑(tablet computer)、手机、MP3播放器、MP4播放器等。
在本说明书所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
另外,在本说明书各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(processor)执行本说明书各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。

Claims (10)

  1. 一种业务处理方法,包括:
    获取数据和图神经网络模型中当前待计算的算子;其中,所述数据包括标签点、所述标签点的邻居节点,以及所述标签点和所述邻居节点之间的连接关系;
    获取所述算子对应的激活点集;
    根据所述激活点集,确定所述数据中当前需要进行计算的点;
    根据所述算子,对当前需要进行计算的点进行计算;
    根据计算结果对业务进行处理。
  2. 根据权利要求1所述的方法,其中,所述获取所述算子对应的激活点集包括:
    根据所述算子的名称进行索引,获取所述算子对应的激活点集;或者,
    根据所述算子所在的层级进行索引,获取所述算子对应的激活点集。
  3. 根据权利要求1所述的方法,其中,所述激活点集的数据结构为比特集,所述比特集中的每个比特位对应数据中的一个点;
    所述根据所述激活点集,确定所述数据中当前需要进行计算的点包括:
    获取所述比特集中的每个比特位的值;
    当所述比特位的值为预定值时,确定所述比特位对应的点为当前需要进行计算的点。
  4. 根据权利要求1-3任意一项所述的方法,其中,所述获取所述算子对应的激活点集之前,还包括:
    获取图神经网络模型的网络结构和数据;
    根据所述网络结构,获得所述图神经网络模型的各算子之间的数据依赖关系;
    根据所述数据依赖关系,生成数据流动图;
    根据所述数据和所述数据流动图,分别生成与所述图神经网络模型的每个层级或每个算子对应的激活点集。
  5. 一种业务处理装置,包括:
    获取模块,用于获取数据和图神经网络模型中当前待计算的算子;其中,所述数据包括标签点、所述标签点的邻居节点,以及所述标签点和所述邻居节点之间的连接关系;以及获取所述算子对应的激活点集;
    构图模块,用于根据所述激活点集,确定所述数据中当前需要进行计算的点;
    计算模块,用于根据所述算子,对当前需要进行计算的点进行计算;
    处理模块,用于根据计算结果对业务进行处理。
  6. 根据权利要求5所述的装置,其中,
    所述获取模块,具体用于根据所述算子的名称进行索引,获取所述算子对应的激活点集;或者,根据所述算子所在的层级进行索引,获取所述算子对应的激活点集。
  7. 根据权利要求5所述的装置,其中,所述激活点集的数据结构为比特集,所述比特集中的每个比特位对应数据中的一个点;
    所述构图模块,具体用于获取所述比特集中的每个比特位的值,当所述比特位的值为预定值时,确定所述比特位对应的点为当前需要进行计算的点。
  8. 根据权利要求5-7任意一项所述的装置,其中,还包括:生成模块;
    所述获取模块,还用于在获取所述算子对应的激活点集之前,获取图神经网络模型的网络结构和数据;以及根据所述网络结构,获得所述图神经网络模型的各算子之间的数据依赖关系;
    所述生成模块,用于根据所述数据依赖关系,生成数据流动图;以及根据所述数据和所述数据流动图,分别生成与所述图神经网络模型的每个层级或每个算子对应的激活点集。
  9. 一种电子设备,包括:
    至少一个处理器;以及
    与所述处理器通信连接的至少一个存储器,其中:
    所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如权利要求1至4任一所述的方法。
  10. 一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求1至4任一所述的方法。
PCT/CN2022/107679 2021-08-04 2022-07-25 业务处理 WO2023011237A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110890706.XA CN113626650A (zh) 2021-08-04 2021-08-04 业务处理方法、装置和电子设备
CN202110890706.X 2021-08-04

Publications (1)

Publication Number Publication Date
WO2023011237A1 true WO2023011237A1 (zh) 2023-02-09

Family

ID=78382683

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/107679 WO2023011237A1 (zh) 2021-08-04 2022-07-25 业务处理

Country Status (2)

Country Link
CN (1) CN113626650A (zh)
WO (1) WO2023011237A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626650A (zh) * 2021-08-04 2021-11-09 支付宝(杭州)信息技术有限公司 业务处理方法、装置和电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110782044A (zh) * 2019-10-29 2020-02-11 支付宝(杭州)信息技术有限公司 多方联合训练图神经网络的方法及装置
CN111309983A (zh) * 2020-03-10 2020-06-19 支付宝(杭州)信息技术有限公司 基于异构图进行业务处理的方法及装置
CN112149808A (zh) * 2020-09-28 2020-12-29 上海交通大学 拓展单机图神经网络训练至分布式训练方法、系统及介质
WO2021022521A1 (zh) * 2019-08-07 2021-02-11 华为技术有限公司 数据处理的方法、训练神经网络模型的方法及设备
CN112766500A (zh) * 2021-02-07 2021-05-07 支付宝(杭州)信息技术有限公司 图神经网络的训练方法及装置
CN113626650A (zh) * 2021-08-04 2021-11-09 支付宝(杭州)信息技术有限公司 业务处理方法、装置和电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021022521A1 (zh) * 2019-08-07 2021-02-11 华为技术有限公司 数据处理的方法、训练神经网络模型的方法及设备
CN110782044A (zh) * 2019-10-29 2020-02-11 支付宝(杭州)信息技术有限公司 多方联合训练图神经网络的方法及装置
CN111309983A (zh) * 2020-03-10 2020-06-19 支付宝(杭州)信息技术有限公司 基于异构图进行业务处理的方法及装置
CN112149808A (zh) * 2020-09-28 2020-12-29 上海交通大学 拓展单机图神经网络训练至分布式训练方法、系统及介质
CN112766500A (zh) * 2021-02-07 2021-05-07 支付宝(杭州)信息技术有限公司 图神经网络的训练方法及装置
CN113626650A (zh) * 2021-08-04 2021-11-09 支付宝(杭州)信息技术有限公司 业务处理方法、装置和电子设备

Also Published As

Publication number Publication date
CN113626650A (zh) 2021-11-09

Similar Documents

Publication Publication Date Title
CN110321958B (zh) 神经网络模型的训练方法、视频相似度确定方法
US20180300604A1 (en) Power-efficient deep neural network module configured for layer and operation fencing and dependency management
US20190166069A1 (en) System and method for visually understanding and programming conversational agents of electronic devices
US10754885B2 (en) System and method for visually searching and debugging conversational agents of electronic devices
US8468146B2 (en) System and method for creating search index on cloud database
US11355123B2 (en) Network data aligning
US11314451B2 (en) Method and apparatus for storing data
CN110941754B (zh) 基于增强学习生成向量最近邻搜索策略
US20210200806A1 (en) Method and apparatus for parallel processing of information
WO2023011237A1 (zh) 业务处理
US11729268B2 (en) Computer-implemented method, system, and storage medium for prefetching in a distributed graph architecture
CN115982323A (zh) 应用于云端在线服务的大数据分析方法及人工智能系统
CN113360683B (zh) 训练跨模态检索模型的方法以及跨模态检索方法和装置
US20240111775A1 (en) Apparatus and Techniques for Contextual Search of a Storage System
CN109033456B (zh) 一种条件查询方法、装置、电子设备和存储介质
CN117149777B (zh) 一种数据查询方法、装置、设备及存储介质
CN113902540A (zh) 一种用于风险识别的方法和装置
US10664663B2 (en) Natural language processing system
CN111460822A (zh) 主题扩展的方法、装置、设备和存储介质
WO2019179252A1 (zh) 一种样本回放数据存取方法及装置
CN114691720A (zh) 数据查询方法、数据库系统、可读介质和电子设备
US20160248711A1 (en) Generation of a communication request based on visual selection
CN112787831B (zh) 一种会议群组拆分的方法与设备
CN108804625A (zh) 一种lsm树的优化方法、装置及计算机设备
CN114168589A (zh) 索引构建方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22851951

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE