CN106657247A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN106657247A
CN106657247A CN201610933611.0A CN201610933611A CN106657247A CN 106657247 A CN106657247 A CN 106657247A CN 201610933611 A CN201610933611 A CN 201610933611A CN 106657247 A CN106657247 A CN 106657247A
Authority
CN
China
Prior art keywords
message
server node
machine
delaying
mark
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.)
Pending
Application number
CN201610933611.0A
Other languages
Chinese (zh)
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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201610933611.0A priority Critical patent/CN106657247A/en
Publication of CN106657247A publication Critical patent/CN106657247A/en
Pending legal-status Critical Current

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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Abstract

The invention discloses a data processing method and device, relates to the Internet technology field, and solves the problem that a conventional scheme solving repeated processing of the same message reduces the work efficiency of an entire cluster. The method includes the following steps: obtaining messages in a message list by server nodes; according to preset mapping rules, converting message identifiers of the messages and obtaining message mapping values; determining whether the mapping values are equal to identifiers of the server nodes, wherein the identifiers of the different server nodes are unique and not repeated; if the mapping values are equal to the identifiers of the server nodes, processing the messages; and if the mapping values are not equal to the identifiers of the server nodes, discarding the messages. The data processing method and device are applied to message processing of cluster environments.

Description

The method and device of data processing
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method and device of data processing.
Background technology
Under clustered deploy(ment) environment, for the executive mode of message in same message table is usually in cluster:In cluster Multiple server node poll message tables, read message and are processed from message table, but the mode of this poll may Same message is caused to be read by multiple server nodes, the repetition for causing same message is processed.For same message is repeated The problem of process, the solution of prior art mainly has two kinds:A kind of set for the message in same message table is only corresponded to Put in cluster a server node to process;Another kind is to set up cluster controller, and the clothes in cluster are made by broadcast mechanism Business device node mutually informs the message for performing each other, it is ensured that the same message of synchronization only one of which server node process.It is right In above-mentioned the first solution, the message correspondence in same message table only starts a server node and is processed, therefore Lose the performance of cluster efficient process message itself.For above-mentioned second solution, due to adopting broadcast mechanism, each clothes It is in netted communication structure between business device node, this netted communication structure easily causes the blocking of network.To sum up, it is existing Scheme can reduce the high efficiency of whole cluster work.
The content of the invention
In view of the above problems, the present invention provides a kind of method and device of data processing, same to solve existing solution Message repeats the problem that the scheme of process can reduce the high efficiency of whole cluster work.
To solve above-mentioned technical problem, on the one hand, the invention provides a kind of method of data processing, methods described bag Include:
Server node obtains the message in message table;
The message identifier of the message is changed according to default mapping ruler, obtains message mapping value;
Judge whether the message mapping value is identical with the mark of the server node, the mark of different server node Uniquely do not repeat;
If the message mapping value is identical with the mark of the server node, the message is processed;
If the message mapping value is differed with the mark of the server node, the message is abandoned.
Optionally, before the message is processed, methods described is further included:
The message is locked, so that other server nodes can not repeat to obtain the message in cluster.
Optionally, it is described that the message is locked, including:
By the mark that the corresponding latch node information updating of message described in the message table is the server node.
Optionally, the server node obtains the message in message table, including:
Server node obtains message unlocked in message table.
Optionally, methods described is further included:
Judge in web services registry with the presence or absence of the server node of machine of delaying, the cluster is recorded in the web services registry In all server nodes having turned on and all server nodes having turned on status information;
The server node of machine if presence is delayed, deletes the server node and machine of delaying of machine of delaying in the web services registry Server node status information;Also,
By the corresponding locking messages unblock of the server node of the machine of delaying.
Optionally, delay in the web services registry is deleted the shape of the server node of machine and the server node of machine of delaying After state information, methods described is further included:
According to the server node in the web services registry after the server node for deleting machine of delaying, default mapping rule are updated Then.
Optionally, the server node for judging to whether there is machine of delaying in web services registry, including:
Inquire about the renewal time of other server nodes in the web services registry;
Judge whether the renewal time exceedes predetermined threshold value with the difference of current time;
If the difference exceedes predetermined threshold value, server node corresponding with the difference is defined as into the service of the machine of delaying Device node.
Optionally, the corresponding locking messages unblock of the server node by the machine of delaying, including:
The corresponding locking messages of server node of machine of delaying are searched in the message table;
The node lockout message of the corresponding locking messages of server node of the machine of delaying is removed, so that the machine of delaying The corresponding locking messages of server node can be reacquired by the server node of machine of not delaying in cluster.
Optionally, methods described is further included:
Timing updates the renewal time of the correspondence server node in the web services registry.
Optionally, the default mapping ruler of the basis is changed to the message identifier of the message, including:
The message identifier of the message is changed according to Hash hash algorithm.
On the other hand, the invention provides a kind of device of data processing, described device includes:
Acquiring unit, for server node the message in message table is obtained;
Converting unit, for being changed to the message identifier of the message according to default mapping ruler, obtains message and reflects Penetrate value;
Judging unit, for judging whether the message mapping value is identical with the mark of the server node, difference clothes The mark of business device node does not uniquely repeat;
Processing unit, if identical with the mark of the server node for the message mapping value, disappears described in process Breath;
Discarding unit, if differing for the message mapping value and the mark of the server node, abandons described Message.
Optionally, described device is further included:
Plus lock unit, for before the message is processed, locking to the message, so that other server sections in cluster Point can not repeat to obtain the message.
Optionally, described plus lock unit is used for:
By the mark that the corresponding latch node information updating of message described in the message table is the server node.
Optionally, the acquiring unit is used for:
Server node obtains message unlocked in message table.
Optionally, described device is further included:
Delay machine judging unit, for judging web services registry in the presence or absence of machine of delaying server node, the service note The state letter of all server nodes having turned on and all server nodes having turned in the cluster is recorded in volume table Breath;
Unit is deleted, if for the server node that there is machine of delaying, deleting the service of machine of delaying in the web services registry The status information of the server node of device node and machine of delaying;
Unlocking unit, for the corresponding locking messages of the server node of the machine of delaying to be unlocked.
Optionally, described device is further included:
Policy Updates unit, for the server node of machine and the service of machine of delaying of delaying in the web services registry is deleted After the status information of device node, according to the server node in the web services registry after the server node for deleting machine of delaying, Update default mapping ruler.
Optionally, the machine judging unit of delaying, including:
Enquiry module, for inquiring about the web services registry in other server nodes the renewal time;
Judge module, for judging whether the renewal time exceedes predetermined threshold value with the difference of current time;
Determining module, if for the difference exceed predetermined threshold value, will server node corresponding with the difference it is true It is set to the server node of the machine of delaying.
Optionally, the unlocking unit, including:
Searching modul, for the corresponding locking messages of server node for searching machine of delaying in the message table;
Module is removed, for the node lockout message of the corresponding locking messages of server node of the machine of delaying to be removed, So that the corresponding locking messages of server node of the machine of delaying can be reacquired by the server node of machine of not delaying in cluster.
Optionally, described device is further included:
Time updating block, for regularly updating the web services registry in the correspondence server node renewal when Between.
Optionally, the converting unit, is used for:
The message identifier of the message is changed according to Hash hash algorithm.
The method and device of the data processing provided by above-mentioned technical proposal, the present invention, can be obtained by server node Take the message in message table;The message identifier of message is changed according to default mapping ruler, obtains message mapping value;Judge Whether message mapping value is identical with the mark of server node, and the mark of different server node does not uniquely repeat;If message is reflected Penetrate value identical with the mark of server node, then process message;If message mapping value is differed with the mark of server node, Abandon message.Compared with prior art, in cluster environment, each server node according to above-mentioned data processing method only Message after message identifier conversion in message table for the mark of itself is processed, is carried out equivalent to the message in message table Distribution, is assigned to server nodes different in cluster, therefore can avoid same message by different server node The problem of reason.In addition, a server node is not intended to limit in cluster processing between message and the server node in cluster Communication also adopt broadcast mechanism, therefore will not reduce cluster work high efficiency.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of the drawings
By the detailed description for reading hereafter preferred embodiment, various other advantages and benefit is common for this area Technical staff will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred embodiment, and is not considered as to the present invention Restriction.And in whole accompanying drawing, it is denoted by the same reference numerals identical part.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of the method for data processing provided in an embodiment of the present invention;
Fig. 2 shows the flow chart of the method for another kind of data processing provided in an embodiment of the present invention;
Fig. 3 shows a kind of composition frame chart of the device of data processing provided in an embodiment of the present invention;
Fig. 4 shows the composition frame chart of the device of another kind of data processing provided in an embodiment of the present invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here Limited.On the contrary, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
To solve the problems, such as that the existing scheme for solving same message repetition process can reduce the high efficiency of whole cluster work, A kind of method of data processing is embodiments provided, as shown in figure 1, the method includes:
Firstly the need of explanation, the present embodiment is in cluster environment, the message in same message table starts multiple The situation that server node is jointly processed by.The mode of data processing provided in an embodiment of the present invention is applied to each clothes in cluster Business device node, each server node carries out the process of message according to the method for the data processing in cluster, therefore below The method of data processing is illustrated by taking a server node as an example.
101st, server node obtains the message in message table.
Wherein message table is a public message table of multiple server nodes in cluster, and each server node can To manage the message table, for the storage location embodiment of the present invention of message table is not restricted.Server node is obtaining message During message in table, obtain particular by the message in traversal message table.
It should be noted that record has the state of message, the type of message, the message identifier of message, message in message table Description information etc..It should be noted that the form of message identifier can be the letter shape such as the digital form such as 0,1,2 or a, b, c Formula, or other character string forms etc..
102nd, the message identifier of message is changed according to default mapping ruler, obtains message mapping value.
For all of message in message table, default mapping ruler is disappearing for many-to-one mapping ruler, i.e. message Breath mark and message mapping value are many-to-one relations.Specific example is given below to illustrate:Hypothesis has 10 message, and The corresponding message identifier of each message is denoted as respectively 1,2,3,4,5,6,7,8,9,10, it is assumed that after by default mapping ruler, The message mapping value obtained after 10 message identifier conversions is respectively a, a, b, b, b, c, c, c, a, b, can from transformation result A message mapping value is corresponded to after a message identifier conversion, the message mapping value after multiple message identifiers conversions can be Identical.
103rd, judge whether message mapping value is identical with the mark of server node.
Before judging whether message mapping value is identical with the mark of server node, need first to obtain server node Mark, the mark of specific server node can be obtained from web services registry.Record has service wherein in web services registry The mark of device node and other information related to server node.It should be noted that in actual applications can also be from Other are able to record that in the memory space of the mark of server node the mark for obtaining server node.It should be noted that collection The mark of different server node does not uniquely repeat in group, and the mark of server node is self-defining identity mark in the present embodiment Know.The such as mark of different server node can be the alphabetical form such as the digital form such as 0,1,2 or a, b, c, or Other character string forms etc..The mark of specific server node is according to presetting message mapping ruler and message identifier What form determined, the form of the mark of server node and the form of message identifier can be identicals, or different.
After the mark of server node is got, after the mark and message identifier of the server node for getting are turned To message mapping value compare, judge whether both identical.
If the 104, message mapping value is identical with the mark of server node, message is processed.
Process message while, can by message table to should message message status be changed to " processing " be similar to Can be identified for that identification information of the message in processed.After message has been processed, it will usually by message table the message it is right The record information answered is deleted, in case being processed again, or can also be processed etc. by the status indicator of the message for having processed.
If the 105, the mark of message mapping value and server node is differed, message is abandoned.
The disappearance that message is not result in the message in message table is abandoned, therefore other server nodes still can be obtained Arrive.
The method of data processing provided in an embodiment of the present invention, can be obtained the message in message table by server node; The message identifier of message is changed according to default mapping ruler, obtains message mapping value;Judge message mapping value whether with The mark of server node is identical, and the mark of different server node does not uniquely repeat;If message mapping value and server node Mark it is identical, then process message;If message mapping value is differed with the mark of server node, message is abandoned.With it is existing Technology is compared, and in cluster environment, each server node is according to the method for above-mentioned data processing only to message in message table Message after mark conversion for the mark of itself is processed, and is distributed equivalent to the message in message table, is assigned to Different server node in cluster, therefore same message can be avoided by the problem of different server node process.In addition, The communication between server node during a server node process message and cluster are not intended to limit in cluster is not also adopted With broadcast mechanism, therefore the high efficiency of cluster work will not be reduced.
Further, for Fig. 1 steps 104, when server node was locked before message is processed to message.It is specific right Message lock process be:Being by the corresponding latch node information updating of message to be processed by server node in message table should The mark of server node.When carrying out locking the message that can make other server nodes in acquisition message table to message, Acquisition that no longer information for having locked is repeated, the conversion of message identifier and by message mapping value and server node The process that mark is compared, it is possible to reduce the futile work of other server nodes, it is also possible to improve the work of whole cluster Efficiency.
Further, based on the addition to message locking procedure, another embodiment of the present invention is given at a kind of data The method of reason, as shown in Fig. 2 the method includes:
201st, server node obtains message unlocked in message table.
Server node judges whether message locks according to the latch node information of message in message table.Specifically, service Device can check first the corresponding latch node information of message, if in latch node information not in the message in obtaining message table The mark of any server node in the cluster is deposited, i.e., the corresponding latch node information of the message is sky, then it represents that the message is not Lock, i.e., the message also not by any server node in cluster read or the message message identifier conversion after disappear Breath mapping value is differed with the mark of the server node for reading the message.
202nd, the message identifier of message is changed according to Hash hash algorithm, obtains message mapping value.
Changed according to the message identifier of default Hash function pairs message, specific default Hash functions can be selected Select direct remainder method, multiplication and round method, middle square method, jackknife method, random number method etc..In the default Hash functions of specific configuration When need the scope of mark of scope and all server nodes having turned on reference to message identifier to be configured.Each disappears A corresponding message mapping value is can only obtain after the message identifier conversion of breath, but can be obtained after the conversion of multiple message identifiers Identical message mapping value.
203rd, judge whether message mapping value is identical with the mark of server node.
The implementation of this step is identical with the implementation of Fig. 1 steps 103, and here is omitted.
If the 204, message mapping value is identical with the mark of server node, message is processed.
The implementation of this step is identical with the implementation of Fig. 1 steps 104, and here is omitted.
If the 205, the mark of message mapping value and server node is differed, message is abandoned.
Further, in actual application, server node in cluster it is possible that the situation of machine of delaying, and when clothes Business device node occurs after the machine of delaying, and may not be had been processed or also do not processed by the message that the server node of the machine of delaying is locked. Exactly because message is locked, so other server nodes can not be processed the message for locking, so may result in Can not be processed all the time by the message that the server node of the machine of delaying is locked.In order to avoid it is above-mentioned the occurrence of, need each to take Business device node inquires about the running status of other server nodes during its operation, determines whether the server of the machine of delaying Node.Specifically query script is:The renewal time of other server nodes, remembers in web services registry in inquiry web services registry The status information of all server nodes having turned on and all server nodes having turned in record cluster, specific service Record has mark, the address of service of server node, the service name of server node, the renewal of server node in registration table Time etc.;Judge whether each renewal time exceedes predetermined threshold value with the difference of current time;If difference exceedes predetermined threshold value, Server node corresponding with difference is then defined as the server node of the machine of delaying.
It should be noted that after each server node is opened, can be registered in web services registry, and it is fixed The corresponding renewal time in Shi Gengxin web services registries, enter the current time of update action as the renewal time when updating every time Row updates.Predetermined threshold value is typically set at the time interval that server node updates the renewal time in correspondence registration table, if poor Value exceedes predetermined threshold value and represents that server node updates the renewal time in web services registry without timing, then can estimate clothes There is machine failure of delaying in business device node.
Further, if server node inquires about the server node for finding there is machine of delaying in web services registry, can Delete the status information of delay in the web services registry server node of machine and the server node of machine of delaying;Also, by the machine of delaying The corresponding locking messages unblock of server node, so that the server node of machine of not delaying in cluster is reacquired and processed by the machine of delaying Server node lock message.
It is to the implementation of the corresponding locking messages unblock of server node of the machine of delaying specifically:Search in message table Delay the corresponding locking messages of server node of machine;By the node lockout message of the corresponding locking messages of the server node of the machine of delaying Remove, node lockout message delay machine server node mark.If in addition, the corresponding message status of message of locking are for just Processing, then needing to be revised as untreated.
Further, delay in web services registry is deleted the state of the server node of machine and the server node of machine of delaying After information, the server node in the web services registry after the server node for deleting machine of delaying is needed, update default Mapping ruler.It is mark that the message identifier of message is converted to different server nodes due to presetting mapping ruler, deletes Delay after the server node of machine, the quantity of the server node that correspondence can process message changes, that is, the clothes having turned on The mark scope of business device node changes, if using original default mapping ruler, it is possible that message identifier conversion Message mapping value afterwards is the mark of the server node of the machine of delaying, therefore is reflected in order to avoid there is the message after message identifier is changed The situation of the mark of the server node that value is machine of delaying is penetrated, needs to update default mapping ruler, make the message mapping value be not in Delay machine server node mark.It should be noted that the mark of the server node in web services registry is according to current The dynamic adjustment of the server node included in web services registry.Provide specific example to illustrate:If starting service note By 5 server nodes in volume table, the mark of server node can be 0,1,2,3,4;And ought wherein be designated 3 server Node is delayed after machine, and it is 0,1,2,3 to adjust the server node for obtaining;0,1,2 server node is designated before wherein adjusting Mark do not become, and the mark of server node for being designated 4 before adjusting just becomes for 3.
Further, as the realization to the various embodiments described above, another embodiment of the embodiment of the present invention additionally provides one The device of data processing is planted, for realizing the method described in above-mentioned Fig. 1 and Fig. 2.As shown in figure 3, the device includes:Acquiring unit 301st, converting unit 302, mark judging unit 303, processing unit 304 and discarding unit 305.
Acquiring unit 301, for server node the message in message table is obtained.
Wherein message table is a public message table of multiple server nodes in cluster, and each server node can To manage the message table, for the storage location embodiment of the present invention of message table is not restricted.Server node is obtaining message During message in table, obtain particular by the message in traversal message table.
Converting unit 302, for changing to the message identifier of message according to default mapping ruler, obtains message mapping Value.
For all of message in message table, default mapping ruler is disappearing for many-to-one mapping ruler, i.e. message Breath mark and message mapping value are many-to-one relations.
Mark judging unit 303, for judging whether message mapping value is identical with the mark of server node, difference service The mark of device node does not uniquely repeat.
Before judging whether message mapping value is identical with the mark of server node, need first to obtain server node Mark, the mark of specific server node can be obtained from web services registry.Record has service wherein in web services registry The mark of device node and other information related to server node.It should be noted that in actual applications can also be from Other are able to record that in the memory space of the mark of server node the mark for obtaining server node.It should be noted that collection The mark of different server node does not uniquely repeat in group.
After the mark of server node is got, after the mark and message identifier of the server node for getting are turned To message mapping value compare, judge whether both identical.
Processing unit 304, if identical with the mark of server node for message mapping value, processes message.
Process message while, can by message table to should message message status be changed to " processing " be similar to Can be identified for that identification information of the message in processed.After message has been processed, it will usually by message table the message it is right The record information answered is deleted, in case being processed again, or can also be processed etc. by the status indicator of the message for having processed.
Discarding unit 305, if differing with the mark of server node for message mapping value, abandons message.
Further, as shown in figure 4, device is further included:
Plus lock unit 306, for before message is processed, locking to message, so that other server nodes are not in cluster Message can repeatedly be obtained.
Further, plus lock unit is used for:
By the mark that the corresponding latch node information updating of message in message table is server node.
Message is carried out locking can make other server nodes in the message in obtaining message table, no longer to adding Acquisition that the information of lock is repeated, the conversion of message identifier and the mark of message mapping value and server node is compared To process, it is possible to reduce the futile work of other server nodes, it is also possible to improve the operating efficiency of whole cluster.
Further, acquiring unit 301 is used for:
Server node obtains message unlocked in message table.
Server node judges whether message locks according to the latch node information of message in message table.Specifically, service Device can check first the corresponding latch node information of message, if in latch node information not in the message in obtaining message table The mark of any server node in the cluster is deposited, i.e., the corresponding latch node information of the message is sky, then it represents that the message is not Lock, i.e., the message also not by any server node in cluster read or the message message identifier conversion after disappear Breath mapping value is differed with the mark of the server node for reading the message.
Further, as shown in figure 4, device is further included:
Delay machine judging unit 307, for judging web services registry in the presence or absence of machine of delaying server node, service registry In table in record clustering all server nodes having turned on and all server nodes having turned on status information;
Unit 308 is deleted, if for the server node that there is machine of delaying, deleting the server of machine of delaying in web services registry The status information of the server node of node and machine of delaying;
Unlocking unit 309, for the corresponding locking messages of the server node of the machine of delaying to be unlocked.
Further, as shown in figure 4, device is further included:
Policy Updates unit 310, for the server node of machine and the service of machine of delaying of delaying in web services registry is deleted After the status information of device node, according to the server node in the web services registry after the server node for deleting machine of delaying, Update default mapping ruler.
Further, as shown in figure 4, machine judging unit 307 of delaying, including:
Enquiry module 3071, for inquiring about web services registry in other server nodes the renewal time;
Judge module 3072, for judging whether the renewal time exceedes predetermined threshold value with the difference of current time;
Determining module 3073, if exceeding predetermined threshold value for difference, server node corresponding with difference is defined as Delay the server node of machine.
After each server node is opened, can be registered in web services registry, and timing more new demand servicing note The corresponding renewal time in volume table, it is updated the current time of update action as the renewal time when updating every time.It is default Threshold value is typically set at the time interval that server node updates the renewal time in correspondence registration table, if difference exceedes default threshold Value represents that server node updates the renewal time in web services registry without timing, then can estimate server node appearance Delay machine failure.
Further, as shown in figure 4, unlocking unit 309, including:
Searching modul 3091, for the corresponding locking messages of server node for searching machine of delaying in message table;
Module 3092 is removed, for the node lockout message of the corresponding locking messages of the server node of the machine of delaying to be removed, So that the corresponding locking messages of the server node of machine of delaying can be reacquired by the server node of machine of not delaying in cluster.
Further, as shown in figure 4, device is further included:
Time updating block 311, for regularly updating the renewal time of corresponding server node in web services registry.
Further, as shown in figure 4, converting unit 302, is used for:
The message identifier of message is changed according to Hash hash algorithm.
The device of data processing provided in an embodiment of the present invention, can be obtained the message in message table by server node; The message identifier of message is changed according to default mapping ruler, obtains message mapping value;Judge message mapping value whether with The mark of server node is identical, and the mark of different server node does not uniquely repeat;If message mapping value and server node Mark it is identical, then process message;If message mapping value is differed with the mark of server node, message is abandoned.With it is existing Technology is compared, and in cluster environment, each server node is according to the method for above-mentioned data processing only to message in message table Message after mark conversion for the mark of itself is processed, and is distributed equivalent to the message in message table, is assigned to Different server node in cluster, therefore same message can be avoided by the problem of different server node process.In addition, The communication between server node during a server node process message and cluster are not intended to limit in cluster is not also adopted With broadcast mechanism, therefore the high efficiency of cluster work will not be reduced.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, without the portion described in detail in certain embodiment Point, may refer to the associated description of other embodiment.
It is understood that said method and the correlated characteristic in device can be referred to mutually.In addition, in above-described embodiment " first ", " second " etc. be, for distinguishing each embodiment, and not represent the quality of each embodiment.
Those skilled in the art can be understood that, for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be described here.
Provided herein algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment. Various general-purpose systems can also be used together based on teaching in this.As described above, construct required by this kind of system Structure be obvious.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use it is various Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this Bright preferred forms.
In specification mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand one or more in each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The more features of feature that the application claims ratio of shield is expressly recited in each claim.More precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as the separate embodiments of the present invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Unit or component are combined into a module or unit or component, and can be divided in addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit is excluded each other, can adopt any Combine to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification is (including adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can it is identical by offers, be equal to or the alternative features of similar purpose carry out generation Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection appoint One of meaning can in any combination mode using.
The present invention all parts embodiment can be realized with hardware, or with one or more processor operation Software module realize, or with combinations thereof realization.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) are realizing denomination of invention according to embodiments of the present invention (such as data processing Device) in some or all parts some or all functions.The present invention is also implemented as performing institute here (for example, computer program and computer program are produced for some or all equipment of the method for description or program of device Product).Such program for realizing the present invention can be stored on a computer-readable medium, or can have one or more The form of signal.Such signal can be downloaded from internet website and obtained, or be provided on carrier signal, or to appoint What other forms is provided.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability Field technique personnel can design without departing from the scope of the appended claims alternative embodiment.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame Claim.

Claims (10)

1. a kind of method of data processing, it is characterised in that methods described includes:
Server node obtains the message in message table;
The message identifier of the message is changed according to default mapping ruler, obtains message mapping value;
Judge whether the message mapping value is identical with the mark of the server node, and the mark of different server node is unique Do not repeat;
If the message mapping value is identical with the mark of the server node, the message is processed;
If the message mapping value is differed with the mark of the server node, the message is abandoned.
2. method according to claim 1, it is characterised in that before the message is processed, methods described is further wrapped Include:
The message is locked, so that other server nodes can not repeat to obtain the message in cluster.
3. method according to claim 2, it is characterised in that described that the message is locked, including:
By the mark that the corresponding latch node information updating of message described in the message table is the server node.
4. method according to claim 2, it is characterised in that the server node obtains the message in message table, bag Include:
Server node obtains message unlocked in message table.
5. method according to claim 2, it is characterised in that methods described is further included:
Judge in web services registry with the presence or absence of the server node of machine of delaying, institute in the cluster is recorded in the web services registry There is the status information of the server node having turned on and all server nodes having turned on;
The server node of machine if presence is delayed, deletes the server node of machine of delaying in the web services registry and the clothes of machine of delaying The status information of business device node;Also,
By the corresponding locking messages unblock of the server node of the machine of delaying.
6. method according to claim 5, it is characterised in that the server section of machine of delaying in the web services registry is deleted After the status information of the server node of point and machine of delaying, methods described is further included:
According to the server node in the web services registry after the server node for deleting machine of delaying, default mapping ruler is updated.
7. method according to claim 5, it is characterised in that with the presence or absence of the clothes of machine of delaying in the judgement web services registry Business device node, including:
Inquire about the renewal time of other server nodes in the web services registry;
Judge whether the renewal time exceedes predetermined threshold value with the difference of current time;
If the difference exceedes predetermined threshold value, server node corresponding with the difference is defined as into the server section of the machine of delaying Point.
8. method according to claim 5, it is characterised in that the corresponding locking messages of the server node by the machine of delaying Unblock, including:
The corresponding locking messages of server node of machine of delaying are searched in the message table;
The node lockout message of the corresponding locking messages of server node of the machine of delaying is removed, so that the service of the machine of delaying The corresponding locking messages of device node can be reacquired by the server node of machine of not delaying in cluster.
9. method according to claim 5, it is characterised in that methods described is further included:
Timing updates the renewal time of the correspondence server node in the web services registry.
10. a kind of device of data processing, it is characterised in that described device includes:
Acquiring unit, for server node the message in message table is obtained;
Converting unit, for changing to the message identifier of the message according to default mapping ruler, obtains message mapping value;
Mark judging unit, for judging whether the message mapping value is identical with the mark of the server node, difference clothes The mark of business device node does not uniquely repeat;
Processing unit, if identical with the mark of the server node for the message mapping value, processes the message;
Discarding unit, if differing for the message mapping value and the mark of the server node, abandons the message.
CN201610933611.0A 2016-10-31 2016-10-31 Data processing method and device Pending CN106657247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610933611.0A CN106657247A (en) 2016-10-31 2016-10-31 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610933611.0A CN106657247A (en) 2016-10-31 2016-10-31 Data processing method and device

Publications (1)

Publication Number Publication Date
CN106657247A true CN106657247A (en) 2017-05-10

Family

ID=58820438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610933611.0A Pending CN106657247A (en) 2016-10-31 2016-10-31 Data processing method and device

Country Status (1)

Country Link
CN (1) CN106657247A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595574A (en) * 2018-04-16 2018-09-28 上海达梦数据库有限公司 Connection method, device, equipment and the storage medium of data-base cluster
CN109254880A (en) * 2017-07-12 2019-01-22 苏宁云商集团股份有限公司 A kind of method and device handling database delay machine

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414756A (en) * 2013-07-18 2013-11-27 华为技术有限公司 Task distributing method and distributing node and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414756A (en) * 2013-07-18 2013-11-27 华为技术有限公司 Task distributing method and distributing node and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254880A (en) * 2017-07-12 2019-01-22 苏宁云商集团股份有限公司 A kind of method and device handling database delay machine
CN109254880B (en) * 2017-07-12 2022-07-19 苏宁易购集团股份有限公司 Method and device for processing database downtime
CN108595574A (en) * 2018-04-16 2018-09-28 上海达梦数据库有限公司 Connection method, device, equipment and the storage medium of data-base cluster
CN108595574B (en) * 2018-04-16 2021-11-02 上海达梦数据库有限公司 Database cluster connection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US8290900B2 (en) Apparatus, and associated method, for synchronizing directory services
US8302157B2 (en) Method and system for generating user group identifiers
US7592906B1 (en) Network policy evaluation
US7072958B2 (en) Identifying network management policies
US20080104277A1 (en) Method, system, client and server for implementing data sync
EP2102765A2 (en) Automatic discovery and reconfiguration of dynamic topology changes in directory services
US10637875B2 (en) Automated classification of domain names resolved by malware
IL292776A (en) Asset search and discovery system using graph data structures
EP2180740A1 (en) Method and device for instantiating management object of management tree in terminal device
US7194472B2 (en) Extending role scope in a directory server system
US20080133533A1 (en) Migrating Credentials to Unified Identity Management Systems
Hesselman et al. Increasing DNS security and stability through a control plane for top-level domain operators
CN106657247A (en) Data processing method and device
US10171415B2 (en) Characterization of domain names based on changes of authoritative name servers
US8554889B2 (en) Method, system and apparatus for managing computer identity
EP2088808A1 (en) Methods and apparatuses for processing and managing subscriber data in telecommunication network
US20080133587A1 (en) Extending Existing Data within a Directory Service
CN104468862A (en) IP address binding method, device and system
Zatloukal et al. Family trees: an ordered dictionary with optimal congestion, locality, degree, and search time
US20160226711A1 (en) Inference-based network route control
CN103902554B (en) Data access method and device
CN107181715B (en) Service checking method and device
JP2018174469A (en) Dns server, blacklist generation method in dns server, blacklist generation program for use in dns server
CN109660390B (en) Information updating method and system based on external inquiry DNS server
CN105610809A (en) Method, device and system for network access control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication