CN105959393A - Automatic card production method and device - Google Patents

Automatic card production method and device Download PDF

Info

Publication number
CN105959393A
CN105959393A CN201610423235.0A CN201610423235A CN105959393A CN 105959393 A CN105959393 A CN 105959393A CN 201610423235 A CN201610423235 A CN 201610423235A CN 105959393 A CN105959393 A CN 105959393A
Authority
CN
China
Prior art keywords
card
communication path
result
client
produces
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
CN201610423235.0A
Other languages
Chinese (zh)
Other versions
CN105959393B (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.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201610423235.0A priority Critical patent/CN105959393B/en
Publication of CN105959393A publication Critical patent/CN105959393A/en
Application granted granted Critical
Publication of CN105959393B publication Critical patent/CN105959393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C3/00Registering or indicating the condition or the working of machines or other apparatus, other than vehicles
    • G07C3/14Quality control systems
    • G07C3/146Quality control systems during manufacturing process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Manufacturing & Machinery (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Primary Health Care (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Automation & Control Theory (AREA)
  • Quality & Reliability (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides an automatic card production method and device. The method comprises the following steps of creating a first communication path and a second communication path corresponding to cards to be produced by a server, sending an identifier of the second communication path to a client side through the first communication path, receiving a card production command sent by the client side through the second communication path, and executing corresponding operation of the cards to be produced corresponding to the second communication path according to the card production command so as to obtain a card production result. In the automatic card production method and device disclosed by the invention, a bus architecture is adopted for production and deployment of cards; separation of card production and data treatment processes is realized; collection of card production information and version management of card sending scripts can be effectively carried out; when large batch card customization of different requirements is faced, the card production period is effectively shortened; and simultaneously, cross-platform cooperative production is realized.

Description

A kind of card automatic production method and device
Technical field
The present invention relates to the communications field, particularly relate to a kind of card automatic production method and device.
Background technology
In prior art, the production of card is normally based on the unit card production that hair fastener script is carried out, at this In the deployment that card produces, it is unfavorable for the collection of card production information, and when needing in the face of high-volume and difference During the card customization asked, need to update all of hair fastener script every time, the version pipe of hair fastener script easily occurs The chaotic problem of reason, and extend the production cycle of card.
Summary of the invention
The invention aims to overcome the deficiencies in the prior art, it is provided that a kind of card automatic production method And device.
On the one hand, the invention provides a kind of card automatic production method, including:
Step S1: described server creates the first communication path;
Step S2: described server creates second communication path corresponding with card to be produced, and by described First communication path sends the second communication path and identifies to client;
Step S3: described server receives described client and sends, by described second communication path, the card of coming Fabrication order, holds according to the card to be produced that described card fabrication order pair is corresponding with described second communication path Row corresponding operating obtains card and produces result.
Alternatively, before described step S2, also include: described server sends sense command to described card Production equipment, produces equipment by described card and all cards to be produced performs detection operation successively, it is judged that Whether receive the detection response that all cards to be produced return, be then to create corresponding with card to be produced the Two communication paths, otherwise find the card to be produced not returning described detection response, and generate the card of correspondence Sheet produces failure result.
Alternatively, in described step S2, described server creates the second communication road corresponding with card to be produced Footpath, particularly as follows: described server is according to the described detection response received, finds the card to be produced of correspondence Sheet, and create corresponding described second communication path.
Alternatively, described step S1, particularly as follows: described server access message-oriented middleware, and disappear described Breath middleware creates the first distribution interface and the first message queue, will described first distribution interface and described the One message queue binding obtain described first communication path, described message-oriented middleware be positioned in described server or In client described in person.
In described step S2, send the second communication path by described first communication path and identify to client, Particularly as follows: described server according to default first communication path name lookup to described first communication path and its Described first distribution interface corresponded to, and described second communication path mark is sent to described first distribution Interface, described second communication path mark is sent to described first message queue by described first distribution interface, Described client presets the first communication path name lookup to described first communication path and its correspondence according to described Described first message queue arrived, monitors and obtains described second communication that described first message queue receives ID of trace route path.
Alternatively, after described step S2, when described client receives described second communication path mark, According to the second communication path identifier lookup received to corresponding described second communication path, and by searching The second communication path arrived sends card fabrication order to described server.
Alternatively, described step S2, particularly as follows: described server creates the card to be produced with predetermined number Second communication path of corresponding described predetermined number, and send described presetting by described first communication path Second communication path of quantity identifies to client.
Alternatively, described step S2, particularly as follows: described server is according to the card described to be produced of predetermined number Sheet creates the second distribution interface of the described predetermined number of correspondence and described present count in described message-oriented middleware Second message queue of amount, and corresponding with described second message queue for described second distribution interface binding is obtained Second communication path of described predetermined number, generates correspondence according to the second communication path of described predetermined number Second communication path mark of described predetermined number, sends described predetermined number by described first communication path The second communication path identify to client.
Alternatively, described step S1, particularly as follows: described server initiation the first socket, and according to institute State the first socket and create the first communication path.
Described create the first communication path according to described first socket, particularly as follows: described server is according to institute State in the first socket first port numbers send comprise the second port numbers the first connection request to client, Described first port numbers corresponding first preset port corresponding with described second port numbers second preset port Between create described first communication path.
Alternatively, described step S2 is particularly as follows: described server is sent by described first communication path and treats The second communication path producing card corresponding identifies to client, and sets up the second communication road with described client Footpath.
Described server sends second communication path corresponding with card to be produced by described first communication path Mark is to client, particularly as follows: described server finds described first communication according to described first socket Path and its correspond to described first preset port and described second and preset port, and by described second pre- If port sends the second communication path mark of the described predetermined number corresponding with the card to be produced of predetermined number Preset port to described first, described client monitor and obtain described first preset that port receives described Second communication path mark of predetermined number.
Described and described client sets up the second communication path, particularly as follows: described server receives described client Hold and send the described predetermined number come and the second connection containing the 4th port numbers by described first communication path Request, and in corresponding the 3rd the presetting port and preset with described of the second communication path mark of described predetermined number Corresponding the 4th the presetting the second of the described predetermined number setting up correspondence between port and lead to of 4th port numbers of quantity News path.
Alternatively, after described client receives the second communication path mark of described predetermined number, also wrap Include: the second socket of the described predetermined number that described client initialization is corresponding, according to described predetermined number The second socket find second communication path of described predetermined number of correspondence and its correspond to described pre- If the 3rd of quantity the presets the 4th of port and described predetermined number presets port, and by described predetermined number The 4th preset port and send card fabrication order and preset port to the 3rd of corresponding described predetermined number, institute State server to monitor and obtain the described 3rd and preset the card fabrication order that port receives.
Alternatively, described step S3, specifically include:
Step A1: described server waits and receives described client and sends by described second communication path Card fabrication order, and after receiving described card fabrication order, perform step A2;
Step A2: described server resolves the card fabrication order received, it may be judged whether terminate life for producing Make or produce and unsuccessfully order, be then to perform step A4, otherwise perform step A3;
Step A3: the described card fabrication order received is sent to card and produces equipment by described server, Waiting and receive described card and produce the operating result that equipment returns, generating order according to described operating result should Described command response data are also returned to described client by answer evidence, return step A1;
Step A4: described server according to described in the card fabrication order that receives generate in the middle of produce result, Result generation card production result is produced in the middle of described.
Alternatively, in described step A3, described command response data are returned to described client, particularly as follows: Described server is according to the path of command response data return path subsidiary in the card fabrication order received Handle, find described command response data return path, by described command response data by finding Command response data return path returns to described client.
Alternatively, in described step A3, described command response data are returned to described client, particularly as follows: Described command response data are returned to described client by described second communication path by described server.
Alternatively, in described step A4, described server according to described in the card fabrication order that receives generate Middle production result, the described middle result that produces according to generating generates card production result, particularly as follows:
The card fabrication order received described in resolving when described server judges that it is to produce to terminate order Time, generating the first card and produce successful result, the first card according to generating produces successful result, generates bag The card including the numbering that card produces successful information and this card produces result;
The card fabrication order received described in resolving when described server judges that it is to produce unsuccessfully to order Time, generating the first card and produce failure result, the first card according to generating produces failure result, generates bag The card including the numbering that card produces failure information and this card produces result.
Alternatively, in described step A4, described server according to described in the card fabrication order that receives generate After middle production result, also include: the described middle result that produces is returned to described client by described server End.
Alternatively, after described step S3, also include:
Step C: described server resolves described card and produces result, when parsing obtains having card to produce result be When card produces failure result, labelling produces failed card.
In described step C, described labelling produces failed card, particularly as follows: described server resolves described Card produces failure result, obtains producing the numbering of failed card, according to the failed card of described production Numbering generates the mark card order comprising the described numbering producing failed card, and by described mark card Order is sent to described card and produces equipment.
On the other hand, present invention also offers a kind of card automatic production device, including:
First creation module, for creating the first communication path;
Second creation module, for creating second communication path corresponding with card to be produced;
Sending module, sends the second communication for the first communication path created by described first creation module ID of trace route path is to client;
Receiver module, the card production come for receiving described client to be sent by described second communication path Order;
Perform module, lead to described second for the card fabrication order pair received according to described receiver module The card execution corresponding operating interrogating path corresponding obtains card production result.
Alternatively, the device in the present invention, also include:
Detection module, is used for sending sense command and produces equipment to card, produces equipment pair by described card All cards to be produced perform detection operation successively;
Judge module, for judging whether to receive the detection response of all cards to be produced return;
Generation module, for judging not receive the inspection that all cards to be produced return when described judge module When surveying response, find the card to be produced not returning described detection response, and the card generating correspondence produces Failure result;
Described second creation module, specifically for judging to receive all cards to be produced when described judge module The detection response that sheet returns, creates second communication path corresponding with described card to be produced.
Alternatively, described second creation module, specifically for: according to the described detection response received, look into Find the card to be produced of correspondence, and create corresponding described second communication path.
Alternatively, described first creation module, specifically for: access message-oriented middleware, in described message Between part creates the first distribution interface and the first message queue, described first distribution interface is disappeared with described first Breath queue binding obtains described first communication path.
Alternatively, described sending module, specifically for: according to default first communication path name lookup to institute State the first communication path and its described first distribution interface corresponded to, and by described second communication path mark It is sent to described first distribution interface.
Alternatively, described second creation module, specifically for: create the card pair to be produced with predetermined number Second communication path of the described predetermined number answered;
Described sending module, specifically for: send the of described predetermined number by described first communication path Two communication ID of trace route paths are to client.
Alternatively, the device in the present invention, also include: the first generation module;
Alternatively, described second creation module, specifically for: according to the card described to be produced of predetermined number The second distribution interface of the described predetermined number of correspondence and described predetermined number is created in described message-oriented middleware The second message queue, and by corresponding with described second message queue for described second distribution interface binding obtain institute State the second communication path of predetermined number;
Described first generation module, generates corresponding institute for the second communication path according to described predetermined number State the second communication path mark of predetermined number;
Described sending module, specifically for: send the of described predetermined number by described first communication path Two communication ID of trace route paths are to client.
Alternatively, described first creation module, specifically for: initialize the first socket, and according to described First socket creates the first communication path.
Alternatively, described first creation module, specifically for: initialize the first socket, according to described The first port numbers in one socket sends and comprises the first connection request of the second port numbers to client, in institute State the first port numbers corresponding first preset second preset port between corresponding with described second port numbers of port Create described first communication path.
Alternatively, described sending module, specifically for: sent with to be produced by described first communication path The second communication path that card is corresponding identifies to client;
Alternatively, described second creation module, specifically at described sending module by described first communication After path transmission the second communication path corresponding with card to be produced identifies to client, with described client Set up the second communication path.
Alternatively, described sending module, specifically for: find described first according to described first socket Communication path and its correspond to described first preset port and described second and preset port, and by described the Two preset port sends the second communication path of the described predetermined number corresponding with the card to be produced of predetermined number Mark presets port to described first.
Alternatively, described second creation module, specifically for: receive described client and lead to by described first News path sends the described predetermined number come and the second connection request containing the 4th port numbers, and described pre- If the 3rd of the second communication path mark correspondence of quantity the 4th port numbers presetting port and described predetermined number Corresponding the 4th presets the second communication path of the described predetermined number setting up correspondence between port.
Alternatively, described execution module, specifically include:
Judging unit, connects transmission for receiving described client at described receiver module by described second After the card fabrication order come, resolve the card fabrication order received, it may be judged whether terminate life for producing Make or produce and unsuccessfully order;
First transmitting element, the card fabrication order received described in judge when described judging unit is not It is to produce terminate order or produce when unsuccessfully ordering, the described card fabrication order received is sent to institute State card and produce equipment;
Receive unit, produce, for waiting and receiving described card, the operating result that equipment returns;
First signal generating unit, generates command response number for the operating result received according to described reception unit According to;
Second transmitting element, returns to described client for the command response data described signal generating unit generated End;
Described receiver module, is additionally operable to the command response when described reception unit is received by described transmitting element After data return to described client, wait and receive described client and sent out by described second communication path The card fabrication order sent here;
Second signal generating unit, generates intermediate green for the card fabrication order received according to described receiver module Producing result, the described middle result generation card that produces according to generating produces result.
Alternatively, described second transmitting element, specifically for: according to attached in the card fabrication order received The path handle of the command response data return path of band, finds described command response data return path, Described command response data are returned to described client by the command response data return path found.
Alternatively, described second transmitting element, specifically for: by described second communication path by described life Reply data is made to return to described client.
Alternatively, described second signal generating unit, specifically for:
The card fabrication order received described in resolving when described judging unit judges that it is to produce to terminate order Time, generating the first card and produce successful result, the first card according to generating produces successful result, generates bag The card including the numbering that card produces successful information and this card produces result;
The card fabrication order received described in resolving when described judging unit judges that it is to produce unsuccessfully to order Time, generating the first card and produce failure result, the first card according to generating produces failure result, generates bag The card including the numbering that card produces failure information and this card produces result.
Alternatively, described execution module, also include:
3rd transmitting element, for the card received according to described receiver module in described second signal generating unit Fabrication order generates middle after producing result, and the described middle result that produces is returned to described client.
Alternatively, the device in the present invention, also include:
Parsing module, after generating card production result when described second signal generating unit, resolves described card Sheet produces result;
Mark module, being used for when the parsing of described parsing module obtains having card to produce result is that card produces unsuccessfully During result, labelling produces failed card.
Alternatively, described mark module, specifically for: resolve described card and produce failure result, given birth to Produce the numbering of failed card, generate according to the described numbering producing failed card and comprise described production unsuccessfully The mark card order of numbering of card, and described mark card order is sent to described production equipment.
The present invention compared with prior art, has the advantage that the production deployment of card in the present invention uses total Wire type framework, it is achieved that card produces and the separation of data handling procedure, it is possible to effectively carry out card production The collection of information and the version management of hair fastener script, when facing the card customization of the different demand of high-volume, have The production cycle shortening card of effect, it is simultaneously achieved cross-platform co-production.
Accompanying drawing explanation
For the technical scheme of the clearer explanation embodiment of the present invention, will make required in embodiment below Accompanying drawing do simple introduction, it should be apparent that, the accompanying drawing in describing below is only some of the present invention Embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, also may be used To obtain other accompanying drawing according to these accompanying drawings.
The flow chart of a kind of card automatic production method that Fig. 1 provides for the embodiment of the present invention one;
The flow chart of a kind of card automatic production method that Fig. 2 provides for the embodiment of the present invention two;
The flow chart of a kind of card automatic production method that Fig. 3 provides for the embodiment of the present invention three;
The flow chart of a kind of card automatic production method that Fig. 4 provides for the embodiment of the present invention four;
The flow chart of a kind of card automatic production method that Fig. 5 provides for the embodiment of the present invention five;
The block diagram of a kind of card automatic production device that Fig. 6 provides for the embodiment of the present invention six.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly Chu, be fully described by, it is clear that described embodiment be only a part of embodiment of the present invention rather than Whole embodiments.Based on the embodiment in the present invention, those skilled in the art are not making creative labor The every other embodiment obtained under dynamic premise, broadly falls into the scope of protection of the invention.
The present invention uses the framework of bus type, it is achieved that cross-platform co-production, such as, in the present invention, The operating system of server is linux system, and the operating system of client is Windows system;Wherein, The operating system of client can also be Android system etc..
Embodiment one
The embodiment of the present invention one provides a kind of card automatic production method, as it is shown in figure 1, include:
Step 101: server creates the first communication path;
In the present embodiment, step 101 can be:
Step E1: server access message-oriented middleware, and in the message between part creates the first communication path;
Specifically, server in the message between part creates the first distribution interface and the first message queue, will wound The first distribution interface built obtains the first communication path with the first message queue binding, and wherein message-oriented middleware can To be positioned in server, it is also possible to be positioned in client.
In the present embodiment, step 101 can also be:
Step D1: server initiation the first socket, and create the first communication path according to the first socket;
Specifically, server sends according to the first port numbers in the first socket and comprises the of the second port numbers One connection request to client, the first port numbers corresponding first to preset port corresponding with the second port numbers Second presets and creates the first communication path between port.
Step 102: server creates second communication path corresponding with card to be produced, and by the first communication Path sends the second communication path and identifies to client;
In the present embodiment, when step 101 is step E1, step 102 particularly as follows:
Step E2: server access message-oriented middleware, in the message between part creates corresponding with card to be produced The second communication path, generate the second corresponding communication path mark according to the second communication path, by generate Second communication path mark is sent to client by the first communication path;
Specifically, server according to the card to be produced of predetermined number in the message between part creates the pre-of correspondence If the second distribution interface of quantity and the second message queue of predetermined number, and by the second distribution interface and second The binding of message queue correspondence obtains the second communication path of predetermined number, according to the second communication road of predetermined number Footpath generates the second communication path mark of corresponding predetermined number, sends predetermined number by the first communication path The second communication path identify to client.
Further, when step 101 is step D1, step 102 particularly as follows:
Step D2: server sends second communication path corresponding with card to be produced by the first communication path Mark is to client, and sets up the second communication path with client;
Specifically, server according to the first socket find the first communication path and its correspond to first pre- If port and second presets port, and the card pair to be produced presetting port transmission and predetermined number by second Second communication path of the predetermined number answered identifies presets port to first, and client is monitored and to obtain first pre- If the second communication path mark of the predetermined number that port receives.
Further, in the present embodiment, before step 102, also include:
Server sends sense command and produces equipment to card, produces equipment to all cards to be produced by card Sheet performs detection operation successively, it may be judged whether receives the detection response that all cards to be produced return, is then Create second communication path corresponding with card to be produced, otherwise find and do not return the to be produced of detection response Card, and generate the card production failure result of correspondence;
Correspondingly, step 102, particularly as follows: server is according to the detection response received, finds treating of correspondence Produce card, and create the second corresponding communication path.
Step 103: server receives client and sends the card fabrication order of coming, root by the second communication path Perform corresponding operating according to the card to be produced that card fabrication order pair is corresponding with the second communication path and obtain card life Produce result;
In the present embodiment, step 103 particularly as follows:
Step A1: server waits and receive the card fabrication order that client is sent by second channel, And after receiving card fabrication order, perform step A2;
Step A2: server resolves the card fabrication order that receives, it may be judged whether for produce terminate order or Person produces and unsuccessfully orders, and is then to perform step A4, otherwise performs step A3;
Step A3: the card fabrication order received is sent to card and produces equipment by server, waits to be concatenated Receive card and produce the operating result that equipment returns, generate command response data also according to the operating result received Command response data are returned to client, returns step A1;
In the present embodiment, command response data are returned to client, Ke Yiwei: server is according to reception To card fabrication order in the path handle of subsidiary command response data backward channel, finding order should Answer data return path, command response data are returned to by the command response data return path found Client.
In the present embodiment, command response data are returned to client, it is also possible to for: server by the Command response data are returned to client by two communication paths.
Step A4: server generates middle production result according to the card fabrication order received, according to generation Produce result in the middle of and generate card production result.
Specifically, when the card fabrication order that server parsing receives judges that it is to produce end order, Generating the first card and produce successful result, the first card according to generating produces successful result, generates and includes card Sheet produces the card of the numbering of successful information and this card and produces result;
When server resolve the card fabrication order that receives judge its be produces unsuccessfully order time, generation the One card produces failure result, and the first card according to generating produces failure result, generates and includes that card produces The card of the numbering of failure information and this card produces result.
In the present embodiment, after server generates middle production result according to the card fabrication order received, Also include: the middle result that produces that server will generate returns to client.
Further, in the present embodiment, after step 103, also include:
Step C: server resolves card and produces result, is that card produces when parsing obtains having card to produce result During failure result, labelling produces failed card;
Specifically, server resolves card and produces failure result, obtains producing the numbering of failed card, root The mark card order comprising the numbering producing failed card is generated according to the numbering producing failed card, and Mark card order is sent to card and produces equipment.
In the present embodiment, server-tag produces failed card, can be to produce on failed card Punching, it is also possible to for altering the methods such as color.
In the present embodiment, after step 103, also include: server disconnects the second communication path;Work as step When proceeding card production after 103, return step 102.
Embodiment two
The embodiment of the present invention two provides a kind of card automatic production method, it is preferable that in the present embodiment, The quantity of production card is redefined for 16 but is not limited to 16, as in figure 2 it is shown, include every time:
Step 201: server access message-oriented middleware, and in the message between part creates first passage;
In the present embodiment, during message-oriented middleware may be located at server, it is also possible to be positioned in client, its IP address presets, and is saved in respectively in server and in client;
Further, server access message-oriented middleware is particularly as follows: server is according in the message pre-saved Between part IP address access message-oriented middleware;
Further, in the present embodiment, server in the message between part creates first passage, specifically For: server in the message between part creates the first distribution interface and the first message queue, first will created Distribution interface obtains first passage with the first message queue binding.
Step 202: client-access message-oriented middleware, finds first passage, waits to be received by first passage Send the routing rule of coming;
Specifically, client, according to the IP address of the message-oriented middleware pre-saved, accesses message-oriented middleware, According to default first passage name lookup to first passage and its first message queue corresponded to, monitor and obtain Take the routing rule that the first message queue receives;
Further, in the present embodiment, after startup of server, server and client side is all in accordance with protecting in advance Message-oriented middleware, in no particular order order are gone to access in the IP address of the message-oriented middleware deposited.
Step 203: server initiation card production equipment, and after the initialization is completed, execution step 204:
In the present embodiment, server initiation card produce equipment, particularly as follows: server by serial ports to Card produces equipment and sends initialization command, and card to be produced is dragged to refer to by the cassette tape making card produce equipment Location is put, and the state arranging production probe is to press down and contact the state of card.
Step 204: server access message-oriented middleware, in the message between part creates second channel, and according to The second channel created generates corresponding routing rule;
In the present embodiment, second channel specifically includes second channel 1, second channel 2 ... second channel 16, Routing rule specifically includes routing rule 1, routing rule 2 ... routing rule 16;
Preferably, in second channel 1, the corresponding HUB of second channel 2 ... second channel 16 order, interface is compiled Number 1, interface index 2 ... the USB interface of interface index 16 correspondence, produces numbered 1, numbered 2 ... The card of numbered 16;
Further, in the present embodiment, step 204 is particularly as follows: server is according in the message pre-saved Between the IP address of part access message-oriented middleware, in the message between part create the second distribution interface 1 and second disappear Breath queue the 1, second distribution interface 2 and the second message queue 2 ... the second distribution interface 16 and the second message queue 16, and corresponding with the second message queue for the second distribution interface created binding is obtained second channel 1, second leads to Road 2 ... second channel 16, generates routing rule 1, routing rule 2 according to the second channel correspondence obtained ... road By rule 16, wherein, routing rule specify that the binding of the second distribution interface and the second message queue is closed System;
Further, in the present embodiment, also include before step 204: server detects card to be produced State;
Specifically, server sends sense command and produces equipment to card, produces equipment to be generated by card Produce card and perform detection operation successively, it may be judged whether receive the detection response that card to be produced returns, be then Part creates between in the message the second channel corresponding with card to be produced, and generates correspondence according to second channel Routing rule, otherwise find the card to be produced not returning detection response, and corresponding generate the second card Produce failure result.
Step 205: the routing rule of generation is sent to client by first passage by server;
Specifically, server accesses message-oriented middleware according to the IP address of the message-oriented middleware pre-saved, and According to default first passage name lookup to first passage and its first distribution interface corresponded to, and will generate Routing rule be sent to the first distribution interface, the first distribution interface sends routing rule to the first message queue, The routing rule that the first message queue receives is monitored and obtained to client.
Step 206: client receives routing rule;
Specifically, the routing rule that the first message queue receives is monitored and obtained to client.
Step 207: client finds the second channel of correspondence according to the routing rule received, by searching The second channel arrived sends card fabrication order to server;
In the present embodiment, step 207 particularly as follows: client to find it according to the routing rule received right The second channel answered and the second distribution interface, send card fabrication order to the second distribution interface, the second distribution Interface transmission card fabrication order is to the second message queue of its correspondence, and server is monitored and obtains the second message The card fabrication order that queue receives;
Such as, client finds the second channel 3 and second of its correspondence according to the routing rule 3 received Distribution interface 3, transmission card fabrication order is to the second distribution interface 3, and it is raw that the second distribution interface 3 sends card Producing and order to the second message queue 3 of its correspondence, server is monitored and obtains what the second message queue 3 received Card fabrication order.
In the present embodiment, client successively receives 16 routing rules, and according to the method described above according to connecing The routing rule received, sends card fabrication order and produces the card of correspondence to client.
Step 208: server waits and receive the card fabrication order that client sends, and is receiving card After fabrication order, perform step 209;
Specifically, the card fabrication order that the second message queue receives is monitored and obtained to server, and according to The card fabrication order got produces corresponding card, i.e. performs step 209.
Step 209: server resolves the card fabrication order that receives, it may be judged whether for produce terminate order or Person produces and unsuccessfully orders, and is then to perform step 212, otherwise performs step 210;
In the present embodiment, card fabrication order include but not limited to card power up commands, firmware download command, Produce and terminate order, produce unsuccessfully order etc.;
Specifically, server resolves the card fabrication order received, it is judged that the type of its command header, when it During for the default command header producing and terminating order, confirm that the card fabrication order received terminates order for producing, When it is the command header preset and produce unsuccessfully order, confirm that the card fabrication order received is for produce unsuccessfully Order;
Preferably, in the present embodiment, when resolving the command header of card fabrication order obtaining receiving it is During Finish, confirm as producing and terminate order, when parsing obtains the command header of the card fabrication order received When being Exception, confirm as producing and unsuccessfully order;Further, when resolving the card obtaining receiving When the command header of fabrication order is Apdu, confirm as performing order.
Step 210: the card fabrication order received is sent to card and produces equipment by server, waits to be concatenated Receive card and produce the operating result that equipment returns, generate command response data according to operating result and return to visitor Family end, returns step 208;
Specifically, the card fabrication order received is sent to card and produces equipment by server, and card produces Equipment performs corresponding operating to card and obtains operating result, and operating result returns to server, server The command response data of preset format are obtained according to the operating result tissue received, and should by the order obtained Answer is according to returning to client;
Further, in the present embodiment, subsidiary command response data backward channel in card fabrication order Passage handle;
The command response data of the preset format obtained are returned to client by server, particularly as follows: server According to the passage handle of command response data backward channel subsidiary in the card fabrication order received, search To backward channel, and by backward channel, the command response data obtained are returned to client;
Such as, card fabrication order ((" Apdu ") (62 00 00 00 00 00 00 00 is received when server 00 00) (reply)) time, server resolves and obtains this order for perform order, then sends the command to card Sheet produces equipment, after card production equipment receives this order, card is performed power on operation, it is preferred that In the present embodiment, the success of card power on operation, then card produces equipment and returns operating result 90 00, service The operating result 90 00 that device returns according to the production equipment received, tissue obtains the command response of preset format Data ((" apdu ") (90 00)), and according to (reply) in card fabrication order find order should Answer, according to backward channel, sends ((" apdu ") (90 00)) to client by the backward channel found.
Step 211: client waits and receive the command response data that server returns, and is finishing receiving it After, return step 207;
Step 212: server generates the first card according to the order received and produces result, and by the first card Produce result and return to client;
Specifically, when server receives production end order, i.e. card has produced, and generates the first card Sheet produces successful result, and by producing the reply data backward channel terminating to specify in order by the first card Produce successful result and be sent to client, it is preferred that server sends OK to client;
When the production that server receives unsuccessfully is ordered, generate the first card and produce failure result, and pass through Produce the reply data backward channel specified in unsuccessfully order and the first card production failure result is sent to client End, it is preferred that server sends Error to client;
Further, in the present embodiment, after 16 the first cards production results server all generate, Perform step 214.
Step 213: client waits and receive that the first card that server returns produces result, returns step 202;
Step 214: server produces result according to the first card and generates the second card production result, and second After card production result all generates, disconnect second channel, perform step 215;
Specifically, when the first card produce result be the first card produce successful result time, server is according to the One card produces successful result and generates the second card production successful result;Wherein, the second card produces and successfully ties Fruit includes that card produces the numbering of successful information and this card, and such as, the card of numbered 4 produces successfully, The second card then generated produces successful result for (" OK ", 4);
When the first card production result is the first card production failure result, server is raw according to the first card Produce failure result and generate the second card production failure result;Wherein, the second card production failure result includes card Sheet produces the numbering of failure information and this card, and such as, the card of numbered 7 produces unsuccessfully, then generate It is (" Error ", 7) that second card produces failure result;
Further, in the present embodiment, 16 are generated when server produces result according to 16 the first cards After individual second card production result completes, perform step 215.
Step 215: server resolves the second card generated and produces result, when parsing obtains having the second card raw When product result is the second card production failure result, perform step 216, produce knot when parsing obtains the second card When fruit is the second card production successful result, return step 203;
Step 216: server produces failure result according to the second card, labelling produces failed card, returns Step 203.
Specifically, server resolves all second cards and produces failure result, obtains the card that all production is failed The numbering of sheet, produces equipment by serial ports to card according to the numbering of the card obtained and sends mark card order, Labelling is all produces failed card, and after receiving card and producing the labelling successful respond that equipment returns, Return step 203;
In the present embodiment, server-tag produces failed card, can be to produce on failed card Punching, it is also possible to for altering the methods such as color;
In the present embodiment, step 216 can also be:
Step 216 ': server produces failure result according to the second card, and generation the 3rd card produces unsuccessfully to be tied Really, the 3rd card according to generating produces failure result, and labelling produces failed card;
In the present embodiment, step 216 ' particularly as follows: server resolves all second cards produces failure result, Obtain all numberings producing failed card, generate the 3rd card according to the numbering of the card obtained and produce mistake Losing result, the 3rd card according to generating produces failure result, produces equipment by serial ports to card and sends mark Note card order, labelling is all produces failed card;Wherein, the 3rd card comprises in producing failure result All numberings producing failed card;
Such as, in the present embodiment, the numbered card of 7,14 produces unsuccessfully, then the 3rd card generated is raw Producing failure result is (" Error ", (7,14));
Further, in the present embodiment, step 215 or step 216 after returning step 203, In step 203, server production equipment is carried out initialized during, if card full scale production is complete, Then produce equipment signal an alert to interrupt producing, and etc. new card to be produced to be placed.
Embodiment three
The embodiment of the present invention three provides a kind of card automatic production method, wherein, runs master in the server Process, equipment control process and the production process of predetermined number, run the client of predetermined number in client Process;Preferably, in the present embodiment, predetermined number is 16 but is not limited to 16, produces 16 the most every time Card, after described startup of server, as it is shown on figure 3, include:
Step 301: host process accesses message-oriented middleware, and in the message between part creates first passage;
In the present embodiment, during message-oriented middleware may be located at server, it is also possible to be positioned in client, its IP address presets and is saved in respectively in server and in client;
Further, in the present embodiment, host process accesses message-oriented middleware particularly as follows: host process is according to pre- The IP address of the message-oriented middleware first preserved accesses message-oriented middleware;
Further, in the present embodiment, in the message between part creates first passage, particularly as follows: main Process in the message between part creates the first distribution interface and the first message queue, the create first distribution is connect Mouth obtains first passage with the first message queue binding;
In addition, step 301 also includes: host process in the message between part creates third channel, four-way Road and Five-channel;The method wherein creating third channel, fourth lane and Five-channel is led to creating first The method in road is identical;
Further, first passage, third channel, fourth lane, Five-channel correspondence respectively presets first Tunnel name, default third channel title, default fourth lane title, default Five-channel title.
Step 302: client process accesses message-oriented middleware, finds first passage, waits to be received by first Passage sends the routing rule of coming;
In the present embodiment, client process specifically includes: client process 1, client process 2 ... client End process 16;
In the present embodiment, step 302 is specifically, client process is according to the message-oriented middleware pre-saved IP address, accesses message-oriented middleware, corresponds to it according to default first passage name lookup to first passage The first message queue, monitor and obtain the routing rule that the first message queue receives;
In the present embodiment, after startup of server, host process and client process are all in accordance with disappearing of pre-saving Message-oriented middleware, in no particular order order are gone to access in the IP address of breath middleware.
Step 303: host process splitter controls process;
Specifically, host process call function interface fork () come splitter control process;
In the present embodiment, equipment control process is used for the cassette tape of control card production equipment and presses down card Produce probe, and be marked producing failed card by card production equipment.
Step 304: equipment controls process initialization card and produces equipment, and returns receiving card production equipment After the commencing signal returned, perform step 305;
In the present embodiment, equipment control process initialization card produce equipment, particularly as follows: equipment control into Journey produces equipment transmitting control commands by serial ports to card, makes card produce the cassette tape of equipment by be produced Card drags to specify position, and the state arranging production probe is to press down and contact the state of card;Initialize After completing, card produces equipment return commencing signal and controls process to equipment.
Step 305: equipment controls process and sends commencing signal to host process;
Specifically, equipment controls the process IP address according to the message-oriented middleware pre-saved, and accesses in message Between part, according to default third channel name lookup to third channel and its 3rd distribution interface corresponded to, and Commencing signal is sent to the 3rd distribution interface, and commencing signal is sent to the 3rd message team by the 3rd distribution interface Row, the commencing signal that the 3rd message queue receives is monitored and obtained to host process.
Step 306: host process waits and the equipment that receives controls the commencing signal that process sends, and is receiving out After beginning signal, divide production process;
In the present embodiment, production process specifically includes production process 1, production process 2 ... production process 16;
Preferably, in the present embodiment, host process, after receiving commencing signal, calls function interface fork () Divide production process 1, production process 2 ... production process 16, and order is corresponding to interface in HUB Numbering 1, interface index 2 ... the USB interface of interface index 16 correspondence, produce numbered 1, numbered 2 ... The card of numbered 16.
Step 307: host process enter monitor card produce state and etc. production process to be received return card Produce result;
Specifically, host process monitors the 4th message queue, receives card life when listening to the 4th message queue When producing result, perform step 315.
Step 308: production process accesses message-oriented middleware, in the message between part creates second channel, and root Secondary route rule is generated according to the second channel created;
In the present embodiment, second channel specifically includes second channel 1, second channel 2 ... second channel 16, Secondary route rule specifically includes secondary route rule 1, secondary route rule 2 ... secondary route rule 16;
In the present embodiment, step 308 is particularly as follows: production process 1, production process 2 ... production process 16 IP address according to the message-oriented middleware pre-saved accesses message-oriented middleware, in the message between corresponding wound in part Build the second distribution interface 1 and the second message queue the 1, second distribution interface 2 and the second message queue 2 ... second Distribution interface 16 and the second message queue 16, and by corresponding with the second message queue for the second distribution interface of establishment Binding obtains second channel 1, second channel 2 ... second channel 16, generates correspondence according to the second channel obtained Secondary route rule 1, secondary route rule 2 ... secondary route rule 16;Wherein, secondary route rule is bright Really the second distribution interface and the binding relationship of the second message queue;
Such as, production process P3 accesses message-oriented middleware according to the IP address of the message-oriented middleware pre-saved, Part creates the second distribution interface 3 and the second message queue 3, the second distribution interface that will create between in the message 3 and second message queue 3 binding obtain second channel 3, and generate route rule according to the second channel 3 obtained Then 3;
Further, in the present embodiment, also include before step 308: production process detects card to be produced The state of sheet;
Specifically, production process sends sense command and produces equipment to card, produces equipment by card and treats Produce card and perform detection operation successively, it may be judged whether receive the detection response that card to be produced returns, be Part creates between the most in the message the second channel corresponding with card to be produced, and right according to second channel generation The secondary route rule answered, otherwise finds the card to be produced not returning detection response, and corresponding generates the Two cards produce failure result and produce, and are sent to host process by fourth lane, and this production process terminates;
Yet further, the second card production failure result generated is sent by production process by fourth lane To host process, particularly as follows: production process is according to default fourth lane name lookup to fourth lane and its correspondence The 4th distribution interface arrived, produces failure result by the second card generated and is sent to the 4th distribution interface, the Second card is produced failure result and is sent to the 4th message queue by four distribution interface, and host process is monitored and obtains The second card that 4th message queue receives produces failure result.
Step 309: secondary route rule is sent to client process by first passage by production process;
Specifically, production process 1, production process 2 ... production process 16 is according to the message-oriented middleware pre-saved IP address access message-oriented middleware, and according to default first passage name lookup to first passage and its correspondence The first distribution interface arrived, and by the secondary route rule 1 of correspondence generation, secondary route rule 2 ... the second tunnel Being sent to the first distribution interface by rule 16, the first distribution interface sends secondary route rule to the first message team Row, the secondary route rule that the first message queue receives is monitored and obtained to client process.
Step 310: client process receives secondary route rule;
Specifically, the secondary route rule that the first message queue receives is monitored and obtained to client process;
In the present embodiment, client process receives secondary route rule and uses must be first main principle, rather than Corresponding principle;
Such as, client process 5 have received secondary route rule 1.
Step 311: client process, according to the secondary route rule received, finds the second channel of correspondence, Card fabrication order is sent to production process by the second channel found;
Specifically, client process according to the secondary route rule searching received to corresponding second channel and Its second distribution interface corresponded to, sends card fabrication order to the second distribution interface found, and second Distribution interface sends card fabrication order and monitors to the second corresponding message queue, corresponding production process and obtain Take the card fabrication order that the second message queue receives;
Such as, client process 5 have received secondary route rule 1, then client process 5 is according to reception Secondary route rule 1 finds second channel 1 and second distribution interface 1 of its correspondence of correspondence, sends card The second distribution interface 1 is given in fabrication order, and the second distribution interface 1 sends card fabrication order and disappears to corresponding second Breath queue 1, corresponding production process P1 monitors and obtains the card production life that the second message queue 1 receives Order;
In the present embodiment, 16 client process are all by said method, according to the secondary route received Rule sends card fabrication order to production process.
Step 312: production process waits and receive the card fabrication order that client process sends, and is receiving After card fabrication order, perform step 313;
Step 313: production process resolves the card fabrication order received, it may be judged whether terminate order for producing Or produce and unsuccessfully order, be then to perform step 316, otherwise perform step 314;
In the present embodiment, card fabrication order include but not limited to card power up commands, firmware download command, Produce and terminate order, produce unsuccessfully order etc.;
Specifically, production process resolves the card fabrication order received, it is judged that the type of its command header, when When it produces, for presetting, the command header terminating order, confirm that the card fabrication order received terminates life for producing Order, when it is the command header preset and produce unsuccessfully order, confirms that the card fabrication order received is for producing Failure order;
Preferably, in the present embodiment, when resolving the command header of card fabrication order obtaining receiving it is During Finish, confirm as producing and terminate order, when parsing obtains the command header of the card fabrication order received When being Exception, confirm as producing and unsuccessfully order;Further, when resolving the card obtaining receiving When the command header of fabrication order is Apdu, confirm as performing order.
Step 314: the card fabrication order received is sent to card and produces equipment by production process, waits also Receive card and produce the operating result that equipment returns, generate command response data according to operating result and return to Client process, returns step 312;
Specifically, the card fabrication order received is sent to card and produces equipment by production process, and card is raw Product equipment performs corresponding operating to card and obtains operating result, and return to the operating result obtained to produce into Journey, production process obtains the command response data of preset format according to the operating result tissue received, and will The command response data obtained return to client process;
Further, in the present embodiment, subsidiary command response data backward channel in card fabrication order Passage handle;
The command response data obtained are returned to client process by production process, particularly as follows: production process root According to the passage handle of command response data backward channel subsidiary in the card fabrication order received, find Backward channel, and by backward channel, the command response data obtained are returned to client process;
Such as, card fabrication order ((" Apdu ") (62 00 00 00 00 00 00 is received when production process 1 00 00 00) (reply)) time, production process 1 resolves and obtains this order for perform order, then this order sent out Give card and produce equipment, after card production equipment receives this order, card is performed power on operation, excellent Choosing, in the present embodiment, the success of card power on operation, then card produces equipment and returns operating result 90 00, The operating result 90 00 that production process 1 returns according to the production equipment received, tissue obtains preset format Command response data ((" apdu ") (90 00)), and find command response data according to (reply) Backward channel, sends ((" apdu ") (90 00)) to client process 5 by the backward channel found.
Step 315: client process receives the command response data that production process returns, and is finishing receiving it After, return step 311;
Step 316: production process generates the first card according to the order received and produces result, and blocks first Sheet produces result and returns to client process;
Specifically, when production process receives production end order, i.e. card has produced, and generates first Card produces successful result, and blocks first by producing the reply data backward channel terminating to specify in order Sheet produces successful result and is sent to client process, it is preferred that production process sends OK to client process;
When the production that production process receives unsuccessfully is ordered, generate the first card and produce failure result, and lead to Cross and produce the reply data backward channel specified in unsuccessfully order and the first card is produced failure result be sent to visitor Family end process, it is preferred that production process sends Error to client process.
Step 317: client process waits and receive that the first card that production process returns produces result, returns Step 302.
Step 318: production process produces result according to the first card and generates the second card production result, by second Card produces result and is sent to host process, and production process terminates;
Specifically, production process accesses message-oriented middleware according to the IP address of the message-oriented middleware pre-saved, And according to default fourth lane name lookup to fourth lane and its 4th distribution interface corresponded to, will generate Second card produce result be sent to the 4th distribution interface, the 4th distribution interface by second card produce result Being sent to the 4th message queue, the second card production that the 4th message queue receives is monitored and obtained to host process Result;
Further, in the present embodiment, when first card produce result be first card produce successful result Time, production process produces successful result according to the first card and generates the second card production successful result;Wherein, Second card produces successful result and includes that card produces the numbering of successful information and this card, such as, produce into The card that journey 4 produces produces successfully, and the card of the most numbered 4 produces successfully, then production process 4 sends (" OK ", 4) gives host process;
In the present embodiment, when first card produce result be first card produce failure result time, produce into Journey Pn produces failure result according to the first card and generates the second card production failure result;Wherein, the second card Producing failure result and include that card produces the numbering of failure information and this card, such as, production process 7 produces Card produce unsuccessfully, the card of the most numbered 7 produces unsuccessfully, then production process 7 send (" Error ", 7) host process is given;
Further, in the present embodiment, production process 1, production process 2 ... production process 16 all passes through The first card that said method is generated produces the second card production result that result generates, and blocks second Sheet produces result and is sent to host process.
Step 319: host process receives the second card production result that production process returns, when the second card produces When result all finishes receiving, perform step 320;
Specifically, the second card production result that the 4th message queue receives is monitored and received to host process, when After 16 the second card production results all finish receiving, perform step 320.
Step 320: host process resolves the second card received and produces result and generate the 3rd card production knot Really, the 3rd card generated is produced result and is sent to equipment control process, return step 306;
Specifically, host process resolves 16 the second cards received and produces result, when parsing obtains having second When card production result is the second card production failure result, obtain the numbering producing failed card, and root Generate the 3rd card according to the numbering of the card got and produce failure result, the 3rd card is produced failure result It is sent to equipment by Five-channel and controls process;It is the second card when parsing obtains the second card production result When sheet produces successful result, generate the 3rd card and produce successful result, the 3rd card is produced successful result and leads to Road Five-channel is sent to equipment and controls process;
Such as, in the present embodiment, the numbered card of 7,14 produces unsuccessfully, then host process passes through five-way Road sends (" Error ", (7,14)) and controls process to equipment;
When card full scale production success, it is preferred that host process sends (" OK ") by Five-channel and gives Equipment controls process;
Further, in the present embodiment, the 3rd card generated is produced result by five-way by host process Road is sent to equipment and controls process, particularly as follows: host process is according to the IP address of the message-oriented middleware pre-saved Access message-oriented middleware, and according to preset Five-channel name lookup to Five-channel and its correspond to the 5th Distribution interface, produces result by the 3rd card generated and is sent to the 5th distribution interface, and the 5th distribution interface will 3rd card produces result and is sent to the 5th message queue, and equipment controls process and monitors and obtain the 5th message team The 3rd card that row receive produces result.
Step 321: equipment controls the 3rd card production result that process waited and received that host process sends, when connecing When receiving the 3rd card production result, perform step 322;
Specifically, the 3rd card production knot that the 5th message queue receives is monitored and obtained to equipment control process Really, and when receiving the 3rd card and producing result, step 322 is performed.
Step 322: equipment controls process and resolves the 3rd card production result received, when it is the 3rd card When producing failure result, perform step 323, when it is the 3rd card production successful result, return step 304;
Step 323: equipment controls process and produces failure result according to the 3rd card, and labelling produces failed card, Return step 304;
Specifically, equipment controls process and resolves the 3rd card production failure result received, and obtains all lifes Produce the numbering of failed card, produce equipment by serial ports to card according to the numbering of the card obtained and send mark Note card order, labelling is all produces failed card, and produces, receiving card, the labelling that equipment returns After successful respond, return step 304;
In the present embodiment, equipment controls Processes Tag and produces failed card, can be to produce unsuccessfully Punch on card, it is also possible to for altering the methods such as color.
Further, in the present embodiment, step 322 or step 323 after returning step 304, In step 304, equipment control process production equipment is carried out initialized during, if card full scale production Complete, then produce equipment signal an alert and interrupt producing, and etc. new card to be produced to be placed, when After server closing, host process terminates, and equipment controls process and terminates.
Embodiment four
The embodiment of the present invention four provides a kind of method of card automated production, and server and client side IP address and port numbers all preset;Preferably, in the present embodiment, the quantity every time producing card is pre- First it is set as 16, as shown in Figure 4, including:
Step 401: server initiation network and the first socket, and build with client according to the first socket Vertical first connection;
In the present embodiment, the first socket of server initiation comprises the IP address of client and with One presets the first port numbers that port is corresponding;
In the present embodiment, set up first according to the first socket with client and be connected, particularly as follows: server According to the IP address comprised in the first socket and the first port numbers, send the first connection request to client, After client listens to the first connection request, resolve the first connection request obtain server IP address and with Second presets the second port numbers that port is corresponding, and presets port and second first and preset and set up between port First connects;
Further, after the first connection establishment completes, also include: client returns successful connection response To server, after server receives successful connection response, perform step 402;
Further, in the present embodiment, after the first connection establishment completes, also include: at the beginning of client Beginningization connects corresponding the 3rd socket with first, wherein the 3rd socket comprises the IP address of server with Second port numbers.
Step 402: server initiation produces equipment, and after the initialization is completed, performs step 403;
In the present embodiment, server initiation card produce equipment, particularly as follows: server by serial ports to Card produces equipment and sends initialization command, and card to be produced is dragged to by the cassette tape making card produce equipment Specifying position, the state arranging production probe is to press down and contact the state of card;
Further, after having initialized, card produces equipment and returns commencing signal to server, service After device receives commencing signal, perform step 403.
Step 403: server sends the 3rd port numbers to client by the first connection;
In the present embodiment, the 3rd port numbers specifically includes the 3rd port numbers the 1, the 3rd port numbers 2 ... the 3rd end Slogan 16;
Preferably, the 3rd port numbers the 1, the 3rd port numbers 2 ... the 3rd of the 3rd port numbers 16 correspondence presets port 1, the 3rd port 2 is preset ... the 3rd presets the corresponding production numbered 1, numbered 2 of port 16 ... numbered 16 Card.
Step 404: client waits and receives the 3rd port numbers, the 3rd port numbers according to receiving initializes Second socket, and set up second with server and be connected;
In the present embodiment, the second socket specifically includes second socket the 1, second socket 2 ... the second set Connect word 16;Second connection specifically includes the second connection 1, second and connects 2 ... second connects 16;Wherein the second set Connect IP address and the 3rd port numbers comprising server in word;
In the present embodiment, step 404 presets what port received particularly as follows: client is monitored and obtained first 3rd port numbers, according to the 3rd port numbers initialization package received the second socket containing the 3rd port numbers, And sending the second connection request to server, server resolves the second request and obtains the 4th with client and preset The 4th port numbers that port is corresponding, and preset port and the 4th the 3rd and preset and between port, set up the second connection, And return successful connection response to client, client receive successful connection response that server returns it After, perform step 405;
Further, in the present embodiment, after the second connection establishment success, also include: server is initial Change and the second the 4th socket corresponding to connection, the 4th socket wherein comprises the IP address and the of client Four port numbers;4th socket specifically includes the 4th socket the 1, the 4th socket 2 ... the 4th socket 16.
Step 405: client finds the second connection according to the second socket, and by the second connection sending card Sheet fabrication order is to server;
Specifically, client finds the second connection and the 3rd preset interface of its correspondence according to the second socket, Transmission card fabrication order is to the 3rd preset interface, and server is monitored and obtains what the 3rd preset interface received Card fabrication order;
Such as, client finds the second connection 3 and the 3rd of correspondence according to the second socket 3 received Preset interface 3, transmission card fabrication order is to the 3rd preset interface 3, and server is monitored and obtained the 3rd and presets The card fabrication order that interface 3 receives.
Step 406: server waits and receive the card fabrication order that client sends, and is receiving card After fabrication order, perform step 407;
Specifically, server is monitored and is obtained the 3rd and presets the card fabrication order that port receives.
Step 407: server resolves the card fabrication order that receives, it may be judged whether for produce terminate order or Person produces and unsuccessfully orders, and is then to perform step 410, otherwise performs step 408;
In the present embodiment, card fabrication order include but not limited to card power up commands, firmware download command, Produce and terminate order, produce unsuccessfully order etc.;
Specifically, server resolves the card fabrication order received, it is judged that the type of its command header, when it During for the default command header producing and terminating order, confirm that the card fabrication order received terminates order for producing, When it is the command header preset and produce unsuccessfully order, confirm that the card fabrication order received is for produce unsuccessfully Order;
Preferably, in the present embodiment, when resolving the command header of card fabrication order obtaining receiving it is During Finish, confirm as producing and terminate order, when parsing obtains the command header of the card fabrication order received When being Exception, confirm as producing and unsuccessfully order;Further, when resolving the card obtaining receiving When the command header of fabrication order is Apdu, confirm as performing order.
Step 408: the card fabrication order received is sent to card and produces equipment by server, waits to be concatenated Receive card and produce the operating result that equipment returns, generate command response data and by second according to operating result Connect and return to client, return step 406;
Specifically, the card fabrication order received is sent to card and produces equipment by server, and card produces Equipment performs corresponding operating to card and obtains operating result, and the operating result obtained is returned to server, Server obtains the command response data of preset format according to the operating result tissue received, and according to the 4th Socket finds the second connection, connects by second and command response data are returned to client;
Such as, the 3rd when server presets port 5 and receives card fabrication order ((" Apdu ") (62 00 00 00 00 00 00 00 00 00), time), server resolves and obtains this order for perform order, then this order sent out Give card and produce equipment, after card production equipment receives this order, card is performed power on operation, excellent Choosing, in the present embodiment, the success of card power on operation, then card produces equipment and returns operating result 90 00, The operating result 90 00 that server returns according to the production equipment received, tissue obtains the order of preset format Reply data ((" apdu ") (90 00)), finds the second connection 5 of correspondence according to the 4th socket 5, 5 return command reply datas ((" apdu ") (90 00)) are connected to client by second.
Step 409: client waits and receive the command response data that server returns, and is finishing receiving it After, return step 405;
Specifically, client is monitored and is obtained the 3rd and presets the command response data that port receives.
Step 410: server generates the first card according to the order received and produces result, and by the first card Produce result and return to client by the second connection;
Specifically, when server receives production end order, i.e. card has produced, and generates the first card Sheet produces successful result, and finds the second connection according to the 4th corresponding socket, and connecting by second will First card produces successful result and is sent to client, it is preferred that server sends OK to client;
When the production that server receives unsuccessfully is ordered, generate first card produce failure result, and according to The 4th corresponding socket finds the second connection, connects by second and first card production failure result is sent out Give client, it is preferred that server sends Error to client;
Further, in the present embodiment, all generate when 16 the first cards produce results server and return After client, perform step 412.
Step 411: client waits and receive that the first card that server returns produces result, returns step 404;
Specifically, client is monitored and is obtained the 3rd and presets the first card production result that port receives.
Step 412: server produces result according to the first card and generates the second card production result, and second After card production result all generates, disconnect the second connection, perform step 413;
Specifically, when the first card produce result be the first card produce successful result time, server is according to the One card produces successful result and generates the second card production successful result;Wherein, the second card produces and successfully ties Fruit includes that card produces the numbering of successful information and this card, and such as, the card of numbered 4 produces successfully, The second card then generated produces successful result for (" OK ", 4);
When the first card production result is the first card production failure result, server is raw according to the first card Produce failure result and generate the second card production failure result;Wherein, the second card production failure result includes card Sheet produces the numbering of failure information and this card, and such as, the card of numbered 7 produces unsuccessfully, then generate It is (" Error ", 7) that second card produces failure result;
Further, in the present embodiment, 16 are generated when server produces result according to 16 the first cards After individual second card production result completes, perform step 413.
Step 413: server resolves the second card generated and produces result, when parsing obtains having the second card raw When product result is the second card production failure result, perform step 414, produce knot when parsing obtains the second card When fruit is the second card production successful result, return step 403;
Step 414: server produces failure result according to the second card, labelling produces failed card, returns Step 402.
Specifically, server resolves all second cards and produces failure result, obtains the card that all production is failed The numbering of sheet, produces equipment by serial ports to card according to the numbering of the card obtained and sends mark card order, Labelling is all produces failed card, and after receiving card and producing the labelling successful respond that equipment returns, Return step 402;
In the present embodiment, server-tag produces failed card, can be to produce on failed card Punching, it is also possible to for altering the methods such as color;
In the present embodiment, step 414 can also be:
Step 414 ': server produces failure result according to the second card, and generation the 3rd card produces unsuccessfully to be tied Really, the 3rd card according to generating produces failure result, and labelling produces failed card;
In the present embodiment, step 414 ' particularly as follows: server resolves all second cards produces failure result, Obtain all numberings producing failed card, generate the 3rd card according to the numbering of the card obtained and produce mistake Losing result, the 3rd card according to generating produces failure result, produces equipment by serial ports to card and sends mark Note card order, labelling is all produces failed card;Wherein, the 3rd card comprises in producing failure result All numberings producing failed card;
Such as, in the present embodiment, the numbered card of 7,14 produces unsuccessfully, then the 3rd card generated is raw Producing failure result is (" Error ", (7,14));
Further, in the present embodiment, step 413 or step 414 after returning step 402, In step 402, server production equipment is carried out initialized during, if card full scale production is complete, Then produce equipment signal an alert to interrupt producing, and etc. new card to be produced to be placed.
Embodiment five
The embodiment of the present invention five provides a kind of card automatic production method, wherein runs first in server main Process, equipment control process and the production process of predetermined number, and client runs the second host process and present count The client process of amount;Preferably, in the present embodiment, predetermined number is 16 but is not limited to 16, the most every time Produce 16 cards, as it is shown in figure 5, include:
Step 501: the first host process initializes network and the first socket, and send the first connection request to the Two host processes;
In the present embodiment, the IP address that comprises client in the first socket and to preset port with first corresponding The first port numbers.
Step 502: the second host process receives the first connection request and sets up the first connection;
Specifically, after the first connection request is monitored and received to the second host process, resolve the first connection request Obtain the IP address of server and preset the second port numbers that port is corresponding with second, and presetting port first Preset with second and set up first between port and be connected;
Further, after the first connection establishment completes, also include: the second host process returns successful connection The first host process is given in response, after the first host process receives successful connection response, performs step 503;
Further, after the first connection establishment completes, also including, the second host process initializes and first Connect the 3rd corresponding socket, the 3rd socket wherein comprises IP address and second port numbers of server.
Step 503: the first host process splitter controls process;
Specifically, the first host process call function interface fork () come splitter control process;
In the present embodiment, equipment control process is used for the cassette tape of control card production equipment and presses down card Produce probe, and be marked producing failed card by card production equipment.
Step 504: equipment controls process initialization card and produces equipment, and after the initialization is completed, performs Step 505;
In the present embodiment, equipment control process initialization card produce equipment, particularly as follows: equipment control into Journey produces equipment transmitting control commands by serial ports to card, makes card produce the cassette tape of equipment by be produced Card drags to specify position, and the state arranging production probe is to press down and contact the state of card;
Further, after having initialized, card produces equipment return commencing signal and controls process to equipment.
Step 505: equipment controls process and sends commencing signal to the first host process;
Specifically, equipment controls process communication process communication transmission commencing signal to host process;
Described process communication, can be shared drive, it is also possible to for modes such as internal memory mappings.
Step 506: the first host process waits and the equipment that receives controls the commencing signal that process sends, and is receiving After commencing signal, divide production process;
In the present embodiment, production process specifically includes production process 1, production process 2 ... production process 16;
Preferably, in the present embodiment, the first host process, after receiving commencing signal, is called function and is connect Mouth fork () divides production process 1, production process 2 ... production process 16, and order is corresponding to HUB Middle interface index 1, interface index 2 ... the 3rd port in the USB interface of interface index 16 correspondence and server Number the 1, the 3rd port numbers 2 ... the 3rd of the 3rd port numbers 16 correspondence presets port, produce numbered 1, compile It number it is 2 ... the card of numbered 16.
Step 507: first host process enter monitor card produce state and etc. production process to be received return Card produces result;
Step 508: production process sends the 3rd port numbers of its correspondence to the second host process by the first connection;
Specifically, production process finds the first connection according to the first socket, and is sent by the first connection 3rd port numbers of its correspondence presets port to first, and the second host process is monitored and obtained first and presets port and connect The 3rd port numbers received;
Further, in the present embodiment, also include before step 508: production process detects card to be produced State;
Specifically, production process sends sense command and produces equipment to card, produces equipment by card and treats Produce card and perform detection operation successively, it may be judged whether receive the detection response that card to be produced returns, be Then send the 3rd port numbers of its correspondence to the second host process, otherwise find and do not return the to be generated of detection response Produce card, and corresponding second card that generates produce failure result and produces, and be sent to host process, this produce into Journey terminates.
Step 509: the second host process receives the 3rd port numbers and is sent to client process;
Second host process receives the 3rd port numbers and presets port particularly as follows: the second host process is monitored and obtained first The 3rd port numbers received;
Further, in the present embodiment, client process specifically includes: client process 1, client are entered Journey 2 ... client process 16;
Preferably, in the present embodiment, the 3rd port numbers correspondence received is sent to visitor by the second host process Family end process, it follows that client process 1 receives the 3rd port numbers 1, client process 2 receives 3rd port numbers 2 ... client process 16 receives the 3rd port numbers 16.
Step 510: client process waits and receives the 3rd port numbers, at the beginning of the 3rd port numbers received Beginningization the second socket, and send the second connection request to production process;
In the present embodiment, the second socket specifically includes second socket the 1, second socket 2 ... the second set Connect word 16;Second socket wherein comprises IP address and the 3rd port numbers of server;
Step 511: production process receives the second connection request and sets up the second connection;
In the present embodiment, the second connection specifically includes second connection the 1, second connection 2 ... second connects 16, And order corresponding client process 1, client process 2 ... client process 16, produce numbered 1, Numbered 2 ... the card of numbered 16;
Specifically, client process is monitored and is obtained the 3rd and presets port and receive the second connection request, resolves Second connection request obtains the IP address of client and presets the 4th port numbers that port is corresponding with the 4th, and 3rd presets port and the 4th presets and sets up the second connection between port;
Such as, client process 3 is monitored and is obtained the 3rd and presets port 3 and receive the second connection request, solves Analyse the second connection request obtain the IP address of client and preset, with the 4th, the 4th port numbers 3 that port 3 is corresponding, And preset port 3 the 3rd and preset with the 4th and set up second between port 3 and be connected 3;
Further, after the second connection establishment completes, also include: production process returns successful connection should Answer to client process, after client process receives successful connection response, perform step 512;
Further, in the present embodiment, after the second connection establishment completes, also include: production process Initialize the 4th socket, the 4th socket wherein comprises IP address and the 4th port numbers of client;The Four sockets specifically include the 4th socket the 1, the 4th socket 2 ... the 4th socket 16.
Step 512: client process sends card fabrication order to production process by the second connection;
Specifically, client process finds the second connection of its correspondence according to its initialized second socket Preset port with the 3rd, and preset port by the second connection transmission card fabrication order to the corresponding the 3rd, Production process is monitored and is obtained the 3rd and presets the card fabrication order that port receives;
Such as, client process 5 finds the second connection 5 according to its initialized second socket 5, passes through Second connects 5 transmission card fabrication orders presets port 5 to the corresponding the 3rd, and production process 5 is monitored and obtains 3rd presets the card fabrication order that port 5 receives.
Step 513: production process waits and receive the card fabrication order that client process sends, and is receiving After card fabrication order, perform step 514;
Specifically, production process is monitored and is obtained the 3rd of its correspondence and presets the card production life that port receives Order.
Step 514: production process resolves the card fabrication order received, it may be judged whether terminate order for producing Or produce and unsuccessfully order, be then to perform step 517, otherwise perform step 515;
In the present embodiment, card fabrication order include but not limited to card power up commands, firmware download command, Produce and terminate order, produce unsuccessfully order etc.;
Specifically, production process resolves the card fabrication order received, it is judged that the type of its command header, when When it produces, for presetting, the command header terminating order, confirm that the card fabrication order received terminates life for producing Order, when it is the command header preset and produce unsuccessfully order, confirms that the card fabrication order received is for producing Failure order;
Preferably, in the present embodiment, when resolving the command header of card fabrication order obtaining receiving it is During Finish, confirm as producing and terminate order, when parsing obtains the command header of the card fabrication order received When being Exception, confirm as producing and unsuccessfully order;Further, when resolving the card obtaining receiving When the command header of fabrication order is Apdu, confirm as performing order.
Step 515: the card fabrication order received is sent to card and produces equipment by production process, waits also Receive card and produce the operating result that equipment returns, generate command response data according to operating result and return to Described client process, returns step 513;
Specifically, the card fabrication order received is sent to card and produces equipment by production process, and card is raw Product equipment performs corresponding operating to card and obtains operating result, and operating result returns to production process, raw Product process obtains the command response data of preset format according to the operating result tissue received, and according to the 4th Socket finds the second connection of correspondence, connects return command reply data to client process by second;
Such as, card fabrication order ((" Apdu ") (62 00 00 00 00 00 is received as production process P2 00 00 00 00) (reply)) time, production process P2 resolves and obtains this order for perform order, then by this life Order is sent to card and produces equipment, after card production equipment receives this order, card is performed power on operation, Preferably, in the present embodiment, the success of card power on operation, then card produces equipment and returns operating result 90 00, The operating result 90 00 that production process 2 returns according to the production equipment received, tissue obtains preset format Command response data ((" apdu ") (90 00)), and the second of correspondence is found according to the 4th socket 2 Connect 2, connect 2 return command reply datas ((" apdu ") (90 00)) by second and enter to client Journey 2.
Step 516: client process receives the command response data that production process returns, and is finishing receiving it After, return step 512;
Specifically, client process is monitored and is obtained the 4th of its correspondence and presets the command response that port receives Data.
Step 517: production process generates the first card according to the order received and produces result, and blocks first Sheet produces result and returns to client process by the second connection;
Specifically, when production process receives production end order, i.e. card has produced, and generates first Card produces successful result, and finds the second connection according to the 4th corresponding socket, by corresponding the First card is produced successful result and is sent to client process by two connections, it is preferred that production process sends OK To client process;
When the production that production process receives unsuccessfully is ordered, generate the first card and produce failure result, and also Find the second connection according to the 4th corresponding socket, by the second corresponding connection, the first card is produced Failure result is sent to client process, it is preferred that production process sends Error to client process.
Step 518: client process waits and receive that the first card that production process returns produces result, returns Step 510.
Step 519: production process produces result according to the first card and generates the second card production result, by second Card produces result and is sent to host process, and this production process terminates;
Further, in the present embodiment, when first card produce result be first card produce successful result Time, production process produces successful result according to the first card and generates the second card production successful result;Wherein, Second card produces successful result and includes that card produces the numbering of successful information and this card, such as, produce into The card that journey 2 produces produces successfully, and the card of the most numbered 2 produces successfully, then production process 2 sends (" OK ", 2) gives host process;
In the present embodiment, when first card produce result be first card produce failure result time, produce into Journey produces failure result according to the first card and generates the second card production failure result;Wherein, the second card is raw Producing failure result and include that card produces the numbering of failure information and this card, such as, production process 7 produces Card produces unsuccessfully, and the card of the most numbered 7 produces unsuccessfully, then production process P7 sends (" Error ", 7) To host process;
Further, in the present embodiment, production process 1, production process 2 ... production process 16 all passes through The first card that said method is obtained produces the second card production result that result generates, and blocks second Sheet produces result and is sent to host process by process communication.
Step 520: host process receives the second card production result that production process returns, when the second card produces After result all finishes receiving, perform step 521;
Specifically, after 16 the second cards production results all finish receiving, step 521 is performed.
Step 521: host process resolves the second card received and produces result and generate the 3rd card production knot Really, the 3rd card generated is produced result and is sent to equipment control process, return step 506;
Specifically, host process resolves 16 the second cards received and produces result, when parsing obtains having second When card production result is the second card production failure result, obtain the numbering producing failed card, and root Generate the 3rd card according to the numbering of the card got and produce failure result, the 3rd card is produced failure result It is sent to equipment by process communication and controls process;It is the second card when parsing obtains the second card production result When sheet produces successful result, generate the 3rd card and produce successful result, the 3rd card is produced successful result and leads to Cross process communication and be sent to equipment control process;
Such as, in the present embodiment, the numbered card of 7,14 produces unsuccessfully, then host process transmission (" Error ", (7,14)) control process to equipment;
When card full scale production success, it is preferred that host process sends (" OK ") and controls process to equipment.
Step 522: equipment controls the 3rd card production result that process waited and received that host process sends, when connecing When receiving the 3rd card production result, perform step 523;
Step 523: equipment controls process and resolves the 3rd card production result received, when it is the 3rd card When producing failure result, perform step 524, when it is the 3rd card production successful result, return step 504;
Step 524: equipment controls process and produces failure result according to the 3rd card, and labelling produces failed card, Return step 504;
Specifically, equipment controls process and resolves the 3rd card production failure result received, and obtains all lifes Produce the numbering of failed card, produce equipment by serial ports to card according to the numbering of the card obtained and send mark Note card order, labelling is all produces failed card, and produces, receiving card, the labelling that equipment returns After successful respond, return step 504;
In the present embodiment, equipment controls Processes Tag and produces failed card, can be to produce unsuccessfully Punch on card, it is also possible to for altering the methods such as color.
Further, in the present embodiment, step 522 or step 523 after returning step 504, In step 504, equipment control process production equipment is carried out initialized during, if card full scale production Complete, then produce equipment signal an alert and interrupt producing, and etc. new card to be produced to be placed, when After server closing, host process terminates, and equipment controls process and terminates.
Embodiment six
The embodiment of the present invention six provides a kind of card automatic production device, as shown in Figure 6, and including:
First creation module 601, for creating the first communication path;
Second creation module 602, for creating second communication path corresponding with card to be produced;
Sending module 603, the first communication path for being created by the first creation module 601 is sent second and leads to News ID of trace route path is to client;
Receiver module 604, for receiving the second communication path that client is created by the second creation module 602 Send the card fabrication order of coming;
Perform module 605, for the card fabrication order pair and the second communication that receive according to receiver module 604 Card corresponding to path performs corresponding operating and obtains card and produce result.
Device in the present embodiment, also includes:
Detection module, is used for sending sense command and produces equipment to card, produces equipment to all by card Card to be produced performs detection operation successively;
Judge module, for judging whether to receive the detection response of all cards to be produced return;
When judge module, generation module, for judging that the detection not receiving the return of all cards to be produced should When answering, find the card to be produced not returning described detection response, and the card generating correspondence produces unsuccessfully Result;
When judge module, second creation module 602, specifically for judging that receiving all cards to be produced returns Detection response, create second communication path corresponding with card to be produced.
Further, in the present embodiment, the second creation module 602, specifically for: according to the inspection received Survey response, find the card to be produced of correspondence, and create the second corresponding communication path.
In the present embodiment, the first creation module 601, specifically for: access message-oriented middleware, in the message Between part creates the first distribution interface and the first message queue, the first distribution interface is tied up with the first message queue Surely the first communication path is obtained.
Correspondingly, sending module 603, specifically for: according to default first communication path name lookup to first Communication path and its first distribution interface corresponded to, and the second communication path mark is sent to the first distribution Interface.
In the present embodiment, the second creation module 602, specifically for: create the card to be produced with predetermined number Second communication path of the predetermined number that sheet is corresponding;
Correspondingly, sending module 603, specifically for: the second of predetermined number is sent by the first communication path Communication path identifies to client.
Device in the present embodiment, also includes: the first generation module;
Second creation module 602, specifically for: according to the card to be produced of predetermined number in the message between in part Create the second distribution interface and second message queue of predetermined number of corresponding predetermined number, and by second point Send out interface binding corresponding with the second message queue and obtain the second communication path of predetermined number;
Correspondingly, the first generation module, generate corresponding institute for the second communication path according to predetermined number State the second communication path mark of predetermined number;
Correspondingly, sending module 603, specifically for: the second of predetermined number is sent by the first communication path Communication path identifies to client.
In the present embodiment, the first creation module 601, it is also possible to be used for: initialize the first socket, and root The first communication path is created according to the first socket.
Specifically, the first creation module 601 is used for: initialize the first socket, according in the first socket First port numbers sends and comprises the first connection request of the second port numbers to client, corresponding in the first port numbers First preset port second preset port between create first communication path corresponding with the second port numbers.
Correspondingly, sending module 603, specifically for: sent and card pair to be produced by the first communication path The second communication path answered identifies to client;
Second creation module 602, it is also possible to be used for: sending module 603 by the first communication path send with After the second communication path that card to be produced is corresponding identifies to client, set up the second communication road with client Footpath.
Further, sending module 603, specifically for: find the first communication path according to the first socket First preset port and second with it corresponds to and preset port, and preset port by second and send and preset Second communication path of the predetermined number that the card to be produced of quantity is corresponding identifies presets port to first.
In the present embodiment, the second creation module 602, it is also possible to specifically for: receive client by first Communication path sends the predetermined number come and the second connection request containing the 4th port numbers, and at predetermined number The second communication path mark corresponding the 3rd preset that port is corresponding with the 4th port numbers of predetermined number the 4th Preset the second communication path of the predetermined number setting up correspondence between port.
In the present embodiment, perform module 605, specifically include:
Judging unit, connects, for receiving client at receiver module 604, the card life sending by second After producing order, resolve the card fabrication order received, it may be judged whether terminate order for producing or produce Failure order;
When judging unit, first transmitting element, for judging that the card fabrication order received is not to produce knot Bundle order or produces when unsuccessfully ordering, is sent to card production equipment by the card fabrication order received;
Receive unit, produce, for waiting and receiving card, the operating result that equipment returns;
First signal generating unit, for according to receiving the operating result generation command response data that unit receives;
Second transmitting element, for returning to client by the command response data that signal generating unit generates;
In the present embodiment, receiver module 604, it is additionally operable to: when transmitting element will receive the life that unit receives After making reply data return to client, wait and receive what client was come by the second communication path transmission Card fabrication order;
Second signal generating unit, the card fabrication order for receiving according to receiver module 604 generates middle production As a result, according to producing result generation card production result in the middle of generating.
Further, in the present embodiment, the second transmitting element, specifically for: according to the card received The path handle of command response data return path subsidiary in fabrication order, finds command response data and returns Command response data are returned to client by the command response data return path found by footpath, loop
Second transmitting element, it is also possible to be used for: command response data are returned to visitor by the second communication path Family end.
Further, the second signal generating unit, specifically for:
When the card fabrication order that judging unit parsing receives judges that it is to produce end order, generate First card produces successful result, and the first card according to generating produces successful result, generates and includes that card is raw The card of the numbering producing successful information and this card produces result;
When judging unit resolve the card fabrication order that receives judge its be produces unsuccessfully order time, generation First card produces failure result, and the first card according to generating produces failure result, generates and includes that card is raw The card of the numbering producing failure information and this card produces result.
In the present embodiment, perform module 605, also include:
3rd transmitting element, produces life for the card received according to receiver module 604 in the second signal generating unit Order generates middle after producing result, centre is produced result and returns to client.
Device in the present embodiment, also includes:
Parsing module, after generating card production result when the second signal generating unit, resolves card and produces knot Really;
Mark module, being used for when parsing module parsing obtains having card to produce result is that card produces failure result Time, labelling produces failed card.
In the present embodiment, mark module, specifically for: resolve card and produce failure result, produced The numbering of failed card, generates according to the numbering producing failed card and comprises the failed card of this production The mark card order of numbering, and mark card order is sent to production equipment.
In the present invention, the production deployment of card uses bus type framework, it is achieved that card produces and data processed The separation of journey, it is possible to effectively carry out collection and the version management of hair fastener script of card production information, face to face When facing the card customization of the different demand of high-volume, effectively shorten the production cycle of card, be simultaneously achieved Cross-platform co-production.
The above, the only present invention preferably detailed description of the invention, but protection scope of the present invention not office Being limited to this, any those familiar with the art, can be easily in the technical scope that the invention discloses Expect change or replace, all should contain within protection scope of the present invention.Therefore, the protection model of the present invention Enclose and should be as the criterion with scope of the claims.

Claims (40)

1. the method for a card automated production, it is characterised in that including:
Step S1: described server creates the first communication path;
Step S2: described server creates second communication path corresponding with card to be produced, and by described First communication path sends the second communication path and identifies to client;
Step S3: described server receives described client and sends, by described second communication path, the card of coming Fabrication order, holds according to the card to be produced that described card fabrication order pair is corresponding with described second communication path Row corresponding operating obtains card and produces result.
Method the most according to claim 1, it is characterised in that before described step S2, also include: Described server sends sense command and produces equipment to described card, produces equipment to all by described card Card to be produced performs detection operation successively, it may be judged whether the detection receiving the return of all cards to be produced should Answer, be then to create second communication path corresponding with card to be produced, otherwise find and do not return described detection The card to be produced of response, and generate the card production failure result of correspondence.
Method the most according to claim 2, it is characterised in that in described step S2, described server Create second communication path corresponding with card to be produced, particularly as follows: described server is according to the institute received State detection response, find the card to be produced of correspondence, and create corresponding described second communication path.
Method the most according to claim 1, it is characterised in that described step S1, particularly as follows: described Server access message-oriented middleware, and in described message-oriented middleware, create the first distribution interface and the first message Queue, obtains described first communication path by described first distribution interface with described first message queue binding, Described message-oriented middleware is positioned in described server or in described client.
Method the most according to claim 4, it is characterised in that in described step S2, by described One communication path sends the second communication path and identifies to client, particularly as follows: described server is according to presetting the One communication path name lookup to described first communication path and its described first distribution interface corresponded to, and Described second communication path mark is sent to described first distribution interface, and described first distribution interface is by described Second communication path mark is sent to described first message queue, and described client is led to according to described default first News pathname finds described first communication path and its described first message queue corresponded to, and monitors also Obtain the described second communication path mark that described first message queue receives.
Method the most according to claim 5, it is characterised in that after described step S2, as described visitor When family termination receives described second communication path mark, the second communication path identifier lookup according to receiving arrives Corresponding described second communication path, and by the second communication path found send card fabrication order to Described server.
Method the most according to claim 1, it is characterised in that described step S2, particularly as follows: described Server creates the second communication path of the described predetermined number corresponding with the card to be produced of predetermined number, and The second communication path sending described predetermined number by described first communication path identifies to client.
Method the most according to claim 6, it is characterised in that described step S2, particularly as follows: described Server creates the institute of correspondence according to the card described to be produced of described predetermined number in described message-oriented middleware State the second distribution interface of predetermined number and the second message queue of described predetermined number, and by described second point Send out interface binding corresponding with described second message queue and obtain the second communication path of described predetermined number, according to Second communication path of described predetermined number generates the second communication path mark of corresponding described predetermined number, The second communication path sending described predetermined number by described first communication path identifies to client.
Method the most according to claim 1, it is characterised in that described step S1, particularly as follows: described Server initiation the first socket, and create the first communication path according to described first socket.
Method the most according to claim 9, it is characterised in that create the according to described first socket One communication path, particularly as follows: described server sends bag according to the first port numbers in described first socket The first connection request containing the second port numbers is to client, at the first default end that described first port numbers is corresponding Mouthful corresponding with described second port numbers second is preset and creates described first communication path between port.
11. methods according to claim 10, it is characterised in that described step S2 is particularly as follows: described Server sends second communication path corresponding with card to be produced by described first communication path and identifies to visitor Family end, and set up the second communication path with described client.
12. methods according to claim 11, it is characterised in that described server passes through described first Communication path sends second communication path corresponding with card to be produced and identifies to client, particularly as follows: described Server according to described first socket find described first communication path and its correspond to described first pre- If port and described second presets port, and by described second preset that port sends with predetermined number to be generated Second communication path of the described predetermined number that product card is corresponding identifies presets port, described visitor to described first Family end is monitored and obtains the described first the second communication path mark presetting the described predetermined number that port receives Know.
13. methods according to claim 11, it is characterised in that set up second with described client and lead to News path, particularly as follows: described server receives what described client was come by described first communication path transmission Described predetermined number and the second connection request containing the 4th port numbers, and lead at the second of described predetermined number What news ID of trace route path was corresponding the 3rd presets fourth default corresponding with the 4th port numbers of described predetermined number of port The second communication path of the described predetermined number of correspondence is set up between port.
14. according to method described in claim 13, it is characterised in that described client receives described presetting After second communication path mark of quantity, also include: the described present count that described client initialization is corresponding Second socket of amount, finds the described predetermined number of correspondence according to the second socket of described predetermined number The second communication path and its described predetermined number corresponded to the 3rd preset port and described predetermined number 4th presets port, and presets port transmission card fabrication order to correspondence by the 4th of described predetermined number the Described predetermined number the 3rd preset port, described server is monitored and is obtained the described 3rd and presets port and connect The card fabrication order received.
15. methods according to claim 1, it is characterised in that described step S3, specifically include:
Step A1: described server waits and receives described client and sends by described second communication path Card fabrication order, and after receiving described card fabrication order, perform step A2;
Step A2: described server resolves the card fabrication order received, it may be judged whether terminate life for producing Make or produce and unsuccessfully order, be then to perform step A4, otherwise perform step A3;
Step A3: the described card fabrication order received is sent to card and produces equipment by described server, Waiting and receive described card and produce the operating result that equipment returns, generating order according to described operating result should Described command response data are also returned to described client by answer evidence, return step A1;
Step A4: described server according to described in the card fabrication order that receives generate in the middle of produce result, Result generation card production result is produced in the middle of described.
16. methods according to claim 15, it is characterised in that in described step A3, by described Command response data return to described client, particularly as follows: described server produces according to the card received The path handle of command response data return path subsidiary in order, finds described command response data and returns Described command response data are returned to described by footpath, loop by the command response data return path found Client.
17. methods according to claim 15, it is characterised in that in described step A3, by described Command response data return to described client, particularly as follows: described server is by described second communication path Described command response data are returned to described client.
18. methods according to claim 15, it is characterised in that in described step A4, described clothes Business device according to described in the card fabrication order that receives generate in the middle of produce result, according to the described centre of generation Produce result and generate card production result, particularly as follows:
The card fabrication order received described in resolving when described server judges that it is to produce to terminate order Time, generating the first card and produce successful result, the first card according to generating produces successful result, generates bag The card including the numbering that card produces successful information and this card produces result;
The card fabrication order received described in resolving when described server judges that it is to produce unsuccessfully to order Time, generating the first card and produce failure result, the first card according to generating produces failure result, generates bag The card including the numbering that card produces failure information and this card produces result.
19. methods according to claim 15, it is characterised in that in described step A4, described clothes Business device according to described in the card fabrication order that receives generate in the middle of after production result, also include: described clothes The described middle result that produces is returned to described client by business device.
20. methods according to claim 18, it is characterised in that after described step S3, also include:
Step C: described server resolves described card and produces result, when parsing obtains having card to produce result be When card produces failure result, labelling produces failed card.
21. methods according to claim 20, it is characterised in that in described step C, described labelling Produce failed card, particularly as follows: described server resolves described card produces failure result, produced The numbering of failed card, generates according to the described numbering producing failed card and comprises described production unsuccessfully The mark card order of the numbering of card, and described mark card order is sent to described card production equipment.
22. 1 kinds of card automatic production devices, it is characterised in that including:
First creation module, for creating the first communication path;
Second creation module, for creating second communication path corresponding with card to be produced;
Sending module, sends the second communication for the first communication path created by described first creation module ID of trace route path is to client;
Receiver module, the card production come for receiving described client to be sent by described second communication path Order;
Perform module, lead to described second for the card fabrication order pair received according to described receiver module The card execution corresponding operating interrogating path corresponding obtains card production result.
23. devices according to claim 22, it is characterised in that also include:
Detection module, is used for sending sense command and produces equipment to card, produces equipment pair by described card All cards to be produced perform detection operation successively;
Judge module, for judging whether to receive the detection response of all cards to be produced return;
Generation module, for judging not receive the inspection that all cards to be produced return when described judge module When surveying response, find the card to be produced not returning described detection response, and the card generating correspondence produces Failure result;
Described second creation module, specifically for judging to receive all cards to be produced when described judge module The detection response that sheet returns, creates second communication path corresponding with described card to be produced.
24. devices according to claim 23, it is characterised in that described second creation module, specifically For: according to the described detection response received, find the card to be produced of correspondence, and establishment is right with it Described second communication path answered.
25. devices according to claim 22, it is characterised in that described first creation module, specifically For: access message-oriented middleware, described message-oriented middleware creates the first distribution interface and the first message team Row, obtain described first communication path by described first distribution interface with described first message queue binding.
26. devices according to claim 25, it is characterised in that described sending module, specifically for: According to default first communication path name lookup to described first communication path and its described first point corresponded to Send out interface, and described second communication path mark is sent to described first distribution interface.
27. devices according to claim 22, it is characterised in that described second creation module, specifically For: create the second communication path of the described predetermined number corresponding with the card to be produced of predetermined number;
Described sending module, specifically for: send the of described predetermined number by described first communication path Two communication ID of trace route paths are to client.
28. devices according to claim 26, it is characterised in that also include: the first generation module;
Described second creation module, specifically for: disappear described according to the card described to be produced of predetermined number The second distribution interface of described predetermined number and the second of described predetermined number that create correspondence in breath middleware disappear Breath queue, and corresponding with described second message queue for described second distribution interface binding is obtained described present count Second communication path of amount;
Described first generation module, generates corresponding institute for the second communication path according to described predetermined number State the second communication path mark of predetermined number;
Described sending module, specifically for: send the of described predetermined number by described first communication path Two communication ID of trace route paths are to client.
29. devices according to claim 22, it is characterised in that described first creation module, specifically For: initialize the first socket, and create the first communication path according to described first socket.
30. devices according to claim 29, it is characterised in that the first creation module, specifically for: Initialize the first socket, send according to the first port numbers in described first socket and comprise the second port numbers The first connection request to client, described first port numbers corresponding first preset port and described second Corresponding second the presetting and create described first communication path between port of port numbers.
31. devices according to claim 30, it is characterised in that described sending module, specifically for: Send second communication path corresponding with card to be produced by described first communication path to identify to client;
Described second creation module, specifically for sending by described first communication path at described sending module After the second communication path corresponding with card to be produced identifies to client, set up second with described client Communication path.
32. devices according to claim 31, it is characterised in that described sending module, specifically for: According to described first socket find described first communication path and its correspond to described first preset port Port, and the card to be produced presetting port transmission and predetermined number by described second is preset with described second Second communication path of corresponding described predetermined number identifies presets port to described first.
33. devices according to claim 31, it is characterised in that described second creation module, specifically For: receive described client and send the described predetermined number come and containing the by described first communication path Second connection request of four port numbers, and the 3rd of the second communication path mark correspondence at described predetermined number the Preset port fourth preset port between set up corresponding institute corresponding with the 4th port numbers of described predetermined number State the second communication path of predetermined number.
34. devices according to claim 22, it is characterised in that described execution module, specifically include:
Judging unit, connects transmission for receiving described client at described receiver module by described second After the card fabrication order come, resolve the card fabrication order received, it may be judged whether terminate life for producing Make or produce and unsuccessfully order;
First transmitting element, the card fabrication order received described in judge when described judging unit is not It is to produce terminate order or produce when unsuccessfully ordering, the described card fabrication order received is sent to institute State card and produce equipment;
Receive unit, produce, for waiting and receiving described card, the operating result that equipment returns;
First signal generating unit, generates command response number for the operating result received according to described reception unit According to;
Second transmitting element, returns to described client for the command response data described signal generating unit generated End;
Described receiver module, is additionally operable to the command response when described reception unit is received by described transmitting element After data return to described client, wait and receive described client and sent out by described second communication path The card fabrication order sent here;
Second signal generating unit, generates intermediate green for the card fabrication order received according to described receiver module Producing result, the described middle result generation card that produces according to generating produces result.
35. devices according to claim 34, it is characterised in that described second transmitting element, specifically For: according to the path handle of command response data return path subsidiary in the card fabrication order received, Find described command response data return path, should by the order found by described command response data Answer data return path and return to described client.
36. devices according to claim 34, it is characterised in that described second transmitting element, specifically For: by described second communication path, described command response data are returned to described client.
37. devices according to claim 34, it is characterised in that described second signal generating unit, specifically For:
The card fabrication order received described in resolving when described judging unit judges that it is to produce to terminate order Time, generating the first card and produce successful result, the first card according to generating produces successful result, generates bag The card including the numbering that card produces successful information and this card produces result;
The card fabrication order received described in resolving when described judging unit judges that it is to produce unsuccessfully to order Time, generating the first card and produce failure result, the first card according to generating produces failure result, generates bag The card including the numbering that card produces failure information and this card produces result.
38. devices according to claim 34, it is characterised in that described execution module, also include:
3rd transmitting element, for the card received according to described receiver module in described second signal generating unit Fabrication order generates middle after producing result, and the described middle result that produces is returned to described client.
39. according to the device described in claim 37, it is characterised in that also include:
Parsing module, after generating card production result when described second signal generating unit, resolves described card Sheet produces result;
Mark module, being used for when the parsing of described parsing module obtains having card to produce result is that card produces unsuccessfully During result, labelling produces failed card.
40. according to the device described in claim 39, it is characterised in that described mark module, specifically for: Resolve described card and produce failure result, obtain producing the numbering of failed card, produce unsuccessfully according to described The numbering of card generate the mark card order comprising the described numbering producing failed card, and by described Mark card order is sent to described production equipment.
CN201610423235.0A 2016-06-15 2016-06-15 A kind of card automatic production method and device Active CN105959393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610423235.0A CN105959393B (en) 2016-06-15 2016-06-15 A kind of card automatic production method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610423235.0A CN105959393B (en) 2016-06-15 2016-06-15 A kind of card automatic production method and device

Publications (2)

Publication Number Publication Date
CN105959393A true CN105959393A (en) 2016-09-21
CN105959393B CN105959393B (en) 2019-01-04

Family

ID=56905657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610423235.0A Active CN105959393B (en) 2016-06-15 2016-06-15 A kind of card automatic production method and device

Country Status (1)

Country Link
CN (1) CN105959393B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273618A (en) * 2017-06-20 2017-10-20 北京京东尚科信息技术有限公司 Method and apparatus for information transfer between simulation model
CN114519585A (en) * 2022-01-29 2022-05-20 中银金融科技有限公司 Early warning method and system based on multi-party united card opening information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1501322A (en) * 2002-11-15 2004-06-02 上海市社会保障和市民服务信息中心上 A personalized method for making identification card adaptive for the need of issuing card in batch
CN101216924A (en) * 2008-01-11 2008-07-09 北京盈天信科技发展有限公司 A system and method to generate individualized bank cards
CN104108257A (en) * 2013-04-18 2014-10-22 航天信息股份有限公司 Modular card certificate production equipment
CN104318281A (en) * 2014-10-27 2015-01-28 中国建设银行股份有限公司 Credit card granting system and method
KR20160043876A (en) * 2014-10-14 2016-04-22 주식회사 제황 Automatic production system and method for business card

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1501322A (en) * 2002-11-15 2004-06-02 上海市社会保障和市民服务信息中心上 A personalized method for making identification card adaptive for the need of issuing card in batch
CN101216924A (en) * 2008-01-11 2008-07-09 北京盈天信科技发展有限公司 A system and method to generate individualized bank cards
CN104108257A (en) * 2013-04-18 2014-10-22 航天信息股份有限公司 Modular card certificate production equipment
KR20160043876A (en) * 2014-10-14 2016-04-22 주식회사 제황 Automatic production system and method for business card
CN104318281A (en) * 2014-10-27 2015-01-28 中国建设银行股份有限公司 Credit card granting system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273618A (en) * 2017-06-20 2017-10-20 北京京东尚科信息技术有限公司 Method and apparatus for information transfer between simulation model
CN114519585A (en) * 2022-01-29 2022-05-20 中银金融科技有限公司 Early warning method and system based on multi-party united card opening information

Also Published As

Publication number Publication date
CN105959393B (en) 2019-01-04

Similar Documents

Publication Publication Date Title
JP7030797B2 (en) Network management information receiving method, receiving device and storage medium
CN103856361A (en) Method and system for realizing remote debugging
US20170359844A1 (en) Switching-on method, base station, base station controller, switching-on system and storage medium
CN105162673A (en) Data transmission interface and method
CN107332866A (en) A kind of power transmission and transformation state monitoring method, equipment and system
CN110336865A (en) Service calling method, device, storage medium and electronic equipment
CN110971491B (en) Electric power system 101 and 104 communication protocol processing system and processing method thereof
CN102404414B (en) Ethernet communication system and method based on MMC/SD interface
CN108616582A (en) Pairing method, device and system of internal machine and wire controller
CN109787864A (en) A kind of network automatic test approach, device, terminal and storage medium based on Netperf
CN108683528A (en) A kind of data transmission method, central server, server and data transmission system
CN105959393A (en) Automatic card production method and device
CN103944918B (en) A kind of digital cluster system and telephone system communications method, interchanger and system
CN110278577A (en) The sending control method and device of data
CN107689955A (en) SIP information analysis methods and server
CN114157350B (en) Optical fiber misconnection detection method and system
CN108270638B (en) Error correction method and device based on internet access transmission and internet access transmission equipment
CN113132200A (en) Data forwarding method, data forwarding device, data forwarding system, server and storage medium
CN113411788B (en) Bluetooth grid network system with unassigned communication mechanism and communication method thereof
CN110224950A (en) Stacking system detection system, method, apparatus and computer readable storage medium
CN105871917A (en) Transmission control protocol TCP connection scheduling method and device
CN106685600A (en) Method for messaging among work stations within local area network
JP4067667B2 (en) Communication link automatic identification method and system
CN105471646B (en) A kind of implementation method of IEC101 stipulations boss station calling flow dynamic configuration
CN104483940B (en) Networking method and device for monitoring system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant