A kind of mass network invoice data cluster broadcasting method
Technical field
The present invention relates to the tax invoice information transmission technology, one can carry out mass network invoice data cluster broadcasting method by tax office (as broadcaster) to multiple service provider (as take over party) specifically.
Background technology
Along with the popularization of national Golden Taxes three phase invoice project, the each provincial revenue department in the whole nation needs structuring (or destructuring) data of the magnanimity such as the basic data of taxpayer, business datum, code table data every day, carries out broadcast push to different service providers.These magnanimity invoice datas in units of TB, when carrying out data broadcast, if broadcast mode still traditionally, will form enormous impact, and not meet safe transmission requirement the existing network bandwidth, network structure, be mainly reflected in:
One, traditional data broadcasting method is only message based data broadcasting method:
As the message of traditional broadcast content, be mostly simple byte content, substantially do not take the network bandwidth when Web broadcast.
And the mass data counted in units of TB, when broadcasting, traditional approach obviously can not meet the demands.
Two, traditional data broadcasting method, do not treat broadcasted content with a certain discrimination:
Traditional data broadcasting method, only has message to multicast a kind of means.
And in invoice data broadcast content, only have code table class data to be applicable to multicasting, and other basic datas, business datum can only directional broadcastings, forbid to irrelevant node broadcasts.
The above problem of comprehensive analysis, when carrying out the broadcast of mass network invoice data, needs to solve following problem:
The high concurrent I/O request problem of A, mass data, handles up with the transmission solving mass network invoice data and calculating is handled up.
The computational problem of B, mass data, to solve the classified calculating (appointment, formation bulk transfer message etc. as directional transmissions direction) to mass network invoice data.
C, mass data transfers mode issue, originally once report the wasting of resources that brings of mode and inefficiency problem to solve.
D, mass data transfers bandwidth occupancy problem, impact the bandwidth that operation system causes with the transmission solving mass network invoice data.
Based under this background, the existing one proposed utilizes practical PC cluster system (containing network store system and NOSQL database) to improve the way of mass network invoice data broadcasting transmitting efficiency and system availability.
Summary of the invention
Technical assignment of the present invention solves the deficiencies in the prior art, provides a kind of efficient, safe mass network invoice data cluster broadcasting method.
Technical scheme of the present invention realizes in the following manner, this kind of mass network invoice data cluster broadcasting method, and one, build invoice data broadcast work cluster, this cluster comprises with lower node:
Broadcast data memory node: for carrying out high concurrent reading and writing, magnanimity caching process to being broadcasted data;
Speech amplifier node: the directed or invoice data-message that multicasts;
Broadcast front end processor node: transmission needs the batch invoice data message of broadcast;
Broadcasting service machine node: carry out classified calculating process according to processing policy to being broadcasted data;
Receiver node: receive the datacast message from speech amplifier node;
Receive front end processor node: receive the batch invoice data message from broadcast front end processor node;
Receive data memory node: high concurrent reading and writing, destructuring stores processor are carried out to the mass network invoice data received;
Two, broadcast data memory node provides the service of high speed concurrent reading and writing to needing the invoice data of broadcast, and mass data to be broadcast write buffer zone etc. is pending;
Three, broadcasting service machine node is according to scheduler task, carries out batch and to classify process, form data message to be broadcast according to data processing policy to mass network invoice data to be broadcast;
Four, the quantitative check of speech amplifier node is with or without data message to be broadcast, if do not had, so continues to wait for next round inspection; If had, carry out corresponding business processing according to type of message to be broadcast;
Five, after receiver node receives the broadcasting data messages that speech amplifier node sends, notify that reception front end processor node that this node belongs to carries out message batch data and carries out transmission and ask;
Six, receive front end processor node and send message transmissions request to broadcast front end processor node, by broadcast front end processor node according to cluster load balance situation allocation process machine, and receive between front end processor node and set up data transmission channel, the message comprising mass network invoice data is carried out data transmission according to stream mode;
Seven, after reception front end processor node receives message, call the high-speed i/o interface receiving data memory node, data are stored;
Eight, after packet data transmission completes, speech amplifier service node is cleared being broadcasted data message according to scheduling strategy.
Broadcast data memory node is provided with 1, speech amplifier Node configuration has 1, broadcast front end processor Node configuration has at least 2, broadcasting service machine Node configuration has at least 2, receiver node is provided with 1, receive front end processor Node configuration at least 1, receive data memory node is provided with 1.
Described broadcast data memory node adopts NOSQL database to carry out data storage.
The data message to be broadcast formed in described step 3 is divided into two classes: multicast data message and directional data message, and the data message that wherein multicasts is reported to all receivers, and carries out data transmission; Directional data message is reported to appointment receiver, and carries out single data transmission.
The detailed step carrying out corresponding business processing according to type of message to be broadcast in described step 4 is: if message is the data message that multicasts, speech amplifier node sends broadcast to all registered receiver node in coverage, pushes the UUID sequence number of the data message needing broadcast; If message is directional data message, so speech amplifier node sends broadcast to the registered receiver node of specifying, and pushes the UUID sequence number of the data message needing broadcast.
Carry out clearance according to scheduling strategy refer to being broadcasted data message in described step 8: directional data message cancels broadcasting tasks immediately; After the data message that multicasts waits for that all registered receivers all complete data transmission, then cancel broadcasting tasks.
Described data transmission adopts distributed data broadcasting law:
1) data transmission message broadcast, message content contains: target machine numbering, data message unique number UUID sequence number, broadcast type, and broadcast type is here and multicasts or directed two classes, to alleviate immediate data broadcast taking the network bandwidth;
2) carry out the stream transmission of message data according to message unique number UUID, employing request, response mode are carried out, and line asynchronousization of going forward side by side builds.
The beneficial effect that the present invention is compared with prior art produced is:
A kind of mass network invoice data cluster broadcasting method of the present invention utilizes distributed computing method and network storage file system, solve the problems such as the data transmission bottle neck in the broadcast of mass network invoice data, calculated performance bottleneck, data storage bottleneck, thus improve the broadcasting transmitting efficiency of mass network invoice data, thus reach the object improving invoice system availability:
By adopting NOSQL database and network store system, solving the transmission of mass network invoice data, calculating the low problem of throughput efficiency.
By adopting the mode of cluster of workstation and database associated working, calculating pressure being divided into separate unit and processing, and carrying out result of calculation integration by task scheduling mode, solve the classified calculating inefficiency problem of mass network invoice data.
By adopting " substep data broadcasting method ", a traditional message being reported, changes the substep broadcasting method that first message reports datacast again into, improving broadcast system resource utilization factor and work efficiency.
By the support to asynchronous streaming data transfer mode, adopt mass network invoice data time sharing transmissions strategy, solve bandwidth occupancy problem.Thus greatly improve the broadcasting efficiency of mass network invoice data and improve the availability of system.
Practical, applied widely, data cluster can be carried out report and transmit between tax office and multiple service provider, highly effective and safe, accelerate Tax Informatization progress, be easy to promote.
Accompanying drawing explanation
Accompanying drawing 1 of the present inventionly realizes schematic block diagram.
Embodiment
Below in conjunction with accompanying drawing, a kind of mass network invoice data cluster broadcasting method of the present invention is described in detail below.
As shown in Figure 1, a kind of mass network invoice data cluster broadcasting method is now provided, the method is by building mass network invoice data broadcasting cluster, set up by " broadcast data memory node ", " speech amplifier node ", " broadcast front end processor node (cluster) ", " broadcasting service machine node (cluster) ", " receiver node ", " receive front end processor node ", the Distributed Calculation that " reception data memory node " is formed, transmission work cluster platform, and by adopting NOSQL database and network store system, solve the transmission of mass network invoice data, calculate the low problem of throughput efficiency, by adopting the mode of cluster of workstation and database associated working, calculating pressure being divided into separate unit and processing, and carrying out result of calculation integration by task scheduling mode, solve the classified calculating inefficiency problem of mass network invoice data, by adopting " substep data broadcasting method ", a traditional message being reported, changes the substep broadcasting method that first message reports datacast again into, improving and report resource utilization and work efficiency, by the support to asynchronous streaming data transfer mode, adopt mass network invoice data time sharing transmissions strategy, solve bandwidth occupancy problem.Solve the performance bottleneck under present mode, thus improve the broadcasting efficiency of mass network invoice data and improve system availability.Implementation step is as follows:
One, build invoice data broadcast work cluster, this cluster comprises with lower node:
Broadcast data memory node: for carrying out high concurrent reading and writing, magnanimity caching process to being broadcasted data.
Speech amplifier node: the directed or invoice data-message that multicasts.
Broadcast front end processor node: transmission needs the batch invoice data message of broadcast, here broadcast front end processor node is clustered node, it possesses load-balancing function, can carry out Real-Time Scheduling, can process the data transfer request from different receivers simultaneously according to cluster working machine loading condition.
Broadcasting service machine node: carry out classified calculating process according to processing policy to being broadcasted data, here broadcasting service machine node is clustered node, it possesses task scheduling function, can carry out the functions such as task generation, tracking, cancellation according to real-time task order and tasks carrying strategy.
Receiver node: receive the datacast message from speech amplifier node, supports that cluster is extending transversely, at least comprises a node.
Receive front end processor node: receive the batch invoice data message from broadcast front end processor node, support cluster is extending transversely, at least comprise a node, mass network invoice data magnitude according to receiving can be extended to cluster working node, when carrying out data transmission between broadcast front end processor node and reception front end processor node, the stream data conversion of structuring, unstructured data can be supported.
Receive data memory node: high concurrent reading and writing, destructuring stores processor are carried out to the mass network invoice data received, support that high speed concurrent reading and writing request and magnanimity unstructured data store.
Two, broadcast data memory node provides the service of high speed concurrent reading and writing to needing the invoice data of broadcast, and mass data to be broadcast write buffer zone etc. is pending;
Three, broadcasting service machine node is according to scheduler task, carries out batch and to classify process, form data message to be broadcast according to data processing policy to mass network invoice data to be broadcast;
Four, the quantitative check of speech amplifier node is with or without data message to be broadcast, if do not had, so continues to wait for next round inspection; If had, carry out corresponding business processing according to type of message to be broadcast;
Five, after receiver node receives the broadcasting data messages that speech amplifier node sends, notify that reception front end processor node that this node belongs to carries out message batch data and carries out transmission and ask;
Six, receive front end processor node and send message transmissions request to broadcast front end processor node, by broadcast front end processor node according to cluster load balance situation allocation process machine, and receive between front end processor node and set up data transmission channel, the message comprising mass network invoice data is carried out data transmission according to stream mode;
Seven, after reception front end processor node receives message, call the high-speed i/o interface receiving data memory node, data are stored;
Eight, after packet data transmission completes, speech amplifier service node is cleared being broadcasted data message according to scheduling strategy.
Broadcast data memory node is provided with 1, speech amplifier Node configuration has 1, broadcast front end processor Node configuration has at least 2, broadcasting service machine Node configuration has at least 2, receiver node is provided with 1, receive front end processor Node configuration at least 1, receive data memory node is provided with 1.
Described broadcast data memory node adopts NOSQL database to carry out data storage, supports the request of high speed concurrent reading and writing, magnanimity unstructured data stores, asynchronous mass data calculates.
The data message to be broadcast formed in described step 3 is divided into two classes: multicast data message and directional data message, and the data message that wherein multicasts is reported to all receivers, and carries out data transmission; Directional data message is reported to appointment receiver, and carries out single data transmission.
The detailed step carrying out corresponding business processing according to type of message to be broadcast in described step 4 is: if message is the data message that multicasts, speech amplifier node sends broadcast to all registered receiver node in coverage, pushes the UUID sequence number of the data message needing broadcast; If message is directional data message, so speech amplifier node sends broadcast to the registered receiver node of specifying, and pushes the UUID sequence number of the data message needing broadcast.
Carry out clearance according to scheduling strategy refer to being broadcasted data message in described step 8: directional data message cancels broadcasting tasks immediately; After the data message that multicasts waits for that all registered receivers all complete data transmission, then cancel broadcasting tasks.
The transmission of above-mentioned mass network invoice data is defined as " substep data broadcasting method ", that is:
The first step: data transmission message is broadcasted, and message content contains: target machine numbering, data message unique number (UUID), broadcast type (multicast/orientation) etc., to alleviate immediate data broadcast taking the network bandwidth.
Second step: the stream transmission carrying out message data according to message unique number (UUID), employing request, response mode are carried out, and can carry out asynchronization structure.
Except the technical characteristic described in instructions, be the known technology of those skilled in the art.