CN103475520A - Service processing control method and device in distribution network - Google Patents

Service processing control method and device in distribution network Download PDF

Info

Publication number
CN103475520A
CN103475520A CN2013104092012A CN201310409201A CN103475520A CN 103475520 A CN103475520 A CN 103475520A CN 2013104092012 A CN2013104092012 A CN 2013104092012A CN 201310409201 A CN201310409201 A CN 201310409201A CN 103475520 A CN103475520 A CN 103475520A
Authority
CN
China
Prior art keywords
affairs
identification information
processing
data
network element
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
CN2013104092012A
Other languages
Chinese (zh)
Other versions
CN103475520B (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.)
Juhaokan Technology Co Ltd
Original Assignee
Qingdao Hisense Media 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 Qingdao Hisense Media Network Technology Co Ltd filed Critical Qingdao Hisense Media Network Technology Co Ltd
Priority to CN201310409201.2A priority Critical patent/CN103475520B/en
Publication of CN103475520A publication Critical patent/CN103475520A/en
Application granted granted Critical
Publication of CN103475520B publication Critical patent/CN103475520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a service processing control method and device in a distribution network. The service processing control method comprises the steps that identification information is distributed to service to be processed and the identification information is sent to network elements which processes the service; monitoring is conducted on the processing state of the service; when the fact that the service is in the processing end state is monitored, persistence processing is conducted on the data submitted by the network elements which process the service. Due to the fact that united management is conducted on the service processing process and united processing is conducted on the data submitted by the network elements which process the service, the integrity and unity of the data can be guaranteed without transmission of the data by the network elements, the processing complicity of each network element is reduced, and the processing capability is improved.

Description

Transaction control method and device in a kind of distributed network
Technical field
The present invention relates to the distributing network techniques field, relate in particular to transaction control method and device in a kind of distributed network.
Background technology
The cloud platform is taked distributed network architecture usually, by the network element be positioned on different server, is built.A concrete operation flow needs a plurality of network elements to work in coordination with usually.
In order to keep the complete unification of data, a kind of processing scheme is the transmission that keeps data.From the initial network element that participates in Business Processing, constantly accumulate the data of each network element and it is passed to next network element, until participate in the final persistence processing that last network element of Business Processing carries out data.Although this processing scheme has guaranteed the complete unification of data, but increased the processing complexity of each network element, and each network element not only needs to be concerned about the service logic of oneself, the data that also need to pay close attention to the upstream transmission and come and preparation are to the data in downstream, in addition, the cumulative rises of packet the burden of Internet Transmission, cause disposal ability low.
Summary of the invention
The purpose of this invention is to provide office management method and device in a kind of distributed network, the problem existed to solve existing implementation.
The objective of the invention is to be achieved through the following technical solutions:
Transaction control method in a kind of distributed network comprises:
For pending affairs allocation identification information, and described identification information is sent to the network element of processing described affairs, in order to process after the network elements at different levels of these affairs are processed these affairs, this network element is processed to the data preservation associated with this identification information that these affairs obtain;
By the spatial cache that reads the state information for preserving affairs, the treatment state of described affairs is monitored;
When processing done state information corresponding to the identification information that reads described affairs, the data of the described identification information association that the network elements at different levels of processing described affairs are preserved are carried out the persistence processing.
The method that the embodiment of the present invention provides, the transaction process is carried out to unified management, and the data that the network element of processing transactions is submitted to are carried out unified processing, the transmission that does not need each network element to carry out data can guarantee the complete unification of data, reduce the processing complexity of each network element, improved disposal ability.
Below respectively the preferred implementation of above each step is described.It should be pointed out that these preferred implementations can apply separately, also can fit applications.
Above-mentioned identification information is sent to the network element of processing above-mentioned affairs, its specific implementation can be both that identification information is sent to the initial network element of processing above-mentioned affairs, in the transaction process, this identification information transmits step by step between the network elements at different levels of processing these affairs.Can be also that identification information is sent to the network elements at different levels of processing above-mentioned affairs.
The specific implementation that the treatment state of above-mentioned affairs is monitored is relevant with the status information storage locations of above-mentioned affairs.If process the network element of above-mentioned affairs by the state information of these affairs be kept at shared buffer memory space associated with above-mentioned identification information, by reading the monitoring state of this shared buffer memory space to these affairs.If process the network elements at different levels of above-mentioned affairs, the state information of these affairs and above-mentioned identification information are kept at respectively in corresponding spatial cache, by reading the spatial cache that above-mentioned network element at different levels is corresponding, the treatment state of these affairs are monitored.
It is relevant that the data of the above-mentioned identification information association that the network elements at different levels of processing above-mentioned affairs are preserved are carried out the position that the specific implementation of persistence processing stores with data.If above-mentioned network element at different levels is processed data the be kept at above-mentioned shared buffer memory space associated with this identification information that these affairs obtain, the specific implementation that the data of this identification information association of network elements at different levels of processing these affairs being preserved are carried out the persistence processing can be: the data of obtaining this identification information association from this shared buffer memory space; The data of obtaining are carried out to the persistence processing.If above-mentioned network element at different levels is processed, data that these affairs obtain and this identification information are associated respectively is kept at corresponding spatial cache, and the specific implementation that the data of this identification information association of network elements at different levels of processing these affairs being preserved are carried out the persistence processing can be: the data of obtaining respectively this identification information association from above-mentioned network elements at different levels corresponding spatial cache; The data of obtaining are carried out to the persistence processing.
Preferably, above-mentioned shared buffer memory space comprises stack internal memory and heap memory.If process the network element of above-mentioned affairs by the state information of these affairs be kept at shared buffer memory space associated with above-mentioned identification information, so, the state information of these affairs is associated with above-mentioned identification information to be kept in the stack internal memory in this shared buffer memory space.If above-mentioned network element at different levels is processed data the be kept at above-mentioned shared buffer memory space associated with this identification information that these affairs obtain, so, process the data that these affairs obtain and be kept in the stack internal memory in this shared buffer memory space, indicate be kept in stack internal memory associated with this identification information of pointer of this data storage location.
When the network element of processing above-mentioned affairs occurs need to carrying out the rollback processing to data when abnormal.In the embodiment of the present invention, occur that abnormal network element can preserve the processing abnormal state information.So, based on above-mentioned any embodiment, if above-mentioned network element at different levels is processed data the be kept at shared buffer memory space associated with above-mentioned identification information that these affairs obtain, and at the identification information that reads these affairs before corresponding processing done state information, read the processing abnormal state information corresponding to identification information of these affairs, also the data of this identification information association of preserving in above-mentioned shared buffer memory space are carried out to the rollback processing; If above-mentioned network element at different levels is processed, data that these affairs obtain and this identification information are associated respectively is kept at corresponding spatial cache, and at the identification information that reads these affairs before corresponding processing done state information, read the processing abnormal state information corresponding to identification information of these affairs, the data of the above-mentioned identification information association of also above-mentioned network elements at different levels being preserved in corresponding spatial cache are carried out the rollback processing.
The method that the embodiment of the present invention provides, when certain network element occurs when abnormal, the unified data that the network element that completes processing is submitted to are carried out the rollback processing, thereby can avoid the generation of dirty data.
Inventive concept based on same with method, the embodiment of the present invention also provides the control device of the transaction in a kind of distributed network, comprising:
Registering modules, be used to pending affairs allocation identification information, and described identification information is sent to the network element of processing described affairs, in order to process after the network elements at different levels of described affairs are processed described affairs, this network element is processed to the data preservation associated with described identification information that described affairs obtain;
Monitoring module, monitored the treatment state of described affairs for the spatial cache by reading the state information for preserving affairs;
Processing module, when described monitoring module reads the processing done state information corresponding to identification information of described affairs, the data of the described identification information association that the network elements at different levels of processing described affairs are preserved are carried out the persistence processing.
The device that the embodiment of the present invention provides, the transaction process is carried out to unified management, and the data that the network element of processing transactions is submitted to are carried out unified processing, the transmission that does not need each network element to carry out data can guarantee the complete unification of data, reduce the processing complexity of each network element, improved disposal ability.
Below respectively the preferred implementation of above each module is described.It should be pointed out that these preferred implementations can apply separately, also can fit applications.
When above-mentioned identification information is sent to the network element of processing above-mentioned affairs, Registering modules specifically can for: this identification information is sent to the initial network element of processing these affairs, in this transaction process, this identification information transmits step by step between the network elements at different levels of processing these affairs; Perhaps, this identification information is sent to the network elements at different levels of processing these affairs.
If process the network element of these affairs by the state information of these affairs be kept at shared buffer memory space associated with this identification information, monitoring module specifically can for: by reading the monitoring state of this shared buffer memory space to these affairs;
If process the network elements at different levels of these affairs, the state information of these affairs and this identification information are kept at respectively in corresponding spatial cache, monitoring module specifically can for: by reading the spatial cache that above-mentioned network element at different levels is corresponding, the treatment state of these affairs is monitored.
If above-mentioned network element at different levels is processed data the be kept at above-mentioned shared buffer memory space associated with this identification information that described affairs obtain, processing module specifically can for: obtain the data of this identification information association from this shared buffer memory space; The data of obtaining are carried out to the persistence processing;
If above-mentioned network element at different levels is processed, data that described affairs obtain and described identification information are associated respectively is kept at corresponding spatial cache, processing module specifically can for: obtain the data of this identification information association from spatial cache corresponding to above-mentioned network elements at different levels respectively; The data of obtaining are carried out to the persistence processing.
If above-mentioned network element at different levels is processed data the be kept at shared buffer memory space associated with this identification information that these affairs obtain, and at the identification information that reads these affairs before corresponding processing done state information, monitoring module reads the processing abnormal state information corresponding to identification information of above-mentioned affairs, processing module can also for: the data of the described identification information association that above-mentioned shared buffer memory space is preserved are carried out the rollback processing; If above-mentioned network element at different levels is processed, data that these affairs obtain and this identification information are associated respectively is kept at corresponding spatial cache, and at the identification information that reads these affairs before corresponding processing done state information, monitoring module reads the processing abnormal state information corresponding to identification information of these affairs, processing module can also for: the data of this identification information association that spatial cache corresponding to above-mentioned network elements at different levels preserved are carried out the rollback processing.
Inventive concept based on same with method, the embodiment of the present invention also provides the network element in a kind of distributed network, comprising:
The identification information receiver module, for receiving the identification information of pending affairs;
The transaction module, for being processed described affairs;
Data are preserved module, the data preservation associated with described identification information obtained for this network element being processed to described affairs.
The network element that the embodiment of the present invention provides, do not need the data that processing transactions is obtained to be transmitted, only need the data preservation associated with identification information that this network element processing transactions is obtained, by the transaction control device, the transaction process is carried out to unified management, and the data that the network element of processing transactions is submitted to are carried out unified processing, reduce the processing complexity of each network element, improved disposal ability.
Preferably, the identification information receiver module specifically for:
Receive the identification information of the described affairs of transaction control device transmission, described identification information is distributed by described transaction control device; Perhaps,
The identification information of the described affairs that the upper level network element of the described affairs of reception & disposal sends, described identification information is distributed and sends to the initial NE of the described affairs of processing by described transaction control device.
The accompanying drawing explanation
The method flow diagram that Fig. 1 provides for the embodiment of the present invention;
The first device schematic diagram that Fig. 2 provides for the embodiment of the present invention;
The second device schematic diagram that Fig. 3 provides for the embodiment of the present invention;
The network element schematic diagram that Fig. 4 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the technical scheme that the embodiment of the present invention is provided is elaborated.
For the complete unification of data after assurance transaction under the prerequisite not reducing handling property, the embodiment of the present invention provides the control method of the transaction in a kind of distributed network, and as shown in Figure 1, the method specifically comprises:
Step 100, be pending affairs allocation identification information (ID), and this identification information is sent to the network element of processing these affairs, in order to process after the network elements at different levels of these affairs are processed these affairs, this network element is processed to the data preservation associated with this identification information that these affairs obtain.
In the embodiment of the present invention, a plurality of network elements in distributed network are processed this affairs.So, can send this identification information to all network elements of processing these affairs respectively.Preferably, also can only to the initial network element of processing these affairs, send this identification information, then each network element sends this identification information to the next stage network element after handling the single node affairs.So-called single node transaction,, in the transaction process, the single network element part affairs responsible to this node are processed.
Step 110, by the spatial cache that reads the state information for preserving affairs, the treatment state of these affairs is monitored.
The specific implementation that the treatment state of above-mentioned affairs is monitored is relevant with the status information storage locations of above-mentioned affairs.If process the network element of above-mentioned affairs by the state information of these affairs be kept at shared buffer memory space associated with above-mentioned identification information, by reading the monitoring state of this shared buffer memory space to these affairs.If process the network elements at different levels of above-mentioned affairs, the state information of these affairs and above-mentioned identification information are kept at respectively in corresponding spatial cache, by reading the spatial cache that above-mentioned network element at different levels is corresponding, the treatment state of these affairs are monitored.
Wherein, the state information that network elements at different levels are preserved these affairs can be the same or different with the corresponding spatial cache of above-mentioned identification information.
Step 120, when processing done state information corresponding to the identification information that reads above-mentioned affairs, data corresponding to above-mentioned identification information that the network elements at different levels of processing above-mentioned affairs are preserved are carried out the persistence processing.
It is relevant that the data of the above-mentioned identification information association that the network elements at different levels of processing above-mentioned affairs are preserved are carried out the position that the specific implementation of persistence processing stores with data.If above-mentioned network element at different levels is processed data the be kept at above-mentioned shared buffer memory space associated with this identification information that these affairs obtain, the specific implementation that the data of this identification information association of network elements at different levels of processing these affairs being preserved are carried out the persistence processing can be: the data of obtaining this identification information association from this shared buffer memory space; The data of obtaining are carried out to the persistence processing.If above-mentioned network element at different levels is processed, data that these affairs obtain and this identification information are associated respectively is kept at corresponding spatial cache, and the specific implementation that the data of this identification information association of network elements at different levels of processing these affairs being preserved are carried out the persistence processing can be: the data of obtaining respectively this identification information association from above-mentioned network elements at different levels corresponding spatial cache; The data of obtaining are carried out to the persistence processing.
Wherein, the spatial cache that network elements at different levels are preserved the correspondence of above-mentioned data can be the same or different.
In addition, each network element is preserved state information and the spatial cache corresponding to above-mentioned data of above-mentioned affairs can be identical, also can be different.
The method that the embodiment of the present invention provides, the transaction process is carried out to unified management, and the data that the network element of processing transactions is submitted to are carried out unified processing, the transmission that does not need each network element to carry out data can guarantee the complete unification of data, reduce the processing complexity of each network element, improved disposal ability.
Preferably, above-mentioned shared buffer memory space comprises stack internal memory and heap memory.If process the network element of above-mentioned affairs by the state information of these affairs be kept at shared buffer memory space associated with above-mentioned identification information, so, the state information of these affairs is associated with above-mentioned identification information to be kept in the stack internal memory in this shared buffer memory space.If above-mentioned network element at different levels is processed data the be kept at above-mentioned shared buffer memory space associated with this identification information that these affairs obtain, so, process the data that these affairs obtain and be kept in the heap memory in this shared buffer memory space, indicate be kept in stack internal memory associated with this identification information of pointer of this data storage location.
Therefore because the disposal ability of stack internal memory is stronger, can be buffered in the stack internal memory calling information frequently (as the state information of affairs etc.), thereby improve the performance of shared buffer memory module.
In prior art, if a network element occurs that this network element carries out the transaction rollback operation so extremely.In the embodiment of the present invention, occur that abnormal network element only needs abnormal data preservation associated with above-mentioned identification information, and preserve and process abnormal state information.Accordingly, based on above-mentioned any embodiment, if above-mentioned network element at different levels is processed data the be kept at shared buffer memory space associated with above-mentioned identification information that these affairs obtain, and at the identification information that reads these affairs before corresponding processing done state information, read the processing abnormal state information corresponding to identification information of these affairs, also the data of this identification information association of preserving in above-mentioned shared buffer memory space are carried out to the rollback processing, wherein, occur that abnormal network element is kept in this shared buffer memory space abnormal data is associated with above-mentioned identification information.If above-mentioned network element at different levels is processed, data that these affairs obtain and this identification information are associated respectively is kept at corresponding spatial cache, and at the identification information that reads these affairs before corresponding processing done state information, read the processing abnormal state information corresponding to identification information of these affairs, the data of the above-mentioned identification information association of also above-mentioned network elements at different levels being preserved in corresponding spatial cache are carried out the rollback processing, wherein, occur that abnormal network element is kept at corresponding memory space by abnormal data is associated with above-mentioned identification information.
So-called rollback, delete corresponding data (data that comprising finishes dealing with obtains and abnormal data).Rollback in the embodiment of the present invention is processed, and data corresponding to above-mentioned identification information that soon reported are all deleted.Therefore, after carrying out the rollback processing, this transaction flow process finishes.
The method that the embodiment of the present invention provides, when certain network element produces abnormal data, the data of the network element that completes processing being submitted to by the affair administration device unification are carried out the rollback processing, thereby can avoid the generation of dirty data.
Inventive concept based on same with method, the embodiment of the present invention also provides the control device of the transaction in a kind of distributed network, and as shown in Figure 2, the transaction control device in this distributed network comprises:
Registering modules 201, be used to pending affairs allocation identification information, and this identification information is sent to the network element of processing described affairs, in order to process after the network elements at different levels of these affairs are processed these affairs, this network element is processed to the data preservation associated with this identification information that described affairs obtain.
In the embodiment of the present invention, preferably, 201 pairs of pending affairs of Registering modules are registered, and rule, object, the resource of transaction management are unified to process and dispatching management.Wherein, so-called registration, be not only as pending affairs allocation identification information, also for this affairs initialization thread, and is this affairs distribution shared buffer memory space.
In addition, Registering modules 201, after for pending affairs, having distributed identification information, also sends to this identification information monitoring module 202, and notifies the treatment state of the affairs that 202 pairs of these identification informations of monitoring module are corresponding to be monitored.
Monitoring module 202, monitored the treatment state of these affairs for the spatial cache by reading the state information for preserving affairs.
Concrete, monitoring module 202 is after the notice that receives Registering modules 201, and to above-mentioned identification information, the treatment state of corresponding affairs is monitored.
Wherein, what is called is monitored the treatment state of these affairs by the spatial cache that reads the state information for preserving affairs, specifically refer to, read this spatial cache to obtain the state information of affairs, according to the treatment state of the state information monitor both transactions of the affairs that get.
Processing module 203, when monitoring module 202 reads the processing done state information corresponding to identification information of above-mentioned affairs, the data of this identification information association that the network elements at different levels of processing these affairs are preserved are carried out the persistence processing.
Concrete, when monitoring module 202 reads the processing done state information (monitoring the processing done state of above-mentioned affairs) corresponding to identification information of above-mentioned affairs, notification handler module 203 is carried out the persistence processing.Accordingly, data corresponding to above-mentioned identification information that processing module 203 is submitted to the network element of processing above-mentioned affairs according to this notice are carried out the persistence processing.
The device that the embodiment of the present invention provides, the transaction process is carried out to unified management, and the data that the network element of processing transactions is submitted to are carried out unified processing, the transmission that does not need each network element to carry out data can guarantee the complete unification of data, reduce the processing complexity of each network element, improved disposal ability.
In the embodiment of the present invention, preferably, monitoring module 202 and processing module 203 can realize by thread, concrete employing multithreading polling mode realization.Take monitoring module 202 as example, suppose the corresponding affairs of a thread for monitoring, so, each thread for monitoring is corresponding to be activated and the dormancy two states.Thread in state of activation takies more resource, thread release portion resource in resting state, each thread in the monitoring thread pond adopts the mode of poll to guarantee all for the thread of monitoring, can balancedly carry out the state switching, with the treatment state to all affairs, monitored, and then guarantee high when concurrent, the maximum carrying of the disposal ability of monitoring thread.Wherein, the initialization in monitoring thread pond and the control of polling mode, realized by Registering modules 201.
Based on above-mentioned any embodiment, below respectively the preferred implementation of above each module is described.It should be pointed out that these preferred implementations can apply separately, also can fit applications.
The device provided due to the embodiment of the present invention gives identical inventive concept with said method, therefore, for repeating part, will repeat no more.
When above-mentioned identification information is sent to the network element of processing above-mentioned affairs, Registering modules 201 specifically can for: this identification information is sent to the initial network element of processing these affairs, in this transaction process, this identification information transmits step by step between the network elements at different levels of processing these affairs; Perhaps, this identification information is sent to the network elements at different levels of processing these affairs.
If process the network element of these affairs by the state information of these affairs be kept at shared buffer memory space associated with this identification information, monitoring module 202 specifically can for: by reading the monitoring state of this shared buffer memory space to these affairs;
If process the network elements at different levels of these affairs, the state information of these affairs and this identification information are kept at respectively in corresponding spatial cache, monitoring module 202 specifically can for: by reading the spatial cache that above-mentioned network element at different levels is corresponding, the treatment state of these affairs is monitored.
If above-mentioned network element at different levels is processed data the be kept at above-mentioned shared buffer memory space associated with this identification information that these affairs obtain, processing module 203 specifically can for: obtain the data of this identification information association from this shared buffer memory space; The data of obtaining are carried out to the persistence processing;
If above-mentioned network element at different levels is processed, data that described affairs obtain and described identification information are associated respectively is kept at corresponding spatial cache, processing module 203 specifically can for: obtain the data of this identification information association from spatial cache corresponding to above-mentioned network elements at different levels respectively; The data of obtaining are carried out to the persistence processing.
Preferably, as shown in Figure 3, the device that the embodiment of the present invention provides can also comprise shared buffer memory module 204, and this shared buffer memory module 204 is above-mentioned shared buffer memory space.Further, shared buffer memory module 204 comprises stack internal memory and heap memory.If process the network element of above-mentioned affairs by the state information of these affairs be kept at shared buffer memory module 204 associated with above-mentioned identification information, so, the state information of these affairs is associated with above-mentioned identification information to be kept in the stack internal memory of this shared buffer memory module 204.If above-mentioned network element at different levels is processed, data that these affairs obtain are associated with this identification information is kept at above-mentioned shared buffer memory module 204, so, process the data that these affairs obtain and be kept in the heap memory of this shared buffer memory module 204, indicate be kept in stack internal memory associated with this identification information of pointer of this data storage location.
Therefore because the disposal ability of stack internal memory is stronger, can be buffered in the stack internal memory calling information frequently (as the state information of affairs etc.), thereby improve the performance of shared buffer memory module.
If above-mentioned network element at different levels is processed data the be kept at shared buffer memory space associated with this identification information that these affairs obtain, and at the identification information that reads these affairs before corresponding processing done state information, monitoring module 202 reads the processing abnormal state information corresponding to identification information of above-mentioned affairs, processing module 203 can also for: the data of the described identification information association that above-mentioned shared buffer memory space is preserved are carried out the rollback processing; If above-mentioned network element at different levels is processed, data that these affairs obtain and this identification information are associated respectively is kept at corresponding spatial cache, and at the identification information that reads these affairs before corresponding processing done state information, monitoring module 202 reads the processing abnormal state information corresponding to identification information of these affairs, processing module 203 can also for: the data of this identification information association that spatial cache corresponding to above-mentioned network elements at different levels preserved are carried out the rollback processing.
Inventive concept based on same with method, the embodiment of the present invention also provides the network element in a kind of distributed network, as shown in Figure 4, comprising:
Identification information receiver module 401, for receiving the identification information of pending affairs;
Transaction module 402, for being processed described affairs;
Data are preserved module 403, the data preservation associated with described identification information obtained for this network element being processed to described affairs.
The network element that the embodiment of the present invention provides, do not need the data that processing transactions is obtained to be transmitted, only need the data preservation associated with identification information that this network element processing transactions is obtained, by the transaction control device, the transaction process is carried out to unified management, and the data that the network element of processing transactions is submitted to are carried out unified processing, reduce the processing complexity of each network element, improved disposal ability.
Preferably, identification information receiver module 401 specifically for:
Receive the identification information of the described affairs of transaction control device transmission, described identification information is distributed by described transaction control device; Perhaps,
The identification information of the described affairs that the upper level network element of the described affairs of reception & disposal sends, described identification information is distributed and sends to the initial NE of the described affairs of processing by described transaction control device.
Below will coordinate and be embodied as example with the network element shown in the transaction control device shown in Fig. 3, the method that the embodiment of the present invention is provided be described in detail.
When the flow process of transaction starts, 201 pairs of these affairs of the Registering modules of transaction control device are registered.Concrete, be this affairs allocation identification information, for the thread of this affairs initialization monitoring module 202 and the thread of processing module 203, and distribute shared buffer memory space (being shared buffer memory module 204) for these affairs.
Registering modules 201 sends to this identification information the initial NE of processing these affairs.
This initial NE receives this identification information; The part that these affairs are responsible for processing by this network element is processed; After finishing dealing with, the data that need persistence that processing is obtained are associated with identification information to be saved in the shared buffer memory module 204 of transaction control device, and this identification information is sent to the next stage network element.
The part of these affairs being responsible for processing by it by the next stage network element is processed, the data that need persistence that processing is obtained are associated with identification information to be saved in the shared buffer memory module 204 of transaction control device, and this identification information is sent to the next stage network element.
So repeatedly, until process the afterbody network element of these affairs, this afterbody network element is after the part of these affairs being responsible for to process by it is processed, except preserving and need the data of persistence in the manner described above, also in shared buffer memory module 204, preserve the end of transaction state information.
For any one-level network element of processing these affairs, once occur abnormal when processing these affairs,, by the abnormal data shared buffer memory module 204 that be saved in transaction control device associated with identification information, also in shared buffer memory module 204, preserve the transaction abnormal state information.Now, network element finishes the flow process of transaction, there will be no the processing action of follow-up network element.
Wherein, to need data or the abnormal data specific implementation that be kept in shared buffer memory module 204 associated with identification information of persistence to be: to judge the identification information of whether preserving above-mentioned affairs in the stack internal memory of above-mentioned shared buffer memory module, if do not have, need the data of persistence to be kept in the heap memory of shared buffer memory module, by this identification information and need the pointer association of the address of data in heap memory of persistence to be kept in the stack internal memory.
Optionally, for non-afterbody network element, after the section processes responsible by this network element to above-mentioned affairs completes, can also generate single node transaction completion status information and be kept in shared buffer memory module 204.
The specific implementation that the process state information of affairs (end of transaction state information, transaction abnormal state information, single node transaction completion status information) is kept in shared buffer memory module 204 can be: be kept in the stack internal memory state information is associated with identification information.
In monitoring module 202, thread corresponding to these affairs is under state of activation, and the stack internal memory that continues to read shared buffer memory module 204 carrys out the monitoring state to these affairs.If read the transaction abnormal state information, trigger processing module 203 and carry out rolling back action, if read the end of transaction state information, trigger processing module 203 and carry out the persistence operation.
If need to carry out rolling back action, processing module 203 reads all data corresponding to above-mentioned identification information in the heap memory of shared buffer memory module 204, deletes these data.If need to carry out the persistence operation, processing module 203 reads all data corresponding to above-mentioned identification information in the heap memory of shared buffer memory module 204, and these data are carried out to the persistence processing.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect fully.And the present invention can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code one or more.
The present invention describes with reference to flow chart and/or the block diagram of method, equipment (system) and computer program according to the embodiment of the present invention.Should understand can be in computer program instructions realization flow figure and/or block diagram each flow process and/or the flow process in square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computer or other programmable data processing device produce for realizing the device in the function of flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction be stored in this computer-readable memory produce the manufacture that comprises command device, this command device is realized the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded on computer or other programmable data processing device, make and carry out the sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out on computer or other programmable devices is provided for realizing the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
Although described the preferred embodiments of the present invention, once those skilled in the art obtain the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.

Claims (12)

1. the transaction control method in a distributed network, is characterized in that, comprising:
For pending affairs allocation identification information, and described identification information is sent to the network element of processing described affairs, in order to process after the network elements at different levels of described affairs are processed described affairs, this network element is processed to the data preservation associated with described identification information that described affairs obtain;
By the spatial cache that reads the state information for preserving affairs, the treatment state of described affairs is monitored;
When processing done state information corresponding to the identification information that reads described affairs, the data of the described identification information association that the network elements at different levels of processing described affairs are preserved are carried out the persistence processing.
2. method according to claim 1, is characterized in that, described identification information sent to the network element of processing described affairs, comprising:
Described identification information is sent to the initial network element of processing described affairs, in described transaction process, described identification information transmits step by step between the network elements at different levels of processing described affairs; Perhaps,
Described identification information is sent to the network elements at different levels of processing described affairs.
3. method according to claim 1, it is characterized in that, if process the network element of described affairs by the state information of described affairs be kept at shared buffer memory space associated with described identification information, describedly by the spatial cache that reads the state information for preserving affairs, the treatment state of described affairs is monitored, being comprised:
By reading the monitoring state of described shared buffer memory space to described affairs;
If processing the network elements at different levels of described affairs is kept at the state information of described affairs and described identification information respectively in corresponding spatial cache, describedly by the spatial cache that reads the state information for preserving affairs, the treatment state of described affairs is monitored, being comprised:
By reading the spatial cache that described network element at different levels is corresponding, the treatment state of described affairs is monitored.
4. according to the described method of claim 1~3 any one, it is characterized in that, if described network element at different levels is processed data the be kept at shared buffer memory space associated with described identification information that described affairs obtain, the data of the described described identification information association that the network elements at different levels of processing described affairs are preserved are carried out the persistence processing, comprising:
Obtain the data of described identification information association from described shared buffer memory space;
The data of obtaining are carried out to the persistence processing;
If described network element at different levels is processed, data that described affairs obtain and described identification information are associated respectively is kept at corresponding spatial cache, and the data of the described described identification information association that the network elements at different levels of processing described affairs are preserved are carried out the persistence processing, comprising:
Obtain respectively the data of described identification information association corresponding spatial cache from described network elements at different levels;
The data of obtaining are carried out to the persistence processing.
5. according to the described method of claim 1~3 any one, it is characterized in that, if described network element at different levels is processed data the be kept at shared buffer memory space associated with described identification information that described affairs obtain, and at the identification information that reads described affairs before corresponding processing done state information, read the processing abnormal state information corresponding to identification information of described affairs, the method also comprises:
Data to the described identification information association of preserving in described shared buffer memory space are carried out the rollback processing;
If described network element at different levels is processed, data that described affairs obtain and described identification information are associated respectively is kept at corresponding spatial cache, and at the identification information that reads described affairs before corresponding processing done state information, read the processing abnormal state information corresponding to identification information of described affairs, the method also comprises:
The data of the described identification information association that described network elements at different levels are preserved in corresponding spatial cache are carried out the rollback processing.
6. the transaction control device in a distributed network, is characterized in that, comprising:
Registering modules, be used to pending affairs allocation identification information, and described identification information is sent to the network element of processing described affairs, in order to process after the network elements at different levels of described affairs are processed described affairs, this network element is processed to the data preservation associated with described identification information that described affairs obtain;
Monitoring module, monitored the treatment state of described affairs for the spatial cache by reading the state information for preserving affairs;
Processing module, when described monitoring module reads the processing done state information corresponding to identification information of described affairs, the data of the described identification information association that the network elements at different levels of processing described affairs are preserved are carried out the persistence processing.
7. device according to claim 6, is characterized in that, when described identification information is sent to the network element of processing described affairs, described Registering modules specifically for:
Described identification information is sent to the initial network element of processing described affairs, in described transaction process, described identification information transmits step by step between the network elements at different levels of processing described affairs; Perhaps,
Described identification information is sent to the network elements at different levels of processing described affairs.
8. device according to claim 6, is characterized in that, if the network element of processing described affairs by the state information of described affairs be kept at shared buffer memory space associated with described identification information, described monitoring module specifically for:
By reading the monitoring state of described shared buffer memory space to described affairs;
If process the network elements at different levels of described affairs, the state information of described affairs and described identification information are kept at respectively in corresponding spatial cache, described monitoring module specifically for:
By reading the spatial cache that described network element at different levels is corresponding, the treatment state of described affairs is monitored.
9. according to the described device of claim 6~8 any one, it is characterized in that, if described network element at different levels is processed data the be kept at shared buffer memory space associated with described identification information that described affairs obtain, described processing module specifically for:
Obtain the data of described identification information association from described shared buffer memory space;
The data of obtaining are carried out to the persistence processing;
If described network element at different levels is processed, data that described affairs obtain and described identification information are associated respectively is kept at corresponding spatial cache, described processing module specifically for:
Obtain respectively the data of described identification information association corresponding spatial cache from described network elements at different levels;
The data of obtaining are carried out to the persistence processing.
10. according to the described device of claim 6~8 any one, it is characterized in that, if described network element at different levels is processed data the be kept at shared buffer memory space associated with described identification information that described affairs obtain, and at the identification information that reads described affairs before corresponding processing done state information, described monitoring module reads the processing abnormal state information corresponding to identification information of described affairs, described processing module also for:
Data to the described identification information association of preserving in described shared buffer memory space are carried out the rollback processing;
If described network element at different levels is processed, data that described affairs obtain and described identification information are associated respectively is kept at corresponding spatial cache, and at the identification information that reads described affairs before corresponding processing done state information, described monitoring module reads the processing abnormal state information corresponding to identification information of described affairs, described processing module also for:
The data of the described identification information association that described network elements at different levels are preserved in corresponding spatial cache are carried out the rollback processing.
11. the network element in a distributed network, is characterized in that, comprising:
The identification information receiver module, for receiving the identification information of pending affairs;
The transaction module, for being processed described affairs;
Data are preserved module, the data preservation associated with described identification information obtained for this network element being processed to described affairs.
12. network element according to claim 11, is characterized in that, described identification information receiver module specifically for:
Receive the identification information of the described affairs of transaction control device transmission, described identification information is distributed by described transaction control device; Perhaps,
The identification information of the described affairs that the upper level network element of the described affairs of reception & disposal sends, described identification information is distributed and sends to the initial NE of the described affairs of processing by described transaction control device.
CN201310409201.2A 2013-09-10 2013-09-10 Service processing control method and device in distribution network Active CN103475520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310409201.2A CN103475520B (en) 2013-09-10 2013-09-10 Service processing control method and device in distribution network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310409201.2A CN103475520B (en) 2013-09-10 2013-09-10 Service processing control method and device in distribution network

Publications (2)

Publication Number Publication Date
CN103475520A true CN103475520A (en) 2013-12-25
CN103475520B CN103475520B (en) 2017-04-26

Family

ID=49800230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310409201.2A Active CN103475520B (en) 2013-09-10 2013-09-10 Service processing control method and device in distribution network

Country Status (1)

Country Link
CN (1) CN103475520B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486448A (en) * 2014-12-29 2015-04-01 成都致云科技有限公司 Data processing method and device
CN105204941A (en) * 2015-08-18 2015-12-30 耿懿超 Data processing method and data processing device
CN106155775A (en) * 2015-04-28 2016-11-23 阿里巴巴集团控股有限公司 Message treatment method, equipment and system
CN107003897A (en) * 2014-12-19 2017-08-01 Arm 有限公司 Monitor the utilization rate of issued transaction resource
CN112492619A (en) * 2019-09-12 2021-03-12 大唐移动通信设备有限公司 Transaction state management method and device and state caching device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562543A (en) * 2009-05-25 2009-10-21 阿里巴巴集团控股有限公司 Cache data processing method and processing system and device thereof
WO2011000260A1 (en) * 2009-06-30 2011-01-06 华为技术有限公司 Method, apparatus and network system for managing memory resources in cluster system
CN102279730A (en) * 2010-06-10 2011-12-14 阿里巴巴集团控股有限公司 Parallel data processing method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562543A (en) * 2009-05-25 2009-10-21 阿里巴巴集团控股有限公司 Cache data processing method and processing system and device thereof
WO2011000260A1 (en) * 2009-06-30 2011-01-06 华为技术有限公司 Method, apparatus and network system for managing memory resources in cluster system
CN102279730A (en) * 2010-06-10 2011-12-14 阿里巴巴集团控股有限公司 Parallel data processing method, device and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107003897A (en) * 2014-12-19 2017-08-01 Arm 有限公司 Monitor the utilization rate of issued transaction resource
US10810039B2 (en) 2014-12-19 2020-10-20 Arm Limited Monitoring utilization of transactional processing resource
CN104486448A (en) * 2014-12-29 2015-04-01 成都致云科技有限公司 Data processing method and device
CN104486448B (en) * 2014-12-29 2018-09-11 成都极驰科技有限公司 A kind of data processing method and device
CN106155775A (en) * 2015-04-28 2016-11-23 阿里巴巴集团控股有限公司 Message treatment method, equipment and system
CN106155775B (en) * 2015-04-28 2020-02-21 菜鸟智能物流控股有限公司 Message processing method, device and system
CN105204941A (en) * 2015-08-18 2015-12-30 耿懿超 Data processing method and data processing device
CN112492619A (en) * 2019-09-12 2021-03-12 大唐移动通信设备有限公司 Transaction state management method and device and state caching device
CN112492619B (en) * 2019-09-12 2022-04-01 大唐移动通信设备有限公司 Transaction state management method and device and state caching device

Also Published As

Publication number Publication date
CN103475520B (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN107241281B (en) Data processing method and device
CN104092717B (en) Message treatment method and system, message destination equipment
CN108647104B (en) Request processing method, server and computer readable storage medium
CN103475520A (en) Service processing control method and device in distribution network
CN108052396B (en) Resource allocation method and system
CN108965457A (en) A kind of message delivery method of distributed cluster system, device, equipment and medium
CN105468302B (en) A kind of method, apparatus and system of processing data
CN108319495A (en) Task processing method and device
US20220012692A1 (en) Schedule information acquiring method, apparatus, device, storage medium and program product
CN111813868B (en) Data synchronization method and device
CN107277022B (en) Process marking method and device
CN106815080A (en) Distributed diagram data treating method and apparatus
CN106250229A (en) The method and device of event handling
CN109766198B (en) Stream processing method, device, equipment and computer readable storage medium
CN110727523A (en) Service request processing method, processing device and readable storage medium
US20120102168A1 (en) Communication And Coordination Between Web Services In A Cloud-Based Computing Environment
CN112948081A (en) Method, device and equipment for processing task in delayed mode and storage medium
CN110781387B (en) Pushing method of stock market snapshot, stock trading system and storage medium
CN105630556B (en) A kind of method and system loading resource
CN109819000A (en) Methods, devices and systems and machine readable storage medium for PUSH message
CN107222555A (en) Message treatment method and device
KR20140135020A (en) Low Latency Framework System
CN110737655A (en) Method and device for reporting data
CN116010065A (en) Distributed task scheduling method, device and equipment
KR101771183B1 (en) Method for managing in-memory cache

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20170109

Address after: 266000 Shandong Province, Qingdao city Laoshan District Songling Road No. 399

Applicant after: Poly Polytron Technologies Inc

Address before: 266071 Laoshan, Qingdao province Hongkong District No. East Road, room 248, room 131

Applicant before: Hisense Media Networks Co., Ltd.

GR01 Patent grant
GR01 Patent grant