WO2019184241A1 - Method and system for synchronizing network data - Google Patents

Method and system for synchronizing network data Download PDF

Info

Publication number
WO2019184241A1
WO2019184241A1 PCT/CN2018/103282 CN2018103282W WO2019184241A1 WO 2019184241 A1 WO2019184241 A1 WO 2019184241A1 CN 2018103282 W CN2018103282 W CN 2018103282W WO 2019184241 A1 WO2019184241 A1 WO 2019184241A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
client
interaction
server
service
Prior art date
Application number
PCT/CN2018/103282
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 WO2019184241A1 publication Critical patent/WO2019184241A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • the present invention relates to the field of interaction and comparison of network data, and in particular to a method and system for synchronizing network data.
  • the process of the client and the server performing the network service interaction includes: the client requests the server to create the service, and the client requests the server to delete the created service, and one service is created or deleted, and actually creates or deletes multiple sub-services.
  • the process, for example, the process of creating service A is: creating sub-service A1 (service tunnel), sub-service A2 (service pseudo-line), sub-service A3 (service protection), and sub-service A4 (service establishment) in order, and deleting the service Reason.
  • the process of the client requesting the server to create a service includes: requesting the service to create a service according to the order in which the service is created; for example, the service A is created in the order of A1, A2, A3, and A4, and then the client requests the creation of the server in turn.
  • A1, A2, A3 and A4 services are examples of services.
  • the process of the client requesting the server to delete the created service includes: the client requests the server to delete the service according to the deletion order of the service (the reverse order of the service creation order), for example, the deletion order of the service A is A4, A3, A2, and A1, the client sequentially requests the server to delete the A4, A3, A2, and A1 services.
  • the deletion order of the service is A4, A3, A2, and A1
  • the client sequentially requests the server to delete the A4, A3, A2, and A1 services.
  • the client requests the server to create and delete a service
  • some of the remaining parts of the server are successfully created. For example, if A1 and A2 are created successfully and A3 fails, the data of A1 and A2 remains in the server. And deleting the failed data, the residual data needs to be manually cleared by the maintenance personnel. In the scenario where the number of services is increasing, it is difficult for maintenance personnel to effectively remove the residual data. When there is more residual data, it is not only inconvenient for data management, but also significantly reduce the efficiency of the server, and even cause server downtime.
  • the synchronization method is: the client periodically generates the created service data table.
  • the server requests to generate the created service data table 2, and the maintenance personnel means to compare the service data tables 1 and 2, and then synchronize the data of the service data table 1 according to the data of the service data table 2.
  • the technical problem solved by the present invention is: how the client automatically processes the abnormal data when the client interacts with the server, so as to maintain the data synchronization between the client and the server.
  • the method for synchronizing network data includes the following steps:
  • the client obtains the client synchronization data and the server synchronization data in the specified time period, the client synchronization data is all the service data that the client interacts with the server, and the server synchronization data is the server interaction with the client. All business data; synchronize the client synchronization data according to the server synchronization data.
  • the type of network service interaction between the client and the server in the S1 includes: the client requests the service to create a service, and the S1 includes the following steps:
  • S101 The client uses the first sub-service to be created as an interactive service according to the order in which the service is created, and the process goes to S102;
  • S102 The client initiates a request for creating an interactive service to the server, and records the interaction data information of the interactive service, and proceeds to S103.
  • S103 The client sends the service creation information returned by the server as the interaction result information of the interaction service, and is associated with the interaction data information; if the interaction result information is successfully created for the interaction service, go to S104; if the interaction result information is created for the interaction service If it fails, it means an interaction exception, go to S105;
  • S104 The client uses the sub-service to be created as the interactive service according to the order in which the service is created, and the process proceeds to S102.
  • the method includes the following steps: the client determines whether the number of times the service creation fails is greater than a specified threshold, and if so, fails to create a failure flag for the service. , end; if not, go to S101.
  • S2 further includes the following steps: processing all the services with the creation failure flag according to the step of S1.
  • the following steps are included in the S2: when the data A of the server synchronization data exists and the client synchronization data does not exist is detected. Adding data A on the client; when monitoring the data that the server synchronization data does not exist and the client synchronizes the data, the data B is deleted on the client; when the server synchronization data and the client synchronization data are detected, When there are different but different data C and D, the data D on the client is replaced with the data C on the server.
  • the network data synchronization system comprises a network data interaction module and a network data synchronization module arranged on the client;
  • the network data interaction module is configured to: when the client and the server perform the network service data interaction, record the interaction data information and the interaction result information; when the interaction result information represents the interaction abnormality, according to the interaction associated with the interaction result information Data information, processing corresponding business data in the server;
  • the network data synchronization module is configured to: acquire client synchronization data and server synchronization data in a specified time period, and client synchronization data is all service data that the client interacts with the server, and the server synchronization data is a server and a client. All business data exchanged by the terminal; synchronization of the client synchronization data according to the server synchronization data.
  • the type of the network service interaction performed by the client and the server includes: the client requests the service to create a service, and the network data interaction module is specifically configured to: according to the order in which the service is created, After the first sub-service that needs to be created is used as an interactive service, the business interaction process is entered;
  • the business interaction process is: initiating a request for creating an interactive service to the server, and recording the interaction data information of the interaction service, and using the service creation information returned by the server as the interaction result information of the interaction service and associating with the interaction data information;
  • the result information is that the interactive service is created successfully.
  • the business interaction process is re-entered. If the interaction result information fails to be created, the interaction abnormality is obtained.
  • the interaction service data corresponding to the interaction data information is deleted in the server according to the deletion order of the service.
  • the network data interaction module deletes the interaction service data in the server, it is also used to: determine whether the number of times the service creation failure is above a specified threshold, and if so, create a failure flag for the service. End; if not, start working again.
  • the network data synchronization module is further configured to: process all services that have a creation failure flag according to the working mode of the network data interaction module.
  • the network data synchronization module synchronizes the client synchronization data according to the server synchronization data
  • the following steps are included: when the server synchronization data exists and the client synchronization data does not exist, A, the data A is added on the client; when it is detected that the server synchronization data does not exist, the client synchronizes the data B, the data B is deleted on the client; when the server synchronization data is detected and the client synchronizes
  • data exists but different data C and D the data D on the client is replaced with the data C on the server.
  • the present invention records interaction data information and interaction result information each time the client and the server perform business interaction; when the interaction result information represents an interaction exception, the client bases
  • the interaction data information associated with the interaction result information is used to process the corresponding service data in the server. For example, when the service fails to be created, the residual data in the server is automatically reversed. Therefore, compared with the residual data when the interaction abnormality is manually cleared in the prior art, the present invention can immediately clear the abnormal data, which not only ensures the data synchronization precision between the client and the server, but also ensures the integrity of the single service. .
  • the present invention can automatically synchronize the corresponding data of the client according to the server data in the specified time period. , further improving the data synchronization accuracy between the client and the server.
  • the present invention performs secondary analysis processing on the abnormal service, and if it fails again, it is manually processed, and if successful, no manual processing is required. In turn, the probability of manual processing is reduced, and the accuracy of the work is also improved, and the risk of data security and correctness can be minimized to ensure the consistency of data between the client and the server.
  • FIG. 1 is a flowchart of a method for synchronizing network data according to an embodiment of the present invention.
  • a method for synchronizing network data in an embodiment of the present invention includes the following steps:
  • S2 The client obtains the client synchronization data and the server synchronization data in the specified time period, the client synchronization data is all the service data that the client interacts with the server, and the server synchronization data is the server interaction with the client. All service data; according to the server synchronization data, the client synchronization data is synchronized, and the execution time of S2 can be performed periodically, that is, S2 may be performed before, after, or during S1 execution.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the type of the network service interaction between the client and the server in the S1 includes: the client requests the service to create a service, and the S1 includes the following steps:
  • S101 The client uses the first sub-service that needs to be created as the interactive service according to the order in which the service is created, and the process goes to S102.
  • S102 The client initiates a request for creating an interactive service to the server (each time the creation request is considered to be a network service data interaction), and records the interaction data information of the interaction service (the interaction data information includes an interaction service type, an operation type, and Specific interactive business data), go to S103.
  • the interaction data information includes an interaction service type, an operation type, and Specific interactive business data
  • the client creates the service creation information returned by the server as the interaction result information of the interaction service (if the interaction result information already exists, directly covers the information), and associates with the interaction data information; if the interaction result information is successfully created for the interaction service, Go to S104; if the interaction result information is that the interaction service creation fails, it represents an interaction exception, and go to S105.
  • S104 The client forwards the sub-service to be created as the interactive service to the S102 according to the order in which the service is created. If the sub-service that needs to be created is not the next one, the S1 ends.
  • the interaction service data corresponding to the interaction data information is deleted in the server according to the deletion order of the service (the reverse order of the service creation order); for example, the service A is created.
  • the creation process is to create A1, A2, A3, and A4. If the A3 fails to be created on the server, the A2 and A1 data are deleted in the server. In this case, the creation failure flag can be created for the service to be created. deal with.
  • the type of network service interaction between the client and the server in S1 includes: the client requests the server to delete the service, and the S1 includes the following steps:
  • S101a The client moves the first sub-service that needs to be deleted as an interactive service according to the deletion order of the service, and the process goes to S102a.
  • S102a The client initiates a deletion request of the interactive service to the server (the transmission request is considered to be a business interaction every time the deletion request is sent), and records the interaction data information of the interaction service (the interaction data information includes the interaction service type, the operation type, and the specific Interactive business data), go to S103a.
  • S103a The client deletes the service deletion information returned by the server as the interaction result information of the interaction service (if the interaction result information already exists, directly covers the information), and associates with the interaction data information; if the interaction result information is that the interaction service is deleted successfully, Go to S104a; if the interaction result information is that the interactive service deletion fails, the interaction is abnormal.
  • the deletion failure flag may be marked on the service to be deleted in S101a, so as to be manually processed later.
  • S104a The client sends the next sub-service to be deleted as the interactive service to S102a according to the deletion order of the service; if there is no sub-service to be deleted, the service is deleted successfully, and S1 ends.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the method includes the following steps: the client determines whether the number of times the service creation fails is greater than a specified threshold, and if yes, the service has been created multiple times. However, all of them fail. If they are created again, there is a high probability that they will not succeed. In order to improve the working efficiency of the client and the server, the service is not created at this time, the creation failure flag is marked for the service, and the process ends; if not, it can be created again. Go to S101.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • the method includes the following steps: the client determines whether the number of times the service deletion fails is greater than a specified threshold, and if yes, the service has been deleted multiple times. However, all of them fail, and there is a high probability that the deletion will not succeed. In order to improve the working efficiency of the client and the server, the service deletion is not performed at this time, and the deletion failure flag is marked for the service, and the process ends; if not, the deletion can be performed again. Go to S101a.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • S2 synchronizes the client synchronization data according to the server synchronization data, and specifically includes the following steps: after filtering the same data in the server synchronization data and the client synchronization data, when the server synchronization data is detected, the client exists.
  • the data A that does not exist in the synchronization data is synchronized
  • the data A is added on the client
  • the data B in which the server synchronization data does not exist and the client synchronization data exists is detected
  • the data B is deleted on the client
  • the server is detected
  • both the synchronous data and the client synchronization data exist, but different data C and D the data D on the client is replaced with the data C on the server.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • S2 further includes the following steps: processing all the services with the creation failure flag and the deletion failure flag according to the step of S1, which is equivalent to the data that has been previously processed and then analyzed twice, if it fails again. , it is manually processed, if it is successful, no manual processing is required, thereby reducing the probability of manual processing, and thus improving the working precision.
  • Embodiment 6 The client is an SPTN (S Packet Transport Network) controller, and the server is a network management server.
  • SPTN Packet Transport Network
  • the SPTN controller During the daytime, the SPTN controller records the interrelated interaction data information and the interaction result information when the SPTN controller interacts with the network management server.
  • the types of network service interaction between the SPTN controller and the network management server include: SPTN control.
  • the device requests the NMS server to create a service and request to delete the service.
  • the SPTN controller When requesting to create service A, the SPTN controller uses sub-service A1 as an interactive service according to the order in which service A is created (sub-services A1, A2, A3, and A4).
  • the SPTN controller initiates a request for creating an interactive service to the network management server, and records interactive data information of the interactive service.
  • the service creation information returned by the network management server fails to be created. In this case, the SPTN controller finds that the interaction is abnormal. After the service is deleted, the A7, A3, A2, and A1 are deleted. A1).
  • the SPTN controller creates the sub-service A1 again twice according to the above procedure (that is, the total number of failures is 3 and the specified threshold is also 3), the service A fails to be created.
  • the SPTN controller When requesting to delete service A, the SPTN controller uses the first sub-service A4 to be deleted as the interactive service according to the service deletion order (sub-services A4, A3, A2, and A1).
  • the SPTN controller initiates a deletion request for the interaction service to the network management server, and records the interaction data information of the interaction service.
  • the service deletion information returned by the NMS server is that the service deletion fails. At this time, the SPTN controller finds that the interaction is abnormal.
  • the SPTN controller After the SPTN controller deletes the sub-service A4 again twice according to the above procedure (that is, the total number of failures is 3 and the specified threshold is also 3), the service A is marked with a deletion failure flag.
  • the synchronization data of the SPTN controller and the network management server are synchronized within 12 hours.
  • the synchronization data of the SPTN controller is all the service data exchanged with the network management server on the SPTN controller.
  • the synchronization data of the network management server is the interaction with the SPTN controller on the network management server. All business data.
  • the synchronization data of the network management server is obtained by calling the network management server to obtain the full circuit interface, obtaining the full circuit number of the network management system and the last processing time of the circuit, and configuring the SPTN controller to filter the circuit data of the specified time period of the SPTN controller.
  • the network management server synchronization data and the SPTN controller synchronization data are fully detected, which are divided into two aspects:
  • the network data synchronization system in the embodiment of the present invention includes a network data interaction module and a network data synchronization module disposed on the client.
  • the network data interaction module is configured to: when the client and the server perform the network service data interaction, record the interaction data information and the interaction result information; when the interaction result information represents the interaction abnormality, according to the interaction associated with the interaction result information Data information, processing corresponding business data in the server.
  • the type of the network service interaction between the client and the server includes: the client requests the server to create a service, and the network data interaction module is specifically configured to: according to the service creation order, the first sub-service to be created. After the interactive service, enter the business interaction process;
  • the business interaction process is: initiating a request for creating an interactive service to the server, and recording the interaction data information of the interaction service, and using the service creation information returned by the server as the interaction result information of the interaction service and associating with the interaction data information;
  • the result information is that the interactive service is created successfully.
  • the business interaction process is re-entered. If the interaction result information fails to be created, the interaction abnormality is obtained.
  • the interaction service data corresponding to the interaction data information is deleted in the server according to the deletion order of the service; and the number of times the service creation failure is determined to be above a specified threshold, and if so, the service fails to be marked. , end; if not, start working again.
  • the network data synchronization module is configured to: process all the services with the creation failure flag according to the working mode of the network data interaction module; acquire the client synchronization data and the server synchronization data in the specified time period, and the client synchronization data is the client and the service.
  • the server synchronization data is all service data interacting with the client on the server; according to the server synchronization data, the synchronization data of the client is synchronized, and the synchronization mode is: when the synchronization data of the server is detected When the client synchronizes the data A that does not exist in the data, the data A is added to the client; when the data of the client synchronization data does not exist and the client synchronizes the data, the data B is deleted on the client; when monitoring When the server-side synchronization data and the client-side synchronization data exist, but different data C and D, the data D on the client is replaced with the data C on the server.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

Disclosed in the present invention are a method and a system for synchronizing network data, relating to the field of network data exchange and comparison. Said method comprises the following steps: every time a client end and a server perform network traffic data exchange, the client end records exchange data information and exchange result information; when the exchange result information indicates that the exchange is abnormal, the client end processes corresponding traffic data in the server according to exchange data information associated with the exchange result information; the client end acquires client-end synchronization data and server synchronization data within a specified time period, the client-end synchronization data being all the traffic data on the client end exchanged with the server, and the server synchronization data being all the traffic data on the server exchanged with the client end; and synchronizing the client-end synchronization data according to the server synchronization data. The present invention enables a client end to automatically process abnormal data when an abnormality occurs during an exchange between the client end and a server, thereby ensuring data synchronization between the client end and the server.

Description

网络数据的同步方法及系统Network data synchronization method and system 技术领域Technical field
本发明涉及网络数据的交互和比对领域,具体涉及一种网络数据的同步方法及系统。The present invention relates to the field of interaction and comparison of network data, and in particular to a method and system for synchronizing network data.
背景技术Background technique
随着通信技术的快速发展,传输网络的业务种类和业务场景的增加,客户端与服务端进行交互的网络业务也越来越多。客户端与服务端进行网络业务交互的流程包括:客户端请求服务端创建业务、以及客户端请求服务端删除已创建的业务,1个业务在创建或删除,实际上是创建或删除多个子业务的过程,例如创建业务A的过程为:按顺序创建子业务A1(业务隧道)、子业务A2(业务伪线)、子业务A3(业务保护)和子业务A4(业务建立),业务的删除同理。With the rapid development of communication technologies, the types of services and service scenarios of the transmission network increase, and the network services for the client and the server to interact are also increasing. The process of the client and the server performing the network service interaction includes: the client requests the server to create the service, and the client requests the server to delete the created service, and one service is created or deleted, and actually creates or deletes multiple sub-services. The process, for example, the process of creating service A is: creating sub-service A1 (service tunnel), sub-service A2 (service pseudo-line), sub-service A3 (service protection), and sub-service A4 (service establishment) in order, and deleting the service Reason.
客户端请求服务端创建业务的流程包括:按照业务的创建顺序,向服务端请求创建业务;例如业务A的创建顺序为A1、A2、A3和A4,则此时客户端依次向服务端请求创建A1、A2、A3和A4业务。The process of the client requesting the server to create a service includes: requesting the service to create a service according to the order in which the service is created; for example, the service A is created in the order of A1, A2, A3, and A4, and then the client requests the creation of the server in turn. A1, A2, A3 and A4 services.
客户端请求服务端删除已创建的业务的流程包括:客户端按照业务的删除顺序(业务的创建顺序的倒序),向服务端请求删除业务,例如业务A的删除顺序为A4、A3、A2和A1,则客户端依次向服务端请求创建删除A4、A3、A2和A1业务。The process of the client requesting the server to delete the created service includes: the client requests the server to delete the service according to the deletion order of the service (the reverse order of the service creation order), for example, the deletion order of the service A is A4, A3, A2, and A1, the client sequentially requests the server to delete the A4, A3, A2, and A1 services.
但是,现有的客户端与服务端进行网络业务交互时,存在以下缺陷:However, when the existing client and the server perform network service interaction, the following defects exist:
客户端请求服务端创建和删除业务时,若创建或删除失败,均会 在服务端中残留有部分创建成功(例如创建A1和A2成功,A3失败,则服务端中残留有A1和A2的数据)和删除失败的数据,这些残留数据需要维护人员手动清除,在业务种类不断增多的场景下,维护人员是难以有效清除残留数据的,当残留数据较多时,不仅不便于数据的管理,而且会严重降低服务端的工作效率,甚至会造成服务端宕机。When the client requests the server to create and delete a service, if the creation or deletion fails, some of the remaining parts of the server are successfully created. For example, if A1 and A2 are created successfully and A3 fails, the data of A1 and A2 remains in the server. And deleting the failed data, the residual data needs to be manually cleared by the maintenance personnel. In the scenario where the number of services is increasing, it is difficult for maintenance personnel to effectively remove the residual data. When there is more residual data, it is not only inconvenient for data management, but also Seriously reduce the efficiency of the server, and even cause server downtime.
此外,保持客户端与服务端的数据一致,以便于对客户端中的业务进行维护,客户端需要定期与服务端同步业务数据,同步方法为:客户端定期生成已创建的业务数据表1、向服务端请求生成已创建的业务数据表2,维护人员手段将业务数据表1和2进行比对后,根据业务数据表2的数据,同步业务数据表1的数据。In addition, the data of the client and the server are kept consistent, so that the service in the client is maintained, and the client needs to periodically synchronize the service data with the server. The synchronization method is: the client periodically generates the created service data table. The server requests to generate the created service data table 2, and the maintenance personnel means to compare the service data tables 1 and 2, and then synchronize the data of the service data table 1 according to the data of the service data table 2.
但是,客户端与服务端同步业务数据时,若业务数据比较复杂,则维护人员人工对比业务数据的精度较低,进而降低了客户端与服务端的业务数据同步质量。However, when the client and the server synchronize the service data, if the service data is relatively complicated, the precision of the manual comparison of the service data by the maintenance personnel is low, thereby reducing the synchronization quality of the service data between the client and the server.
发明内容Summary of the invention
针对现有技术中存在的缺陷,本发明解决的技术问题为:在客户端与服务端交互发生异常时,客户端如何自动对异常数据进行处理,以保持客户端与服务端的数据同步。In view of the deficiencies in the prior art, the technical problem solved by the present invention is: how the client automatically processes the abnormal data when the client interacts with the server, so as to maintain the data synchronization between the client and the server.
为达到以上目的,本发明提供的网络数据的同步方法,包括以下步骤:To achieve the above objective, the method for synchronizing network data provided by the present invention includes the following steps:
S1:客户端与服务端每进行一次网络业务数据交互时,客户端记录相互关联的交互数据信息和交互结果信息;当交互结果信息代表交互异常时,客户端根据与交互结果信息关联的交互数据信息,在服务端中处理对应的业务数据;S1: When the client and the server perform the network service data interaction, the client records the interaction data information and the interaction result information associated with each other; when the interaction result information represents the interaction abnormality, the client performs the interaction data associated with the interaction result information. Information, processing corresponding business data in the server;
S2:客户端获取指定时间段内的客户端同步数据与服务端同步数据,客户端同步数据为客户端上与服务端交互的所有业务数据,服务 端同步数据为服务端上与客户端交互的所有业务数据;根据服务端同步数据,对客户端同步数据进行同步。S2: The client obtains the client synchronization data and the server synchronization data in the specified time period, the client synchronization data is all the service data that the client interacts with the server, and the server synchronization data is the server interaction with the client. All business data; synchronize the client synchronization data according to the server synchronization data.
在上述技术方案的基础上,S1中客户端与服务端进行的网络业务交互的类型包括:客户端向服务端请求创建业务,此时S1包括以下步骤:On the basis of the foregoing technical solution, the type of network service interaction between the client and the server in the S1 includes: the client requests the service to create a service, and the S1 includes the following steps:
S101:客户端按照业务的创建顺序,将第一个需要创建的子业务作为交互业务,转到S102;S101: The client uses the first sub-service to be created as an interactive service according to the order in which the service is created, and the process goes to S102;
S102:客户端向服务端发起交互业务的创建请求、并记录交互业务的交互数据信息,转到S103;S102: The client initiates a request for creating an interactive service to the server, and records the interaction data information of the interactive service, and proceeds to S103.
S103:客户端将服务端返回的业务创建信息,作为交互业务的交互结果信息、并与交互数据信息关联;若交互结果信息为交互业务创建成功,转到S104;若交互结果信息为交互业务创建失败,则代表交互异常,转到S105;S103: The client sends the service creation information returned by the server as the interaction result information of the interaction service, and is associated with the interaction data information; if the interaction result information is successfully created for the interaction service, go to S104; if the interaction result information is created for the interaction service If it fails, it means an interaction exception, go to S105;
S104:客户端按照业务的创建顺序,将下一个需要创建的子业务作为交互业务,转到S102;S104: The client uses the sub-service to be created as the interactive service according to the order in which the service is created, and the process proceeds to S102.
S105:客户端获取所有交互业务的交互数据信息后,按照业务的删除顺序,在服务端中删除与交互数据信息对应的交互业务数据。S105: After obtaining the interaction data information of all the interaction services, the client deletes the interaction service data corresponding to the interaction data information in the server according to the deletion order of the service.
在上述技术方案的基础上,S105中客户端在服务端中删除交互业务数据后,还包括以下步骤:客户端判断业务创建失败的次数是否在指定阈值以上,若是,对该业务进行创建失败标记,结束;若不是,转到S101。On the basis of the foregoing technical solution, after the client deletes the interactive service data in the server, the method includes the following steps: the client determines whether the number of times the service creation fails is greater than a specified threshold, and if so, fails to create a failure flag for the service. , end; if not, go to S101.
在上述技术方案的基础上,S2还包括以下步骤:按照S1的步骤处理所有存在创建失败标记的业务。Based on the above technical solution, S2 further includes the following steps: processing all the services with the creation failure flag according to the step of S1.
在上述技术方案的基础上,S2中所述根据服务端同步数据,对客户端同步数据进行同步时,包括以下步骤:当监测到服务端同步数 据存在、客户端同步数据不存在的数据A时,在客户端上增加数据A;当监测到服务端同步数据不存在、客户端同步数据存在的数据B时,在客户端上删除数据B;当监测到服务端同步数据和客户端同步数据均存在、但不同的数据C和D时,将客户端上的数据D替换为服务端上的数据C。On the basis of the foregoing technical solution, when synchronizing the client synchronization data according to the server synchronization data, the following steps are included in the S2: when the data A of the server synchronization data exists and the client synchronization data does not exist is detected. Adding data A on the client; when monitoring the data that the server synchronization data does not exist and the client synchronizes the data, the data B is deleted on the client; when the server synchronization data and the client synchronization data are detected, When there are different but different data C and D, the data D on the client is replaced with the data C on the server.
本发明提供的网络数据的同步系统,包括设置于客户端上的网络数据交互模块和网络数据同步模块;The network data synchronization system provided by the invention comprises a network data interaction module and a network data synchronization module arranged on the client;
网络数据交互模块用于:客户端与服务端每进行一次网络业务数据交互时,记录相互关联的交互数据信息和交互结果信息;当交互结果信息代表交互异常时,根据与交互结果信息关联的交互数据信息,在服务端中处理对应的业务数据;The network data interaction module is configured to: when the client and the server perform the network service data interaction, record the interaction data information and the interaction result information; when the interaction result information represents the interaction abnormality, according to the interaction associated with the interaction result information Data information, processing corresponding business data in the server;
网络数据同步模块用于:获取指定时间段内的客户端同步数据与服务端同步数据,客户端同步数据为客户端上与服务端交互的所有业务数据,服务端同步数据为服务端上与客户端交互的所有业务数据;根据服务端同步数据,对客户端同步数据进行同步。The network data synchronization module is configured to: acquire client synchronization data and server synchronization data in a specified time period, and client synchronization data is all service data that the client interacts with the server, and the server synchronization data is a server and a client. All business data exchanged by the terminal; synchronization of the client synchronization data according to the server synchronization data.
在上述技术方案的基础上,客户端与服务端进行的网络业务交互的类型包括:客户端向服务端请求创建业务,此时所述网络数据交互模块具体用于:按照业务的创建顺序,将第一个需要创建的子业务作为交互业务后,进入业务交互流程;On the basis of the foregoing technical solution, the type of the network service interaction performed by the client and the server includes: the client requests the service to create a service, and the network data interaction module is specifically configured to: according to the order in which the service is created, After the first sub-service that needs to be created is used as an interactive service, the business interaction process is entered;
业务交互流程为:向服务端发起交互业务的创建请求、并记录交互业务的交互数据信息,将服务端返回的业务创建信息,作为交互业务的交互结果信息、并与交互数据信息关联;若交互结果信息为交互业务创建成功,按照业务的创建顺序,将下一个需要创建的子业务作为交互业务后,重新进入业务交互流程;若交互结果信息为交互业务创建失败,则代表交互异常,获取所有交互业务的交互数据信息后, 按照业务的删除顺序,在服务端中删除与交互数据信息对应的交互业务数据。The business interaction process is: initiating a request for creating an interactive service to the server, and recording the interaction data information of the interaction service, and using the service creation information returned by the server as the interaction result information of the interaction service and associating with the interaction data information; The result information is that the interactive service is created successfully. After the next sub-service that needs to be created is used as the interactive service, the business interaction process is re-entered. If the interaction result information fails to be created, the interaction abnormality is obtained. After the interaction data of the interaction service, the interaction service data corresponding to the interaction data information is deleted in the server according to the deletion order of the service.
在上述技术方案的基础上,所述网络数据交互模块在服务端中删除交互业务数据后,还用于:判断业务创建失败的次数是否在指定阈值以上,若是,对该业务进行创建失败标记,结束;若不是,重新开始工作。On the basis of the foregoing technical solution, after the network data interaction module deletes the interaction service data in the server, it is also used to: determine whether the number of times the service creation failure is above a specified threshold, and if so, create a failure flag for the service. End; if not, start working again.
在上述技术方案的基础上,所述网络数据同步模块还用于:按照网络数据交互模块的工作方式处理所有存在创建失败标记的业务。On the basis of the foregoing technical solution, the network data synchronization module is further configured to: process all services that have a creation failure flag according to the working mode of the network data interaction module.
在上述技术方案的基础上,所述网络数据同步模块根据服务端同步数据,对客户端同步数据进行同步时,包括以下步骤:当监测到服务端同步数据存在、客户端同步数据不存在的数据A时,在客户端上增加数据A;当监测到服务端同步数据不存在、客户端同步数据存在的数据B时,在客户端上删除数据B;当监测到服务端同步数据和客户端同步数据均存在、但不同的数据C和D时,将客户端上的数据D替换为服务端上的数据C。On the basis of the foregoing technical solution, when the network data synchronization module synchronizes the client synchronization data according to the server synchronization data, the following steps are included: when the server synchronization data exists and the client synchronization data does not exist, A, the data A is added on the client; when it is detected that the server synchronization data does not exist, the client synchronizes the data B, the data B is deleted on the client; when the server synchronization data is detected and the client synchronizes When data exists but different data C and D, the data D on the client is replaced with the data C on the server.
与现有技术相比,本发明的优点在于:The advantages of the present invention over the prior art are:
(1)参见本发明方法的S1可知,本发明在客户端与服务端每次进行业务交互时,均会记录交互数据信息和交互结果信息;当交互结果信息代表交互异常时,客户端根据与交互结果信息关联的交互数据信息,在服务端中处理对应的业务数据,例如创建业务失败时,自动反向删除服务端中的残留数据。因此,与现有技术中手动清除交互异常时的残留数据相比,本发明能够即时对异常数据进行清除处理,不仅保证了客户端与服务端的数据同步精度,而且保证了单笔业务的完整性。(1) Referring to S1 of the method of the present invention, the present invention records interaction data information and interaction result information each time the client and the server perform business interaction; when the interaction result information represents an interaction exception, the client bases The interaction data information associated with the interaction result information is used to process the corresponding service data in the server. For example, when the service fails to be created, the residual data in the server is automatically reversed. Therefore, compared with the residual data when the interaction abnormality is manually cleared in the prior art, the present invention can immediately clear the abnormal data, which not only ensures the data synchronization precision between the client and the server, but also ensures the integrity of the single service. .
(2)与现有技术中人工通过对比业务数据的方式进行同步相比, 参见本发明方法的S2可知,本发明能够根据指定时间段内的服务端数据,自动对客户端相应的数据进行同步,进一步提高了客户端与服务端的数据同步精度。(2) Compared with the method of manually comparing the service data in the prior art, referring to S2 of the method of the present invention, the present invention can automatically synchronize the corresponding data of the client according to the server data in the specified time period. , further improving the data synchronization accuracy between the client and the server.
(3)参见本发明方法的S2可知,本发明在客户端与服务端交互异常后,还会对异常业务进行二次分析处理,若再次失败,则由人工处理,若成功则不需要人工处理,进而降低人工处理的概率,随之也提高了工作精度,而且能够将数据的安全性和正确性的风险降到最低,保证客户端和服务端数据的一致性。(3) Referring to S2 of the method of the present invention, after the abnormal interaction between the client and the server, the present invention performs secondary analysis processing on the abnormal service, and if it fails again, it is manually processed, and if successful, no manual processing is required. In turn, the probability of manual processing is reduced, and the accuracy of the work is also improved, and the risk of data security and correctness can be minimized to ensure the consistency of data between the client and the server.
附图说明DRAWINGS
图1为本发明实施例中网络数据的同步方法的流程图。FIG. 1 is a flowchart of a method for synchronizing network data according to an embodiment of the present invention.
具体实施方式detailed description
以下结合附图及实施例对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
参见图1所示,本发明实施例中的网络数据的同步方法,包括以下步骤:Referring to FIG. 1 , a method for synchronizing network data in an embodiment of the present invention includes the following steps:
S1:客户端与服务端每进行一次网络业务数据交互时,客户端记录相互关联的交互数据信息和交互结果信息;当交互结果信息代表交互异常时,客户端根据与交互结果信息关联的交互数据信息,在服务端中处理对应的业务数据。S1: When the client and the server perform the network service data interaction, the client records the interaction data information and the interaction result information associated with each other; when the interaction result information represents the interaction abnormality, the client performs the interaction data associated with the interaction result information. Information, processing corresponding business data in the server.
S2:客户端获取指定时间段内的客户端同步数据与服务端同步数据,客户端同步数据为客户端上与服务端交互的所有业务数据,服务端同步数据为服务端上与客户端交互的所有业务数据;根据服务端同步数据,对客户端同步数据进行同步,S2的执行时间可定期执行,即S2可能在S1之前、之后或者S1执行过程中进行。S2: The client obtains the client synchronization data and the server synchronization data in the specified time period, the client synchronization data is all the service data that the client interacts with the server, and the server synchronization data is the server interaction with the client. All service data; according to the server synchronization data, the client synchronization data is synchronized, and the execution time of S2 can be performed periodically, that is, S2 may be performed before, after, or during S1 execution.
下面通过六个实施例详细说明本发明的方法。The method of the present invention will be described in detail below by means of six embodiments.
实施例一:Embodiment 1:
S1中客户端与服务端进行的网络业务交互的类型包括:客户端向服务端请求创建业务,此时S1包括以下步骤:The type of the network service interaction between the client and the server in the S1 includes: the client requests the service to create a service, and the S1 includes the following steps:
S101:客户端按照业务的创建顺序,将第一个需要创建的子业务作为交互业务,转到S102。S101: The client uses the first sub-service that needs to be created as the interactive service according to the order in which the service is created, and the process goes to S102.
S102:客户端向服务端发起交互业务的创建请求(每发送1次创建请求都认为是一次网络业务数据交互)、并记录交互业务的交互数据信息(交互数据信息包括交互业务类型、操作类型和具体的交互业务数据),转到S103。S102: The client initiates a request for creating an interactive service to the server (each time the creation request is considered to be a network service data interaction), and records the interaction data information of the interaction service (the interaction data information includes an interaction service type, an operation type, and Specific interactive business data), go to S103.
S103:客户端将服务端返回的业务创建信息,作为交互业务的交互结果信息(若交互结果信息已存在,则直接覆盖)、并与交互数据信息关联;若交互结果信息为交互业务创建成功,转到S104;若交互结果信息为交互业务创建失败,则代表交互异常,转到S105。S103: The client creates the service creation information returned by the server as the interaction result information of the interaction service (if the interaction result information already exists, directly covers the information), and associates with the interaction data information; if the interaction result information is successfully created for the interaction service, Go to S104; if the interaction result information is that the interaction service creation fails, it represents an interaction exception, and go to S105.
S104:客户端按照业务的创建顺序,将下一个需要创建的子业务作为交互业务,转到S102;若没有下一个需要创建的子业务则代表业务创建成功,S1结束。S104: The client forwards the sub-service to be created as the interactive service to the S102 according to the order in which the service is created. If the sub-service that needs to be created is not the next one, the S1 ends.
S105:客户端获取所有交互业务的交互数据信息后,按照业务的删除顺序(业务的创建顺序的反序),依次在服务端中删除与交互数据信息对应的交互业务数据;例如创建业务A的创建过程为创建A1、A2、A3和A4,本次服务端创建A3失败,则在服务端中依次删除A2和A1数据,此时还可对需要创建的业务进行创建失败标记,以便后期进行人工处理。S105: After the client obtains the interaction data information of all the interaction services, the interaction service data corresponding to the interaction data information is deleted in the server according to the deletion order of the service (the reverse order of the service creation order); for example, the service A is created. The creation process is to create A1, A2, A3, and A4. If the A3 fails to be created on the server, the A2 and A1 data are deleted in the server. In this case, the creation failure flag can be created for the service to be created. deal with.
S1中客户端与服务端进行的网络业务交互的类型包括:客户端向服务端请求删除业务,此时S1包括以下步骤:The type of network service interaction between the client and the server in S1 includes: the client requests the server to delete the service, and the S1 includes the following steps:
S101a:客户端按照业务的删除顺序,将第一个需要删除的子业 务作为交互业务,转到S102a。S101a: The client moves the first sub-service that needs to be deleted as an interactive service according to the deletion order of the service, and the process goes to S102a.
S102a:客户端向服务端发起交互业务的删除请求(每发送1次删除请求都认为是一次业务交互)、并记录交互业务的交互数据信息(交互数据信息包括交互业务类型、操作类型和具体的交互业务数据),转到S103a。S102a: The client initiates a deletion request of the interactive service to the server (the transmission request is considered to be a business interaction every time the deletion request is sent), and records the interaction data information of the interaction service (the interaction data information includes the interaction service type, the operation type, and the specific Interactive business data), go to S103a.
S103a:客户端将服务端返回的业务删除信息,作为交互业务的交互结果信息(若交互结果信息已存在,则直接覆盖)、并与交互数据信息关联;若交互结果信息为交互业务删除成功,转到S104a;若交互结果信息为交互业务删除失败,则代表交互异常,此时可对S101a中需要删除的业务进行删除失败标记,以便后期人工进行处理。S103a: The client deletes the service deletion information returned by the server as the interaction result information of the interaction service (if the interaction result information already exists, directly covers the information), and associates with the interaction data information; if the interaction result information is that the interaction service is deleted successfully, Go to S104a; if the interaction result information is that the interactive service deletion fails, the interaction is abnormal. In this case, the deletion failure flag may be marked on the service to be deleted in S101a, so as to be manually processed later.
S104a:客户端按照业务的删除顺序,将下一个需要删除的子业务作为交互业务,转到S102a;若没有下一个需要删除的子业务则代表业务删除成功,S1结束。S104a: The client sends the next sub-service to be deleted as the interactive service to S102a according to the deletion order of the service; if there is no sub-service to be deleted, the service is deleted successfully, and S1 ends.
实施例二:Embodiment 2:
在实施例一的基础上,S105中客户端在服务端中删除交互业务数据后,还包括以下步骤:客户端判断业务创建失败的次数是否在指定阈值以上,若是,则说明业务已创建多次、但均失败,再次创建有很大概率不会成功,为了提高客户端和服务端的工作效率,此时不在进行业务创建,对该业务进行创建失败标记,结束;若不是,则可再次创建,转到S101。On the basis of the first embodiment, after the client deletes the interactive service data in the server, the method includes the following steps: the client determines whether the number of times the service creation fails is greater than a specified threshold, and if yes, the service has been created multiple times. However, all of them fail. If they are created again, there is a high probability that they will not succeed. In order to improve the working efficiency of the client and the server, the service is not created at this time, the creation failure flag is marked for the service, and the process ends; if not, it can be created again. Go to S101.
实施例三:Embodiment 3:
在实施例一的基础上,S103a中若交互结果信息为交互业务删除失败之后,具体包括以下步骤:客户单判断业务删除失败的次数是否在指定阈值以上,若是,则说明业务已删除多次、但均失败,再次删除有很大概率不会成功,为了提高客户端和服务端的工作效率,此时 不在进行业务删除,对该业务进行删除失败标记,结束;若不是,则可再次删除,转到S101a。On the basis of the first embodiment, if the interaction result information in the S103a is the deletion of the interactive service, the method includes the following steps: the client determines whether the number of times the service deletion fails is greater than a specified threshold, and if yes, the service has been deleted multiple times. However, all of them fail, and there is a high probability that the deletion will not succeed. In order to improve the working efficiency of the client and the server, the service deletion is not performed at this time, and the deletion failure flag is marked for the service, and the process ends; if not, the deletion can be performed again. Go to S101a.
实施例四:Embodiment 4:
S2中根据服务端同步数据,对客户端同步数据进行同步,具体包括以下步骤:对服务端同步数据和客户端同步数据中的相同数据进行过滤后,当监测到服务端同步数据存在、客户端同步数据不存在的数据A时,在客户端上增加数据A;当监测到服务端同步数据不存在、客户端同步数据存在的数据B时,在客户端上删除数据B;当监测到服务端同步数据和客户端同步数据均存在、但不同的数据C和D时,在客户端上的数据D替换为服务端上的数据C。S2 synchronizes the client synchronization data according to the server synchronization data, and specifically includes the following steps: after filtering the same data in the server synchronization data and the client synchronization data, when the server synchronization data is detected, the client exists. When the data A that does not exist in the synchronization data is synchronized, the data A is added on the client; when the data B in which the server synchronization data does not exist and the client synchronization data exists is detected, the data B is deleted on the client; when the server is detected When both the synchronous data and the client synchronization data exist, but different data C and D, the data D on the client is replaced with the data C on the server.
实施例五:Embodiment 5:
在实施例一的基础上,S2还包括以下步骤:按照S1的步骤处理所有存在创建失败标记和删除失败标记的业务,该步骤相当于对之前处理失败的数据进而二次分析处理,若再次失败,则由人工处理,若成功则不需要人工处理,进而降低人工处理的概率,随之也提高了工作精度。On the basis of the first embodiment, S2 further includes the following steps: processing all the services with the creation failure flag and the deletion failure flag according to the step of S1, which is equivalent to the data that has been previously processed and then analyzed twice, if it fails again. , it is manually processed, if it is successful, no manual processing is required, thereby reducing the probability of manual processing, and thus improving the working precision.
实施例六:客户端为SPTN(S Packet Transport Network,软件定义的分组传送网)控制器,服务端为网管服务器。Embodiment 6: The client is an SPTN (S Packet Transport Network) controller, and the server is a network management server.
日间,SPTN控制器与网管服务器每进行一次网络业务数据交互时,SPTN控制器记录相互关联的交互数据信息和交互结果信息;SPTN控制器与网管服务器进行的网络业务交互的类型包括:SPTN控制器向网管服务器请求创建业务和请求删除业务。During the daytime, the SPTN controller records the interrelated interaction data information and the interaction result information when the SPTN controller interacts with the network management server. The types of network service interaction between the SPTN controller and the network management server include: SPTN control. The device requests the NMS server to create a service and request to delete the service.
请求创建业务A时,SPTN控制器按照业务A的创建顺序(子业务A1、A2、A3和A4),将子业务A1作为交互业务。SPTN控制器向网管服务器发起交互业务的创建请求、并记录交互业务的交互数据 信息。网管服务器返回的业务创建信息为业务创建失败,此时SPTN控制器发现交互异常,按照业务的删除顺序A4、A3、A2和A1,在网管服务器中删除已创建交互业务后(此时删除子业务A1)。When requesting to create service A, the SPTN controller uses sub-service A1 as an interactive service according to the order in which service A is created (sub-services A1, A2, A3, and A4). The SPTN controller initiates a request for creating an interactive service to the network management server, and records interactive data information of the interactive service. The service creation information returned by the network management server fails to be created. In this case, the SPTN controller finds that the interaction is abnormal. After the service is deleted, the A7, A3, A2, and A1 are deleted. A1).
SPTN控制器按照上述流程再次创建子业务A1失败2次后(即总共失败次数为3次,指定阈值也为3),对业务A进行创建失败标记。After the SPTN controller creates the sub-service A1 again twice according to the above procedure (that is, the total number of failures is 3 and the specified threshold is also 3), the service A fails to be created.
请求删除业务A时,SPTN控制器按照业务的删除顺序(子业务A4、A3、A2和A1),将第一个需要删除的子业务A4作为交互业务。SPTN控制器向网管服务器发起交互业务的删除请求、并记录交互业务的交互数据信息。网管服务器返回的业务删除信息为业务删除失败,此时SPTN控制器发现交互异常。When requesting to delete service A, the SPTN controller uses the first sub-service A4 to be deleted as the interactive service according to the service deletion order (sub-services A4, A3, A2, and A1). The SPTN controller initiates a deletion request for the interaction service to the network management server, and records the interaction data information of the interaction service. The service deletion information returned by the NMS server is that the service deletion fails. At this time, the SPTN controller finds that the interaction is abnormal.
SPTN控制器按照上述流程再次删除子业务A4失败2次后(即总共失败次数为3次,指定阈值也为3),对业务A进行删除失败标记。After the SPTN controller deletes the sub-service A4 again twice according to the above procedure (that is, the total number of failures is 3 and the specified threshold is also 3), the service A is marked with a deletion failure flag.
日终,获取12小时内SPTN控制器同步数据与网管服务器同步数据,SPTN控制器同步数据为SPTN控制器上与网管服务器交互的所有业务数据,网管服务器同步数据为网管服务器上与SPTN控制器交互的所有业务数据。网管服务器同步数据的获取方式为:调用网管服务器获取全量电路接口,获取到网管全量电路编号和该笔电路最后处理时间,通过SPTN控制器配置,过滤SPTN控制器指定时间段的电路数据。At the end of the day, the synchronization data of the SPTN controller and the network management server are synchronized within 12 hours. The synchronization data of the SPTN controller is all the service data exchanged with the network management server on the SPTN controller. The synchronization data of the network management server is the interaction with the SPTN controller on the network management server. All business data. The synchronization data of the network management server is obtained by calling the network management server to obtain the full circuit interface, obtaining the full circuit number of the network management system and the last processing time of the circuit, and configuring the SPTN controller to filter the circuit data of the specified time period of the SPTN controller.
对网管服务器同步数据和SPTN控制器同步数据进行全量检测,具体分为2个方面:The network management server synchronization data and the SPTN controller synchronization data are fully detected, which are divided into two aspects:
一、根据网管服务器同步数据,对SPTN控制器同步数据进行同步:对网管服务器同步数据和SPTN控制器同步数据中的相同数据进 行过滤后,监测到网管服务器同步数据存在、SPTN控制器同步数据不存在的数据A,以及网管服务器同步数据和SPTN控制器同步数据均存在、但不同的数据C和D;SPTN控制器增加数据A将数据D替换为网管服务器上的数据C。1. Synchronize the synchronization data of the SPTN controller according to the synchronization data of the network management server: after filtering the same data in the synchronization data of the network management server and the synchronization data of the SPTN controller, the synchronization data of the network management server is detected, and the synchronization data of the SPTN controller is not The existing data A, and the network management server synchronization data and the SPTN controller synchronization data exist, but different data C and D; the SPTN controller adds data A to replace the data D with the data C on the network management server.
二、按照日间的业务处理方式处理所有存在创建失败标记和删除失败标记的业务。Second, according to the day-to-day business processing method, all the services with the creation failure flag and the deletion failure flag are processed.
本发明实施例中的网络数据的同步系统,包括设置于客户端上的网络数据交互模块和网络数据同步模块。The network data synchronization system in the embodiment of the present invention includes a network data interaction module and a network data synchronization module disposed on the client.
网络数据交互模块用于:客户端与服务端每进行一次网络业务数据交互时,记录相互关联的交互数据信息和交互结果信息;当交互结果信息代表交互异常时,根据与交互结果信息关联的交互数据信息,在服务端中处理对应的业务数据。The network data interaction module is configured to: when the client and the server perform the network service data interaction, record the interaction data information and the interaction result information; when the interaction result information represents the interaction abnormality, according to the interaction associated with the interaction result information Data information, processing corresponding business data in the server.
客户端与服务端进行的网络业务交互的类型包括:客户端向服务端请求创建业务,此时所述网络数据交互模块具体用于:按照业务的创建顺序,将第一个需要创建的子业务作为交互业务后,进入业务交互流程;The type of the network service interaction between the client and the server includes: the client requests the server to create a service, and the network data interaction module is specifically configured to: according to the service creation order, the first sub-service to be created. After the interactive service, enter the business interaction process;
业务交互流程为:向服务端发起交互业务的创建请求、并记录交互业务的交互数据信息,将服务端返回的业务创建信息,作为交互业务的交互结果信息、并与交互数据信息关联;若交互结果信息为交互业务创建成功,按照业务的创建顺序,将下一个需要创建的子业务作为交互业务后,重新进入业务交互流程;若交互结果信息为交互业务创建失败,则代表交互异常,获取所有交互业务的交互数据信息后,按照业务的删除顺序,在服务端中删除与交互数据信息对应的交互业务数据;判断业务创建失败的次数是否在指定阈值以上,若是,对该业务进行创建失败标记,结束;若不是,重新开始工作。The business interaction process is: initiating a request for creating an interactive service to the server, and recording the interaction data information of the interaction service, and using the service creation information returned by the server as the interaction result information of the interaction service and associating with the interaction data information; The result information is that the interactive service is created successfully. After the next sub-service that needs to be created is used as the interactive service, the business interaction process is re-entered. If the interaction result information fails to be created, the interaction abnormality is obtained. After the interaction data of the interactive service is deleted, the interaction service data corresponding to the interaction data information is deleted in the server according to the deletion order of the service; and the number of times the service creation failure is determined to be above a specified threshold, and if so, the service fails to be marked. , end; if not, start working again.
网络数据同步模块用于:按照网络数据交互模块的工作方式处理所有存在创建失败标记的业务;获取指定时间段内的客户端同步数据与服务端同步数据,客户端同步数据为客户端上与服务端交互的所有业务数据,服务端同步数据为服务端上与客户端交互的所有业务数据;根据服务端同步数据,对客户端同步数据进行同步,同步方式为:当监测到服务端同步数据存在、客户端同步数据不存在的数据A时,在客户端上增加数据A;当监测到服务端同步数据不存在、客户端同步数据存在的数据B时,在客户端上删除数据B;当监测到服务端同步数据和客户端同步数据均存在、但不同的数据C和D时,将客户端上的数据D替换为服务端上的数据C。The network data synchronization module is configured to: process all the services with the creation failure flag according to the working mode of the network data interaction module; acquire the client synchronization data and the server synchronization data in the specified time period, and the client synchronization data is the client and the service. All service data exchanged by the server, the server synchronization data is all service data interacting with the client on the server; according to the server synchronization data, the synchronization data of the client is synchronized, and the synchronization mode is: when the synchronization data of the server is detected When the client synchronizes the data A that does not exist in the data, the data A is added to the client; when the data of the client synchronization data does not exist and the client synchronizes the data, the data B is deleted on the client; when monitoring When the server-side synchronization data and the client-side synchronization data exist, but different data C and D, the data D on the client is replaced with the data C on the server.
需要说明的是:本发明实施例提供的系统在进行模块间通信时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将系统的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that, when the system provided by the embodiment of the present invention performs inter-module communication, only the division of the above functional modules is illustrated. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the system is divided into different functional modules to complete all or part of the functions described above.
进一步,本发明不局限于上述实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围之内。本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。Further, the present invention is not limited to the above embodiments, and those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. These improvements and refinements are also considered as the present invention. Within the scope of protection. The contents not described in detail in the present specification belong to the prior art well known to those skilled in the art.

Claims (10)

  1. 一种网络数据的同步方法,其特征在于,该方法包括以下步骤:A method for synchronizing network data, characterized in that the method comprises the following steps:
    S1:客户端与服务端每进行一次网络业务数据交互时,客户端记录相互关联的交互数据信息和交互结果信息;当交互结果信息代表交互异常时,客户端根据与交互结果信息关联的交互数据信息,在服务端中处理对应的业务数据;S1: When the client and the server perform the network service data interaction, the client records the interaction data information and the interaction result information associated with each other; when the interaction result information represents the interaction abnormality, the client performs the interaction data associated with the interaction result information. Information, processing corresponding business data in the server;
    S2:客户端获取指定时间段内的客户端同步数据与服务端同步数据,客户端同步数据为客户端上与服务端交互的所有业务数据,服务端同步数据为服务端上与客户端交互的所有业务数据;根据服务端同步数据,对客户端同步数据进行同步。S2: The client obtains the client synchronization data and the server synchronization data in the specified time period, the client synchronization data is all the service data that the client interacts with the server, and the server synchronization data is the server interaction with the client. All business data; synchronize the client synchronization data according to the server synchronization data.
  2. 如权利要求1所述的网络数据的同步方法,其特征在于:S1中客户端与服务端进行的网络业务交互的类型包括:客户端向服务端请求创建业务,此时S1包括以下步骤:The method for synchronizing network data according to claim 1, wherein the type of the network service interaction between the client and the server in the S1 includes: the client requests the server to create a service, and the S1 includes the following steps:
    S101:客户端按照业务的创建顺序,将第一个需要创建的子业务作为交互业务,转到S102;S101: The client uses the first sub-service to be created as an interactive service according to the order in which the service is created, and the process goes to S102;
    S102:客户端向服务端发起交互业务的创建请求、并记录交互业务的交互数据信息,转到S103;S102: The client initiates a request for creating an interactive service to the server, and records the interaction data information of the interactive service, and proceeds to S103.
    S103:客户端将服务端返回的业务创建信息,作为交互业务的交互结果信息、并与交互数据信息关联;若交互结果信息为交互业务创建成功,转到S104;若交互结果信息为交互业务创建失败,则代表交互异常,转到S105;S103: The client sends the service creation information returned by the server as the interaction result information of the interaction service, and is associated with the interaction data information; if the interaction result information is successfully created for the interaction service, go to S104; if the interaction result information is created for the interaction service If it fails, it means an interaction exception, go to S105;
    S104:客户端按照业务的创建顺序,将下一个需要创建的子业务作为交互业务,转到S102;S104: The client uses the sub-service to be created as the interactive service according to the order in which the service is created, and the process proceeds to S102.
    S105:客户端获取所有交互业务的交互数据信息后,按照业务的 删除顺序,在服务端中删除与交互数据信息对应的交互业务数据。S105: After obtaining the interaction data information of all the interaction services, the client deletes the interaction service data corresponding to the interaction data information in the server according to the deletion order of the service.
  3. 如权利要求2所述的网络数据的同步方法,其特征在于:S105中客户端在服务端中删除交互业务数据后,还包括以下步骤:客户端判断业务创建失败的次数是否在指定阈值以上,若是,对该业务进行创建失败标记,结束;若不是,转到S101。The method for synchronizing network data according to claim 2, wherein after the client deletes the interactive service data in the server, the method further includes the following steps: the client determines whether the number of times the service creation fails is above a specified threshold. If yes, the creation failure flag is marked for the service, and if not, go to S101.
  4. 如权利要求3所述的网络数据的同步方法,其特征在于:S2还包括以下步骤:按照S1的步骤处理所有存在创建失败标记的业务。The method for synchronizing network data according to claim 3, characterized in that: S2 further comprises the step of processing all the services having the creation failure flag in accordance with the step of S1.
  5. 如权利要求1至4任一项所述的网络数据的同步方法,其特征在于:S2中所述根据服务端同步数据,对客户端同步数据进行同步时,包括以下步骤:当监测到服务端同步数据存在、客户端同步数据不存在的数据A时,在客户端上增加数据A;当监测到服务端同步数据不存在、客户端同步数据存在的数据B时,在客户端上删除数据B;当监测到服务端同步数据和客户端同步数据均存在、但不同的数据C和D时,将客户端上的数据D替换为服务端上的数据C。The method for synchronizing network data according to any one of claims 1 to 4, wherein: when synchronizing the client synchronization data according to the server synchronization data in S2, the method includes the following steps: when the server is monitored When the synchronous data exists and the client synchronizes the data A that does not exist, the data A is added to the client; when the data of the client synchronization data does not exist and the client synchronizes the data, the data B is deleted on the client. When it is detected that both the server synchronization data and the client synchronization data exist, but different data C and D, the data D on the client is replaced with the data C on the server.
  6. 一种网络数据的同步系统,其特征在于:该系统包括设置于客户端上的网络数据交互模块和网络数据同步模块;A synchronization system for network data, characterized in that: the system comprises a network data interaction module and a network data synchronization module arranged on the client;
    网络数据交互模块用于:客户端与服务端每进行一次网络业务数据交互时,记录相互关联的交互数据信息和交互结果信息;当交互结果信息代表交互异常时,根据与交互结果信息关联的交互数据信息,在服务端中处理对应的业务数据;The network data interaction module is configured to: when the client and the server perform the network service data interaction, record the interaction data information and the interaction result information; when the interaction result information represents the interaction abnormality, according to the interaction associated with the interaction result information Data information, processing corresponding business data in the server;
    网络数据同步模块用于:获取指定时间段内的客户端同步数据与服务端同步数据,客户端同步数据为客户端上与服务端交互的所有业务数据,服务端同步数据为服务端上与客户端交互的所有业务数据;根据服务端同步数据,对客户端同步数据进行同步。The network data synchronization module is configured to: acquire client synchronization data and server synchronization data in a specified time period, and client synchronization data is all service data that the client interacts with the server, and the server synchronization data is a server and a client. All business data exchanged by the terminal; synchronization of the client synchronization data according to the server synchronization data.
  7. 如权利要求6所述的网络数据的同步系统,其特征在于:客 户端与服务端进行的网络业务交互的类型包括:客户端向服务端请求创建业务,此时所述网络数据交互模块具体用于:按照业务的创建顺序,将第一个需要创建的子业务作为交互业务后,进入业务交互流程;The network data synchronization system according to claim 6, wherein the type of the network service interaction between the client and the server comprises: the client requests the server to create a service, and the network data interaction module is specifically used by the client. In: according to the order in which the business is created, after the first sub-service that needs to be created is used as an interactive service, the business interaction process is entered;
    业务交互流程为:向服务端发起交互业务的创建请求、并记录交互业务的交互数据信息,将服务端返回的业务创建信息,作为交互业务的交互结果信息、并与交互数据信息关联;若交互结果信息为交互业务创建成功,按照业务的创建顺序,将下一个需要创建的子业务作为交互业务后,重新进入业务交互流程;若交互结果信息为交互业务创建失败,则代表交互异常,获取所有交互业务的交互数据信息后,按照业务的删除顺序,在服务端中删除与交互数据信息对应的交互业务数据。The business interaction process is: initiating a request for creating an interactive service to the server, and recording the interaction data information of the interaction service, and using the service creation information returned by the server as the interaction result information of the interaction service and associating with the interaction data information; The result information is that the interactive service is created successfully. After the next sub-service that needs to be created is used as the interactive service, the business interaction process is re-entered. If the interaction result information fails to be created, the interaction abnormality is obtained. After the interactive data is exchanged, the interactive service data corresponding to the interaction data information is deleted in the server according to the deletion order of the service.
  8. 如权利要求7所述的网络数据的同步系统,其特征在于:所述网络数据交互模块在服务端中删除交互业务数据后,还用于:判断业务创建失败的次数是否在指定阈值以上,若是,对该业务进行创建失败标记,结束;若不是,重新开始工作。The network data synchronization system according to claim 7, wherein the network data interaction module is configured to: determine whether the number of times the service creation failure is above a specified threshold, if the interaction data is deleted in the server, if , create a failure flag for the business, and end; if not, restart the work.
  9. 如权利要求8所述的网络数据的同步系统,其特征在于:所述网络数据同步模块还用于:按照网络数据交互模块的工作方式处理所有存在创建失败标记的业务。The network data synchronization system according to claim 8, wherein the network data synchronization module is further configured to: process all the services with the creation failure flag according to the working mode of the network data interaction module.
  10. 如权利要求6至9任一项所述的网络数据的同步系统,其特征在于:所述网络数据同步模块根据服务端同步数据,对客户端同步数据进行同步时,包括以下步骤:当监测到服务端同步数据存在、客户端同步数据不存在的数据A时,在客户端上增加数据A;当监测到服务端同步数据不存在、客户端同步数据存在的数据B时,在客户端上删除数据B;当监测到服务端同步数据和客户端同步数据均存在、但不同的数据C和D时,将客户端上的数据D替换为服务端上 的数据C。The network data synchronization system according to any one of claims 6 to 9, wherein the network data synchronization module synchronizes the client synchronization data according to the server synchronization data, and includes the following steps: when monitoring When the server synchronous data exists and the client synchronizes the data A that does not exist, the data A is added to the client; when the server synchronous data does not exist and the client synchronizes the data B, the client deletes the data B. Data B; when it is detected that both the server synchronization data and the client synchronization data exist, but different data C and D, the data D on the client is replaced with the data C on the server.
PCT/CN2018/103282 2018-03-28 2018-08-30 Method and system for synchronizing network data WO2019184241A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810264721.1 2018-03-28
CN201810264721.1A CN108494859B (en) 2018-03-28 2018-03-28 Network data synchronization method and system

Publications (1)

Publication Number Publication Date
WO2019184241A1 true WO2019184241A1 (en) 2019-10-03

Family

ID=63316517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103282 WO2019184241A1 (en) 2018-03-28 2018-08-30 Method and system for synchronizing network data

Country Status (2)

Country Link
CN (1) CN108494859B (en)
WO (1) WO2019184241A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
CN106464745A (en) * 2015-06-30 2017-02-22 华为技术有限公司 Dns server, client and data synchronization method
CN106921734A (en) * 2017-02-13 2017-07-04 上海大学 It is a kind of to be cached based on selectivity and synchronous client and server data exchange method
WO2018009094A1 (en) * 2016-07-05 2018-01-11 Общество С Ограниченной Ответственностью "Рм" On-board information device for railway rolling stock

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765100B (en) * 2009-08-14 2012-08-22 北京握奇数据系统有限公司 Method, system and device for realizing mobile office
CN103368919B (en) * 2012-04-06 2016-09-28 中国银联股份有限公司 Security information interaction system based on thin terminal pattern, terminal, server and method
CN103839340B (en) * 2012-11-27 2016-08-10 中国电信股份有限公司 The method and system of e-wallet information synchronization, space transference business platform
CN103605703B (en) * 2013-11-08 2017-07-04 北京奇虎科技有限公司 It is a kind of it is multi-platform between data consistency detection method and system
CN106993015A (en) * 2016-01-21 2017-07-28 阿里巴巴集团控股有限公司 Synchronous method, system and the security server of transaction
CN106130751B (en) * 2016-05-27 2019-05-17 努比亚技术有限公司 A kind of upgrade status data administrator, system and method
CN106572173B (en) * 2016-11-07 2020-06-09 阿里巴巴(中国)有限公司 Configuration information updating method, device and system
CN106603662B (en) * 2016-12-14 2019-04-30 日照职业技术学院 The implementation method of Internet of Things and the comprehensive intelligent platform of internet rete mirabile isomorphism
CN107146607B (en) * 2017-04-10 2021-06-18 北京猎户星空科技有限公司 Method, device and system for correcting interaction information of intelligent equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
CN106464745A (en) * 2015-06-30 2017-02-22 华为技术有限公司 Dns server, client and data synchronization method
WO2018009094A1 (en) * 2016-07-05 2018-01-11 Общество С Ограниченной Ответственностью "Рм" On-board information device for railway rolling stock
CN106921734A (en) * 2017-02-13 2017-07-04 上海大学 It is a kind of to be cached based on selectivity and synchronous client and server data exchange method

Also Published As

Publication number Publication date
CN108494859A (en) 2018-09-04
CN108494859B (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN108600353B (en) Parallel block synchronization method of block chain nodes
CN109688012A (en) A kind of method of alliance's chain node hot standby switch
US20070094467A1 (en) Method for rolling back from snapshot with log
EP1950931A1 (en) Devices, system and method for distributing and synchronizing service data
CN106407030A (en) Failure processing method and system for storage cluster system
CN106911648B (en) Environment isolation method and equipment
CN107357681B (en) Salt-based Zookeeper backup management system and method
WO2017198144A1 (en) Disaster tolerance method for iptv system, and iptv disaster tolerance system
US20080208958A1 (en) Risk assessment program for a directory service
CN110545207A (en) Synchronous automatic intelligent DNS system and configuration method
CN113965578A (en) Method, device, equipment and storage medium for electing master node in cluster
WO2017016196A1 (en) Data synchronization method, apparatus, and system
US20130205162A1 (en) Redundant computer control method and device
CN109257218B (en) Island self-healing method of network system based on SNMP protocol
CN110912979B (en) Method for solving multi-server resource synchronization conflict
CN110716828B (en) Database real-time backup method
WO2019184241A1 (en) Method and system for synchronizing network data
CN110851527B (en) Data synchronization method for main and standby servers
CN113765690A (en) Cluster switching method, system, device, terminal, server and storage medium
WO2022206426A1 (en) Distributed transaction processing method and system, and related device
CN115017235A (en) Data synchronization method, electronic device and storage medium
CN112068978B (en) Method and device for prolonging timing period of VIEW-CHANGE secondary start timer
CN114363350A (en) Service management system and method
CN110830281B (en) Hot standby method and system based on mesh network structure
CN113364633A (en) Container cluster dynamic construction method for high maneuvering environment

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

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

Country of ref document: EP

Kind code of ref document: A1