WO2016095738A1 - Relationship network data maintenance method, off-line server and real-time server - Google Patents

Relationship network data maintenance method, off-line server and real-time server Download PDF

Info

Publication number
WO2016095738A1
WO2016095738A1 PCT/CN2015/096796 CN2015096796W WO2016095738A1 WO 2016095738 A1 WO2016095738 A1 WO 2016095738A1 CN 2015096796 W CN2015096796 W CN 2015096796W WO 2016095738 A1 WO2016095738 A1 WO 2016095738A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
network data
server
network
preset time
Prior art date
Application number
PCT/CN2015/096796
Other languages
French (fr)
Chinese (zh)
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 WO2016095738A1 publication Critical patent/WO2016095738A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present application relates to the field of network information processing, and in particular, to a method for maintaining network data, an offline server, and a real-time server.
  • a network diagram structure composed of associations between interacting entities in a network platform may be referred to as a relational network.
  • Relationship-based network services can be provided in the network platform.
  • the relationship may be an association relationship between a network social subject or a network transaction subject.
  • a network structure diagram can be constructed from the perspective of the figure. From the perspective of the graph, the subject in the relational network can be a graph node, and the association relationship between the subjects can be the edge of the graph.
  • Such a network structure diagram can intuitively and clearly indicate the network of subjects and relationships.
  • a user in a network structure diagram composed of a network social platform, a user may be a graph node, and a relationship between a user and a user such as a friend and/or a concern may be used as an edge of the graph.
  • a user, a credit card, a device, or the like in a network transaction platform, can be regarded as a graph node, and the user can use the credit card to pay, the user to use the device to log in, the user to pay the valuable object to other users, and the like can be regarded as the edge of the graph.
  • the maintenance of the relational network generally involves an offline server and an online server.
  • the offline server can read the user operation record in the network platform in a certain period of time, and calculate the user operation record before the preset time node in each time period to construct the relationship network data.
  • the offline server then updates the calculated relational network data directly to the online server.
  • the relational network data in the online server can be provided to the network platform for access.
  • the online server and the network platform can be located in the same network environment, and the offline server and the online server can be in different network environments.
  • the purpose of the embodiment of the present application is to provide a method for maintaining network data, an offline server, and a real-time server, so that the network platform can access the relationship after the preset time node in time after the offline server processes the user operation record.
  • Network data is to maintain network data, an offline server, and a real-time server, so that the network platform can access the relationship after the preset time node in time after the offline server processes the user operation record.
  • a method for maintaining relationship network data, an offline server, and a real-time server provided by the embodiments of the present application are implemented as follows:
  • a method for maintaining network data including:
  • the offline server obtains a user operation record before the preset time node
  • the offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
  • the offline server synchronizes the first sub-network data into the real-time server and sends the preset time node to the real-time server;
  • the real-time server stores the first sub-network data and acquires a user operation record after the preset time node;
  • the real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges the combined The third subnet data is updated to the online server.
  • a method for maintaining network data including:
  • the offline server obtains a user operation record before the preset time node
  • the offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
  • the offline server synchronizes the first sub-network data into the online server and sends the preset time node to the real-time server;
  • the real-time server acquires a user operation record after the preset time node
  • the real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
  • a method for maintaining network data including:
  • the offline server obtains a user operation record before the preset time node
  • the offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
  • the offline server synchronizes the first sub-network data to the real-time server or the online server, and sends the preset time node to the real-time server.
  • a method for maintaining network data including:
  • the real-time server stores the first sub-network data synchronized from the offline server and receives the preset time node;
  • the real-time server acquires a user operation record after the preset time node
  • the real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges the combined The third subnet data is updated to the online server.
  • a method for maintaining network data including:
  • the real-time server receives the preset time node and acquires a user operation record after the preset time node;
  • the real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
  • An offline server that includes:
  • a user operation record obtaining unit configured to acquire a user operation record before the preset time node
  • a calculating unit configured to calculate a user operation record before the preset time node, to obtain a first sub-network data before the preset time node;
  • the sub-network data synchronization unit is configured to synchronize the first sub-network data into the real-time server and send the preset time node to the real-time server.
  • An offline server that includes:
  • a user operation record obtaining unit configured to acquire a user operation record before the preset time node
  • a calculating unit configured to calculate a user operation record before the preset time node, to obtain a first sub-network data before the preset time node;
  • the sub-network data update unit is configured to synchronize the first sub-network data into the online server and send the preset time node to the real-time server.
  • a real-time server that includes:
  • a storage unit configured to store first sub-network data synchronized by the offline server
  • the user operation record reading unit is configured to obtain a user operation record after the preset time node
  • a calculating unit configured to calculate a user operation record after the preset time node, to obtain second sub-network data
  • a merging unit configured to merge the second sub-network data with the first sub-network data into the third sub-network data
  • the update unit is configured to update the merged third sub-network data to the online server.
  • a real-time server that includes:
  • the user operation record reading unit is configured to obtain a user operation record after the preset time node
  • a calculating unit configured to calculate a user operation record after the preset time node, to obtain second sub-network data
  • the merging unit is used to merge the second sub-network data into the online server.
  • the real-time server can supplement the user operation record after the preset time node in time, so that the network platform can be enabled.
  • the offline server processes the user operation record, it accesses the relational network data after the preset time node in time.
  • FIG. 1 is a flowchart of a first embodiment of a method for maintaining relationship network data according to the present application
  • FIG. 2 is a functional diagram of a module of an offline server in an embodiment of the present application
  • FIG. 3 is a functional block diagram of an offline server in another embodiment of the present application.
  • FIG. 4 is a functional block diagram of a computing unit in an offline server in an embodiment of the present application.
  • FIG. 5 is a functional diagram of a module of a real-time server in an embodiment of the present application.
  • FIG. 6 is a functional diagram of a module of a real-time server in another embodiment of the present application.
  • FIG. 7 is a functional diagram of a module of a computing unit in a real-time server according to an embodiment of the present application.
  • FIG. 8 is a flowchart of an embodiment of a method for maintaining relationship network data that is mainly an offline server according to the present application
  • FIG. 9 is a flowchart of another embodiment of a method for maintaining relationship network data that is mainly composed of an offline server
  • FIG. 10 is a flowchart of an embodiment of a method for maintaining relationship network data mainly composed of a real-time server
  • FIG. 11 is a flow chart of another embodiment of a method for maintaining relationship network data mainly based on a real-time server in the present application.
  • the embodiment of the present application provides a method for maintaining network data, an offline server, and a real-time server.
  • the technical solutions in the embodiments of the present application are clearly and completely described in the following, in which the technical solutions in the embodiments of the present application are clearly and completely described.
  • the embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope shall fall within the scope of the application.
  • the method for maintaining relationship network data relates to an offline server, a real-time server, and an online server.
  • the offline server can be responsible for the calculation of large amounts of data in an offline environment; the real-time server and the online server can be located in the same network environment.
  • the real-time server can also be integrated into the online server as a software module or hardware module.
  • 1 is a flow chart of a first embodiment of a method for maintaining network data in the present application. As shown in FIG. 1, the method for maintaining the relationship network data includes the following steps:
  • S1 The offline server obtains a user operation record before the preset time node.
  • the offline server can synchronize the user actions recorded by the platform system in a fixed cycle. For example, the offline server synchronizes daily user action records for the day in the online production environment on a daily basis. Further, the offline server can set a specific time node, for example, 23:59:59 every day. In this way, the offline server can synchronize the user operation records before the time node at 23:59:59 every day.
  • the above-mentioned daily time node can be used as the preset time node described in step 1.
  • the offline server can also perform the above synchronization operation on user operations recorded by the platform system in a non-fixed cycle.
  • the offline server can use incremental synchronization when performing synchronization operations. Specifically, in each synchronization after the first synchronization, only the data of the last cycle can be synchronized. Based on the above example, when the offline server synchronizes the user operation records at 23:59:59 on September 24, 2014, it only needs to be 23:59:59 on September 23, 2014 to September 24, 2014. The user operation record of 23:59:59 on the day can be synchronized, because the user operation record before 23:59:59 on September 23, 2014 has been processed in the previous synchronization process.
  • the online production environment can scroll to generate a user operation record file every day, for example, the user operation data of September 24, 2014 is stored in the " User operation record - 2014.09.24.log” file. Then, when the offline server synchronizes at 23:59:59 on September 24, 2014, the "user operation record-2014.09.24.log” file can be read or copied incrementally.
  • the online production environment uses the HBase database to implement the user operation record storage. Then the online production environment can use the data backup tool provided by the HBase database to store the last cycle of data to the offline server. You can also use the HBase database scan. Operation, the data in the last cycle time period is read into the offline server.
  • the common methods of the scan class in HBase are described as follows:
  • the offline server when the offline server performs the synchronization operation, it can also be processed in a synchronous manner as needed, which is not limited herein.
  • steps S2 to S5 may be performed:
  • S2 The offline server calculates a user operation record before the preset time node, and obtains the preset time.
  • the offline server After the offline server reads the user operation record before the preset time node, it can be processed as follows:
  • S201 The offline server disassembles each user operation record before the preset time node into data including a sub-network body and a sub-network edge.
  • the sub-network body disassembled in step S201 may include a start body and a terminating body.
  • the offline server can determine the starting body and the terminating body, and save the starting body, the terminating body, and the sub-network side into the sub-network table, as shown in Table 1:
  • the offline server disassembles the user operation data in the preset time period into the starting body one by one, terminates the body and the sub-network side, and terminates the starting body, the terminating body, and the sub-network side. Save in the subnet table.
  • the subject and sub-network edges involved in the user action record may be accompanied by an initial identifier that distinguishes between different subjects and different sub-network edges.
  • the sub-network side involved in the user operation record can also be accompanied by an initial time letter. Information, used to record the exact time point generated by the subnetwork. After the offline server determines the starting body and the terminating body and the sub-network side between them, the identifiers of the starting body, the terminating body, and the sub-network edge can be emptied.
  • the offline server performs the merge processing on the disassembled data according to the sub-network body and the sub-network edge according to a preset rule, to obtain the first sub-network data before the preset time node.
  • the offline server may perform a merge process on the sub-network body in the sub-network table to obtain a correspondence between the main body and the sub-network.
  • the offline server can follow the following rules when merging sub-network bodies in the sub-network table:
  • the offline server If neither the starting body nor the terminating body has an identifier, the offline server generates an identifier assigned to the starting body and the terminating body;
  • the identifier of the starting body is assigned to the terminating body
  • the identity of the terminating body is assigned to the starting body
  • the identifiers of the start body and the terminating body are different, the identifier of the terminating body is cleared, then the identifier of the starting body is assigned to the terminating body, and the identifiers of all the subjects associated with the terminating body are modified to Terminate the identity of the subject;
  • start and stop bodies have the same identity, no processing is done.
  • the identifier generated by the offline server is a unique identifier.
  • the rules followed in the above-mentioned merge processing can be preset rules.
  • step S201 to illustrate:
  • the starting entity is user 1
  • the terminating body is device 1, wherein user 1 has no identifier, and device 1 has no identifier.
  • the offline server generates an identifier A, and sets the identifiers of user 1 and device 1 to A. ;
  • the above processing is performed on the second item in Table 2.
  • the starting body is the user 1
  • the terminating body is the credit card 1, wherein the user 1 has the identifier A, the credit card 1 has no identification, and according to the above-mentioned merge principle, the identification of the credit card 1 is set to A;
  • the above processing is performed on the third item in Table 2.
  • the starting entity is the device 1, and the terminating body is the credit card 1, wherein the identifier of the device 1 is A, and the identifier of the credit card 1 is also A. According to the above-mentioned merge principle, no processing is performed.
  • the above processing is performed on the fourth item in Table 2.
  • the starting entity is user 2
  • the terminating body is device 2, wherein user 2 has no identity, and device 2 has no identity.
  • the offline server generates a different identifier B from the identifier A, and the user 2 and the device 2 The identity is set to B.
  • the subject identifiers in Articles 5 and 6 of Table 2 are both set to B; for the seventh clause in Table 2, the starting subject is User 1, and the terminating subject is Device 2, where User 1's logo is A.
  • the identifier of the device 2 is B.
  • the identifier of the device 2 is cleared, then the identifier A of the user 1 is assigned to the device 2, and the identifiers of all the subjects associated with the device 2 are modified to A. , that is, the identification of both user 2 and credit card 2 is changed from B to A.
  • the starting body and the terminating body in the same subnet have the same identity; the subjects in different subnetworks have different identities.
  • the offline server can continue to assign the identifier of the subject in the same sub-network to the sub-network side, so that the subject and the edge in the same sub-network can have the same identifier, and the same identifier can be defined as the sub-network identifier.
  • the subnet table after the merge processing is shown in Table 3:
  • the start body, the termination body, the sub-network side, the time information of the sub-network side, and the sub-network identifier in the sub-network can be the first sub-network data before the preset time node.
  • S3 The offline server synchronizes the first sub-network data into the real-time server and sends the preset time node to the real-time server.
  • the offline server may synchronize the first sub-network data before the preset time node to the real-time server.
  • the specific implementation manner can use the data backup tool provided by the HBase database to save the sub-network data to the real-time server; or use the scan operation of the HBase database to read the sub-network data in the preset time period to the real-time server.
  • the offline server may send the preset time node to the real-time server after the synchronization of the first sub-network data before the preset time node is completed. For example, the offline server processes the user operation record before 23:59:59 on September 24, 2014. After the synchronization of the sub-network data before this time node is completed, it can be September 24, 2014. At 59 minutes and 59 seconds, this time node is sent to the real-time server. In this way, the real-time server can start processing the subsequent user operation records from 23:59:59 on September 24, 2014.
  • the real-time server stores the first sub-network data and acquires a user operation record after the preset time node.
  • the real-time server may store the sub-network data before the preset time node synchronized by the offline server, and perform subsequent processing.
  • Step S1 mentioned that the user generated by the platform system The record can be stored in the software system.
  • the software system storing the user operation record can be located in a separate data server, which can be located in the online environment where the platform system is located; the software system storing the user operation record can also be integrated into the real-time server as a software module. Facilitate faster access to real-time servers.
  • the real-time server may determine the user operation record after the preset time node: if the user operation record is not generated, the real-time server waits for the user record to be generated; if the user operation record is generated, after reading the preset time node User action record.
  • the real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data.
  • the real-time server may first disassemble each user operation record after the preset time node into data including the sub-network body and the sub-network edge. Then, the real-time server may perform the merge processing on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the second sub-network data.
  • the merging process is similar to step S202, and will not be described again here.
  • the real-time server may then merge the second sub-network data with the first sub-network data into the third sub-network data based on the sub-network body and the sub-network side in the second sub-network data.
  • the specific process is as follows:
  • the real-time server searches for the sub-network and the sub-network identifier corresponding to the disassembled main body in the stored first sub-network data according to the disassembled main body. If the discovered subnet identifiers are the same, the disassembled entities are located in the same subnet. Further, whether the disassembled user operation record already exists in the stored first sub-network data may be determined by the time information of the disassembled sub-network side.
  • the first sub-network data stored in the storage may be directly set to the sub-network identifier of the disassembled sub-network identifier and merged into the stored first sub-network data.
  • a user operation record is that the user 1 is performing a payment operation using the credit card 1.
  • the user operation record can be disassembled into: user 1, credit card 1 and the payment of the sub-network side, and the payment is assumed to be at 9:24 on September 24, 2014.
  • the payment operation in the user operation record has a time information, which is assumed to be 0020140924092438.
  • the real-time server can then find the identifier corresponding to the user 1 and the credit card 1 in the stored first sub-network data. Assuming that the identified IDs of both User 1 and Credit Card 1 are A1, it indicates that User 1 and Credit Card 1 are in the same sub-network.
  • the real-time server can continue to compare the time information of the payment operation between the user 1 and the credit card 1, assuming that there is also a payment operation between the user 1 and the credit card 1 in the stored first sub-network data, and the payment
  • the time information of the operation is also 0020140924092438, which indicates that the current user operation record processed by the real-time server actually exists in the stored A subnet of the network data.
  • the real-time server can directly skip the user operation record and perform the processing of the next user operation record.
  • the time information corresponding to the payment operation between the user 1 and the credit card 1 in the stored first sub-network data is different from the time information corresponding to the payment operation between the user 1 and the credit card 1 in the user operation record, it indicates that The user operation record and the stored first sub-network data are not duplicated, and then the user 1, the credit card 1 and the payment identifier in the user operation record can be set to A1 and merged into the stored first sub-network data.
  • the sub-networks that are found may be merged first.
  • the method of merging may be: randomly selecting one sub-network identifier in the discovered sub-network, and setting the subject identifier, the sub-network edge identifier, and the sub-network identifier in the found sub-network to the The selected sub-network identifiers, so that the discovered sub-networks can be merged into one sub-network; the identifiers of the disassembled main body and sub-network edges can be set as the selected sub-network identifiers and merged into the In the first subnet data stored.
  • a user operation record read by the real-time server after the preset time node is: User 1 performs a payment operation on the device 2. Then the real-time server can disassemble the user operation record into the main user 1 and the main device 2 and the sub-network side payment. The real-time server can then find the sub-network corresponding to user 1 and device 2 from the stored first sub-network data. It is assumed that the sub-network corresponding to user 1 is A, the sub-network identifier is A1, the sub-network corresponding to device 2 is B, and the sub-network identifier is B1.
  • the user 1 and the device 2 are not in the same sub-network, but the sub-network A and the sub-network B are connected through the payment relationship between the user 1 and the device 2, so the sub-network A and the sub-network need to be Network B is merged into one subnet.
  • the specific merge method is as follows: the real-time server randomly selects one sub-network identifier in the sub-network A and the sub-network B, for example, A1, and the subject identifier, the sub-network edge identifier, and the sub-network identifier in the sub-network A and the sub-network B are both Set to A1. In this way, sub-network A and sub-network B can be combined into one sub-network.
  • the user 1 and the device 2 and the payment identifier can then be set to A1 and merged into the stored first sub-network data.
  • the real-time server is looking for the sub-network corresponding to the disassembled main body, there may be another case: the disassembled main body does not have a corresponding sub-network in the stored first sub-network data. This situation indicates that the disassembled body appears for the first time.
  • the real-time server may form the disassembled main body into a new sub-network, and merge the constructed new sub-network data into the stored first sub-network data.
  • the subsequent user operation record processing can be continued. The process is as described above, and will not be described here.
  • S6 The real-time server updates the merged third sub-network data to the online server.
  • the real-time server Since the amount of user operation record data after the preset time node is relatively small, and the user operation record can be stored in the real-time server or stored in a separate server in the same network environment as the real-time server, the real-time server The time for data reading and data processing is very short; on the other hand, the real-time server can be located in the same network environment as the online server, and can also be integrated into the online server as a software module or hardware module, so the real-time server and online The information exchange between the servers is very fast, and the time for the real-time server to update the data to the online server is also very short, so that the online server can timely access the user operation records after the preset time node.
  • the offline server performs data acquisition and calculation processing according to a preset time period, and can flexibly respond to the access requirements of the network platform system.
  • an online trading platform wants to access the number of credit card usages of a user in the most recent year.
  • the offline server may continue to process the user operation record of the latest year for processing in the time period after the user operation record before the preset time node is acquired. In this way, the data in the online server will only contain the user operation data of the last year, which can meet the access requirements of the network transaction platform.
  • the offline server may also not read the user operation record for a certain period of time, but only read the user operation record before the preset time node once and perform calculation processing. For example, if the preset time node is 23:59:59 on September 24, 2014, the offline server can read the user operation record before 23:59:59 on September 24, 2014, and calculate after reading. deal with. After the offline server calculates the user operation record before the preset time node, the first sub-network data before the preset time node can be obtained. The offline server synchronizes the first sub-network data before the preset time node to the real-time server and sends the preset time node to the real-time server.
  • the real-time server stores the first sub-network data before the preset time node and acquires a user operation record after the preset time node.
  • the real-time server calculates a user operation record after the preset time node, and merges the calculated sub-network data into the stored first sub-network data, and updates the merged sub-network data to the online server.
  • the offline server can calculate the sub-network data before 23:59:59 on September 24, 2014 after calculating the user operation record before 23:59:59 on September 24, 2014. .
  • the offline server synchronizes the subnet data to the real-time server and sends the time node at 23:59:59 on September 24, 2014 to the real-time server.
  • the real-time server After the real-time server stores the sub-network data before 23:59:59 on September 24, 2014, it can calculate all the user operation records after 23:59:59 on September 24, 2014, and The calculated sub-network data is merged into the stored sub-network data, and the merged sub-network data can be further updated to the online server.
  • the calculation process of the offline server and the data calculation and merge process of the real-time server are as described in the first embodiment of the present application, and are not described herein again.
  • the offline server only reads the user operation record before the preset time node, avoids repeated calculation of part of the large data amount, and can improve the efficiency of the maintenance of the entire relationship network.
  • the offline server may acquire the preset time node according to the preset time period.
  • User action record The following processing can be performed during each preset time period:
  • the offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
  • the offline server synchronizes the first sub-network data into the online server and sends the preset time node to the real-time server;
  • the real-time server acquires a user operation record after the preset time node
  • the real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
  • the offline server directly updates the sub-network data before the preset time node to the online server, avoiding the process of performing data synchronization to the real-time server and data storage by the real-time server.
  • the real-time server can directly merge the user operation records after the preset time node into the online server, thereby avoiding the process of updating the large data volume to the online server, so the whole process is more efficient.
  • the offline server performs data acquisition and calculation processing according to a preset time period, and can flexibly respond to the access requirements of the network platform system. For example, in a network trading platform system, an online trading platform wants to access the number of credit card usages of a user in the most recent year.
  • the offline server may continue to process the user operation record of the latest year for processing in the time period after the user operation record before the preset time node is acquired.
  • the data in the online server will only contain the user operation data of the last year, which can meet the access requirements of the network transaction platform.
  • the offline server may not read the user operation record for a certain period of time, but only read the user operation record before the preset time node once and perform calculation processing. For example, if the preset time node is 23:59:59 on September 24, 2014, the offline server can read the user operation record before 23:59:59 on September 24, 2014, and calculate after reading. deal with.
  • the offline server calculates the user operation record before the preset time node
  • the first sub-network data before the preset time node is obtained.
  • the offline server may directly synchronize the first sub-network data before the preset time node to the online server, and simultaneously send the preset time node to the real-time server.
  • the real-time server calculates a user operation record after the preset time node, and merges the calculated sub-network data into the online server.
  • the offline server directly updates the first sub-network data before the preset time node to the online server, avoiding the process of performing data synchronization to the real-time server and data storage by the real-time server.
  • the real-time server can directly merge the user operation records after the preset time node into the online server, avoiding the entry to the online server.
  • the process of updating large amounts of data is so efficient that the entire process is more efficient.
  • the offline server only reads the user operation record before the preset time node, avoids the repeated calculation of part of the large data amount, and can also improve the efficiency of the maintenance of the entire relationship network.
  • the offline server calculates a user operation record of a large amount of data before the preset time node, and obtains sub-network data before the preset time node; the real-time server can timely access the user after the preset time node.
  • the operation record is supplemented, so that the network platform can access the relational network data after the preset time node in time after the offline server processes the user operation record.
  • FIG. 8 is a flowchart of an embodiment of a method for maintaining relationship network data with an offline server as the main body of the present application. As shown in FIG. 8, the method for maintaining relationship network data that is mainly composed of an offline server includes the following steps:
  • the offline server acquires a user operation record before the preset time node.
  • the offline server may acquire a user operation record before the preset time node according to a preset time period, where the preset time period includes a preset fixed time period and a preset non-fixed time period.
  • the offline server can obtain the user operation record before the preset time node in the incremental synchronization mode or can obtain the user operation record before the preset time node in all synchronization modes.
  • S120 The offline server calculates a user operation record before the preset time node, and obtains the first sub-network data before the preset time node.
  • Step S120 can be specifically implemented by the following two steps:
  • the offline server disassembles each user operation record before the preset time node into data including the sub-network body and the sub-network edge;
  • the offline server performs the merging process on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the first sub-network data before the preset time node.
  • the offline server synchronizes the first sub-network data into the real-time server and sends the preset time node to the real-time server.
  • FIG. 9 is a flowchart of another embodiment of a method for maintaining relationship network data that is mainly an offline server according to the present application. As shown in FIG. 9, the method for maintaining relationship network data that is based on an offline server includes:
  • S210 The offline server acquires a user operation record before the preset time node.
  • the offline server may acquire a user operation record before the preset time node according to a preset time period, where the preset time period includes a preset fixed time period and a preset non-fixed time period.
  • the offline server can obtain the user operation record before the preset time node in the incremental synchronization mode or can obtain the user operation record before the preset time node in all synchronization modes.
  • S220 The offline server calculates a user operation record before the preset time node, and obtains the first sub-network data before the preset time node.
  • Step S220 can be specifically implemented by the following two steps:
  • the offline server disassembles each user operation record before the preset time node into data including the sub-network body and the sub-network edge;
  • the offline server performs the merging process on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the first sub-network data before the preset time node.
  • S230 The offline server synchronizes the first sub-network data into the online server and sends the preset time node to the real-time server.
  • FIG. 10 is a flowchart of an embodiment of a method for maintaining relationship network data that is based on a real-time server. As shown in FIG. 10, the method for maintaining relationship network data that is based on a real-time server includes the following steps:
  • the real-time server stores the first sub-network data synchronized from the offline server and receives the preset time node;
  • S320 The real-time server acquires a user operation record after the preset time node
  • the real-time server calculates a user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges The third sub-network data is updated to the online server.
  • the obtaining the third sub-network data may be specifically implemented by the following three steps:
  • the real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
  • the real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
  • the real-time server merges the second sub-network data and the first sub-network data into the third sub-network data based on the sub-network body and the sub-network side in the second sub-network data.
  • the method may further include:
  • the real-time server obtains the fourth sub-network data, and the start time point of the fourth sub-network data is not earlier than the end time point of the third sub-network data;
  • the real-time server merges the fourth sub-network data and the third sub-network data into the fifth sub-network data, and updates the merged fifth sub-network data to the online server.
  • FIG. 11 is a flowchart of another embodiment of a method for maintaining relationship network data that is based on a real-time server. As shown in FIG. 11, the method for maintaining relationship network data that is based on a real-time server includes the following steps:
  • the real-time server receives the preset time node and acquires a user operation record after the preset time node;
  • the real-time server calculates a user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
  • Step S420 may specifically include the following three steps:
  • the real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
  • the real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
  • the real-time server merges the second sub-network data into the online server based on the sub-network body and the sub-network side in the second sub-network data.
  • the method may further include:
  • the real-time server obtains the third sub-network data, and the start time point of the third sub-network data is not earlier than the end time point of the second sub-network data;
  • the real-time server merges the third subnet data into the online server.
  • the offline server includes:
  • the user operation record obtaining unit 101 is configured to acquire a user operation record before the preset time node;
  • the calculating unit 102 is configured to calculate a user operation record before the preset time node, and obtain a first sub-network data before the preset time node;
  • the sub-network data synchronization unit 103 is configured to synchronize the first sub-network data into the real-time server and send the preset time node to the real-time server.
  • FIG. 3 is a functional block diagram of an offline server in another embodiment of the present application. As shown in FIG. 3, the offline server specifically includes:
  • the user operation record obtaining unit 101 is configured to acquire a user operation record before the preset time node;
  • the calculating unit 102 is configured to calculate a user operation record before the preset time node, and obtain a first sub-network data before the preset time node;
  • the sub-network data updating unit 104 is configured to synchronize the first sub-network data into the online server and send the preset time node to the real-time server.
  • FIG. 4 is a functional block diagram of a computing unit in an offline server in an embodiment of the present application.
  • the computing unit 102 in the offline server specifically includes:
  • the disassembling unit 1021 is configured to disassemble each user operation record before the preset time node to include a sub-network body and Data on the side of the subnetwork;
  • the merging unit 1022 is configured to perform merging processing on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain first sub-network data before the preset time node.
  • FIG. 5 is a functional diagram of a module of a real-time server in an embodiment of the present application. As shown in FIG. 5, the real-time server includes:
  • the storage unit 201 is configured to store first sub-network data synchronized by the offline server;
  • the user operation record reading unit 202 is configured to acquire a user operation record after the preset time node
  • the calculating unit 203 is configured to calculate a user operation record after the preset time node to obtain second sub-network data
  • the merging unit 204 is configured to merge the second sub-network data with the first sub-network data into the third sub-network data;
  • the updating unit 205 is configured to update the merged third sub-network data into the online server.
  • the real-time server includes:
  • the user operation record reading unit 202 is configured to acquire a user operation record after the preset time node
  • the calculating unit 203 is configured to calculate a user operation record after the preset time node to obtain second sub-network data
  • the merging unit 303 is configured to merge the second sub-network data into the online server.
  • FIG. 7 is a functional diagram of a module of a computing unit in a real-time server according to an embodiment of the present application.
  • the calculating unit 203 includes:
  • the disassembling unit 2031 is configured to disassemble each user operation record after the preset time node into data including a sub-network body and a sub-network side;
  • the merging unit 2032 is configured to perform merging and processing the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain second sub-network data.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • computer readable program code eg, software or firmware
  • examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding.
  • Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component.
  • a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • the present application can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM or a disk. , CD, etc., including a number of instructions to make a computer device (can It is a personal computer, server, or network device, etc.) that performs the methods described in various embodiments of the present application or portions of the embodiments.
  • This application can be used in a variety of general purpose or special purpose computer system environments or configurations.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

Landscapes

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

Abstract

Provided are a relationship network data maintenance method, an off-line server and a real-time server. The method comprises: an off-line server acquiring a user operation record before a pre-set time node; the off-line server conducting calculation to obtain sub-network data before the pre-set time node; and a real-time server supplementing a user operation record after the pre-set time node, and updating the supplemented relationship network data into an on-line server. The relationship network data maintenance method, off-line server and real-time server provided in the embodiments of the present application enable a network platform to access relationship network data after a pre-set time node in time after the off-line server completely processes a user operation record.

Description

一种关系网络数据的维护方法、离线服务器及实时服务器Maintenance method for relational network data, offline server and real-time server 技术领域Technical field
本申请涉及网络信息处理领域,特别涉及一种关系网络数据的维护方法、离线服务器及实时服务器。The present application relates to the field of network information processing, and in particular, to a method for maintaining network data, an offline server, and a real-time server.
背景技术Background technique
网络平台中有交互的主体之间的关联关系组成的网络图结构可以称为关系网络。A network diagram structure composed of associations between interacting entities in a network platform may be referred to as a relational network.
网络平台中可以提供基于关系的网络服务。所述关系可以是网络社交主体或网络交易主体概念上的关联关系。例如网络社交主体之间的关注、好友等关系;网络交易主体之间的支付、转账等关系。利用所述关系,可以从图的角度构成网络结构图。从图的角度看,关系网络中的主体可以是图节点,主体之间的关联关系可以是图的边。这样的网络结构图能够直观、清楚的表明主体及关系构成的网络。Relationship-based network services can be provided in the network platform. The relationship may be an association relationship between a network social subject or a network transaction subject. For example, the relationship between social social subjects, friends, etc.; the relationship between payment and transfer between online transaction entities. With the relationship, a network structure diagram can be constructed from the perspective of the figure. From the perspective of the graph, the subject in the relational network can be a graph node, and the association relationship between the subjects can be the edge of the graph. Such a network structure diagram can intuitively and clearly indicate the network of subjects and relationships.
例如在网络社交平台构成的网络结构图中,用户可以是图节点,用户与用户之间的好友和/或关注等关系可以作为图的边。又例如在网络交易平台中,用户、信用卡、设备等主体可以看作图节点,用户使用信用卡支付、用户使用设备登陆、用户支付有价值物给其他用户等可以看作图的边。For example, in a network structure diagram composed of a network social platform, a user may be a graph node, and a relationship between a user and a user such as a friend and/or a concern may be used as an edge of the graph. For example, in a network transaction platform, a user, a credit card, a device, or the like can be regarded as a graph node, and the user can use the credit card to pay, the user to use the device to log in, the user to pay the valuable object to other users, and the like can be regarded as the edge of the graph.
通常,网络平台系统需要结合用户操作记录来维护关系网络。现有技术中对关系网络进行维护的方式中通常涉及离线服务器和在线服务器。其中,离线服务器可以以一定的时间周期对网络平台中的用户操作记录进行读取,并且在每个时间周期中,对预设时间节点之前的用户操作记录进行计算,构建出关系网络数据。然后离线服务器把计算得到的关系网络数据直接更新到在线服务器中。在线服务器中的关系网络数据可以提供给网络平台进行访问。一般情况下,在线服务器与网络平台可以位于同一个网络环境中,而离线服务器和在线服务器可以处于不同的网络环境中。Typically, network platform systems need to maintain a relational network in conjunction with user action records. In the prior art, the maintenance of the relational network generally involves an offline server and an online server. The offline server can read the user operation record in the network platform in a certain period of time, and calculate the user operation record before the preset time node in each time period to construct the relationship network data. The offline server then updates the calculated relational network data directly to the online server. The relational network data in the online server can be provided to the network platform for access. In general, the online server and the network platform can be located in the same network environment, and the offline server and the online server can be in different network environments.
在实现本申请的过程中,发明人发现现有技术至少存在如下问题:In the process of implementing the present application, the inventors found that the prior art has at least the following problems:
由于离线服务器读取的预设时间节点之前的用户操作记录数据量比较庞大,从而进行计算的时间比较长。这就导致从预设时间节点至离线服务器计算完毕这段时间内产生的用户操作记录只有经过下一个周期计算后,才可以更新到在线服务器中,导致网络平台无法及时访问到这一段时间的关系网络数据。Since the amount of user operation record data before the preset time node read by the offline server is relatively large, the calculation takes a long time. This causes the user operation record generated from the preset time node to the offline server to be updated to the online server only after the calculation of the next cycle, resulting in the network platform not being able to access the relationship in time. Network data.
发明内容Summary of the invention
本申请实施例的目的是提供一种关系网络数据的维护方法、离线服务器及实时服务器,使网络平台能够在离线服务器处理完用户操作记录后,及时访问到预设时间节点之后的关系 网络数据。The purpose of the embodiment of the present application is to provide a method for maintaining network data, an offline server, and a real-time server, so that the network platform can access the relationship after the preset time node in time after the offline server processes the user operation record. Network data.
本申请实施例提供的一种关系网络数据的维护方法、离线服务器及实时服务器是这样实现的:A method for maintaining relationship network data, an offline server, and a real-time server provided by the embodiments of the present application are implemented as follows:
一种关系网络数据的维护方法,包括:A method for maintaining network data, including:
离线服务器获取预设时间节点之前的用户操作记录;The offline server obtains a user operation record before the preset time node;
离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
离线服务器将第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点;The offline server synchronizes the first sub-network data into the real-time server and sends the preset time node to the real-time server;
实时服务器存储第一子网络数据并获取所述预设时间节点之后的用户操作记录;The real-time server stores the first sub-network data and acquires a user operation record after the preset time node;
实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据,并将合并后的第三子网络数据更新到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges the combined The third subnet data is updated to the online server.
一种关系网络数据的维护方法,包括:A method for maintaining network data, including:
离线服务器获取预设时间节点之前的用户操作记录;The offline server obtains a user operation record before the preset time node;
离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
离线服务器将第一子网络数据同步到在线服务器中并向实时服务器发送所述预设时间节点;The offline server synchronizes the first sub-network data into the online server and sends the preset time node to the real-time server;
实时服务器获取所述预设时间节点之后的用户操作记录;The real-time server acquires a user operation record after the preset time node;
实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据合并到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
一种关系网络数据的维护方法,包括:A method for maintaining network data, including:
离线服务器获取预设时间节点之前的用户操作记录;The offline server obtains a user operation record before the preset time node;
离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
离线服务器将第一子网络数据同步到实时服务器或在线服务器中,并向实时服务器发送所述预设时间节点。The offline server synchronizes the first sub-network data to the real-time server or the online server, and sends the preset time node to the real-time server.
一种关系网络数据的维护方法,包括:A method for maintaining network data, including:
实时服务器存储从离线服务器同步的第一子网络数据并接收预设时间节点;The real-time server stores the first sub-network data synchronized from the offline server and receives the preset time node;
实时服务器获取预设时间节点之后的用户操作记录; The real-time server acquires a user operation record after the preset time node;
实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据,并将合并后的第三子网络数据更新到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges the combined The third subnet data is updated to the online server.
一种关系网络数据的维护方法,包括:A method for maintaining network data, including:
实时服务器接收预设时间节点并获取预设时间节点之后的用户操作记录;The real-time server receives the preset time node and acquires a user operation record after the preset time node;
实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据合并到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
一种离线服务器,包括:An offline server that includes:
用户操作记录获取单元,用来获取预设时间节点之前的用户操作记录;a user operation record obtaining unit, configured to acquire a user operation record before the preset time node;
计算单元,用来对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;a calculating unit, configured to calculate a user operation record before the preset time node, to obtain a first sub-network data before the preset time node;
子网络数据同步单元,用来将第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点。The sub-network data synchronization unit is configured to synchronize the first sub-network data into the real-time server and send the preset time node to the real-time server.
一种离线服务器,包括:An offline server that includes:
用户操作记录获取单元,用来获取预设时间节点之前的用户操作记录;a user operation record obtaining unit, configured to acquire a user operation record before the preset time node;
计算单元,用来对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;a calculating unit, configured to calculate a user operation record before the preset time node, to obtain a first sub-network data before the preset time node;
子网络数据更新单元,用来将第一子网络数据同步到在线服务器中并向实时服务器发送所述预设时间节点。The sub-network data update unit is configured to synchronize the first sub-network data into the online server and send the preset time node to the real-time server.
一种实时服务器,包括:A real-time server that includes:
存储单元,用来存储离线服务器同步的第一子网络数据;a storage unit, configured to store first sub-network data synchronized by the offline server;
用户操作记录读取单元,用来获取预设时间节点之后的用户操作记录;The user operation record reading unit is configured to obtain a user operation record after the preset time node;
计算单元,用来对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据;a calculating unit, configured to calculate a user operation record after the preset time node, to obtain second sub-network data;
合并单元,用来将第二子网络数据与第一子网络数据合并为第三子网络数据;a merging unit, configured to merge the second sub-network data with the first sub-network data into the third sub-network data;
更新单元,用来将合并后的第三子网络数据更新到在线服务器中。The update unit is configured to update the merged third sub-network data to the online server.
一种实时服务器,包括:A real-time server that includes:
用户操作记录读取单元,用来获取预设时间节点之后的用户操作记录;The user operation record reading unit is configured to obtain a user operation record after the preset time node;
计算单元,用来对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据;a calculating unit, configured to calculate a user operation record after the preset time node, to obtain second sub-network data;
合并单元,用来将第二子网络数据合并到在线服务器中。 The merging unit is used to merge the second sub-network data into the online server.
通过上述本申请的实施例可以发现,离线服务器对预设时间节点之前的用户操作记录进行计算后,实时服务器可以及时对预设时间节点之后的用户操作记录进行补充,从而可以使网络平台能够在离线服务器处理完用户操作记录后,及时访问到预设时间节点之后的关系网络数据。According to the embodiment of the present application, after the offline server calculates the user operation record before the preset time node, the real-time server can supplement the user operation record after the preset time node in time, so that the network platform can be enabled. After the offline server processes the user operation record, it accesses the relational network data after the preset time node in time.
附图说明DRAWINGS
图1是本申请一种关系网络数据的维护方法的第一实施例的流程图;1 is a flowchart of a first embodiment of a method for maintaining relationship network data according to the present application;
图2是本申请一个实施例中一种离线服务器的模块功能图;2 is a functional diagram of a module of an offline server in an embodiment of the present application;
图3是本申请另一个实施例中一种离线服务器的功能模块图;3 is a functional block diagram of an offline server in another embodiment of the present application;
图4是本申请一个实施例中一种离线服务器中计算单元的功能模块图;4 is a functional block diagram of a computing unit in an offline server in an embodiment of the present application;
图5是本申请一个实施例中一种实时服务器的模块功能图;FIG. 5 is a functional diagram of a module of a real-time server in an embodiment of the present application; FIG.
图6是本申请另一个实施例中一种实时服务器的模块功能图;6 is a functional diagram of a module of a real-time server in another embodiment of the present application;
图7是本申请一实施例中一种实时服务器中计算单元的模块功能图;7 is a functional diagram of a module of a computing unit in a real-time server according to an embodiment of the present application;
图8是本申请以离线服务器为主体的关系网络数据的维护方法的一实施例流程图;8 is a flowchart of an embodiment of a method for maintaining relationship network data that is mainly an offline server according to the present application;
图9是本申请以离线服务器为主体的关系网络数据的维护方法的另一实施例流程图;FIG. 9 is a flowchart of another embodiment of a method for maintaining relationship network data that is mainly composed of an offline server;
图10是本申请以实时服务器为主体的关系网络数据的维护方法的一实施例流程图;10 is a flowchart of an embodiment of a method for maintaining relationship network data mainly composed of a real-time server;
图11是本申请以实时服务器为主体的关系网络数据的维护方法的另一实施例流程图。11 is a flow chart of another embodiment of a method for maintaining relationship network data mainly based on a real-time server in the present application.
具体实施方式detailed description
本申请实施例提供一种关系网络数据的维护方法、离线服务器及实时服务器。为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。The embodiment of the present application provides a method for maintaining network data, an offline server, and a real-time server. The technical solutions in the embodiments of the present application are clearly and completely described in the following, in which the technical solutions in the embodiments of the present application are clearly and completely described. The embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope shall fall within the scope of the application.
本申请提供的一种关系网络数据的维护方法中涉及离线服务器、实时服务器和在线服务器。其中,离线服务器可以在线下环境中,负责大数据量的计算;实时服务器和在线服务器可以位于同一个网络环境中。另外,实时服务器还可以作为一个软件模块或者硬件模块集成于在线服务器中。图1是本申请一种关系网络数据的维护方法的第一实施例的流程图。如图1所示,所述关系网络数据的维护方法包括以下步骤:The method for maintaining relationship network data provided by the present application relates to an offline server, a real-time server, and an online server. The offline server can be responsible for the calculation of large amounts of data in an offline environment; the real-time server and the online server can be located in the same network environment. In addition, the real-time server can also be integrated into the online server as a software module or hardware module. 1 is a flow chart of a first embodiment of a method for maintaining network data in the present application. As shown in FIG. 1, the method for maintaining the relationship network data includes the following steps:
S1:离线服务器获取预设时间节点之前的用户操作记录。S1: The offline server obtains a user operation record before the preset time node.
网络平台系统中,用户在线上环境中的操作,例如“增、删、改”,都可以被记入用户操作记录中。存储用户操作记录的软件系统多种多样,包括:文件系统、MySQL数据库、HBase数据库等。 In the network platform system, operations in the user's online environment, such as "add, delete, change", can be recorded in the user operation record. There are various software systems for storing user operation records, including: file system, MySQL database, HBase database, and so on.
离线服务器可以以一个固定的周期,对平台系统记录的用户操作进行同步。例如,离线服务器以天为周期,每天都对线上生产环境中当天的用户操作记录进行同步。进一步地,离线服务器可以设定一个具体时间节点,例如每天的23时59分59秒。这样,离线服务器就可以在每天的23时59分59秒对该时间节点之前的用户操作记录进行同步。上述每天的时间节点可以作为步骤1中所述的预设时间节点。此外,离线服务器也可以以非固定的周期对平台系统记录的用户操作执行上述同步操作。The offline server can synchronize the user actions recorded by the platform system in a fixed cycle. For example, the offline server synchronizes daily user action records for the day in the online production environment on a daily basis. Further, the offline server can set a specific time node, for example, 23:59:59 every day. In this way, the offline server can synchronize the user operation records before the time node at 23:59:59 every day. The above-mentioned daily time node can be used as the preset time node described in step 1. In addition, the offline server can also perform the above synchronization operation on user operations recorded by the platform system in a non-fixed cycle.
离线服务器在进行同步操作的时候,可以采用增量同步方式。具体的,在首次同步之后的每次同步中,可以只同步最后一个周期的数据。以上述的例子分析,离线服务器在2014年9月24日23时59分59秒进行用户操作记录同步的时候,只需对2014年9月23日23时59分59秒至2014年9月24日23时59分59秒的用户操作记录进行同步即可,因为2014年9月23日23时59分59秒之前的用户操作记录已经在之前同步过程中已经处理过了。具体地,假设线上生产环境中是用文件系统实现用户操作记录存储的,那么线上生产环境每天可以滚动生成一个用户操作记录文件,比如2014年9月24日的用户操作数据则存储到“用户操作记录-2014.09.24.log”文件中。那么离线服务器在2014年9月24日23时59分59秒进行同步时,可以增量地读取或者拷贝“用户操作记录-2014.09.24.log”文件即可。假设线上生产环境中是用HBase数据库实现用户操作记录存储的,那么线上生产环境可以使用HBase数据库自带的数据备份工具将最后一个周期的数据存储到离线服务器;也可以利用HBase数据库的scan操作,将最后一个周期时间段内的数据读取到离线服务器中。HBase中scan类部分常用方法说明如下:The offline server can use incremental synchronization when performing synchronization operations. Specifically, in each synchronization after the first synchronization, only the data of the last cycle can be synchronized. Based on the above example, when the offline server synchronizes the user operation records at 23:59:59 on September 24, 2014, it only needs to be 23:59:59 on September 23, 2014 to September 24, 2014. The user operation record of 23:59:59 on the day can be synchronized, because the user operation record before 23:59:59 on September 23, 2014 has been processed in the previous synchronization process. Specifically, assuming that the online production environment uses the file system to implement the user operation record storage, the online production environment can scroll to generate a user operation record file every day, for example, the user operation data of September 24, 2014 is stored in the " User operation record - 2014.09.24.log" file. Then, when the offline server synchronizes at 23:59:59 on September 24, 2014, the "user operation record-2014.09.24.log" file can be read or copied incrementally. Assume that the online production environment uses the HBase database to implement the user operation record storage. Then the online production environment can use the data backup tool provided by the HBase database to store the last cycle of data to the offline server. You can also use the HBase database scan. Operation, the data in the last cycle time period is read into the offline server. The common methods of the scan class in HBase are described as follows:
//scan.setTimeRange();//指定最大的时间戳和最小的时间戳,只有在此范围内的cell才能被获取.//scan.setTimeRange();//Specify the maximum timestamp and the smallest timestamp, only cells in this range can be obtained.
//scan.setTimeStamp();//指定时间戳//scan.setTimeStamp();//Specify the timestamp
//scan.setFilter();//指定Filter来过滤掉不需要的信息//scan.setFilter();//Specify Filter to filter out unwanted information
//scan.setStartRow();//指定开始的行。如果不调用,则从表头开始;//scan.setStartRow();//Specify the starting line. If not called, start from the header;
//scan.setStopRow();//指定结束的行(不含此行);//scan.setStopRow();//Specify the end of the line (without this line);
//scan.setBatch();//指定最多返回的Cell数目。用于防止一行中有过多的数据,导致OutOfMemory错误。//scan.setBatch();//Specifies the maximum number of cells returned. Used to prevent excessive data in a row, resulting in an OutOfMemory error.
当然,离线服务器在进行同步操作的时候,也可以根据需要采用全部同步的方式处理,这里并不限定。Of course, when the offline server performs the synchronization operation, it can also be processed in a synchronous manner as needed, which is not limited herein.
在每个所述预设时间周期内,可以进行步骤S2至S5的处理:During each of the preset time periods, the processing of steps S2 to S5 may be performed:
S2:离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间 节点之前的第一子网络数据。S2: The offline server calculates a user operation record before the preset time node, and obtains the preset time. The first subnet data before the node.
离线服务器读取所述预设时间节点之前的用户操作记录后,可以按下述步骤进行处理:After the offline server reads the user operation record before the preset time node, it can be processed as follows:
S201:离线服务器将预设时间节点之前的每条用户操作记录拆解为包括子网络主体和子网络边的数据。S201: The offline server disassembles each user operation record before the preset time node into data including a sub-network body and a sub-network edge.
步骤S201中拆解后的子网络主体可以包括起始主体和终止主体。The sub-network body disassembled in step S201 may include a start body and a terminating body.
举个例子来说明:有一条用户操作记录为用户1在设备1上使用信用卡1进行支付。离线服务器在对这条操作记录进行拆解后,便得到子网络主体为用户1、设备1以及信用卡1;子网络边为支付。根据操作记录,离线服务器可以确定出起始主体和终止主体,并将起始主体、终止主体以及子网络边保存到子网络表中,具体如表1所示:As an example, there is a user operation record for user 1 to pay by using credit card 1 on device 1. After the offline server disassembles this operation record, the sub-network body is obtained as user 1, device 1, and credit card 1; the sub-network side is paid. According to the operation record, the offline server can determine the starting body and the terminating body, and save the starting body, the terminating body, and the sub-network side into the sub-network table, as shown in Table 1:
表1:子网络表Table 1: Subnet Table
起始主体Starting subject 终止主体Termination of the subject 子网络边Subnetwork side
用户1User 1 设备1Equipment 1 支付Pay
用户1User 1 信用卡1Credit card 1 支付Pay
设备1Equipment 1 信用卡1Credit card 1 支付Pay
离线服务器处理完这条用户操作记录后会继续用同样的方法处理之后的用户操作记录,最终可以得到由若干个子网络数据组成的子网络表,具体如表2所示:After the offline server processes the user operation record, it will continue to process the subsequent user operation records in the same way, and finally obtain a subnet table composed of several subnetwork data, as shown in Table 2:
表2:子网络表Table 2: Subnet Table
起始主体Starting subject 终止主体Termination of the subject 子网络边Subnetwork side
用户1User 1 设备1Equipment 1 支付Pay
用户1User 1 信用卡1Credit card 1 支付Pay
设备1Equipment 1 信用卡1Credit card 1 支付Pay
用户2User 2 设备2Device 2 支付Pay
用户2User 2 信用卡2Credit card 2 支付Pay
设备2Device 2 信用卡2Credit card 2 支付Pay
用户1User 1 设备2Device 2 支付Pay
... ... ...
从表2中可以看出,离线服务器将预设时间段内的用户操作数据逐条拆解为起始主体,终止主体以及子网络边,并将所述起始主体,终止主体以及子网络边都保存在子网络表中。As can be seen from Table 2, the offline server disassembles the user operation data in the preset time period into the starting body one by one, terminates the body and the sub-network side, and terminates the starting body, the terminating body, and the sub-network side. Save in the subnet table.
用户操作记录中涉及的主体和子网络边可以附带一个初始的标识,该标识用以区别不同主体和不同子网络边。另外,用户操作记录中涉及的子网络边还可以附带一个初始的时间信 息,用以记录该子网络边产生的确切时间点。离线服务器确定出起始主体和终止主体以及它们之间的子网络边后,可以清空这些起始主体、终止主体以及子网络边的标识。The subject and sub-network edges involved in the user action record may be accompanied by an initial identifier that distinguishes between different subjects and different sub-network edges. In addition, the sub-network side involved in the user operation record can also be accompanied by an initial time letter. Information, used to record the exact time point generated by the subnetwork. After the offline server determines the starting body and the terminating body and the sub-network side between them, the identifiers of the starting body, the terminating body, and the sub-network edge can be emptied.
S202:离线服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到预设时间节点之前的第一子网络数据。S202: The offline server performs the merge processing on the disassembled data according to the sub-network body and the sub-network edge according to a preset rule, to obtain the first sub-network data before the preset time node.
离线服务器可以对所述子网络表中的子网络主体进行归并处理,得到主体与子网络的对应关系。离线服务器对所述子网络表中的子网络主体进行归并处理时可以遵循以下规则:The offline server may perform a merge process on the sub-network body in the sub-network table to obtain a correspondence between the main body and the sub-network. The offline server can follow the following rules when merging sub-network bodies in the sub-network table:
如果起始主体和终止主体都没有标识,则离线服务器生成一个标识,分配给起始主体和终止主体;If neither the starting body nor the terminating body has an identifier, the offline server generates an identifier assigned to the starting body and the terminating body;
如果起始主体有标识,而终止主体没有标识,则将起始主体的标识分配给终止主体;If the starting body has an identifier and the terminating body has no identifier, the identifier of the starting body is assigned to the terminating body;
如果起始主体没有标识,而终止主体有标识,则将终止主体的标识分配给起始主体;If the starting body has no identity and the terminating body has an identity, the identity of the terminating body is assigned to the starting body;
如果起始主体和终止主体的标识不一样,则清除终止主体的标识,然后将起始主体的标识分配给终止主体,并且将与所述终止主体相关联的所有主体的标识均修改为所述终止主体的标识;If the identifiers of the start body and the terminating body are different, the identifier of the terminating body is cleared, then the identifier of the starting body is assigned to the terminating body, and the identifiers of all the subjects associated with the terminating body are modified to Terminate the identity of the subject;
如果起始主体和终止主体的标识一样,则不进行处理。If the start and stop bodies have the same identity, no processing is done.
其中,离线服务器生成的标识为唯一标识。The identifier generated by the offline server is a unique identifier.
上述进行归并处理时遵循的规则就可以为预设规则。The rules followed in the above-mentioned merge processing can be preset rules.
继续以步骤S201的例子来说明:Continue with the example of step S201 to illustrate:
首先对表2中第一条执行上述处理。起始主体为用户1,终止主体为设备1,其中用户1没有标识,设备1也没有标识,根据上述的归并原则,离线服务器生成一个标识A,并将用户1和设备1的标识设置为A;First, the above processing is performed on the first item in Table 2. The starting entity is user 1, the terminating body is device 1, wherein user 1 has no identifier, and device 1 has no identifier. According to the above-mentioned merge principle, the offline server generates an identifier A, and sets the identifiers of user 1 and device 1 to A. ;
对表2中第二条执行上述处理。起始主体为用户1,终止主体为信用卡1,其中用户1的标识为A,信用卡1没有标识,根据上述的归并原则,将信用卡1的标识设置为A;The above processing is performed on the second item in Table 2. The starting body is the user 1, the terminating body is the credit card 1, wherein the user 1 has the identifier A, the credit card 1 has no identification, and according to the above-mentioned merge principle, the identification of the credit card 1 is set to A;
对表2中第三条执行上述处理。起始主体为设备1,终止主体为信用卡1,其中设备1的标识为A,信用卡1的标识也为A,根据上述的归并原则,不进行处理。The above processing is performed on the third item in Table 2. The starting entity is the device 1, and the terminating body is the credit card 1, wherein the identifier of the device 1 is A, and the identifier of the credit card 1 is also A. According to the above-mentioned merge principle, no processing is performed.
对表2中第四条执行上述处理。起始主体为用户2,终止主体为设备2,其中用户2没有标识,设备2也没有标识,根据上述的归并原则,离线服务器生成一个与标识A不同的标识B,并将用户2和设备2的标识设置为B。The above processing is performed on the fourth item in Table 2. The starting entity is user 2, the terminating body is device 2, wherein user 2 has no identity, and device 2 has no identity. According to the above-mentioned merge principle, the offline server generates a different identifier B from the identifier A, and the user 2 and the device 2 The identity is set to B.
以此类推,表2中第五条和第六条中的主体标识均设置为B;对表2中第七条,起始主体为用户1,终止主体为设备2,其中用户1的标识为A,设备2的标识为B,根据上述的归并原则,将设备2的标识清除,然后将用户1的标识A分配给设备2,并且将与设备2相关联的所有主体的标识均修改为A,即将用户2和信用卡2的标识均由B修改为A。 By analogy, the subject identifiers in Articles 5 and 6 of Table 2 are both set to B; for the seventh clause in Table 2, the starting subject is User 1, and the terminating subject is Device 2, where User 1's logo is A. The identifier of the device 2 is B. According to the above-mentioned merge principle, the identifier of the device 2 is cleared, then the identifier A of the user 1 is assigned to the device 2, and the identifiers of all the subjects associated with the device 2 are modified to A. , that is, the identification of both user 2 and credit card 2 is changed from B to A.
最终,处于同一个子网络中的起始主体和终止主体就具有相同的标识;处于不同子网络中的主体具有不同的标识。Finally, the starting body and the terminating body in the same subnet have the same identity; the subjects in different subnetworks have different identities.
离线服务器可以继续将该同一子网络中主体的标识分配给子网络边,这样就能保证处于同一个子网络中的主体和边都具备相同的标识,该相同的标识可以定义为子网络标识,标识归并处理后的子网络表如表3所示:The offline server can continue to assign the identifier of the subject in the same sub-network to the sub-network side, so that the subject and the edge in the same sub-network can have the same identifier, and the same identifier can be defined as the sub-network identifier. The subnet table after the merge processing is shown in Table 3:
表3:标识归并处理后的子网络表Table 3: Subnet Tables after Identification and Merging
Figure PCTCN2015096796-appb-000001
Figure PCTCN2015096796-appb-000001
这样,子网络中的起始主体,终止主体,子网络边,子网络边的时间信息以及子网络标识就可以为预设时间节点之前的第一子网络数据。In this way, the start body, the termination body, the sub-network side, the time information of the sub-network side, and the sub-network identifier in the sub-network can be the first sub-network data before the preset time node.
S3:离线服务器将第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点。S3: The offline server synchronizes the first sub-network data into the real-time server and sends the preset time node to the real-time server.
离线服务器可以将所述预设时间节点之前的第一子网络数据同步到实时服务器。具体实现方式可以使用HBase数据库自带的数据备份工具将子网络数据保存到实时服务器中;也可以利用HBase数据库的scan操作,将预设时间段内的子网络数据读取到实时服务器中。The offline server may synchronize the first sub-network data before the preset time node to the real-time server. The specific implementation manner can use the data backup tool provided by the HBase database to save the sub-network data to the real-time server; or use the scan operation of the HBase database to read the sub-network data in the preset time period to the real-time server.
离线服务器可以在预设时间节点之前的第一子网络数据同步完毕后,向实时服务器发送所述预设时间节点。例如,离线服务器是对2014年9月24日23时59分59秒之前的用户操作记录进行处理的,那么在这个时间节点之前的子网络数据同步完成后,可以将2014年9月24日23时59分59秒这个时间节点发送给实时服务器。这样,实时服务器便可以从2014年9月24日23时59分59秒开始处理之后的用户操作记录。The offline server may send the preset time node to the real-time server after the synchronization of the first sub-network data before the preset time node is completed. For example, the offline server processes the user operation record before 23:59:59 on September 24, 2014. After the synchronization of the sub-network data before this time node is completed, it can be September 24, 2014. At 59 minutes and 59 seconds, this time node is sent to the real-time server. In this way, the real-time server can start processing the subsequent user operation records from 23:59:59 on September 24, 2014.
S4:实时服务器存储第一子网络数据并获取所述预设时间节点之后的用户操作记录。S4: The real-time server stores the first sub-network data and acquires a user operation record after the preset time node.
实时服务器接收到离线服务器发来的预设时间节点后,可以存储所述离线服务器同步的预设时间节点之前的子网络数据,留作后续处理。步骤S1中提到,平台系统产生的用户操 作记录可以存储在软件系统中。存储用户操作记录的软件系统可以位于一个独立的数据服务器中,该数据服务器可以位于平台系统所处的线上环境中;存储用户操作记录的软件系统还可以作为一个软件模块集成于实时服务器中,便于实时服务器对其进行更加快速的访问。实时服务器可以对所述预设时间节点之后的用户操作记录进行判定:如果没有产生用户操作记录,实时服务器等待用户记录产生;如果产生了用户操作记录,则读取所述预设时间节点之后的用户操作记录。After receiving the preset time node sent by the offline server, the real-time server may store the sub-network data before the preset time node synchronized by the offline server, and perform subsequent processing. Step S1 mentioned that the user generated by the platform system The record can be stored in the software system. The software system storing the user operation record can be located in a separate data server, which can be located in the online environment where the platform system is located; the software system storing the user operation record can also be integrated into the real-time server as a software module. Facilitate faster access to real-time servers. The real-time server may determine the user operation record after the preset time node: if the user operation record is not generated, the real-time server waits for the user record to be generated; if the user operation record is generated, after reading the preset time node User action record.
S5:实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据。S5: The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data.
实时服务器针对每条预设时间节点之后的用户操作记录,首先可以将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据。接着实时服务器可以按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据。所述归并处理与步骤S202类似,这里便不再赘述。然后实时服务器可以基于所述第二子网络数据中的子网络主体和子网络边将第二子网络数据与第一子网络数据合并为第三子网络数据。具体的流程如下所述:For the user operation record after each preset time node, the real-time server may first disassemble each user operation record after the preset time node into data including the sub-network body and the sub-network edge. Then, the real-time server may perform the merge processing on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the second sub-network data. The merging process is similar to step S202, and will not be described again here. The real-time server may then merge the second sub-network data with the first sub-network data into the third sub-network data based on the sub-network body and the sub-network side in the second sub-network data. The specific process is as follows:
实时服务器根据所述拆解出的主体,在存储的第一子网络数据中查找所述拆解出的主体对应的子网络及子网络标识。若查找到的子网络标识相同,说明所述拆解出的主体位于同一个子网络中。进一步地可以通过拆解出的子网络边的时间信息,判定所述拆解的用户操作记录是否已经存在于存储的第一子网络数据中。如果所述拆解的用户操作记录已经存在于存储的第一子网络数据中,则直接跳过该条用户操作记录,进行下一条用户操作记录的处理;如果所述拆解的用户操作记录不存在于存储的第一子网络数据中,可以直接将所述拆解出的主体和子网络边的标识设置为所述寻找出的子网络标识后合并到所述存储的第一子网络数据中。The real-time server searches for the sub-network and the sub-network identifier corresponding to the disassembled main body in the stored first sub-network data according to the disassembled main body. If the discovered subnet identifiers are the same, the disassembled entities are located in the same subnet. Further, whether the disassembled user operation record already exists in the stored first sub-network data may be determined by the time information of the disassembled sub-network side. If the disassembled user operation record already exists in the stored first sub-network data, skip the user operation record directly, and perform processing of the next user operation record; if the disassembled user operation record is not The first sub-network data stored in the storage may be directly set to the sub-network identifier of the disassembled sub-network identifier and merged into the stored first sub-network data.
举个例子来说明:一条用户操作记录为用户1在利用信用卡1进行支付操作。实时服务器获取该条用户操作记录后,可以将该用户操作记录拆解为:用户1,信用卡1这两个主体以及支付这个子网络边,假设支付的时间为2014年9月24日9时24分38秒,则该用户操作记录中的支付操作便拥有一个时间信息,假设为0020140924092438。实时服务器接着可以在存储的第一子网络数据中寻找用户1和信用卡1对应的标识。假设查找出的用户1和信用卡1的标识都为A1,则表明用户1和信用卡1处于同一个子网络中。此时,实时服务器可以继续比对用户1和信用卡1之间的支付操作的时间信息,假设在存储的第一子网络数据中也存在用户1和信用卡1之间的一个支付操作,并且该支付操作的时间信息同样为0020140924092438,则表明目前实时服务器处理的该用户操作记录其实已经存在于存储的第 一子网络数据中了。为了不重复对数据进行处理,实时服务器可以直接跳过该用户操作记录,进行下一条用户操作记录的处理。如果在存储的第一子网络数据中用户1和信用卡1之间的支付操作对应的时间信息与该用户操作记录中用户1和信用卡1之间的支付操作对应的时间信息不相同,则表明该用户操作记录与存储的第一子网络数据不重复,那么便可以将该用户操作记录中的用户1,信用卡1以及支付的标识都设置为A1,合并到存储的第一子网络数据中。As an example, a user operation record is that the user 1 is performing a payment operation using the credit card 1. After the real-time server obtains the user operation record, the user operation record can be disassembled into: user 1, credit card 1 and the payment of the sub-network side, and the payment is assumed to be at 9:24 on September 24, 2014. In 38 seconds, the payment operation in the user operation record has a time information, which is assumed to be 0020140924092438. The real-time server can then find the identifier corresponding to the user 1 and the credit card 1 in the stored first sub-network data. Assuming that the identified IDs of both User 1 and Credit Card 1 are A1, it indicates that User 1 and Credit Card 1 are in the same sub-network. At this time, the real-time server can continue to compare the time information of the payment operation between the user 1 and the credit card 1, assuming that there is also a payment operation between the user 1 and the credit card 1 in the stored first sub-network data, and the payment The time information of the operation is also 0020140924092438, which indicates that the current user operation record processed by the real-time server actually exists in the stored A subnet of the network data. In order not to process the data repeatedly, the real-time server can directly skip the user operation record and perform the processing of the next user operation record. If the time information corresponding to the payment operation between the user 1 and the credit card 1 in the stored first sub-network data is different from the time information corresponding to the payment operation between the user 1 and the credit card 1 in the user operation record, it indicates that The user operation record and the stored first sub-network data are not duplicated, and then the user 1, the credit card 1 and the payment identifier in the user operation record can be set to A1 and merged into the stored first sub-network data.
若查找出的子网络标识不同,说明所述拆解出的主体处于不同的子网络中,那么可以先对所述查找出的子网络进行合并。合并的方式具体可以为:随机选取所述查找出的子网络中的一个子网络标识,并将所述查找出的子网络中的主体标识、子网络边标识以及子网络标识都设置为所述选取的子网络标识,这样所述查找出的子网络就可以合并为一个子网络;之后可以将所述拆解出的主体和子网络边的标识设置为所述选取的子网络标识后合并到所述存储的第一子网络数据中。If the discovered sub-network identifiers are different, indicating that the disassembled entities are in different sub-networks, the sub-networks that are found may be merged first. The method of merging may be: randomly selecting one sub-network identifier in the discovered sub-network, and setting the subject identifier, the sub-network edge identifier, and the sub-network identifier in the found sub-network to the The selected sub-network identifiers, so that the discovered sub-networks can be merged into one sub-network; the identifiers of the disassembled main body and sub-network edges can be set as the selected sub-network identifiers and merged into the In the first subnet data stored.
以下以一个具体例子加以说明。例如实时服务器在预设时间节点之后读取的一条用户操作记录为:用户1在设备2上进行支付操作。那么实时服务器可以将该用户操作记录拆解为主体用户1和主体设备2以及子网络边支付。然后实时服务器可以从存储的第一子网络数据中寻找用户1和设备2对应的子网络。假设用户1对应的子网络为A,子网络标识为A1;设备2对应的子网络为B,子网络标识为B1。可以看出,用户1与设备2原先并不处于同一个子网络中,而此时子网络A和子网络B却通过用户1和设备2之间的支付关系产生了联系,因此需要将子网络A和子网络B合并为一个子网络。具体合并的方法如上所述:实时服务器随机选取子网络A和子网络B中的一个子网络标识,例如A1,并将子网络A和子网络B中的主体标识、子网络边标识以及子网络标识都设置为A1。这样,子网络A和子网络B便可以合并为一个子网络。接着可以将用户1与设备2以及支付的标识设置为A1后合并到所述存储的第一子网络数据中。实时服务器在寻找所述拆解出的主体对应的子网络时,还可以存在另一个情况:所述拆解出的主体在所述存储的第一子网络数据中均没有对应的子网络。这种情况说明所述拆解出的主体是第一次出现。实时服务器可以将所述拆解出的主体构成一个新的子网络,并将所述构成的新子网络数据合并到所述存储的第一子网络数据中。实时服务器处理完该条用户操作记录后,可以继续进行后续用户操作记录的处理,处理过程如上所述,这里便不再赘述。The following is explained by a specific example. For example, a user operation record read by the real-time server after the preset time node is: User 1 performs a payment operation on the device 2. Then the real-time server can disassemble the user operation record into the main user 1 and the main device 2 and the sub-network side payment. The real-time server can then find the sub-network corresponding to user 1 and device 2 from the stored first sub-network data. It is assumed that the sub-network corresponding to user 1 is A, the sub-network identifier is A1, the sub-network corresponding to device 2 is B, and the sub-network identifier is B1. It can be seen that the user 1 and the device 2 are not in the same sub-network, but the sub-network A and the sub-network B are connected through the payment relationship between the user 1 and the device 2, so the sub-network A and the sub-network need to be Network B is merged into one subnet. The specific merge method is as follows: the real-time server randomly selects one sub-network identifier in the sub-network A and the sub-network B, for example, A1, and the subject identifier, the sub-network edge identifier, and the sub-network identifier in the sub-network A and the sub-network B are both Set to A1. In this way, sub-network A and sub-network B can be combined into one sub-network. The user 1 and the device 2 and the payment identifier can then be set to A1 and merged into the stored first sub-network data. When the real-time server is looking for the sub-network corresponding to the disassembled main body, there may be another case: the disassembled main body does not have a corresponding sub-network in the stored first sub-network data. This situation indicates that the disassembled body appears for the first time. The real-time server may form the disassembled main body into a new sub-network, and merge the constructed new sub-network data into the stored first sub-network data. After the real-time server processes the user operation record, the subsequent user operation record processing can be continued. The process is as described above, and will not be described here.
S6:实时服务器将合并后的第三子网络数据更新到在线服务器中。S6: The real-time server updates the merged third sub-network data to the online server.
由于预设时间节点之后的用户操作记录数据量相对较小,并且用户操作记录可以存储于实时服务器中或者存储在与实时服务器处于同一网络环境的独立服务器中,因此实时服务器 进行数据读取以及数据处理的时间都非常短暂;另一方面,实时服务器可以与在线服务器位于同一个网络环境中,还可以作为一个软件模块或者硬件模块集成于在线服务器中,因此实时服务器与在线服务器之间的信息交互速度非常快,能够保证实时服务器将数据更新到在线服务器的时间同样非常短暂,从而能够保证在线服务器可以对预设时间节点之后的用户操作记录进行及时的访问。Since the amount of user operation record data after the preset time node is relatively small, and the user operation record can be stored in the real-time server or stored in a separate server in the same network environment as the real-time server, the real-time server The time for data reading and data processing is very short; on the other hand, the real-time server can be located in the same network environment as the online server, and can also be integrated into the online server as a software module or hardware module, so the real-time server and online The information exchange between the servers is very fast, and the time for the real-time server to update the data to the online server is also very short, so that the online server can timely access the user operation records after the preset time node.
在该实施例中,离线服务器按照预设时间周期进行数据的获取以及计算处理,可以灵活地应对网络平台系统的访问要求。例如,在网络交易平台系统中,网络交易平台想要访问最近一年某个用户的信用卡使用次数。那么该实施例提供的方案中,离线服务器在每个时间周期内,可以在获取预设时间节点之前的用户操作记录后,继续在其中筛选出最近一年的用户操作记录进行处理。这样最终在在线服务器中的数据就仅仅包含最近一年的用户操作数据,能够满足网络交易平台的访问要求。In this embodiment, the offline server performs data acquisition and calculation processing according to a preset time period, and can flexibly respond to the access requirements of the network platform system. For example, in a network trading platform system, an online trading platform wants to access the number of credit card usages of a user in the most recent year. In the solution provided by the embodiment, the offline server may continue to process the user operation record of the latest year for processing in the time period after the user operation record before the preset time node is acquired. In this way, the data in the online server will only contain the user operation data of the last year, which can meet the access requirements of the network transaction platform.
在本申请的第二实施例中,离线服务器也可以不按一定的时间周期对用户操作记录进行读取,而是仅仅读取一次预设时间节点之前的用户操作记录并且进行计算处理。例如,预设的时间节点为2014年9月24日23时59分59秒,那么离线服务器可以读取2014年9月24日23时59分59秒之前的用户操作记录,读取以后进行计算处理。离线服务器对预设时间节点之前的用户操作记录进行计算后,可以得到预设时间节点之前的第一子网络数据。离线服务器将所述预设时间节点之前的第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点。实时服务器存储所述预设时间节点之前的第一子网络数据并获取所述预设时间节点之后的用户操作记录。实时服务器对所述预设时间节点之后的用户操作记录进行计算,并将计算得到的子网络数据合并到存储的第一子网络数据中,并将合并后的子网络数据更新到在线服务器中。继续以上述的例子进行解释,离线服务器计算完2014年9月24日23时59分59秒之前的用户操作记录后,可以得到2014年9月24日23时59分59秒之前的子网络数据。离线服务器将该子网络数据同步到实时服务器中并将2014年9月24日23时59分59秒这个时间节点发送给实时服务器。实时服务器将2014年9月24日23时59分59秒之前的子网络数据进行存储后,可以对2014年9月24日23时59分59秒之后的所有用户操作记录进行计算处理,并将计算处理后的子网络数据合并到存储的子网络数据中,进一步地可以将合并后的子网络数据更新到在线服务器中。所述离线服务器的计算过程以及实时服务器的数据计算以及合并过程如本申请的第一实施例所述,这里便不再赘述。In the second embodiment of the present application, the offline server may also not read the user operation record for a certain period of time, but only read the user operation record before the preset time node once and perform calculation processing. For example, if the preset time node is 23:59:59 on September 24, 2014, the offline server can read the user operation record before 23:59:59 on September 24, 2014, and calculate after reading. deal with. After the offline server calculates the user operation record before the preset time node, the first sub-network data before the preset time node can be obtained. The offline server synchronizes the first sub-network data before the preset time node to the real-time server and sends the preset time node to the real-time server. The real-time server stores the first sub-network data before the preset time node and acquires a user operation record after the preset time node. The real-time server calculates a user operation record after the preset time node, and merges the calculated sub-network data into the stored first sub-network data, and updates the merged sub-network data to the online server. Continuing with the above example, the offline server can calculate the sub-network data before 23:59:59 on September 24, 2014 after calculating the user operation record before 23:59:59 on September 24, 2014. . The offline server synchronizes the subnet data to the real-time server and sends the time node at 23:59:59 on September 24, 2014 to the real-time server. After the real-time server stores the sub-network data before 23:59:59 on September 24, 2014, it can calculate all the user operation records after 23:59:59 on September 24, 2014, and The calculated sub-network data is merged into the stored sub-network data, and the merged sub-network data can be further updated to the online server. The calculation process of the offline server and the data calculation and merge process of the real-time server are as described in the first embodiment of the present application, and are not described herein again.
在该实施例中,离线服务器仅仅读取一次预设时间节点之前的用户操作记录,避免了对部分大数据量的重复计算,能够提高整个关系网络维护的效率。In this embodiment, the offline server only reads the user operation record before the preset time node, avoids repeated calculation of part of the large data amount, and can improve the efficiency of the maintenance of the entire relationship network.
在本申请的第三实施例中,离线服务器可以按照预设时间周期获取预设时间节点之前的 用户操作记录。在每个预设时间周期内,均可以进行以下处理:In the third embodiment of the present application, the offline server may acquire the preset time node according to the preset time period. User action record. The following processing can be performed during each preset time period:
离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
离线服务器将第一子网络数据同步到在线服务器中并向实时服务器发送所述预设时间节点;The offline server synchronizes the first sub-network data into the online server and sends the preset time node to the real-time server;
实时服务器获取所述预设时间节点之后的用户操作记录;The real-time server acquires a user operation record after the preset time node;
实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据合并到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
所述离线服务器的计算过程以及实时服务器的数据计算以及合并过程如本申请的第一实施例所述,这里便不再赘述。The calculation process of the offline server and the data calculation and merge process of the real-time server are as described in the first embodiment of the present application, and are not described herein again.
在该实施例中,离线服务器将预设时间节点之前的子网络数据直接更新到在线服务器中,避免了向实时服务器进行数据同步以及实时服务器进行数据存储的过程。实时服务器可以将预设时间节点之后的用户操作记录直接合并到在线服务器中,避免了向在线服务器进行大数据量的更新过程,因此整个处理过程的效率更高。另外,离线服务器按照预设时间周期进行数据的获取以及计算处理,可以灵活地应对网络平台系统的访问要求。例如,在网络交易平台系统中,网络交易平台想要访问最近一年某个用户的信用卡使用次数。那么该实施例提供的方案中,离线服务器在每个时间周期内,可以在获取预设时间节点之前的用户操作记录后,继续在其中筛选出最近一年的用户操作记录进行处理。这样最终在在线服务器中的数据就仅仅包含最近一年的用户操作数据,能够满足网络交易平台的访问要求。In this embodiment, the offline server directly updates the sub-network data before the preset time node to the online server, avoiding the process of performing data synchronization to the real-time server and data storage by the real-time server. The real-time server can directly merge the user operation records after the preset time node into the online server, thereby avoiding the process of updating the large data volume to the online server, so the whole process is more efficient. In addition, the offline server performs data acquisition and calculation processing according to a preset time period, and can flexibly respond to the access requirements of the network platform system. For example, in a network trading platform system, an online trading platform wants to access the number of credit card usages of a user in the most recent year. In the solution provided by the embodiment, the offline server may continue to process the user operation record of the latest year for processing in the time period after the user operation record before the preset time node is acquired. In this way, the data in the online server will only contain the user operation data of the last year, which can meet the access requirements of the network transaction platform.
在本申请的第四实施例中,离线服务器可以不按一定的时间周期对用户操作记录进行读取,而是仅仅读取一次预设时间节点之前的用户操作记录并且进行计算处理。例如,预设的时间节点为2014年9月24日23时59分59秒,那么离线服务器可以读取2014年9月24日23时59分59秒之前的用户操作记录,读取以后进行计算处理。离线服务器对预设时间节点之前的用户操作记录进行计算后,得到预设时间节点之前的第一子网络数据。离线服务器可以将所述预设时间节点之前的第一子网络数据直接同步到在线服务器中,并同时向实时服务器发送所述预设时间节点。实时服务器获取所述预设时间节点之后的用户操作记录后对所述预设时间节点之后的用户操作记录进行计算,并将计算得到的子网络数据合并到在线服务器中。In the fourth embodiment of the present application, the offline server may not read the user operation record for a certain period of time, but only read the user operation record before the preset time node once and perform calculation processing. For example, if the preset time node is 23:59:59 on September 24, 2014, the offline server can read the user operation record before 23:59:59 on September 24, 2014, and calculate after reading. deal with. After the offline server calculates the user operation record before the preset time node, the first sub-network data before the preset time node is obtained. The offline server may directly synchronize the first sub-network data before the preset time node to the online server, and simultaneously send the preset time node to the real-time server. After obtaining the user operation record after the preset time node, the real-time server calculates a user operation record after the preset time node, and merges the calculated sub-network data into the online server.
在该实施例中,离线服务器将预设时间节点之前的第一子网络数据直接更新到在线服务器中,避免了向实时服务器进行数据同步以及实时服务器进行数据存储的过程。实时服务器可以将预设时间节点之后的用户操作记录直接合并到在线服务器中,避免了向在线服务器进 行大数据量的更新过程,因此整个处理过程的效率更高。另外,离线服务器仅仅读取一次预设时间节点之前的用户操作记录,避免了对部分大数据量的重复计算,同样能够提高整个关系网络维护的效率。通过上述本申请的实施例,离线服务器对预设时间节点之前大数据量的用户操作记录进行计算,得到预设时间节点之前的子网络数据;实时服务器可以及时地对预设时间节点之后的用户操作记录进行补充,从而使网络平台能够在离线服务器处理完用户操作记录后,及时访问到预设时间节点之后的关系网络数据。In this embodiment, the offline server directly updates the first sub-network data before the preset time node to the online server, avoiding the process of performing data synchronization to the real-time server and data storage by the real-time server. The real-time server can directly merge the user operation records after the preset time node into the online server, avoiding the entry to the online server. The process of updating large amounts of data is so efficient that the entire process is more efficient. In addition, the offline server only reads the user operation record before the preset time node, avoids the repeated calculation of part of the large data amount, and can also improve the efficiency of the maintenance of the entire relationship network. Through the foregoing embodiment of the present application, the offline server calculates a user operation record of a large amount of data before the preset time node, and obtains sub-network data before the preset time node; the real-time server can timely access the user after the preset time node. The operation record is supplemented, so that the network platform can access the relational network data after the preset time node in time after the offline server processes the user operation record.
下面介绍本申请以离线服务器为主体的关系网络的维护方法的一个实施例。图8为本申请以离线服务器为主体的关系网络数据的维护方法的一实施例流程图。如图8所示,所述以离线服务器为主体的关系网络数据的维护方法包括以下步骤:The following describes an embodiment of the maintenance method of the relational network with the offline server as the main body of the present application. FIG. 8 is a flowchart of an embodiment of a method for maintaining relationship network data with an offline server as the main body of the present application. As shown in FIG. 8, the method for maintaining relationship network data that is mainly composed of an offline server includes the following steps:
S110:离线服务器获取预设时间节点之前的用户操作记录。S110: The offline server acquires a user operation record before the preset time node.
在本申请一优选实施例中,离线服务器可以按照预设时间周期获取预设时间节点之前的用户操作记录,所述预设时间周期包括预设的固定时间周期和预设的非固定时间周期。离线服务器可以采用增量同步方式获取预设时间节点之前的用户操作记录或者可以采用全部同步方式获取预设时间节点之前的用户操作记录。In a preferred embodiment of the present application, the offline server may acquire a user operation record before the preset time node according to a preset time period, where the preset time period includes a preset fixed time period and a preset non-fixed time period. The offline server can obtain the user operation record before the preset time node in the incremental synchronization mode or can obtain the user operation record before the preset time node in all synchronization modes.
S120:离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据。S120: The offline server calculates a user operation record before the preset time node, and obtains the first sub-network data before the preset time node.
步骤S120具体可以由下述两个步骤实现:Step S120 can be specifically implemented by the following two steps:
离线服务器将预设时间节点之前的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The offline server disassembles each user operation record before the preset time node into data including the sub-network body and the sub-network edge;
离线服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到预设时间节点之前的第一子网络数据。The offline server performs the merging process on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the first sub-network data before the preset time node.
S130:离线服务器将第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点。S130: The offline server synchronizes the first sub-network data into the real-time server and sends the preset time node to the real-time server.
下面介绍本申请以离线服务器为主体的关系网络的维护方法的另一个实施例。图9为本申请以离线服务器为主体的关系网络数据的维护方法的另一实施例流程图。如图9所示,所述以离线服务器为主体的关系网络数据的维护方法包括:Another embodiment of the maintenance method of the relational network with the offline server as the main body of the present application is described below. FIG. 9 is a flowchart of another embodiment of a method for maintaining relationship network data that is mainly an offline server according to the present application. As shown in FIG. 9, the method for maintaining relationship network data that is based on an offline server includes:
S210:离线服务器获取预设时间节点之前的用户操作记录。S210: The offline server acquires a user operation record before the preset time node.
在本申请一优选实施例中,离线服务器可以按照预设时间周期获取预设时间节点之前的用户操作记录,所述预设时间周期包括预设的固定时间周期和预设的非固定时间周期。离线服务器可以采用增量同步方式获取预设时间节点之前的用户操作记录或者可以采用全部同步方式获取预设时间节点之前的用户操作记录。 In a preferred embodiment of the present application, the offline server may acquire a user operation record before the preset time node according to a preset time period, where the preset time period includes a preset fixed time period and a preset non-fixed time period. The offline server can obtain the user operation record before the preset time node in the incremental synchronization mode or can obtain the user operation record before the preset time node in all synchronization modes.
S220:离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据。S220: The offline server calculates a user operation record before the preset time node, and obtains the first sub-network data before the preset time node.
步骤S220具体可以由下述两个步骤实现:Step S220 can be specifically implemented by the following two steps:
离线服务器将预设时间节点之前的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The offline server disassembles each user operation record before the preset time node into data including the sub-network body and the sub-network edge;
离线服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到预设时间节点之前的第一子网络数据。The offline server performs the merging process on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the first sub-network data before the preset time node.
S230:离线服务器将第一子网络数据同步到在线服务器中并向实时服务器发送所述预设时间节点。S230: The offline server synchronizes the first sub-network data into the online server and sends the preset time node to the real-time server.
下面介绍本申请以实时服务器为主体的关系网络的维护方法中的一个实施例。图10为本申请以实时服务器为主体的关系网络数据的维护方法的一实施例流程图。如图10所示,所述以实时服务器为主体的关系网络数据的维护方法包括以下步骤:The following describes an embodiment of the maintenance method of the relational network in which the real-time server is the main body of the present application. FIG. 10 is a flowchart of an embodiment of a method for maintaining relationship network data that is based on a real-time server. As shown in FIG. 10, the method for maintaining relationship network data that is based on a real-time server includes the following steps:
S310:实时服务器存储从离线服务器同步的第一子网络数据并接收预设时间节点;S310: The real-time server stores the first sub-network data synchronized from the offline server and receives the preset time node;
S320:实时服务器获取预设时间节点之后的用户操作记录;S320: The real-time server acquires a user operation record after the preset time node;
S330:实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据,并将合并后的第三子网络数据更新到在线服务器中。所述得到第三子网络数据具体可以通过下述三个步骤实现:S330: The real-time server calculates a user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges The third sub-network data is updated to the online server. The obtaining the third sub-network data may be specifically implemented by the following three steps:
实时服务器将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
实时服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据;The real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
实时服务器基于所述第二子网络数据中的子网络主体和子网络边将第二子网络数据与第一子网络数据合并为第三子网络数据。The real-time server merges the second sub-network data and the first sub-network data into the third sub-network data based on the sub-network body and the sub-network side in the second sub-network data.
进一步地,在上述步骤之后,还可以包括:Further, after the foregoing steps, the method may further include:
实时服务器获得第四子网络数据,所述第四子网络数据的起始时间点不早于第三子网络数据的终止时间点;The real-time server obtains the fourth sub-network data, and the start time point of the fourth sub-network data is not earlier than the end time point of the third sub-network data;
实时服务器将第四子网络数据与第三子网络数据合并为第五子网络数据,并将合并后的第五子网络数据更新到在线服务器中。The real-time server merges the fourth sub-network data and the third sub-network data into the fifth sub-network data, and updates the merged fifth sub-network data to the online server.
下面介绍本申请以实时服务器为主体的关系网络的维护方法中的另一个实施例。图11为本申请以实时服务器为主体的关系网络数据的维护方法的另一实施例流程图。如图11所示,所述以实时服务器为主体的关系网络数据的维护方法包括以下步骤: Another embodiment of the maintenance method of the relational network with the real-time server as the main body of the present application is described below. FIG. 11 is a flowchart of another embodiment of a method for maintaining relationship network data that is based on a real-time server. As shown in FIG. 11, the method for maintaining relationship network data that is based on a real-time server includes the following steps:
S410:实时服务器接收预设时间节点并获取预设时间节点之后的用户操作记录;S410: The real-time server receives the preset time node and acquires a user operation record after the preset time node;
S420:实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据合并到在线服务器中。S420: The real-time server calculates a user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
步骤S420具体可以包括下述3个步骤:Step S420 may specifically include the following three steps:
实时服务器将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
实时服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据;The real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
实时服务器基于所述第二子网络数据中的子网络主体和子网络边将第二子网络数据合并到在线服务器中。The real-time server merges the second sub-network data into the online server based on the sub-network body and the sub-network side in the second sub-network data.
进一步地,在上述步骤之后,还可以包括:Further, after the foregoing steps, the method may further include:
实时服务器获得第三子网络数据,所述第三子网络数据的起始时间点不早于第二子网络数据的终止时间点;The real-time server obtains the third sub-network data, and the start time point of the third sub-network data is not earlier than the end time point of the second sub-network data;
实时服务器将第三子网络数据合并到在线服务器中。The real-time server merges the third subnet data into the online server.
图2是本申请一个实施例中一种离线服务器的模块功能图。如图2所示,所述一种离线服务器包括:2 is a functional diagram of a module of an offline server in an embodiment of the present application. As shown in FIG. 2, the offline server includes:
用户操作记录获取单元101,用来获取预设时间节点之前的用户操作记录;The user operation record obtaining unit 101 is configured to acquire a user operation record before the preset time node;
计算单元102,用来对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The calculating unit 102 is configured to calculate a user operation record before the preset time node, and obtain a first sub-network data before the preset time node;
子网络数据同步单元103,用来将第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点。The sub-network data synchronization unit 103 is configured to synchronize the first sub-network data into the real-time server and send the preset time node to the real-time server.
图3是本申请另一个实施例中一种离线服务器的功能模块图。如图3所示,所述一种离线服务器具体包括:FIG. 3 is a functional block diagram of an offline server in another embodiment of the present application. As shown in FIG. 3, the offline server specifically includes:
用户操作记录获取单元101,用来获取预设时间节点之前的用户操作记录;The user operation record obtaining unit 101 is configured to acquire a user operation record before the preset time node;
计算单元102,用来对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The calculating unit 102 is configured to calculate a user operation record before the preset time node, and obtain a first sub-network data before the preset time node;
子网络数据更新单元104,用来将第一子网络数据同步到在线服务器中并向实时服务器发送所述预设时间节点。The sub-network data updating unit 104 is configured to synchronize the first sub-network data into the online server and send the preset time node to the real-time server.
图4是本申请一个实施例中一种离线服务器中计算单元的功能模块图。如图4所示,所述一种离线服务器中计算单元102具体包括:4 is a functional block diagram of a computing unit in an offline server in an embodiment of the present application. As shown in FIG. 4, the computing unit 102 in the offline server specifically includes:
拆解单元1021,用来将预设时间节点之前的每条用户操作记录拆解为包括子网络主体和 子网络边的数据;The disassembling unit 1021 is configured to disassemble each user operation record before the preset time node to include a sub-network body and Data on the side of the subnetwork;
归并单元1022,用来按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到预设时间节点之前的第一子网络数据。The merging unit 1022 is configured to perform merging processing on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain first sub-network data before the preset time node.
图5是本申请一个实施例中一种实时服务器的模块功能图。如图5所示,所述一种实时服务器包括:FIG. 5 is a functional diagram of a module of a real-time server in an embodiment of the present application. As shown in FIG. 5, the real-time server includes:
存储单元201,用来存储离线服务器同步的第一子网络数据;The storage unit 201 is configured to store first sub-network data synchronized by the offline server;
用户操作记录读取单元202,用来获取预设时间节点之后的用户操作记录;The user operation record reading unit 202 is configured to acquire a user operation record after the preset time node;
计算单元203,用来对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据;The calculating unit 203 is configured to calculate a user operation record after the preset time node to obtain second sub-network data;
合并单元204,用来将第二子网络数据与第一子网络数据合并为第三子网络数据;The merging unit 204 is configured to merge the second sub-network data with the first sub-network data into the third sub-network data;
更新单元205,用来将合并后的第三子网络数据更新到在线服务器中。The updating unit 205 is configured to update the merged third sub-network data into the online server.
图6是本申请另一个实施例中一种实时服务器的模块功能图。如图6所示,所述一种实时服务器包括:6 is a block diagram of a real-time server in another embodiment of the present application. As shown in FIG. 6, the real-time server includes:
用户操作记录读取单元202,用来获取预设时间节点之后的用户操作记录;The user operation record reading unit 202 is configured to acquire a user operation record after the preset time node;
计算单元203,用来对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据;The calculating unit 203 is configured to calculate a user operation record after the preset time node to obtain second sub-network data;
合并单元303,用来将第二子网络数据合并到在线服务器中。The merging unit 303 is configured to merge the second sub-network data into the online server.
图7是本申请一实施例中一种实时服务器中计算单元的模块功能图。如图7所示,所述计算单元203包括:FIG. 7 is a functional diagram of a module of a computing unit in a real-time server according to an embodiment of the present application. As shown in FIG. 7, the calculating unit 203 includes:
拆解单元2031,用来将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The disassembling unit 2031 is configured to disassemble each user operation record after the preset time node into data including a sub-network body and a sub-network side;
归并单元2032,用来按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据。The merging unit 2032 is configured to perform merging and processing the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain second sub-network data.
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制 作专用的集成电路芯片2。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog2。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, improvements to a technology could clearly distinguish between hardware improvements (eg, improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (for process flow improvements). However, as technology advances, many of today's method flow improvements can be seen as direct improvements in hardware circuit architecture. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented by hardware entity modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designed by the designer to "integrate" a digital system on a PLD without the need for a chip manufacturer to design and manufacture A dedicated integrated circuit chip 2 is used. Moreover, today, instead of manually making integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in programming development, but before compiling The original code has to be written in a specific programming language. This is called the Hardware Description Language (HDL). HDL is not the only one, but there are many kinds, such as ABEL (Advanced Boolean Expression Language). AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., are currently the most commonly used VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog2. It should also be apparent to those skilled in the art that the hardware flow for implementing the logic method flow can be easily obtained by simply programming the method flow into the integrated circuit with a few hardware description languages.
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。The controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor. In the form of logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。Those skilled in the art will also appreciate that in addition to implementing the controller in purely computer readable program code, the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding. The form of a microcontroller or the like to achieve the same function. Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component. Or even a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。The system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above devices are described separately by function into various units. Of course, the functions of each unit may be implemented in the same software or software and/or hardware when implementing the present application.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以 是个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。It will be apparent to those skilled in the art from the above description of the embodiments that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM or a disk. , CD, etc., including a number of instructions to make a computer device (can It is a personal computer, server, or network device, etc.) that performs the methods described in various embodiments of the present application or portions of the embodiments.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。This application can be used in a variety of general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor based systems, set-top boxes, programmable consumer electronics devices, network PCs, small computers, mainframe computers, including A distributed computing environment of any of the above systems or devices, and the like.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
虽然通过实施例描绘了本申请,本领域普通技术人员知道,本申请有许多变形和变化而不脱离本申请的精神,希望所附的权利要求包括这些变形和变化而不脱离本申请的精神。 While the present invention has been described by the embodiments of the present invention, it will be understood by those skilled in the art

Claims (29)

  1. 一种关系网络数据的维护方法,其特征在于,包括:A method for maintaining relationship network data, comprising:
    离线服务器获取预设时间节点之前的用户操作记录;The offline server obtains a user operation record before the preset time node;
    离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
    离线服务器将第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点;The offline server synchronizes the first sub-network data into the real-time server and sends the preset time node to the real-time server;
    实时服务器存储第一子网络数据并获取所述预设时间节点之后的用户操作记录;The real-time server stores the first sub-network data and acquires a user operation record after the preset time node;
    实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据,并将合并后的第三子网络数据更新到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges the combined The third subnet data is updated to the online server.
  2. 一种关系网络数据的维护方法,其特征在于,包括:A method for maintaining relationship network data, comprising:
    离线服务器获取预设时间节点之前的用户操作记录;The offline server obtains a user operation record before the preset time node;
    离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
    离线服务器将第一子网络数据同步到在线服务器中并向实时服务器发送所述预设时间节点;The offline server synchronizes the first sub-network data into the online server and sends the preset time node to the real-time server;
    实时服务器获取所述预设时间节点之后的用户操作记录;The real-time server acquires a user operation record after the preset time node;
    实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据合并到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
  3. 如权利要求1或2所述的一种关系网络数据的维护方法,其特征在于,所述离线服务器获取预设时间节点之前的用户操作记录包括:The method for maintaining the relationship network data according to claim 1 or 2, wherein the user operation record before the offline server acquires the preset time node comprises:
    离线服务器按照预设时间周期获取预设时间节点之前的用户操作记录。The offline server obtains the user operation record before the preset time node according to the preset time period.
  4. 如权利要求3所述的一种关系网络数据的维护方法,其特征在于,所述预设时间周期包括预设的固定时间周期和预设的非固定时间周期。The method for maintaining relationship network data according to claim 3, wherein the preset time period comprises a preset fixed time period and a preset non-fixed time period.
  5. 如权利要求3所述的一种关系网络数据的维护方法,其特征在于,所述离线服务器按照预设时间周期获取预设时间节点之前的用户操作记录,包括:The method for maintaining the relationship network data according to claim 3, wherein the offline server obtains the user operation record before the preset time node according to the preset time period, including:
    所述离线服务器采用增量同步方式获取预设时间节点之前的用户操作记录;The offline server acquires a user operation record before the preset time node by using an incremental synchronization manner;
    或,or,
    所述离线服务器采用全部同步方式获取预设时间节点之前的用户操作记录。The offline server acquires the user operation record before the preset time node in all synchronization manners.
  6. 如权利要求1或2所述的一种关系网络数据的维护方法,其特征在于,所述离线服 务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据具体包括:A method for maintaining relationship network data according to claim 1 or 2, wherein said offline service The server calculates the user operation record before the preset time node, and the first sub-network data before the preset time node is specifically included:
    离线服务器将预设时间节点之前的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The offline server disassembles each user operation record before the preset time node into data including the sub-network body and the sub-network edge;
    离线服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到预设时间节点之前的第一子网络数据。The offline server performs the merging process on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the first sub-network data before the preset time node.
  7. 如权利要求1所述的一种关系网络数据的维护方法,其特征在于,所述实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据包括:The method for maintaining relationship network data according to claim 1, wherein the real-time server calculates a user operation record after the preset time node to obtain a second sub-network data, and the second The merging of the sub-network data with the first sub-network data into the third sub-network data includes:
    实时服务器将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
    实时服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据;The real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
    实时服务器基于所述第二子网络数据中的子网络主体和子网络边将第二子网络数据与第一子网络数据合并为第三子网络数据。The real-time server merges the second sub-network data and the first sub-network data into the third sub-network data based on the sub-network body and the sub-network side in the second sub-network data.
  8. 如权利要求2所述的一种关系网络数据的维护方法,其特征在于,所述实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据合并到在线服务器中包括:The method for maintaining relationship network data according to claim 2, wherein the real-time server calculates a user operation record after the preset time node to obtain a second sub-network data, and the second The subnet data is merged into the online server including:
    实时服务器将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
    实时服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据;The real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
    实时服务器基于所述第二子网络数据中的子网络主体和子网络边将第二子网络数据合并到在线服务器中。The real-time server merges the second sub-network data into the online server based on the sub-network body and the sub-network side in the second sub-network data.
  9. 如权利要求1中所述的一种关系网络数据的维护方法,其特征在于,所述方法之后还包括:The method for maintaining the relationship network data according to claim 1, wherein the method further comprises:
    实时服务器获得第四子网络数据,所述第四子网络数据的起始时间点不早于第三子网络数据的终止时间点;The real-time server obtains the fourth sub-network data, and the start time point of the fourth sub-network data is not earlier than the end time point of the third sub-network data;
    实时服务器将第四子网络数据与第三子网络数据合并为第五子网络数据,并将合并后的第五子网络数据更新到在线服务器中。The real-time server merges the fourth sub-network data and the third sub-network data into the fifth sub-network data, and updates the merged fifth sub-network data to the online server.
  10. 如权利要求2中所述的一种关系网络数据的维护方法,其特征在于,所述方法之后 还包括:A method for maintaining relationship network data as claimed in claim 2, characterized in that after the method Also includes:
    实时服务器获得第三子网络数据,所述第三子网络数据的起始时间点不早于第二子网络数据的终止时间点;The real-time server obtains the third sub-network data, and the start time point of the third sub-network data is not earlier than the end time point of the second sub-network data;
    实时服务器将第三子网络数据合并到在线服务器中。The real-time server merges the third subnet data into the online server.
  11. 如权利要求1或2所述的一种关系网络数据的维护方法,其特征在于,所述用户操作记录存储于独立的数据服务器中,所述数据服务器与实时服务器处于相同的网络环境中;The method for maintaining relationship network data according to claim 1 or 2, wherein the user operation record is stored in an independent data server, and the data server is in the same network environment as the real-time server;
    或,or,
    所述用户操作记录存储于实时服务器中。The user operation record is stored in a real-time server.
  12. 如权利要求1或2所述的一种关系网络数据的维护方法,其特征在于,所述实时服务器和在线服务器位于同一个网络环境中;The method for maintaining relationship network data according to claim 1 or 2, wherein the real-time server and the online server are located in the same network environment;
    或,or,
    实时服务器作为一个软件模块或者硬件模块集成于在线服务器中。The real-time server is integrated into the online server as a software module or hardware module.
  13. 一种关系网络数据的维护方法,其特征在于,包括:A method for maintaining relationship network data, comprising:
    离线服务器获取预设时间节点之前的用户操作记录;The offline server obtains a user operation record before the preset time node;
    离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;The offline server calculates the user operation record before the preset time node, and obtains the first sub-network data before the preset time node;
    离线服务器将第一子网络数据同步到实时服务器或在线服务器中,并向实时服务器发送所述预设时间节点。The offline server synchronizes the first sub-network data to the real-time server or the online server, and sends the preset time node to the real-time server.
  14. 如权利要求13所述的一种关系网络数据的维护方法,其特征在于,所述离线服务器获取预设时间节点之前的用户操作记录包括:The method for maintaining the relationship network data according to claim 13, wherein the user operation record before the offline server acquires the preset time node comprises:
    离线服务器按照预设时间周期获取预设时间节点之前的用户操作记录。The offline server obtains the user operation record before the preset time node according to the preset time period.
  15. 如权利要求14所述的一种关系网络数据的维护方法,其特征在于,所述预设时间周期包括预设的固定时间周期和预设的非固定时间周期。The method for maintaining relationship network data according to claim 14, wherein the preset time period comprises a preset fixed time period and a preset non-fixed time period.
  16. 如权利要求14所述的一种关系网络数据的维护方法,其特征在于,所述离线服务器按照预设时间周期获取预设时间节点之前的用户操作记录,包括:The method for maintaining the relationship network data according to claim 14, wherein the offline server obtains the user operation record before the preset time node according to the preset time period, including:
    所述离线服务器采用增量同步方式获取预设时间节点之前的用户操作记录;The offline server acquires a user operation record before the preset time node by using an incremental synchronization manner;
    或,or,
    所述离线服务器采用全部同步方式获取预设时间节点之前的用户操作记录。The offline server acquires the user operation record before the preset time node in all synchronization manners.
  17. 如权利要求13所述的一种关系网络数据的维护方法,其特征在于,所述离线服务器对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据具体包括: The method for maintaining the relationship network data according to claim 13, wherein the offline server calculates a user operation record before the preset time node, and obtains the first before the preset time node. The subnet data specifically includes:
    离线服务器将预设时间节点之前的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The offline server disassembles each user operation record before the preset time node into data including the sub-network body and the sub-network edge;
    离线服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到预设时间节点之前的第一子网络数据。The offline server performs the merging process on the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain the first sub-network data before the preset time node.
  18. 一种关系网络数据的维护方法,其特征在于,包括:A method for maintaining relationship network data, comprising:
    实时服务器存储从离线服务器同步的第一子网络数据并接收预设时间节点;The real-time server stores the first sub-network data synchronized from the offline server and receives the preset time node;
    实时服务器获取预设时间节点之后的用户操作记录;The real-time server acquires a user operation record after the preset time node;
    实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据,并将合并后的第三子网络数据更新到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data with the first sub-network data into the third sub-network data, and merges the combined The third subnet data is updated to the online server.
  19. 如权利要求18所述的一种关系网络数据的维护方法,其特征在于,所述实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据与第一子网络数据合并为第三子网络数据包括:The method for maintaining relationship network data according to claim 18, wherein the real-time server calculates a user operation record after the preset time node to obtain a second sub-network data, and the second The merging of the sub-network data with the first sub-network data into the third sub-network data includes:
    实时服务器将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
    实时服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据;The real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
    实时服务器基于所述第二子网络数据中的子网络主体和子网络边将第二子网络数据与第一子网络数据合并为第三子网络数据。The real-time server merges the second sub-network data and the first sub-network data into the third sub-network data based on the sub-network body and the sub-network side in the second sub-network data.
  20. 如权利要求18中所述的一种关系网络数据的维护方法,其特征在于,所述方法之后还包括:The method for maintaining the relationship network data according to claim 18, further comprising:
    实时服务器获得第四子网络数据,所述第四子网络数据的起始时间点不早于第三子网络数据的终止时间点;The real-time server obtains the fourth sub-network data, and the start time point of the fourth sub-network data is not earlier than the end time point of the third sub-network data;
    实时服务器将第四子网络数据与第三子网络数据合并为第五子网络数据,并将合并后的第五子网络数据更新到在线服务器中。The real-time server merges the fourth sub-network data and the third sub-network data into the fifth sub-network data, and updates the merged fifth sub-network data to the online server.
  21. 一种关系网络数据的维护方法,其特征在于,包括:A method for maintaining relationship network data, comprising:
    实时服务器接收预设时间节点并获取预设时间节点之后的用户操作记录;The real-time server receives the preset time node and acquires a user operation record after the preset time node;
    实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网络数据合并到在线服务器中。The real-time server calculates the user operation record after the preset time node, obtains the second sub-network data, and merges the second sub-network data into the online server.
  22. 如权利要求21所述的一种关系网络数据的维护方法,其特征在于,所述实时服务器对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据,并将第二子网 络数据合并到在线服务器中包括:The method for maintaining relationship network data according to claim 21, wherein the real-time server calculates a user operation record after the preset time node to obtain a second sub-network data, and the second Subnet The consolidation of the data into the online server includes:
    实时服务器将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;The real-time server disassembles each user operation record after the preset time node into data including the sub-network body and the sub-network edge;
    实时服务器按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据;The real-time server merges the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the second sub-network data;
    实时服务器基于所述第二子网络数据中的子网络主体和子网络边将第二子网络数据合并到在线服务器中。The real-time server merges the second sub-network data into the online server based on the sub-network body and the sub-network side in the second sub-network data.
  23. 如权利要求21中所述的一种关系网络数据的维护方法,其特征在于,所述方法之后还包括:The method for maintaining the relationship network data according to claim 21, wherein the method further comprises:
    实时服务器获得第三子网络数据,所述第三子网络数据的起始时间点不早于第二子网络数据的终止时间点;The real-time server obtains the third sub-network data, and the start time point of the third sub-network data is not earlier than the end time point of the second sub-network data;
    实时服务器将第三子网络数据合并到在线服务器中。The real-time server merges the third subnet data into the online server.
  24. 一种离线服务器,其特征在于,包括:An offline server, comprising:
    用户操作记录获取单元,用来获取预设时间节点之前的用户操作记录;a user operation record obtaining unit, configured to acquire a user operation record before the preset time node;
    计算单元,用来对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;a calculating unit, configured to calculate a user operation record before the preset time node, to obtain a first sub-network data before the preset time node;
    子网络数据同步单元,用来将第一子网络数据同步到实时服务器中并向实时服务器发送所述预设时间节点。The sub-network data synchronization unit is configured to synchronize the first sub-network data into the real-time server and send the preset time node to the real-time server.
  25. 一种离线服务器,其特征在于,包括:An offline server, comprising:
    用户操作记录获取单元,用来获取预设时间节点之前的用户操作记录;a user operation record obtaining unit, configured to acquire a user operation record before the preset time node;
    计算单元,用来对所述预设时间节点之前的用户操作记录进行计算,得到所述预设时间节点之前的第一子网络数据;a calculating unit, configured to calculate a user operation record before the preset time node, to obtain a first sub-network data before the preset time node;
    子网络数据更新单元,用来将第一子网络数据同步到在线服务器中并向实时服务器发送所述预设时间节点。The sub-network data update unit is configured to synchronize the first sub-network data into the online server and send the preset time node to the real-time server.
  26. 如权利要求24或25所述的一种离线服务器,其特征在于,所述计算单元具体包括:The offline server according to claim 24 or 25, wherein the calculating unit specifically comprises:
    拆解单元,用来将预设时间节点之前的每条用户操作记录拆解为包括子网络主体和子网络边的数据;a disassembling unit, configured to disassemble each user operation record before the preset time node into data including a sub-network body and a sub-network edge;
    归并单元,用来按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到预设时间节点之前的第一子网络数据。The merging unit is configured to perform the merging processing on the disassembled data according to the preset rule based on the sub-network body and the sub-network edge to obtain the first sub-network data before the preset time node.
  27. 一种实时服务器,其特征在于,包括:A real-time server, comprising:
    存储单元,用来存储离线服务器同步的第一子网络数据; a storage unit, configured to store first sub-network data synchronized by the offline server;
    用户操作记录读取单元,用来获取预设时间节点之后的用户操作记录;The user operation record reading unit is configured to obtain a user operation record after the preset time node;
    计算单元,用来对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据;a calculating unit, configured to calculate a user operation record after the preset time node, to obtain second sub-network data;
    合并单元,用来将第二子网络数据与第一子网络数据合并为第三子网络数据;a merging unit, configured to merge the second sub-network data with the first sub-network data into the third sub-network data;
    更新单元,用来将合并后的第三子网络数据更新到在线服务器中。The update unit is configured to update the merged third sub-network data to the online server.
  28. 一种实时服务器,其特征在于,包括:A real-time server, comprising:
    用户操作记录读取单元,用来获取预设时间节点之后的用户操作记录;The user operation record reading unit is configured to obtain a user operation record after the preset time node;
    计算单元,用来对所述预设时间节点之后的用户操作记录进行计算,得到第二子网络数据;a calculating unit, configured to calculate a user operation record after the preset time node, to obtain second sub-network data;
    合并单元,用来将第二子网络数据合并到在线服务器中。The merging unit is used to merge the second sub-network data into the online server.
  29. 如权利要求27或28所述的一种实时服务器,其特征在于,所述计算单元包括:A real-time server according to claim 27 or 28, wherein said calculating unit comprises:
    拆解单元,用来将预设时间节点之后的每条用户操作记录拆解为包括子网络主体和子网络边的数据;a disassembling unit, configured to disassemble each user operation record after the preset time node into data including a sub-network body and a sub-network edge;
    归并单元,用来按照预设规则对所述拆解后的数据基于所述子网络主体和子网络边进行归并处理,得到第二子网络数据。 The merging unit is configured to perform merging and processing the disassembled data based on the sub-network body and the sub-network edge according to a preset rule to obtain second sub-network data.
PCT/CN2015/096796 2014-12-18 2015-12-09 Relationship network data maintenance method, off-line server and real-time server WO2016095738A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410791077.5A CN105763588B (en) 2014-12-18 2014-12-18 Relational network data maintenance method, offline server and real-time server
CN201410791077.5 2014-12-18

Publications (1)

Publication Number Publication Date
WO2016095738A1 true WO2016095738A1 (en) 2016-06-23

Family

ID=56125903

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/096796 WO2016095738A1 (en) 2014-12-18 2015-12-09 Relationship network data maintenance method, off-line server and real-time server

Country Status (2)

Country Link
CN (1) CN105763588B (en)
WO (1) WO2016095738A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3863231B1 (en) * 2020-02-04 2023-11-15 Siemens Aktiengesellschaft Automation network with packet-based communication between host and client and method for operating an automation network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441580A (en) * 2008-12-09 2009-05-27 华北电网有限公司 Distributed paralleling calculation platform system and calculation task allocating method thereof
WO2010114964A1 (en) * 2009-04-03 2010-10-07 Google Inc. Architectural pattern for persistent web application design
US20100313205A1 (en) * 2009-06-09 2010-12-09 Yahoo! Inc., A Delaware Corporation System and method for offline data generation for online system analysis
CN103297419A (en) * 2013-04-23 2013-09-11 携程计算机技术(上海)有限公司 Method and system for fusing off-line data and on-line data
CN103391307A (en) * 2012-05-11 2013-11-13 阿里巴巴集团控股有限公司 Off-line transparent-transmitting and display method, device and system for off-line data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100583804C (en) * 2007-06-22 2010-01-20 清华大学 Method and system for processing social network expert information based on expert value propagation algorithm
CN103744774A (en) * 2014-01-23 2014-04-23 浪潮电子信息产业股份有限公司 Server fault visualizing and rapid diagnosing method
CN103856353B (en) * 2014-03-06 2018-01-26 上海爱数信息技术股份有限公司 A kind of business diary data access and the method and device of statistical analysis

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441580A (en) * 2008-12-09 2009-05-27 华北电网有限公司 Distributed paralleling calculation platform system and calculation task allocating method thereof
WO2010114964A1 (en) * 2009-04-03 2010-10-07 Google Inc. Architectural pattern for persistent web application design
US20100313205A1 (en) * 2009-06-09 2010-12-09 Yahoo! Inc., A Delaware Corporation System and method for offline data generation for online system analysis
CN103391307A (en) * 2012-05-11 2013-11-13 阿里巴巴集团控股有限公司 Off-line transparent-transmitting and display method, device and system for off-line data
CN103297419A (en) * 2013-04-23 2013-09-11 携程计算机技术(上海)有限公司 Method and system for fusing off-line data and on-line data

Also Published As

Publication number Publication date
CN105763588A (en) 2016-07-13
CN105763588B (en) 2020-02-04

Similar Documents

Publication Publication Date Title
TWI748175B (en) Data processing method, device and equipment
WO2017050188A1 (en) Transaction data processing method and device
JP2019503525A (en) Event batch processing, output sequencing, and log-based state storage in continuous query processing
US20200264956A1 (en) Recovery support techniques for storage virtualization environments
US9848306B2 (en) Contextually aware dynamic group formation
CN105117382B (en) Document cooperation method and device
EP3365781A1 (en) Guaranteeing the event order for multi-stage processing in distributed systems
TWI694700B (en) Data processing method and device, user terminal
CN107977396B (en) Method and device for updating data table of KeyValue database
CN105871959A (en) Message delivery method, system and device
WO2020019893A1 (en) Data object identification generating method and device
JP6506686B2 (en) Technique for automatically managing file descriptors
WO2018095307A1 (en) Method and device for releasing evaluation information
WO2020024648A1 (en) Data processing method and device, client, and server
CN111723161A (en) Data processing method, device and equipment
CN107798039A (en) A kind of method of data synchronization and device
WO2020088072A1 (en) Failover data processing method, apparatus, and system
WO2016062197A1 (en) Method and apparatus for determining directory category and automatic categorization method and apparatus
KR102164409B1 (en) Crowdsourcing user-provided identifiers and associating them with brand identities
TW200843433A (en) Efficient detection of deleted objects against a stateless content directory service
WO2016095738A1 (en) Relationship network data maintenance method, off-line server and real-time server
CN106202091A (en) A kind of field method to set up and device
WO2019154096A1 (en) Information sharing method and device
WO2016095716A1 (en) Fault information processing method and related device
CN105719072A (en) System and method for associating multistage assembly transactions

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: 15869246

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15869246

Country of ref document: EP

Kind code of ref document: A1