CN104410632A - Method and device for synchronizing business data - Google Patents

Method and device for synchronizing business data Download PDF

Info

Publication number
CN104410632A
CN104410632A CN201410699181.1A CN201410699181A CN104410632A CN 104410632 A CN104410632 A CN 104410632A CN 201410699181 A CN201410699181 A CN 201410699181A CN 104410632 A CN104410632 A CN 104410632A
Authority
CN
China
Prior art keywords
synchronizing information
class
function
service
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410699181.1A
Other languages
Chinese (zh)
Other versions
CN104410632B (en
Inventor
覃炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201410699181.1A priority Critical patent/CN104410632B/en
Publication of CN104410632A publication Critical patent/CN104410632A/en
Application granted granted Critical
Publication of CN104410632B publication Critical patent/CN104410632B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multi Processors (AREA)

Abstract

The invention discloses a method and a device for synchronizing business data and belongs to the field of internet communication. The method includes that once the fact that a procedure code of running business generates first business data is monitored by a first business server, a class and a function, used for generating the first business data, of the procedure code are acquired; according to the class and the function, first synchronous information corresponding to the first business data is acquired, to be specific, the first synchronous information contains class identification, function identification and parameter type and value of the function; the first synchronous information is transmitted to business servers except the first business server of a business server group corresponding to the business, causing the business servers except the first one execute the class and the function to generate first business data according to the first synchronous information, thus the first business data are synchronized. The device comprises a first acquiring module, a second acquiring module and a sending module. By the use of the method and the device, bandwidth resources are saved, and business data synchronization efficiency is improved.

Description

A kind of method of synchronous service data and device
Technical field
The present invention relates to field of Internet communication, particularly a kind of method of synchronous service data and device.
Background technology
At present, in order to alleviate the pressure that huge visit capacity causes service server, multiple service server is usually used to provide service for a business.When producing business datum on a service server, this service server needs by the synchronizing traffic data of generation in other service servers, to ensure that other service servers can according to this business datum for this business provides service.
Current, prior art provides a kind of method of synchronous service data, comprising: wherein, arranges a data server in advance, and this data server is used for the business datum of storage service.The corresponding multiple service server of this business, when the arbitrary service server in this multiple service server produces business datum, the business datum of generation is sent to data server by this service server, and data server stores this business datum.And when a service server receives the service request for reading this business datum, service server sends for obtaining the request of this business datum to data server, this business datum is obtained from data server, to realize by this synchronizing traffic data in this service server, then the business datum of acquisition is sent to user by this service server again.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
Each generation business datum, all the business datum of generation to be sent to data server, and when needs read business datum, this business datum is obtained again from data server, so can take a large amount of bandwidth resources, and when the capacity of the business datum produced is very large, sends the chronic of business datum cost, cause the efficiency of synchronous service data very low.
Summary of the invention
In order to save bandwidth resources, and improving the efficiency of synchronous service data, the invention provides a kind of method and device of synchronous service data.Described technical scheme is as follows:
A method for synchronous service data, described method comprises:
First service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of described first business datum in described program code;
According to described class and described function, obtain the first synchronizing information that described first business datum is corresponding, described first synchronizing information comprise the class mark of described class, the parameter type of parameter that the function identification of described function, described function comprise and parameter value;
Other each service servers in the service server group that described business is corresponding except described first service server send described first synchronizing information, other each service servers described are made to perform described class and described first business datum of described function generation, to realize synchronously described first business datum according to described first synchronizing information respectively.
A device for synchronous service data, described device comprises:
First acquisition module, for the first service server when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of described first business datum in described program code;
Second acquisition module, for according to described class and described function, obtain the first synchronizing information that described first business datum is corresponding, described first synchronizing information comprise the class mark of described class, the parameter type of parameter that the function identification of described function, described function comprise and parameter value;
Sending module, described first synchronizing information is sent for other each service servers in service server group corresponding to described business except described first service server, other each service servers described are made to perform described class and described first business datum of described function generation, to realize synchronously described first business datum according to described first synchronizing information respectively.
In embodiments of the present invention, the first service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of the first business datum in program code; According to such sum functions, obtain the first synchronizing information that the first business datum is corresponding, the parameter type of the parameter that class mark, the function identification of this function, this function that the first synchronizing information comprises such comprise and parameter value; Other each service servers in the service server group that this business is corresponding except the first service server send the first synchronizing information, make other each service servers perform class sum functions according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum.Because the capacity of the first synchronizing information is very little, the bandwidth sent shared by the first synchronizing information is little, and the speed sending the first synchronizing information is very fast, other each service servers generate the first business datum fast according to the first synchronizing information after receiving the first synchronizing information, so save the network bandwidth, improve the efficiency of synchronous service data.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of a kind of synchronous service data that the embodiment of the present invention 1 provides;
Fig. 2 is the method flow diagram of a kind of synchronous service data that the embodiment of the present invention 2 provides;
Fig. 3 is the apparatus structure schematic diagram of a kind of synchronous service data that the embodiment of the present invention 3 provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
See Fig. 1, embodiments provide a kind of method of synchronous service data, comprising:
Step 101: the first service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of the first business datum in program code;
Step 102: according to such and this function, obtain the first synchronizing information that the first business datum is corresponding, the parameter type of the parameter that class mark, the function identification of this function, this function that the first synchronizing information comprises such comprise and parameter value;
Step 103: other each service servers in the service server group that this business is corresponding except the first service server send the first synchronizing information, make other each service servers perform class sum functions according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum.
Preferably, according to such and this function, obtain the first synchronizing information that the first business datum is corresponding, comprising:
Obtain such class mark and the function identification of this function;
Obtain each parameter that this function comprises, obtain the parameter value of each parameter respectively, and obtain the parameter type of each parameter value;
The class of acquisition is identified, function identification, parameter type and parameter value form the first synchronizing information corresponding to the first business datum.
Preferably, other each service servers in the service server group that this business is corresponding except the first service server send the first synchronizing information, comprising:
Obtain the address of other each service servers service server group corresponding to business except the first service server from Control Server, the address according to other each service servers sends the first synchronizing information respectively to other each service servers; Or,
Send the first synchronizing information, the service identification of this business and the mark of the first service server to Control Server, make Control Server send the first synchronizing information respectively to other each service servers according to the address of other each service servers in service server group corresponding to business except the first service server.
Further, the method also comprises:
Receive the second synchronizing information that the second service server sends, the second synchronizing information comprises class mark, function identification, parameter type and parameter value;
According to the second synchronizing information, perform the function that class corresponding to such mark is corresponding with this function identification, to produce the second business datum.
Preferably, according to the second synchronizing information, perform the function that class corresponding to such mark is corresponding with this function identification, to produce the second business datum, comprising:
According to the class mark that the second synchronizing information comprises, from program code, obtain the class that such mark is corresponding;
According to the function identification that the second synchronizing information comprises, from program code, obtain the function that this function identification is corresponding;
The parameter type comprised according to the second synchronizing information and parameter value, perform the function of class and the acquisition obtained, to produce the second business datum.
In embodiments of the present invention, the first service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of the first business datum in program code; According to such sum functions, obtain the first synchronizing information that the first business datum is corresponding, the parameter type of the parameter that class mark, the function identification of this function, this function that the first synchronizing information comprises such comprise and parameter value; Other each service servers in the service server group that this business is corresponding except the first service server send the first synchronizing information, make other each service servers perform class sum functions according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum.Because the capacity of the first synchronizing information is very little, the bandwidth sent shared by the first synchronizing information is little, and the speed sending the first synchronizing information is very fast, other each service servers generate the first business datum fast according to the first synchronizing information after receiving the first synchronizing information, so save the network bandwidth, improve the efficiency of synchronous service data.
Embodiment 2
Embodiments provide a kind of method of synchronous service data.
At present, in order to alleviate the pressure that huge visit capacity causes service server, multiple service server is usually used to provide service, the corresponding service server group of a business like this for a business.When the service server of in service server group produces business datum, the method that this service server can be provided by the embodiment of the present invention is by other each service servers in this service server group except this service server of the synchronizing traffic data that produces.
Wherein, this business is a corresponding load-balanced server also, for the load pressure of each service server in the service server group that this business balanced is corresponding.When this load-balanced server receives a service request of this business, load-balanced server is according to the loading condition of service server each in service server group, determine the service server that load pressure is minimum, and this service request is transmitted to the service server determined.
See Fig. 2, the method specifically comprises:
Step 201: the first service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of the first business datum in this program code;
Wherein, technical staff, when the program code of the business of writing, marks the class sum functions that can produce business datum in program code, is then stored in by the program code of business in each service server that service server group corresponding to this business comprise.
Wherein, class is a kind of data type in Object-oriented Programming Design, for describing a class things with common trait.The enclosed inside of class function, operationally need class to be instantiated as object, this object has such feature described, and carrys out call function by this object.Such as, " teacher " is exactly a class, and " teacher " this class describes the common trait of all teachers." teacher " this class can encapsulate " preparing lessons " function and " check and prepare lessons this " function.Instantiation is carried out to " teacher " this class and can obtain an object " teacher Li ".Operationally, carry out call function by object " teacher Li " " to prepare lessons " or " check and prepare lessons this ".Wherein, " teacher Li " call function " is prepared lessons " and can be produced business datum, and " teacher Li " call function " is checked and prepared lessons this " and can not produce business datum.
Wherein, class is instantiated as object, in internal memory, opens up a memory space exactly, for storing the data message of this object.Such as, " teacher " this class is instantiated as object " teacher Li ", in internal memory, open up the data message that a memory space stores " teacher Li " exactly, the data message of " teacher Li " can comprise " teacher Li " and teach class name and course name etc.
This step is specially, when the first service server receives the service request of load-balanced server forwarding, run the program code of this business to process this service request, now the program code of the first service server to this business is monitored, when the class monitoring certain mark in program code calls the function of certain mark, judge that such and this function are performed and create the first business datum, from program code, now obtain such and this function.
Wherein, the first service server is the arbitrary service server in service server group corresponding to this business.
Such as, when the first service server receives the service request of load-balanced server forwarding, run the program code of this business 1 to process this service request, now the program code of the first service server to this business 1 is monitored, when the class monitoring certain mark in program code calls the function of certain mark, judge that such and this function are performed and create the first business datum.Suppose that the class of this mark is class " teacher ", the function of this mark is that function " is prepared lessons ".From program code, now obtain such " teacher " and this function " is prepared lessons ".
Step 202: according to the class sum functions obtained, obtain the first synchronizing information that the first business datum is corresponding, the parameter type of the parameter that class mark, the function identification of this function, this function that the first synchronizing information comprises such comprise and parameter value;
Wherein, such class mark can be such class name etc., and the function identification of this function can be the function name etc. of this function.Function comprises at least one parameter, and when running this function, the parameter that function comprises is endowed parameter value, and parameter value has corresponding parameter type, and parameter type can be integer or character type etc.
This step is specially, and obtains such the class mark of class name as such from such.The function identification of function name as this function of this function is obtained from this function.Obtain each parameter that this function comprises, obtain the parameter value of each parameter respectively, and obtain the parameter type of each parameter value.The class of acquisition is identified, function identification, parameter type and parameter value form the first synchronizing information corresponding to the first business datum.
Such as, from such " teacher ", obtain such the class mark of class name " teacher " as such.The function name obtaining this function from this function " is prepared lessons " " is prepared lessons " as the function identification of this function.Obtain this function " to prepare lessons " each parameter comprised, suppose that function " is prepared lessons " and comprise parameter " teacher ", " course " and " number of pages ", the parameter value " 5 pages " of the parameter value " teacher Li " of " teacher ", the parameter value " Chinese language " of parameter " course " and the parameter " number of pages " of getting parms, and the value that gets parms " teacher Li ", " Chinese language " and parameter value " 5 pages " parameter type be integer.The class obtained mark " teacher ", function identification " are prepared lessons ", parameter value " teacher Li " and parameter type integer, parameter value " Chinese language " and parameter type integer thereof and parameter value " 5 pages " and parameter type integer thereof form the first synchronizing information S1 corresponding to the first business datum.
Wherein, after getting the first synchronizing information corresponding to the first business datum by the operation of above-mentioned steps 201 and 202, can as follows 203 operation other each service servers except the first service server that the first synchronizing traffic data is comprised to the service server group that this business is corresponding in.
Step 203: other each service servers in the service server group that this business is corresponding except the first service server send the first synchronizing information, make other each service servers perform such according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum with this function;
Wherein, in a network can also Control Server be set, in Control Server, stores the mark of each service server and the corresponding relation of address that service server group corresponding to this business comprise.Control Server and load-balanced server can be same server, also can be different servers.
Wherein, this step can be realized by mode in following first and second liang, is specially:
The mark of service identification and the first service server that the first, first service server sends this business is to Control Server.Control Server is according to the service identification of this business, from the corresponding relation of service identification and service server group, obtain the service server group that this business is corresponding, according to the mark of the first service server, the mark of other each service servers except the first service server is obtained from this service server group, then according to the mark of other each service servers, the address of other each service servers in service server group except the first service server is obtained from the mark of service server and the corresponding relation of address, and the address of other each service servers is returned to the first service server.First service server, according to the address of other each service servers, sends the first synchronizing information respectively to other each service servers.After other each service servers receive the first synchronizing information, perform such according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum with this function.
Such as, suppose that service server group comprises service server 1,2 and 3, wherein, service server 1 is the first service server.The mark F1 of service identification B1 and the first service server that the first service server 1 sends this business 1 is to Control Server.Control Server is according to the service identification B1 of this business 1, from the corresponding relation of service identification as shown in table 1 and service server group, obtain the service server group (F1 of this business 1 correspondence, F2, F3), according to the mark F1 of the first service server, from this service server group (F1, F2, the mark of the service server 2 and 3 obtained except the first service server F3) is respectively F2 and F3, then according to mark F2 and the F3 of service server 2 and 3, service server group (F1 is obtained from the mark of service server as shown in table 2 and the corresponding relation of address, F2, the address of the service server 2 and 3 F3) except the first service server 1 is respectively URL2 and URL3, and the address URL 2 of service server 2 and 3 and URL3 are returned to the first service server 1.First service server 1, according to the address URL 2 of service server 2 and 3 and URL3, sends the first synchronizing information S1 respectively to service server 2 and 3.After service server 2 and 3 receives the first synchronizing information S1, perform such " teacher " and this function according to the first synchronizing information S1 respectively and " prepare lessons " and produce the first business datum, to realize synchronous first business datum.
Table 1
Service identification Service server group
B1 (F1、F2、F3)
…… ……
Table 2
The mark of service server The address of service server
F1 URL1
F2 URL2
F3 URL3
Second, first service server sends the first synchronizing information, the service identification of this business and the mark of the first service server to Control Server.Control Server is according to the service identification of this business, corresponding service server group is obtained with the corresponding relation of service server group from service identification, according to the mark of the first service server, the mark of other each service servers except the first service server is obtained from the service server group obtained, then according to the mark of other each service servers, from the mark of service server and the corresponding relation of address, the address of other each service servers is obtained.First synchronizing information is sent to other each service servers according to the address of other each service servers by Control Server respectively.After other each service servers receive the first synchronizing information, perform such according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum with this function.
Such as, the first service server 1 sends the first synchronizing information S1, the service identification B1 of this business 1 and the mark F1 of the first service server to Control Server.Control Server is according to the service identification B1 of this business 1, from service identification as shown in table 1 with obtain corresponding service server group (F1 the corresponding relation of service server group, F2, F3), according to the mark F1 of the first service server, from the service server group (F1 obtained, F2, the mark of the service server 2 and 3 obtained except the first service server 1 F3) is respectively F2 and F3, then according to mark F2 and the F3 of service server 2 and 3, the address obtaining service server 2 and 3 from the mark of service server as shown in table 2 and the corresponding relation of address is respectively URL2 and URL3.First synchronizing information S1 is sent to service server 2 and 3 according to the address URL 2 of service server 2 and 3 and URL3 by Control Server respectively.After service server 2 and 3 receives the first synchronizing information S1, perform such " teacher " and this function according to the first synchronizing information S1 respectively and " prepare lessons " and produce the first business datum, to realize synchronous first business datum.
Wherein, when each service servers of other except the first service server comprised for the service server group that this business is corresponding produce business datums, the business datum that synchronously can produce according to the operation of step 201-203 with the first service server.
Wherein, the first service server both can obtain the first synchronizing information when generation the first business datum, and other each service servers except the first service server sending to service server group to comprise the first synchronizing information.Also can as follows 204 and 205 operation receive the second synchronizing information that other service servers send, and generate the second business datum according to the second synchronizing information.
Step 204: the first service server receives the second synchronizing information that the second service server sends, and the second synchronizing information comprises class mark, function identification, parameter type and parameter value;
Wherein, the second service server is the arbitrary service server in service server group corresponding to this business except the first service server.
Such as, first service server 1 receives the second synchronizing information S2 that the second service server 2 sends, the second synchronizing information S2 comprises that class mark " teacher ", function identification " are prepared lessons ", the parameter type integer of parameter value " Mr. Zhang " and correspondence thereof, " mathematics " and the parameter type integer of correspondence thereof and the parameter type integer of parameter value " 10 pages " and correspondence thereof.
Step 205: according to the second synchronizing information, performs the function that class corresponding to such mark is corresponding with this function identification, to produce the second business datum.
Particularly, according to the class mark that the second synchronizing information comprises, from the program code of business, the class that such mark is corresponding is obtained.According to the function identification that the second synchronizing information comprises, from the program code of business, obtain the function that this function identification is corresponding.The parameter type comprised according to the second synchronizing information and parameter value, perform the class sum functions obtained, to produce the second business datum.
Wherein, the class sum functions of acquisition can be performed in the following way, be specially:
The parameter type comprised according to the second synchronizing information and parameter value, by the class instantiation obtained, obtain an object.The parameter type comprise the second synchronizing information and parameter value substitute in the function obtained, and call this function, to produce the second business datum by this object.
Such as, according to class mark " teacher " that the second synchronizing information S2 comprises, from the program code of business 1, the class " teacher " that such mark is corresponding is obtained." prepare lessons " according to the function identification that the second synchronizing information S2 comprises, from the program code of business 1, obtain function corresponding to this function identification " prepare lessons ".The parameter value " Mr. Zhang " comprised according to the second synchronizing information S2 and data type integer thereof, be instantiated as object " Mr. Zhang " by the class " teacher " obtained.The parameter value " mathematics " comprised by second synchronizing information S2 and parameter type integer thereof and parameter value " 10 pages " and parameter type integer thereof are updated to during function " prepares lessons ", carry out call function by object " Mr. Zhang " " to prepare lessons ", making " Mr. Zhang prepares lessons to mathematics and obtains 10 pages of records of preparing lessons ", thus produce the second business datum.
Wherein, when other each service servers except the first service server that the service server group that this business is corresponding comprises receive synchronizing information, can come to generate business datum, to complete synchronous service data according to synchronizing information according to the operation of above-mentioned steps 204 and 205 with the first service server.
In embodiments of the present invention, the first service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of the first business datum in program code; According to such sum functions, obtain the first synchronizing information that the first business datum is corresponding, the parameter type of the parameter that class mark, the function identification of this function, this function that the first synchronizing information comprises such comprise and parameter value; Other each service servers in the service server group that this business is corresponding except the first service server send the first synchronizing information, make other each service servers perform class sum functions according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum.Because the capacity of the first synchronizing information is very little, the bandwidth sent shared by the first synchronizing information is little, and the speed sending the first synchronizing information is very fast, other each service servers generate the first business datum fast according to the first synchronizing information after receiving the first synchronizing information, so save the network bandwidth, improve the efficiency of synchronous service data.
Embodiment 3
See Fig. 3, embodiments provide a kind of device of synchronous service data, comprising:
First acquisition module 301, for the first service server when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of the first business datum in program code;
Second acquisition module 302, for according to such and this function, obtains the first synchronizing information that the first business datum is corresponding, the parameter type of the parameter that class mark, the function identification of this function, this function that the first synchronizing information comprises such comprise and parameter value;
Sending module 303, the first synchronizing information is sent for other each service servers in service server group corresponding to this business except the first service server, make other each service servers perform class sum functions according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum.
Wherein, the second acquisition module 302 comprises:
First acquiring unit, for obtaining such class mark and the function identification of this function;
Second acquisition unit, for obtaining each parameter that this function comprises, obtaining the parameter value of each parameter respectively, and obtaining the parameter type of each parameter value;
Component units, for the class of acquisition being identified, function identification, parameter type and parameter value form the first synchronizing information corresponding to the first business datum.
Wherein, sending module 303 comprises:
First transmitting element, for obtaining the address of other each service servers in service server group corresponding to this business except the first service server from Control Server, the address according to other each service servers sends the first synchronizing information respectively to other each service servers; Or,
Second transmitting element, for sending the first synchronizing information, the service identification of this business and the mark of the first service server to Control Server, Control Server is made to send the first synchronizing information respectively to other each service servers according to the address of other each service servers in service server group corresponding to this business except the first service server.
Further, this device also comprises:
Receiver module, for receiving the second synchronizing information that the second service server sends, the second synchronizing information comprises class mark, function identification, parameter type and parameter value;
Executive Module, for according to the second synchronizing information, performs the function that class sum functions mark corresponding to class mark is corresponding, to produce the second business datum.
Wherein, Executive Module comprises:
3rd acquiring unit, for the class mark comprised according to the second synchronizing information, obtains the class that class mark is corresponding from program code;
4th acquiring unit, for the function identification comprised according to the second synchronizing information, obtains the function that function identification is corresponding from this program code;
Performance element, for the parameter type that comprises according to the second synchronizing information and parameter value, performs the function of class and the acquisition obtained, to produce the second business datum.
In embodiments of the present invention, the first service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of the first business datum in program code; According to such sum functions, obtain the first synchronizing information that the first business datum is corresponding, the parameter type of the parameter that class mark, the function identification of this function, this function that the first synchronizing information comprises such comprise and parameter value; Other each service servers in the service server group that this business is corresponding except the first service server send the first synchronizing information, make other each service servers perform class sum functions according to the first synchronizing information respectively and produce the first business datum, to realize synchronous first business datum.Because the capacity of the first synchronizing information is very little, the bandwidth sent shared by the first synchronizing information is little, and the speed sending the first synchronizing information is very fast, other each service servers generate the first business datum fast according to the first synchronizing information after receiving the first synchronizing information, so save the network bandwidth, improve the efficiency of synchronous service data.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a method for synchronous service data, is characterized in that, described method comprises:
First service server, when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of described first business datum in described program code;
According to described class and described function, obtain the first synchronizing information that described first business datum is corresponding, described first synchronizing information comprise the class mark of described class, the parameter type of parameter that the function identification of described function, described function comprise and parameter value;
Other each service servers in the service server group that described business is corresponding except described first service server send described first synchronizing information, other each service servers described are made to perform described class and described first business datum of described function generation, to realize synchronously described first business datum according to described first synchronizing information respectively.
2. the method for claim 1, is characterized in that, described according to described class and described function, obtains the first synchronizing information that described first business datum is corresponding, comprising:
Obtain the class mark of described class and the function identification of described function;
Obtain each parameter that described function comprises, obtain the parameter value of described each parameter respectively, and obtain the parameter type of described each parameter value;
The class of described acquisition mark, described function identification, described parameter type and described parameter value are formed the first synchronizing information corresponding to described first business datum.
3. the method for claim 1, is characterized in that, other each service servers in the described service server group corresponding to described business except described first service server send described first synchronizing information, comprising:
Obtain the address of other each service servers service server group corresponding to described business except described first service server from Control Server, the address according to other each service servers described sends described first synchronizing information respectively to other each service servers described; Or,
Send described first synchronizing information, the service identification of described business and the mark of described first service server to described Control Server, make described Control Server send described first synchronizing information respectively to other each service servers described according to the address of other each service servers in service server group corresponding to described business except described first service server.
4. the method for claim 1, is characterized in that, described method also comprises:
Receive the second synchronizing information that the second service server sends, described second synchronizing information comprises class mark, function identification, parameter type and parameter value;
According to described second synchronizing information, perform class corresponding to described class mark and function corresponding to described function identification, to produce the second business datum.
5. method as claimed in claim 4, is characterized in that, described according to described second synchronizing information, performs class corresponding to described class mark and function corresponding to described function identification, to produce the second business datum, comprising:
According to the class mark that described second synchronizing information comprises, from program code, obtain the class that described class mark is corresponding;
According to the function identification that described second synchronizing information comprises, from described program code, obtain function corresponding to described function identification;
The parameter type comprised according to described second synchronizing information and parameter value, perform the class of described acquisition and the function of described acquisition, to produce the second business datum.
6. a device for synchronous service data, is characterized in that, described device comprises:
First acquisition module, for the first service server when the program code monitoring operation business produces the first business datum, obtains the class sum functions for generation of described first business datum in described program code;
Second acquisition module, for according to described class and described function, obtain the first synchronizing information that described first business datum is corresponding, described first synchronizing information comprise the class mark of described class, the parameter type of parameter that the function identification of described function, described function comprise and parameter value;
Sending module, described first synchronizing information is sent for other each service servers in service server group corresponding to described business except described first service server, other each service servers described are made to perform described class and described first business datum of described function generation, to realize synchronously described first business datum according to described first synchronizing information respectively.
7. device as claimed in claim 6, it is characterized in that, described second acquisition module comprises:
First acquiring unit, for obtaining class mark and the function identification of described function of described class;
Second acquisition unit, for obtaining each parameter that described function comprises, obtains the parameter value of described each parameter respectively, and obtains the parameter type of described each parameter value;
Component units, for forming the first synchronizing information corresponding to described first business datum by the class of described acquisition mark, described function identification, described parameter type and described parameter value.
8. device as claimed in claim 6, it is characterized in that, described sending module comprises:
First transmitting element, for obtaining the address of other each service servers in service server group corresponding to described business except described first service server from Control Server, the address according to other each service servers described sends described first synchronizing information respectively to other each service servers described; Or,
Second transmitting element, for sending described first synchronizing information, the service identification of described business and the mark of described first service server to described Control Server, described Control Server is made to send described first synchronizing information respectively to other each service servers described according to the address of other each service servers in service server group corresponding to described business except described first service server.
9. device as claimed in claim 6, it is characterized in that, described device also comprises:
Receiver module, for receiving the second synchronizing information that the second service server sends, described second synchronizing information comprises class mark, function identification, parameter type and parameter value;
Executive Module, for according to described second synchronizing information, performs class corresponding to described class mark and function corresponding to described function identification, to produce the second business datum.
10. device as claimed in claim 9, it is characterized in that, described Executive Module comprises:
3rd acquiring unit, for the class mark comprised according to described second synchronizing information, obtains the class that described class mark is corresponding from program code;
4th acquiring unit, for the function identification comprised according to described second synchronizing information, obtains function corresponding to described function identification from described program code;
Performance element, for the parameter type that comprises according to described second synchronizing information and parameter value, performs the class of described acquisition and the function of described acquisition, to produce the second business datum.
CN201410699181.1A 2014-11-26 2014-11-26 A kind of method and device of synchronous service data Active CN104410632B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410699181.1A CN104410632B (en) 2014-11-26 2014-11-26 A kind of method and device of synchronous service data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410699181.1A CN104410632B (en) 2014-11-26 2014-11-26 A kind of method and device of synchronous service data

Publications (2)

Publication Number Publication Date
CN104410632A true CN104410632A (en) 2015-03-11
CN104410632B CN104410632B (en) 2018-01-16

Family

ID=52648230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410699181.1A Active CN104410632B (en) 2014-11-26 2014-11-26 A kind of method and device of synchronous service data

Country Status (1)

Country Link
CN (1) CN104410632B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070271309A1 (en) * 2006-05-22 2007-11-22 Microsoft Corporation Synchronizing structured web site contents
CN101640588A (en) * 2009-08-18 2010-02-03 中兴通讯股份有限公司 Method and system for synchronizing and processing data
CN102184237A (en) * 2011-05-11 2011-09-14 中山市中商港科技有限公司 Service data synchronization method between associated platforms based on network
CN102571695A (en) * 2010-12-16 2012-07-11 腾讯科技(深圳)有限公司 Data synchronization method and game server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070271309A1 (en) * 2006-05-22 2007-11-22 Microsoft Corporation Synchronizing structured web site contents
CN101640588A (en) * 2009-08-18 2010-02-03 中兴通讯股份有限公司 Method and system for synchronizing and processing data
CN102571695A (en) * 2010-12-16 2012-07-11 腾讯科技(深圳)有限公司 Data synchronization method and game server
CN102184237A (en) * 2011-05-11 2011-09-14 中山市中商港科技有限公司 Service data synchronization method between associated platforms based on network

Also Published As

Publication number Publication date
CN104410632B (en) 2018-01-16

Similar Documents

Publication Publication Date Title
US20160301732A1 (en) Systems and Methods for Recording and Replaying of Web Transactions
CN107528872B (en) Data recovery method and device and cloud storage system
CN103428264B (en) The method of data syn-chronization, equipment and system
CN105447046A (en) Distributed system data consistency processing method, device and system
CN104104717A (en) Inputting channel data statistical method and device
CN108694218A (en) A kind of method and apparatus data write-in and read
CN110048896B (en) Cluster data acquisition method, device and equipment
CN103049355B (en) Method and equipment for database system recovery
CN104935660B (en) A kind of cloud program development operating system, method and device
CN105760380A (en) Database query method, device and system
CN103281206A (en) System, method and device for determining connected relation
CN108243079A (en) A kind of method and apparatus that network access is carried out based on VPC
CN106375362A (en) Cache synchronization method and system for distributed server
CN110011952A (en) A kind of method, service cluster and the client of data transmission
CN103825918B (en) Method of data synchronization, terminal device, server and system
CN104657435A (en) Storage management method for application data and network management system
CN105468699B (en) Duplicate removal data statistical approach and equipment
CN106357539A (en) Data acquisition method and equipment
CN103229480A (en) Data processing method, device and client in distributed storage system
CN104461774B (en) Asynchronous replication method, apparatus and system
CN109062820A (en) A kind of software performance testing method and device
CN110020243A (en) Querying method, device, Internet of Things server and the storage medium of internet of things data
CN106326280B (en) Data processing method, device and system
CN108134811A (en) The methods, devices and systems that file destination is distributed or downloaded
CN113836212B (en) Method for automatically generating Json data by database data, readable medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 510655, Guangzhou, Whampoa Avenue, No. 2, creative industrial park, building 3-08,

Applicant before: Guangzhou Huaduo Network Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20150311

Assignee: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Contract record no.: X2021980000151

Denomination of invention: A method and device for synchronizing service data

Granted publication date: 20180116

License type: Common License

Record date: 20210107

EE01 Entry into force of recordation of patent licensing contract