Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, and
It is not used in the restriction present invention.
In the embodiment of the present invention, access by using mobile terminal intelligent terminal place LAN, and according to
IP address and port numbers can avoid be moved terminal and smart machine finding the intelligent terminal of required interaction data
Geographical position relatively far apart when by signal intensity constrain problem occur, reduce the difficulty of data interaction, improve data
Interactive stability, improves user experience, while arrange because intelligent terminal need not increase extra physics, relative to
Existing data interactive method reduces equipment consumables cost, have effectively achieved the interaction of data.
In embodiments of the present invention, the intelligent terminal refers to the equipment with embedded computer system, its
Many functions such as audio frequency, video, data acquisition are held, for example, can be the various security devices such as attendance recorder, access controller.
It should be appreciated that in addition to access controller and attendance recorder, data interactive method provided in an embodiment of the present invention is still applied to respectively
Plant the intelligent terminal of other field and the data in various other fields.
Fig. 1 shows the system architecture diagram that data interactive method provided in an embodiment of the present invention is suitable for, for the ease of saying
It is bright, illustrate only part related to the present embodiment.
With reference to Fig. 1, the system is made up of intelligent terminal 11 and multiple mobile terminal 1s 2, wherein, intelligent terminal
11 are used for the attendance data according to storage, gate inhibition's turnover data, and with the mobile terminal 12 being connected operation is interacted.It is preferred that
Ground, attendance data, gate inhibition's turnover data message can be stored in the background data base 13 that intelligent terminal is connected, including
But the data messages such as each time period, each user, the data record of each intelligent terminal and abnormal log are not limited to, intelligence
Terminal unit 11 is stored to information, managed, screened according to above-mentioned data type, and with other external equipments, user or shifting
Dynamic terminal 12 is interacted.Meanwhile, intelligent terminal 11 is additionally operable to provide data query, upload, download for mobile terminal 12
Service, so that mobile terminal 12 can feed back to actual user according to the result of data processing.
Within the system, mobile terminal 12 can provide network insertion for notebook computer, panel computer or mobile phone etc.
The terminal unit of function, by operation application client on the device or webpage client and intelligent terminal
11 interactive information, it is ensured that with the communication between intelligent terminal 11.Each mobile terminal 12 can serve as a request visitor
Family end, to intelligent terminal 11 data interaction request, and the interaction results returned according to intelligent terminal 11, control are submitted to
The operation of each component or data are directly output in mobile terminal 12 in intelligent terminal 11.
Fig. 2 shows the flowchart of data interactive method provided in an embodiment of the present invention, and details are as follows:
In S201, mobile terminal accesses the LAN that intelligent terminal is located.
In the present embodiment, intelligent terminal, often should by reality when installation and debugging or actual motion are used
It has been successfully accessed in the LAN in the place with the network layout in scene.For example, attendance recorder is arranged on the wall on company doorway
When upper, the network connection of Connected Corp.'s internal network can be preset with attendance recorder rearward position, the wiring is accessed to into attendance recorder
Network interface, attendance recorder is then successfully connected with the LAN of company.
After the LAN that intelligent terminal is located is via the extension of in-company wireless apss, can extend the LAN
Wireless coverage, it is ensured that mobile terminal need to only be connected to in-company WAP, you can access intelligent terminal
The LAN at place, is wirelessly connected with intelligent terminal.
In S202, the IP address and port numbers of intelligent terminal described in the acquisition for mobile terminal.
As one embodiment of the present of invention, the IP address of intelligent terminal and port described in the acquisition for mobile terminal
Number include:
The intelligent terminal shows the Quick Response Code based on IP address and port number information;
The mobile terminal obtains the IP address and port numbers of the intelligent terminal by the scanning Quick Response Code.
The Quick Response Code, i.e., using certain specific geometric figure or the black and white being distributed in the two-dimensional direction according to certain rules
Alternate figure carrys out a kind of plane pattern of record data symbolic information.Using several and intelligent terminal IP address and end
The corresponding geometrical body of the binary information of slogan data is displayed in the screen of intelligent terminal constituting the Quick Response Code
Above, it is pasted onto on device housings or is shown in other external information carriers.When IP address changes, it is shown on screen
Quick Response Code can real-time update, remaining outside display mode updates Quick Response Code by manual amendment.By using with light
The mobile terminal of electric scanning function is scanned to the Quick Response Code, and information that can be in the automatically identifying and reading Quick Response Code is simultaneously performed automatically
Process, obtain the real IP address and port numbers of the intelligent terminal.
Fig. 3 is the schematic diagram of the IP address and port numbers that the intelligent terminal is obtained by Quick Response Code mode.Such as Fig. 3
Shown, left side shows with the IP address of equipment and port number information as No. 1 attendance recorder of intelligent terminal on screen
Quick Response Code, the mobile terminal on right side starts scan function, and the Quick Response Code that scan box is aligned on attendance recorder screen is simultaneously known
Not, the real IP address and port numbers of No. 1 attendance recorder are finally acquired.
Used as an alternative embodiment of the invention, IP address and port numbers can also be directly defeated on mobile terminals by user
Enter information to specify.As shown in figure 4, specifically, the mobile terminal is obtained by the input frame that is displayed on screen and signal language
Take the IP address and port numbers with regard to the intelligent terminal of user input.User is by consulting intelligent terminal management
Member or inquiry intelligent terminal disclose the data information of record, can learn the intelligent terminal of data to be interacted
IP address and port numbers, and be input into into the input frame shown in mobile terminal screen.
In S203, according to the IP address and port numbers of the intelligent terminal, the mobile terminal is to the intelligence
Terminal unit sends connection request.
IP address is that each intelligent terminal in LAN distributes an exclusive logical address, mobile terminal profit
The IP address is used, the intelligent terminal of correspondence IP address is hunted out from LAN and connection request is sent to the equipment.
Because an intelligent terminal for possessing IP address can provide many different types of data, services, these numbers
Can be realized by an IP address according to service.Specific service required in order to determine mobile terminal, by with each clothes
The mode of business correspondence a port number is solving the problem.
Preferably, intelligent terminal operationally, only opens a port, to provide data, services.
In the present embodiment, according to the IP address and port numbers acquired from number of ways, mobile terminal can break ground
The restriction of reason locus, is interacted by wireless network with remote intelligent terminal, improves data interaction
Stability and motility.
Used as one embodiment of the present of invention, the mobile terminal to the intelligent terminal sends connection request bag
Include:
The identity information of the acquisition for mobile terminal user;
The mobile terminal to the intelligent terminal is sent based on the connection request of the identity information.
In mobile terminal side, the account information related to identity of user input is obtained.The account includes but does not limit
In entity card accounts such as job number, gate inhibition's card number, identification card numbers, also including other virtual accounts, such as equipment manager account, office
System account etc..Wherein, by way of the mobile terminal can be jumping directly to other systems platform in interactive program,
Obtain the user identity account on current system platform.
Mobile terminal to the intelligent terminal sends connection request, comprising in above-mentioned account in connectivity request message
Hold, the password corresponding to the identity account can also be included.
In S204, the intelligent terminal to the mobile terminal returns connection confirmation.
Mobile terminal waits the response of intelligent terminal and receives the connection confirmation bag of its return.If mobile terminal is pre-
If the response that intelligent terminal is not received by the time or the packet for sending, then data interaction connection request failure;If
Receive mobile terminal and return connection confirmation, then mobile terminal initially enters data interaction state.
Used as one embodiment of the present of invention, above-mentioned S203 and S204 is specific as follows:
The mobile terminal sends connection request based on privately owned communications protocol to the intelligent terminal;
The intelligent terminal judges the identity letter according to the connection request based on the identity information for receiving
Whether breath meets pre-conditioned, is if so, then returned to the mobile terminal based on privately owned communications protocol and connects confirmation.
In the present embodiment, privately owned communications protocol represents a kind of self-defining communications protocol, is only used for identical producer
Between the equipment of production, intelligent terminal cannot be led to using privately owned communications protocol come the equipment with other manufacturer productions
Letter, does not possess compatibility.
Especially, the privately owned communications protocol in the present embodiment be UDK (Universal Development Kit, it is general to open
The instrument of sending out) communications protocol, realized by privately owned off line UDK.Off line UDK is off line SDK (Software Development
Kit, SDK) cross-platform version, various types of application platforms such as IOS, ARIXTRA and Linux can be used for, be
One kit instrument that the various data on intelligent terminal can be managed, be configured, there is provided with off-line fingerprint
The intelligent terminals such as machine, door access machine, card machine carry out the interface of data communication.
Initiate data interaction request before, mobile terminal by be stored in inside preset algorithm, to the request data
The value of specific field is processed in bag, obtains first check value with regard to the packet, and the check value is attached to
In interactive demand signal bag, send in the lump to intelligent terminal.
Intelligent terminal one end is received after the request data package based on the privately owned UDK communications protocol, is carried out as follows
Process:The value of specific field in the packet is processed using preset algorithm, obtains one with regard to the of the packet
Two check values.
Whether intelligent terminal compares second check value identical with the first check value in packet, if the two phase
Together, it is determined that request data package illegally the distorting without the third party, it is complete packet.Now, intelligent terminal
Session window is created, and session information is sent to into movement as connection confirmation by privately owned UDK communications protocol
Terminal.
The present embodiment realizes therebetween data by privately owned communications protocol in mobile terminal and intelligent terminal
Transmitting-receiving, it is ensured that cannot be attached with intelligent terminal using the mobile terminal of other communications protocol such that it is able to avoid
Lawless person is set using the supporting application program for mobile terminal of this manufacturer intelligent terminal to the intelligent terminal of other manufacturers
The standby interaction and management for carrying out data.Additionally, the embodiment of the present invention carries out completeness check by the packet to receiving,
Further ensure the safe transmission of data.
Fig. 5 is the flow chart that implements of data interactive method S204 provided in an embodiment of the present invention, specific as follows:
In S501, intelligent terminal is obtained based on the connection request of the identity information.
Intelligent terminal extracts the identity account of user from the connection request, if also there is the body in connection request
The corresponding encrypted message of part account, then extract in the lump.In S502, judge in default identity information storehouse with the presence or absence of right
Should be in the record of the identity account.
The user account information of legal authorization is preset with identity information storehouse, the account being only present in the identity information storehouse
Number could carry out interacting for data with intelligent terminal.The identity information storehouse can be located inside intelligent terminal,
Can be located in the backstage identity information database being connected with intelligent terminal network
The above-mentioned identity account acquired from connection request and the legal account information in identity information storehouse are carried out
Matching contrast one by one, judges whether that identical records entry.If so, then execution step S503;Otherwise, intelligent terminal
Connection refusal information is returned to the mobile terminal.
In S503, judge whether the encrypted message for needing to verify the account.
When existing in identity information storehouse with the identity account identical entry acquired in connection request, this is read
Whether mesh information, the entry for judging the identity account has cryptographic properties, if so, then needs to verify that the password of the account is legal
Property, execution step S504;If not having cryptographic properties, execution step S505 in the entry of the identity account.
In S504, judge the identification cipher that carries in connection request whether with default code matches.
When the identity account identical entry acquired in above-mentioned and connection request carries cryptographic properties, the entry is read
The password of the account of middle storage, as described default password.By the identification cipher acquired in connection request with it is described
Default password is contrasted, if both differ, intelligent terminal to the mobile terminal returns connection refusal information;If
Both are identical, then execution step S505.
In S505, the intelligent terminal to the mobile terminal returns connection confirmation.
The mobile terminal is received after the connection confirmation, the interface of switching and user mutual, receive user
Interactive instruction, prepares to carry out data interaction with intelligent terminal.
Used as one embodiment of the present of invention, the intelligent terminal is according to receiving based on the identity information
Connection request, obtain corresponding to the identity account interactive authority so that mobile terminal can only authority regulation in the range of and
Intelligent terminal interactive information.
In the present embodiment, by increasing subscriber authentication function in intelligent terminal, illegal use can be avoided
Family obtains the private data of internal system, prevents the property loss for causing to be difficult to estimate because of information leakage, by arranging identity
The Permission Levels of account, it is ensured that different users can obtain the data of different security classifications in intelligent terminal, favorably
Management and control is carried out in the transmission range to data.
In S205, the mobile terminal is instructed according to the data interaction of user input, is obtained based on privately owned communications protocol
Take the data in the intelligent terminal.
After mobile terminal and intelligent terminal are set up to be stably connected with, user can be referred to by input on mobile terminals
Order, and the instruction is sent to intelligent terminal by network, to complete the interaction between data.For example control intelligent terminal to set
The data on intelligent terminal are derived in standby operation.
In the embodiment of the present invention, access by using mobile terminal intelligent terminal place LAN, and according to
IP address and port numbers can avoid be moved terminal and smart machine finding the intelligent terminal of required interaction data
Geographical position relatively far apart when by signal intensity constrain problem occur, reduce the difficulty of data interaction, improve data
Interactive stability, improves user experience, while arrange because intelligent terminal need not increase extra physics, relative to
Existing data interactive method reduces equipment consumables cost, have effectively achieved the interaction of data.
Used as one embodiment of the present of invention, intelligent terminal carries out the screening of data according to data interaction instruction,
To after mobile terminal, the data that the UDK automatic decisions inside mobile terminal are currently received are the data transfer that screening is obtained
It is no mutually continuous with the front data for once receiving.
If the data being currently received are discontinuous with the front data for once receiving, show there is data-bag lost, now,
Mobile terminal initiates again data interaction request, with the packet that acquisition request is lost.
Used as one embodiment of the present of invention, the data interactive method that the present invention is provided also includes:
The node location of the data that mobile terminal caching has currently been acquired from the intelligent terminal or
Deviation position;
When the connection between the mobile terminal and the intelligent terminal disconnects, connect again in the mobile terminal
After connecing the intelligent terminal, the mobile terminal sends the node location or deviation position of data to the intelligence eventually
End equipment.
During mobile terminal is downloaded or obtains data, if the connection between mobile terminal and intelligent terminal is disconnected
Open, and the two is reconnected after connection disconnects, then mobile terminal will download the partial data for completing before connection disconnection
Corresponding node location or deviation position is sent to intelligent terminal.
Intelligent terminal according to the information for receiving, parse to should data node location or deviation position, and
From the beginning of the position, data are again read off.By the way that the further part of the data for reading is sent to into mobile terminal, number is realized
According to breakpoint transmission.
When mobile terminal receives the further part information of the data, if the corresponding full detail of the data has been received
Finish, then the data to currently having received are preserved;If the corresponding full detail of the data is not received yet, to currently
While the partial data of reception is preserved, the new node location or deviation position corresponding to the data is cached, so that under
Once it is connected disconnection with intelligent terminal and reconnects after intelligent terminal, the new node of the caching can be sent
Position or deviation position.
Fig. 6 shows the structured flowchart of data interaction system provided in an embodiment of the present invention, and the system is used to run this
Data interactive method described in bright Fig. 1 to Fig. 5 embodiments.For convenience of description, illustrate only part related to the present embodiment.
With reference to Fig. 6, the data interaction system includes intelligent terminal 61 and mobile terminal 62,
The mobile terminal 62 is used to access the LAN at the place of intelligent terminal 61.
The mobile terminal 62 is additionally operable to obtain the IP address and port numbers of the intelligent terminal 61.
The mobile terminal 62 is additionally operable to IP address and port numbers according to the intelligent terminal 61, to the intelligence
Terminal unit 61 sends connection request.
The intelligent terminal 61 is used to return connection confirmation to the mobile terminal 62.
The mobile terminal 62 is additionally operable to be instructed according to the data interaction of user input, is obtained based on privately owned communications protocol
Data in the intelligent terminal 61.
Alternatively, the intelligent terminal 61 is specifically for showing the Quick Response Code based on IP address and port number information;
Alternatively, the mobile terminal 62 is specifically for by the scanning Quick Response Code, obtaining the intelligent terminal
61 IP address and port numbers.
Alternatively, the mobile terminal 62 obtains the pass of user input specifically for the input frame by being displayed on screen
In the IP address and port numbers of the intelligent terminal 61.
Alternatively, the mobile terminal 62 is additionally operable to be sent based on the identity information to the intelligent terminal 61
Connection request.
Alternatively, the mobile terminal 62 is additionally operable to be sent to the intelligent terminal 61 based on privately owned communications protocol
Connection request.
The intelligent terminal 61 is additionally operable to according to the connection request based on the identity information for receiving, and judges institute
State whether identity information meets pre-conditioned, if so, then returned to the mobile terminal 62 based on privately owned communications protocol and connected
Confirmation.
Alternatively, the mobile terminal 62 is additionally operable to cache what is currently acquired from the intelligent terminal 61
The node location or deviation position of data;
When the connection between the mobile terminal 62 and the intelligent terminal 61 disconnects, in the mobile terminal 62
After reconnecting the intelligent terminal 61, the mobile terminal 62 is additionally operable to the node location of the data or deviation
Position is sent to the intelligent terminal 61.
In the embodiment of the present invention, access by using mobile terminal intelligent terminal place LAN, and according to
IP address and port numbers can avoid be moved terminal and smart machine finding the intelligent terminal of required interaction data
Geographical position relatively far apart when by signal intensity constrain problem occur, reduce the difficulty of data interaction, improve data
Interactive stability, improves user experience, while arrange because intelligent terminal need not increase extra physics, relative to
Existing data interactive method reduces equipment consumables cost, have effectively achieved the interaction of data.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.