Summary of the invention
The embodiment of the invention is to provide a kind of bill method for synchronous, service apparatus, tent device and system, can improve synchronous fail safe and the reliability of bill through verification and the encryption to original bill.
The present invention is achieved in that a kind of bill method for synchronous, comprising:
Service apparatus generates the check information of original bill and said original bill, and said original bill comprises bill content and Invoice Number;
Said service apparatus generates and encrypts the bill content according to said bill content;
Said service apparatus is uploaded onto the server said encryption bill content and said Invoice Number;
Said service apparatus sends the bill synchronization message to the tent device, and said bill synchronization message comprises the Invoice Number of said original bill and the check information of said original bill;
After said battalion account device is received said bill synchronization message, according to said bill synchronization message from the synchronous original bill of said server download needs;
Said tent device is deciphered said original bill, and according to the said original bill of the check information verification of said original bill, obtains said original bill;
Said tent device is handled said original bill.
Another object of the present invention is to provide a kind of service apparatus, comprising:
The bill generation module is used to generate original bill, and said original bill comprises bill content and Invoice Number;
The check information generation module links to each other with said bill generation module, is used to generate the check information of said original bill;
Encrypting module links to each other with said bill generation module, is used for according to said bill content, generates to encrypt the bill content;
Last transmission module links to each other with said encrypting module with said bill generation module, is used for said encryption bill content and said Invoice Number are uploaded onto the server;
Send bill synchronization message module, link to each other with said check information generation module with said bill generation module, be used to send the bill synchronization message, said bill synchronization message comprises the Invoice Number of said original bill and the check information of said original bill.
Another purpose of the present invention is to provide a kind of tent device, comprising:
Download the bill module, be used to receive the bill synchronization message, according to said bill synchronization message from the synchronous original bill of server download needs;
Deciphering verification module links to each other with said download bill module, is used for said original bill deciphering, and according to the said original bill of the check information verification of said original bill;
Processing module links to each other with said deciphering verification module, is used to handle said original bill.
A purpose more of the present invention is the system that provides a kind of bill synchronous.
Service apparatus is used to generate the check information of original bill and said original bill, and said original bill comprises bill content and Invoice Number; According to said bill content, generate and encrypt the bill content; Said encryption bill content and said Invoice Number are uploaded onto the server; Send the bill synchronization message to the tent device, said bill synchronization message comprises the Invoice Number of said original bill and the check information of said original bill;
The tent device links to each other with said server with said service apparatus, be used to receive said bill synchronization message after, according to said bill synchronization message from the synchronous original bill of said server download needs; With said original bill deciphering, and according to the said original bill of the check information verification of said original bill, and said original bill handled;
Server links to each other with said tent device with said service apparatus, is used for storage from said service apparatus uploaded content.
Implement the foregoing description,, improved synchronous fail safe and the reliability of bill, and promote the fail safe of DTV operation and tent through verification and encryption to original bill.
Embodiment
In order to make technical problem to be solved by this invention, technical scheme and beneficial effect clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.
See also a kind of bill method for synchronous schematic flow sheet of the embodiment of the invention shown in Fig. 1, comprising:
Step S101: service apparatus generates the check information of original bill and this original bill, and this original bill comprises bill content and Invoice Number.
Step S102: service apparatus generates encrypts the bill content.
Concrete, the bill content-encrypt that service apparatus will this original bill generates encryption bill content.
Step S103: service apparatus should be encrypted the bill content and upload onto the server with this Invoice Number.
Concrete, service apparatus should be changed to not reconciliation state by original bill state.
Step S104: service apparatus sends the bill synchronization message to the tent device, and this bill synchronization message comprises the Invoice Number of this original bill and the check information of this original bill.
Step S105: after the disappointed device of battalion is received this bill synchronization message, according to this bill synchronization message from the synchronous original bill of server download needs.
Concrete, the tent device is downloaded this original bill according to the Invoice Number of this original bill from server.
Step S106: the tent device should be original the bill deciphering, and according to this original bill of check information verification of this original bill.
Step S107: the tent device is handled this original bill.
Concrete, the tent device can be put processing in storage to this original bill, also can carry out discard processing.
Implement the foregoing description,, improved synchronous fail safe and the reliability of bill, and promote the fail safe of DTV operation and tent through verification and encryption to original bill.
Below in conjunction with the schematic flow sheet of another embodiment of a kind of bill method for synchronous of the present invention shown in Fig. 2, for clearer description embodiment, service apparatus is replaced with the VOD system, with the replacement of BOSS system, method step comprises with the tent device:
Step S201:VOD system generates original bill, and this original bill comprises bill content and Invoice Number.
Concrete, the bill content comprises information such as consumption time, content of consumption, the consumption amount of money; Invoice Number adopts privately owned at random mode to generate, and Invoice Number has uniqueness and confidentiality, and corresponding one by one with original bill.
Step S202:VOD system generates the check information of this original bill.
Concrete, the VOD system generates the check information of this original bill through MD5 (Message Digest Algorithm MD5, Message Digest Algorithm 5) algorithm.
Step S203:VOD system generates encrypts the bill content.
Concrete, the VOD system passes through DES (Data Encryption Standard, data encryption standard algorithm) algorithm with the bill content-encrypt.
The bill content will be encrypted by step S204:VOD system and Invoice Number is uploaded onto the server, and put this original bill state simultaneously and be reconciliation state not.
Concrete, the VOD system uploads through ftp (File Transfer Protocol, FTP) agreement and encrypts the bill file to the ftp server.
Step S205:VOD system sends the bill synchronization message to the BOSS system, and this bill synchronization message comprises the Invoice Number of this original bill and the check information of this original bill.
After this bill synchronization message is received by step S206:BOSS system, according to this bill synchronization message from the synchronous original bill of server download needs.
Concrete, the BOSS system downloads this original bill according to the Invoice Number of this original bill from the ftp server.
Step S207:BOSS system should be original the bill deciphering, and according to this original bill of check information verification of this original bill.
Step S208:BOSS system sends the Invoice Number of this original bill and gives the VOD system validation.
Step S209:VOD system confirms this Invoice Number, if confirm successfully, the state of putting this original bill is completion status synchronously.
Concrete, if confirm to get nowhere, the VOD system returns bill to the BOSS system and confirms failed message.
Step S210:VOD system returns acknowledge message and gives the BOSS system.
After the affirmation message of VOD system is received by step S211:BOSS system, should original bill information warehouse-in.
Concrete, if receiving the bill of VOD system, the BOSS system confirms failed message, think that then this original bill is illegal, does not put processing in storage.
Implement the foregoing description,, improved synchronous fail safe and the reliability of bill, and promote the fail safe of DTV operation and tent through verification and encryption to original bill.
Below in conjunction with a kind of service apparatus structural representation of the embodiment of the invention shown in Fig. 3, the structure of a kind of service apparatus of the further explain embodiment of the invention.
Bill generation module 301 is used to generate original bill, and this original bill comprises bill content and Invoice Number.
Check information generation module 302 links to each other with bill generation module 301, is used to generate the check information of this original bill.
Encrypting module 303 links to each other with bill generation module 301, is used for generating encryption bill content.
Last transmission module 304 links to each other with encrypting module 303 with bill generation module 301, is used for this encryption bill content and uploads onto the server with this Invoice Number.
Send bill synchronization message module 305, link to each other with check information generation module 302 with bill generation module 301, be used to send the bill synchronization message, this bill synchronization message comprises the Invoice Number of this original bill and the check information of this original bill.
Concrete, service apparatus also comprises:
Confirmation of receipt module 306 is used to receive the Invoice Number that sends over from the tent device, confirms whether this Invoice Number is effective, if effectively, sends acknowledge message and gives transmission acknowledge message module 307.
Send acknowledge message module 307, link to each other, be used to send acknowledge message and give this tent device with confirmation of receipt module 306.
Block of state 308, with last transmission module 304 with send acknowledge message module 307 and link to each other, be used for when last transmission module 304 is uploaded encryption bill content and Invoice Number and uploaded onto the server, should being changed to not reconciliation state by original bill state; When sending acknowledge message module 307 transmission acknowledge messages, should be changed to completion status synchronously by original bill state.
Implement the foregoing description,, improved synchronous fail safe and the reliability of bill, and promote the fail safe of DTV operation and tent through verification and encryption to original bill.
Below in conjunction with a kind of tent apparatus structure sketch map of the embodiment of the invention shown in Fig. 4, the structure of a kind of tent device of the further explain embodiment of the invention.
Download bill module 401, be used to receive the bill synchronization message, according to this bill synchronization message from the synchronous original bill of server download needs.
Concrete, the tent device is downloaded this original bill according to the Invoice Number of this original bill from server.
Deciphering verification module 402 and is downloaded bill module 401 and is linked to each other, is used for this original bill is deciphered, and according to this original bill of check information verification of this original bill.
Processing module 403 links to each other with deciphering verification module 402, is used for handling this original bill.
Concrete, the tent device can be put processing in storage to this original bill, also can carry out discard processing.
More excellent, processing module 403 comprises sends Invoice Number submodule 4031, receives warehouse-in submodule 4032:
Send Invoice Number submodule 4031, the Invoice Number that is used to send this original bill is confirmed to service apparatus.
Receive warehouse-in submodule 4032, be used to receive after the affirmation message of this service apparatus transmission, should original bill information warehouse-in.
Implement the foregoing description,, improved synchronous fail safe and the reliability of bill, and promote the fail safe of DTV operation and tent through verification and encryption to original bill.
Below in conjunction with the synchronous system configuration sketch map of a kind of bill of the embodiment of the invention shown in Fig. 5, the structure of the system that a kind of bill of the further explain embodiment of the invention is synchronous.
Service apparatus 501 is used to generate the check information of original bill and this original bill, and this original bill comprises bill content and Invoice Number; According to the bill content, generate and encrypt the bill content; Should encrypt the bill content and upload onto the server 503 with this Invoice Number; Send the bill synchronization message to tent device 502, this bill synchronization message comprises the Invoice Number of this original bill and the check information of this original bill.
Tent device 502 links to each other with server 503 with service apparatus 501, be used to receive this bill synchronization message after, according to this bill synchronization message from the synchronous original bill of server 503 download needs; Should be original the bill deciphering, and according to this original bill of check information verification of this original bill, and this original bill handled.
Server 503 links to each other with tent device 502 with service apparatus 501, is used for storage from service apparatus 501 uploaded content.
Concrete, this system also comprises:
Tent device 502, the Invoice Number that also is used to send this original bill is to service apparatus 501 affirmations.
Service apparatus 501 also is used for this Invoice Number is confirmed, if confirm successfully, returns acknowledge message to tent device 502.
Tent device 502, after also being used to receive this acknowledge message, should original bill warehouse-in.
Implement the foregoing description,, improved synchronous fail safe and the reliability of bill, and promote the fail safe of DTV operation and tent through verification and encryption to original bill.
Need to prove that through the description of above execution mode, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential hardware platform, can certainly all implement through hardware.Based on such understanding; All or part of can the coming out that technical scheme of the present invention contributes to background technology with the embodied of software product; This computer software product can be stored in the storage medium, like ROM/RAM, magnetic disc, CD etc., comprises that some instructions are with so that a computer equipment (can be a personal computer; Server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
The above disclosed preferred embodiment that is merely in the embodiment of the invention can not limit the present invention's interest field certainly with this, so according to the equivalent variations that claim of the present invention is done, still belong to the scope that the present invention is contained.