A kind of remote debugging system and method for chip operating system
Technical field
The present invention relates to smart card remote debugging field, more particularly to the remote debugging system of a kind of chip operating system and
Method.
Background technology
The implementation initial stage of general each smart card projects is required for making a small amount of test card, and fit carries out server
Debugging and card test of reaching the standard grade.Current way is to complete fabrication in Research and development room or workshop, then by technology branch
The personnel of holding take curstomer's site to or are mailed to client.The debugging cycle of some complicated projects is very long, and client is not required for card
Technical support personnel participates in the overall process debugging, and need to only give card to they, is voluntarily debugged by client and feedback problem.It debugged
Cheng Zhong must make another again if necessary to modify to card chip operating system COS (chip operationsystem)
One batch card gives client.It is obvious that repeatedly fabrication hands over the process of card that can extend debugging cycle.
In addition, remote desktop technology, and remote-operated scheme can be completed at present.Because remote desktop technology is control
The entire computation of pipe nipple client processed is weighed, therefore deposits many limitations, the safety of such as client computer, internet band
Wide requirement etc..Therefore this scheme is seldom adopted by client.
In currently existing scheme, each time to the modification of card COS, debugging and test process can all be caused to be interrupted 1 to 3 day.
And client is unfamiliar with card COS modifications and newer technology, causes client directly to be transferred in this work to do.
Therefore, there is an urgent need to a kind of solutions that can remotely realize modification card COS, and in the program, should
It only needs client to coordinate and establishes long-range connection, the operating right of the entire computer without controlling pipe nipple client,
The technical detail of its all operating process, all should be transparent to client.
Invention content
It is an object of the present invention to many defects of the existing technology be overcome, to provide a kind of chip operating system
With client, control terminal, server-side and corresponding remote debugging system and method.
The present invention provides a kind of remote debugging system of chip operating system, the debugging system includes control terminal, clothes
Business end, client and intelligent card reading,
The control terminal, for generating Application Protocol Data Unit instruction, by the server-side by application protocol data
Unit instruction is sent to client, and receives the implementing result that the client is sent by server-side;
The server-side for establishing connection between end and client in order to control, and stores the connection ID of all clients;
The client, the Application Protocol Data Unit instruction for receiving server-side transmission, reads to the smart card
Device sends the instruction;Implementing result is received from the intelligent card reading, the implementing result and connection ID are sent to described
Server-side;
The intelligent card reading, it is slotting for the Application Protocol Data Unit received from the client instruction to be sent to
Then the implementing result that the chip generates is sent to client by the chip entered.
As a kind of improvement of above system, the connection ID is the unique mark of client;The client pass through to
Server-side sends connection request, and server-side generates connection ID after establishing connection, is sent to client;The client is by connection ID
It is sent to control terminal.
As a kind of improvement of above system, the client by connection ID be sent to control terminal mode be QQ, wechat,
Voice or short message.
As a kind of improvement of above system, the server-side includes data receipt unit, data transmission unit and storage
Unit;
The data receipt unit, the data with connection ID sent for receiving control terminal and client, will connect
ID is matched in the memory unit, obtains target terminal;
The data transmission unit, for removing the connection ID in the data with connection ID;It is then forwarded to mesh
Mark terminal;
The storage unit, the connection ID for storing client.
As a kind of improvement of above system, the control terminal includes Application Protocol Data Unit instruction generation unit, void
Quasi- intelligent card reading and control terminal connection unit;
The Application Protocol Data Unit instruction generation unit, the application protocol number for generating debugging chip operating system
It is instructed according to unit, control terminal connection unit is sent to by Virtual Intelligent card reader;
The control terminal connection unit, for connection ID and Application Protocol Data Unit instruction to be sent to service together
End;And the implementing result that server-side is sent is sent to Virtual Intelligent card reader;
The Virtual Intelligent card reader, for according to implementing result verifying and debugging as a result, and implementing result is sent to
The Application Protocol Data Unit instruction generation unit, shows implementing result.
The present invention also provides a kind of chip operating system remote debugging methods, the described method comprises the following steps:
The control terminal generates Application Protocol Data Unit and instructs and the instruction and connection ID are sent to the clothes together
Business end;
The server-side is based on connection ID and obtains client, and Application Protocol Data Unit instruction is sent to client;
The client receives Application Protocol Data Unit instruction, and the instruction is sent to the intelligent card reading;
The intelligent card reading sends instructions to the chip of insertion, and the chip, which is then generated implementing result, sends
To client;
The implementing result and connection ID are sent to the server-side by the client together;
The server-side is based on connection ID and obtains control terminal, and implementing result is sent to control terminal;
The control terminal receives the implementing result that the server-side is sent.
It is further comprising the steps of before the method as a kind of improvement of the above method:
The client sends connection request to server-side, and server-side generates connection ID after establishing connection, and is sent to visitor
Family end;
Connection ID is sent to control terminal by the client.
As a kind of improvement of the above method, the mode that connection ID is sent to control terminal by the client is:It is QQ, micro-
Letter, voice or short message.
As a kind of improvement of the above method, the server-side is based on connection ID and obtains client, by application protocol data
Unit instruction is sent to client, specially:It, will after the data receipt unit of the server-side receives the data of control terminal transmission
Connection ID is matched in the memory unit, obtains client, is then instructed Application Protocol Data Unit and is sent by data
Unit is sent to client;
The server-side is based on connection ID and obtains control terminal, implementing result is sent to control terminal, specially:Server-side
After data receipt unit receives instruction, first connection ID is matched in the memory unit, control terminal is obtained, then will execute knot
Fruit is sent to control terminal by data transmission unit;
As a kind of improvement of the above method, the control terminal generate Application Protocol Data Unit instruction and by the instruction and
Connection ID is sent to the server-side together, specially:The Application Protocol Data Unit instruction generation unit generates application association
Data unit instructions are discussed, which is sent to Virtual Intelligent card reader;The Virtual Intelligent card reader is by application protocol
Data unit instructions are sent to control terminal connection unit;Control terminal connection unit instructs connection ID and Application Protocol Data Unit
It is sent to server-side together;
The control terminal receives the implementing result that the server-side is sent, specially:The control terminal connection unit will connect
The implementing result received is sent to Virtual Intelligent card reader;Implementing result is sent to application by the Virtual Intelligent card reader
Protocol Data Unit instruction generation unit shows compared with card is handed in local fabrication implementing result, is implemented according to the present invention
A kind of chip operating system client of offer, control terminal, server-side and the corresponding remote debugging system and side that example provides
The convenient timeliness of method is strong, and the card that can effectively shorten changes delivery cycle.
Compared with remote desktop technology, a kind of chip operating system of offer provided according to embodiments of the present invention uses client
End, control terminal, server-side and corresponding remote debugging system and method can effectively improve the safety of client computer.Mirror
In each instruction transmission all within 300 bytes, it can implement in the lower environment of Internet bandwidth.
Description of the drawings
Fig. 1 is the structure diagram according to a kind of remote debugging system of chip operating system of one embodiment of the invention;
Fig. 2 is the flow chart according to a kind of remote debugging method of chip operating system of another embodiment of the present invention.
Attached drawing identifies:
1, control terminal 2, server-side 3, client
4, intelligent card reading 11, control terminal connection unit 12, Virtual Intelligent card reader
13, APDU instruction generation units
Specific implementation mode
To keep technical solution of the present invention and advantage clearer, pass through following specific implementation in conjunction with attached drawing 1 and attached drawing 2
Present invention is further described in detail for example.Obviously, described embodiments are some of the embodiments of the present invention, rather than all
Embodiment.Based on the embodiments of the present invention, those of ordinary skill in the art are without making creative work
The every other embodiment obtained, shall fall within the protection scope of the present invention.
As shown in Figure 1, a kind of remote debugging system of chip operating system according to the ... of the embodiment of the present invention, including control terminal
1, server-side 2, client 3 and intelligent card reading 4.When it is implemented, server-side 2 can be mounted in a server-side, it is right
It is outer that service is provided in real time.Client 3 can be mounted on the computer of external client.
Specifically, client 3 sends connection request to server-side 2, and server-side 2 generates connection ID after establishing connection, concurrently
It send to client 3;The connection ID is that server-side 2 is the unique mark that client 3 is distributed.Connection ID is sent to by client 3
Control terminal 1.An embodiment according to the present invention, client 3 can will be connected by way of QQ, wechat, voice or short message
ID is sent to control terminal 1.
Control terminal 1 generates Application Protocol Data Unit (Application Protocol Data Unit, APDU) and instructs,
Application Protocol Data Unit instruction is sent to client 3 by the server-side 2;Control terminal 1 receives the client 3 and passes through
The implementing result that server-side 2 is sent.
As shown in Figure 1, control terminal 1 may include that (i.e. " APDU instructions generate single Application Protocol Data Unit instruction generation unit
Member ") 13, Virtual Intelligent card reader 12 and control terminal connection unit 11.The Application Protocol Data Unit instruction generates single
Member 13, the Application Protocol Data Unit instruction for generating debugging chip operating system, is sent out by Virtual Intelligent card reader 12
It send to control terminal connection unit 11;The control terminal connection unit 11, for instructing connection ID and Application Protocol Data Unit
It is sent to server-side 2;And the implementing result that server-side 2 is sent is sent to Virtual Intelligent card reader 12;The Virtual Intelligent
Card reader 12, for according to implementing result verifying and debugging as a result, and implementing result is sent to the application protocol data list
Metainstruction generation unit 13 shows implementing result.
Server-side 2 includes data receipt unit, data transmission unit and storage unit;
Data receipt unit, user receives the data with connection ID that control terminal 1 and client 3 are sent, by connection ID
It is matched in the memory unit, obtains target terminal;Target terminal holds 1 or client 3 in order to control;Then and connection will be carried
The data of ID are sent to data transmission unit;
Data transmission unit, for removing the connection ID in the data with connection ID;It is then forwarded to target end
End;
Storage unit, the connection ID for storing client 3.
Client 3 receives Application Protocol Data Unit instruction from server-side 2, to 4 sending application agreement of intelligent card reading
Data unit instructions receive implementing result from intelligent card reading 4, and send the implementing result and connection ID to server-side 2.
The Application Protocol Data Unit instruction that intelligent card reading 4 is used to receive from client 3 is sent to the core of insertion
Then chip generation implementing result is sent to client 3 by piece;
It is worth noting that, a kind of remote debugging system of the chip operating system provided in Fig. 1 is merely exemplary.
Under the premise of not departing from present inventive concept, according to other embodiments of the invention, a kind of chip operating system remote debugging system
System can include multiple control terminals 1, one or more server-side 2 and multiple client 3 simultaneously.
As shown in Fig. 2, a kind of chip operating system remote debugging method according to the ... of the embodiment of the present invention, including following step
Suddenly:
1, Application Protocol Data Unit instruction generation unit 13 generates APDU instructions, is sent to Virtual Intelligent card reader
12;
2, APDU instructions are sent to control terminal connection unit 11 by Virtual Intelligent card reader 12;
3, connection ID and APDU instructions are sent to server-side 2 by control terminal connection unit 11 together;
4, after the data receipt unit of server-side 2 receives instruction, first connection ID is matched in the memory unit, is obtained
Then original APDU is instructed and is sent to client 3 by data transmission unit by client 3;
5, after client 3 receives APDU instructions, the chip being inserted is sent to by intelligent card reading 4;
6, implementing result is back to intelligent card reading 4 by chip;
7, implementing result is back to client 3 by intelligent card reading 4;
8, connection ID and implementing result are sent to server-side 2 by client 3 together;
9, after the data receipt unit of server-side 2 receives instruction, first connection ID is matched in the memory unit, is obtained
Then original implementing result is sent to control terminal 1 by control terminal 1 by data transmission unit;
10, the implementing result received is sent to Virtual Intelligent card reader 12 by control terminal connection unit 11;
11, implementing result is sent to Application Protocol Data Unit instruction generation unit 13 by Virtual Intelligent card reader 12,
Implementing result is shown.
According to an embodiment of the invention, the remote debugging method further includes between step 1:
Client 3 sends connection request to server-side 2, and server-side generates connection ID after establishing connection, and is sent to client
End 3;
Connection ID is sent to control terminal 1 by client 3 by way of QQ, wechat, voice or short message.
According to an embodiment of the invention, to the modification and update of card COS, essence is by control terminal 1 by one one
The APDU of item is instructed is sent to card by server-side 2, client 3 and intelligent card reading 4;Virtual smart card is utilized simultaneously
The intelligent card reading 4 that client 3 connects is mapped in control terminal 1 by reader technology.
Compared with card is handed in local fabrication, a kind of chip operating system of offer provided according to embodiments of the present invention uses client
The convenient timeliness of end, control terminal, server-side and corresponding remote debugging system and method is strong, and the card that can effectively shorten is repaiied
Change delivery cycle.
Compared with remote desktop technology, a kind of chip operating system of offer provided according to embodiments of the present invention uses client
End, control terminal, server-side and corresponding remote debugging system and method can effectively improve the safety of client computer;And
And it is low to the bandwidth requirement of internet, because instruction transmission is all within 300 bytes every time, even if lower in Internet bandwidth
Can also it implement in environment.
It should be noted last that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting.Although ginseng
It is described the invention in detail according to embodiment, it will be understood by those of ordinary skill in the art that, to the technical side of the present invention
Case is modified or replaced equivalently, and without departure from the spirit and scope of technical solution of the present invention, should all be covered in the present invention
Right in.