CN108269332B - Intelligent access control system and method based on mobile terminal APP - Google Patents

Intelligent access control system and method based on mobile terminal APP Download PDF

Info

Publication number
CN108269332B
CN108269332B CN201711331170.8A CN201711331170A CN108269332B CN 108269332 B CN108269332 B CN 108269332B CN 201711331170 A CN201711331170 A CN 201711331170A CN 108269332 B CN108269332 B CN 108269332B
Authority
CN
China
Prior art keywords
access controller
mobile terminal
controller
entrance guard
state
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.)
Active
Application number
CN201711331170.8A
Other languages
Chinese (zh)
Other versions
CN108269332A (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.)
INFORMATION RESEARCH INSTITUTE OF SHANDONG ACADEMY OF SCIENCES
Original Assignee
INFORMATION RESEARCH INSTITUTE OF SHANDONG ACADEMY OF SCIENCES
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 INFORMATION RESEARCH INSTITUTE OF SHANDONG ACADEMY OF SCIENCES filed Critical INFORMATION RESEARCH INSTITUTE OF SHANDONG ACADEMY OF SCIENCES
Priority to CN201711331170.8A priority Critical patent/CN108269332B/en
Publication of CN108269332A publication Critical patent/CN108269332A/en
Application granted granted Critical
Publication of CN108269332B publication Critical patent/CN108269332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides an intelligent access control system and method based on mobile terminals APP, wherein each mobile terminal is in communication connection with a Web server in a Webservice interface mode, and the mobile terminals realize the control of an access controller by sending access controller control instructions to the Web server; the Web server feeds back control information to the mobile terminal according to an access controller control instruction sent by the mobile terminal; the Web server includes: the system comprises a MySQL database and an access control module used for controlling an access controller to execute a control instruction. On the premise of ensuring the basic functions of the mobile phone, the system architecture comprises a mobile terminal program, a Web server, a MySQL database and an access controller, and the reuse of the system is based on the intelligent access control function. The system operates in the Internet environment, and the design meets the safety requirement of the server and also meets the service requirement and the technical advancement of the system.

Description

Intelligent access control system and method based on mobile terminal APP
Technical Field
The invention relates to the field of intelligent safety control, in particular to an intelligent access control system and method based on a mobile terminal APP.
Background
The access control system is a system for controlling the entrance and exit of people through an entrance and exit channel as the name suggests, and gradually develops towards the intelligent direction on the basis of the traditional mechanical door lock. With the gradual maturity of the induction card technology and the biological identification technology, the access control system is also developed in a leap manner. Such as an inductive card access system, a fingerprint access system, an iris access system, a face recognition access system, an out-of-order keyboard access system, etc. The entrance guard system is developed from an initial C/S architecture to a B/S architecture. With the coming of the era of mobile internet and the gradual maturity of mobile technologies such as Android, the Android-based intelligent access control system becomes an essential part in the access control architecture design. As a software product used on a mobile device, it is distinguished from a conventional system running on a PC. Because of the restrictions such as the memory of cell-phone, processing speed, electric quantity, the network connection condition, at system architecture in-process, the cell-phone is carrying out operation control to the access control system, and communication, during asynchronous loading, received the restriction, how can guarantee under the prerequisite of cell-phone basic function, reuse asynchronous communication based on intelligent access control function, Android advanced processing functions such as asynchronous loading are the technical problem who waits for the solution at present.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides an intelligent access control system based on a mobile terminal APP, which comprises: the system comprises a Web server, a plurality of mobile terminals and an access controller in communication connection with the Web server;
each mobile terminal is in communication connection with the Web server in a Webservice interface mode, and the mobile terminals realize control over the access controller by sending access controller control instructions to the Web server;
the Web server communicates with each mobile terminal in a Json data format, and feeds back control information to the mobile terminals according to the access controller control instructions sent by the mobile terminals;
the Web server is in communication connection with the gate controller through a TCP protocol, and comprises: the system comprises a MySQL database and an access control module used for controlling an access controller to execute a control instruction.
Preferably, the Web server includes: the system comprises a right management module, an operation record acquisition module and an operation record query module;
the authority management module is used for setting the use authority of each mobile terminal,
the usage rights include: setting different authorities for each mobile terminal to realize the operable authority or the inoperable authority of the mobile terminal to the access controller; the permission management module returns the set operation permission of the mobile terminal to the mobile terminal, and the mobile terminal dynamically adjusts the operation permission according to the returned operation permission;
the operation record acquisition module is used for acquiring the operation record of each mobile terminal in real time; recording and dynamically displaying each operation record and data transmission of the mobile terminal in real time by adopting a rolling list; the operation records comprise the opening and closing of the access controller and the abnormal state alarm of the access controller;
the operation record query module is used for providing query data for the mobile terminal according to the query condition of the mobile terminal.
Preferably, the Web server further comprises: the entrance guard controller state setting module;
the entrance guard controller state setting module is used for setting id stored in Mysql by the entrance guard controller, setting name of the entrance guard controller in the system, setting state pictures of the entrance guard controller, setting state marks of the entrance guard controller and setting state classes of the entrance guard controller;
the Web server transmits the state of the entrance guard to the mobile terminal by adopting a Json data format;
the mobile terminal is used for setting id of the entrance guard controller stored in Mysql, setting name of the entrance guard controller in the system, setting state pictures of the entrance guard controller, setting state marks of the entrance guard controller and setting state classes of the entrance guard controller when the entrance guard controller state setting authority is possessed.
Preferably, the Web server further comprises: the system comprises a login processing module and an encryption processing module;
the login processing module is used for correspondingly generating a preset character string for each mobile terminal respectively to serve as a token for each mobile terminal to request;
after the mobile terminal logs in the Web server for the first time, the data transmission processing module generates a preset character string and returns the preset character string to the mobile terminal, and then when the mobile terminal logs in the Web server, the corresponding preset character string is sent to the Web server to log in the Web server;
the encryption processing module is used for acquiring a public key through a public key interface provided by the encryption processing module when each mobile terminal logs in the Web server, encrypting the password of the login Web server by using the public key, and decrypting the password of the login Web server by using the private key by using the Web server.
Preferably, the Web server further comprises: an access control rule inquiry module;
the entrance guard rule query module is used for acquiring the detailed json structure data of the entrance guard rule of the entrance guard controller by calling a dictionary/getSelect interface, setting the id of the entrance guard controller stored in Mysql, the name of the entrance guard controller in the system, the state picture of the entrance guard controller, the state mark of the entrance guard controller and the state class of the entrance guard controller through the entrance guard controller state setting module;
the mobile terminal is used for acquiring the detailed json structure data of the entrance guard rule of the entrance guard controller through the entrance guard rule inquiry module when the entrance guard rule inquiry authority is possessed, setting the id of the entrance guard controller stored in Mysql through the entrance guard controller state setting module, setting the name of the entrance guard controller in the system, setting the state picture of the entrance guard controller, setting the state mark of the entrance guard controller and setting the state class of the entrance guard controller.
Preferably, the Web server further comprises: the access controller state processing module;
the access controller state class processing module is used for defining the state class of the access controller, and the state class comprises: SendlListInfo class; the SendListInfo type member variables comprise info and gridActivity, and have the functions of forwarding message messages and updating ListVIEW, wherein msg.what is 3; defining two BaseAdapter classes, an IndIsn class, a MyAdapter class and a ListviewAdapter class, wherein the MyAdapter class is responsible for data updating of GridView, and the ListviewAdapter class is responsible for a ListView list; the IndISign type defines the equipment type of the access controller, the state variables of open, open and close, and the picture names type _ unused, type _ on, type _ off and id equipment serial number corresponding to the access controller, wherein the id equipment serial number is the serial number of the access controller in the Web server;
the mobile terminal is used for defining the state class of the access controller through the state class processing module of the access controller when the access controller has the state class definition authority.
Preferably, the Web server further comprises: the type processing module of the access controller;
the access controller type processing module is used for acquiring information of an access controller, analyzing data returned by app _ eqpt _ all in the information of the access controller to obtain the type and picture name of the access controller, and judging whether the access controller is a newly added access controller; if the name is not newly added, constructing a url according to the received name, and downloading the picture information of the access controller from the MySQL database; if the new addition is carried out, according to the received information of the access controller, setting id stored in Mysql by the access controller, setting name of the access controller in the system, setting a state picture of the access controller, setting a state mark of the access controller and setting a state class of the access controller;
when information of a plurality of access controllers is acquired, storing the information of the access controllers by adopting a picture cache mechanism LrucCache < String, Bitmap > linked list; the mobile terminal obtains the information of the access controller from the cache;
the mobile terminal is used for acquiring information of the access controller through the access controller type processing module when the access controller type processing right is provided, analyzing data returned by app _ eqpt _ all in the access controller information to obtain the type and the picture name of the access controller, and judging whether the access controller is a newly added access controller.
Preferably, the Web server further comprises: the system comprises a main interface display module and a thread communication monitoring module;
the thread communication monitoring module is used for defining a thread communication monitoring mode of the mobile terminal, the Web server and the access controller based on a Handler mechanism when the mobile terminal is in communication connection with the Web server to operate the access controller, continuously monitoring message information and acquiring an operation result.
The main interface display module is used for displaying the current state of the access controller, the login state of each mobile terminal and the control state of each mobile terminal to the access controller.
Preferably, the mobile terminal is provided with an opening control module, a closing control module, an entrance guard inquiry module and a time recording module;
the opening control module is used for opening the access controller by one key;
the closing control module is used for closing the access controller by one key;
the entrance guard inquiry module is used for inquiring the state of the entrance guard controller through the Web server;
the time recording module is used for recording the time for receiving the data information of the Web server, the time for connecting the Web server, the time for starting the mobile terminal and the current time.
An intelligent access control method based on a mobile terminal APP comprises the following steps:
the mobile terminal is in communication connection with the Web server in a Webservice interface form;
the Web server sets different authorities for each mobile terminal, and realizes the operable authority or the inoperable authority of the mobile terminal to the access controller;
the mobile terminal sends an access controller control instruction to the Web server, and the access controller control instruction comprises the following steps: the id of the controlled access controller stored in the Mysql, the name of the access controller in the system, a state picture of the access controller, a control state of the access controller and a state class of the access controller;
the Web server controls the entrance guard controller to execute the control instruction, and the thread communication monitoring mode of the mobile terminal, the Web server and the entrance guard controller is defined based on a Handler mechanism, so that the information is monitored continuously, and an operation result is obtained.
According to the technical scheme, the invention has the following advantages:
each mobile terminal is in communication connection with the Web server in a Webservice interface mode, and the mobile terminals realize control over the access controller by sending access controller control instructions to the Web server; the Web server communicates with each mobile terminal in a Json data format, and feeds back control information to the mobile terminals according to the access controller control instructions sent by the mobile terminals; the Web server is in communication connection with the gate controller through a TCP protocol, and comprises: the system comprises a MySQL database and an access control module used for controlling an access controller to execute a control instruction. On the premise of ensuring the basic functions of the mobile phone, the system architecture comprises a mobile terminal program, a Web server, a MySQL database and an access controller, and the reuse of the system is based on the intelligent access control function. The system operates in the Internet environment, and the design meets the safety requirement of the server and also meets the service requirement and the technical advancement of the system.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description will be briefly introduced, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an intelligent access control system based on a mobile terminal APP;
FIG. 2 is a schematic diagram of a main interface display module;
fig. 3 is a flow chart of an intelligent access control method based on a mobile terminal APP.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions of the present invention will be clearly and completely described below with reference to specific embodiments and drawings. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the scope of protection of this patent.
The invention provides an intelligent access control system based on a mobile terminal APP, as shown in figure 1, comprising: the system comprises a Web server 1, a plurality of mobile terminals 2 and an access controller 3 which is in communication connection with the Web server 1; each mobile terminal 2 is in communication connection with the Web server 1 in a Webservice interface form, and the mobile terminal 2 controls the access controller 3 by sending an access controller control instruction to the Web server 1; the Web server 1 communicates with each mobile terminal 2 by adopting a Json data format, and the Web server 1 feeds back control information to the mobile terminals 2 according to control instructions of the access controllers 3 sent by the mobile terminals; web server 1 passes through TCP agreement and entrance guard's controller 3 communication connection, and Web server 1 includes: the system comprises a MySQL database and an access control module used for controlling an access controller to execute a control instruction.
In this embodiment, the Web server includes: the system comprises an authority management module, an operation record acquisition module, an operation record query module, an access controller state setting module, a login processing module, an encryption processing module, an access rule query module, an access controller state processing module, an access controller type processing module, a main interface display module and a thread communication monitoring module;
the authority management module is used for setting the use authority of each mobile terminal, and the use authority comprises the following steps: setting different authorities for each mobile terminal to realize the operable authority or the inoperable authority of the mobile terminal to the access controller; the permission management module returns the set operation permission of the mobile terminal to the mobile terminal, and the mobile terminal dynamically adjusts the operation permission according to the returned operation permission;
the operation record acquisition module is used for acquiring the operation record of each mobile terminal in real time; recording and dynamically displaying each operation record and data transmission of the mobile terminal in real time by adopting a rolling list; the operation records comprise the opening and closing of the access controller and the abnormal state alarm of the access controller; the operation record query module is used for providing query data for the mobile terminal according to the query condition of the mobile terminal.
The entrance guard controller state setting module is used for setting id stored in Mysql by the entrance guard controller, setting name of the entrance guard controller in the system, setting state pictures of the entrance guard controller, setting state marks of the entrance guard controller and setting state classes of the entrance guard controller; and the Web server transmits the state of the access control to the mobile terminal by adopting a Json data format.
The mobile terminal is used for setting id of the entrance guard controller stored in Mysql, setting name of the entrance guard controller in the system, setting state pictures of the entrance guard controller, setting state marks of the entrance guard controller and setting state classes of the entrance guard controller when the entrance guard controller state setting authority is possessed.
The login processing module is used for correspondingly generating a preset character string for each mobile terminal respectively to serve as a token for each mobile terminal to request; after the mobile terminal logs in the Web server for the first time, the data transmission processing module generates a preset character string and returns the preset character string to the mobile terminal, and then when the mobile terminal logs in the Web server, the corresponding preset character string is sent to the Web server to log in the Web server;
the encryption processing module is used for acquiring a public key through a public key interface provided by the encryption processing module when each mobile terminal logs in the Web server, encrypting the password of the login Web server by using the public key, and decrypting the password of the login Web server by using the private key by using the Web server.
The entrance guard rule query module is used for acquiring the detailed json structural data of entrance guard rules of the entrance guard controller by calling a dictionary/getSelect interface, setting id stored in Mysql by the entrance guard controller state setting module, setting the name of the entrance guard controller in the system, setting a state picture of the entrance guard controller, setting a state mark of the entrance guard controller and setting the state class of the entrance guard controller.
The mobile terminal is used for acquiring the detailed json structure data of the entrance guard rule of the entrance guard controller through the entrance guard rule inquiry module when the entrance guard rule inquiry authority is possessed, setting the id of the entrance guard controller stored in Mysql through the entrance guard controller state setting module, setting the name of the entrance guard controller in the system, setting the state picture of the entrance guard controller, setting the state mark of the entrance guard controller and setting the state class of the entrance guard controller.
The Web server further includes: the access controller state processing module; the access controller state class processing module is used for defining the state class of the access controller, and the state class comprises: SendlListInfo class; the SendListInfo type member variables comprise info and gridActivity, and have the functions of forwarding message messages and updating ListVIEW, wherein msg.what is 3; defining two BaseAdapter classes, an IndIsn class, a MyAdapter class and a ListviewAdapter class, wherein the MyAdapter class is responsible for data updating of GridView, and the ListviewAdapter class is responsible for a ListView list; the IndIsSign type defines the device type of the access controller, the state variables of open, close, and the picture names type _ unused, type _ on, type _ off and id device serial number corresponding to the access controller, and the id device serial number is the serial number of the access controller in the Web server.
The mobile terminal is used for defining the state class of the access controller through the state class processing module of the access controller when the access controller has the state class definition authority.
The access controller type processing module is used for acquiring information of an access controller, analyzing data returned by app _ eqpt _ all in the information of the access controller to obtain the type and picture name of the access controller, and judging whether the access controller is a newly added access controller; if the name is not newly added, constructing a url according to the received name, and downloading the picture information of the access controller from the MySQL database; if the new addition is carried out, according to the received information of the access controller, setting id stored in Mysql by the access controller, setting name of the access controller in the system, setting a state picture of the access controller, setting a state mark of the access controller and setting a state class of the access controller;
when information of a plurality of access controllers is acquired, storing the information of the access controllers by adopting a picture cache mechanism LrucCache < String, Bitmap > linked list; and the mobile terminal acquires the information of the access controller from the cache.
The main interface display module is used for displaying the current state of the access controller, the login state of each mobile terminal and the control state of each mobile terminal to the access controller.
The mobile terminal is used for acquiring information of the access controller through the access controller type processing module when the access controller type processing right is provided, analyzing data returned by app _ eqpt _ all in the access controller information to obtain the type and the picture name of the access controller, and judging whether the access controller is a newly added access controller.
The thread communication monitoring module is used for defining a thread communication monitoring mode of the mobile terminal, the Web server and the access controller based on a Handler mechanism when the mobile terminal is in communication connection with the Web server to operate the access controller, continuously monitoring message information and acquiring an operation result.
The mobile terminal is provided with an Android client program, the Web server is provided with Apache and MySQL databases, and the entrance guard controller is provided with an entrance guard server program, entrance guard equipment and control equipment.
The system runs in the Internet environment, so that the safety requirement of the server is met, and the service requirement and the technical advancement of the system are also met. The device type: access control and access control.
And the Web server manages the program login authority of the mobile terminal. The login authority is that different authorities are set for each role, and the authority can be operated or not operated, and the control of the authority is completed at a Web server.
The access controller has a switching function, a user after the mobile terminal logs in can operate various devices, and each operation is communicated with a Web server by calling a form of a Webservice interface based on Restful. The Web server returns the operation result to the mobile terminal, and the mobile terminal dynamically adjusts the icon state according to the returned result, so that the equipment state change, the operation result and the icon state correspond to each other. The Web server operates the operation recording function in real time. The mobile terminal records and dynamically displays each operation and data transmission in real time, and comprises an access controller, various abnormal state alarms and the like. The Web server has an operation record inquiry function. The system can inquire the in-out record and the state record data through the Internet according to different inquiry conditions.
The mobile terminal exchanges with the server side by adopting a Json data format based on a Webservice interface of Restful. Json is a lightweight data exchange format, and has higher efficiency in the aspects of data transmission overhead, transmission time, client data deserialization and the like. Contains id, name, eqppic, openPic, closed pic, status and type. Id is the Id stored in Mysql, name is the custom name. eqptPic, openPic, and closed pic are status pictures of the device, status is the status of the device, and type is the type of the device. The following are examples of data formats:
{ "id":5, "name": 7"," eqppic ": eqppic, openPic, closepic, png", "status pic": and "type":1} mobile terminal Android client operating environment: and 4.0 or more Android. Webservice interface: url construction mode: http: // ip port/packagetname/webservice interface.
Program thread communication mechanism: the Handler mechanism is defined as that a thread opens a loop mode to continuously monitor and sequentially process Message messages sent by other threads to the thread, and a Message msg (new Message ()) is defined herein; the communication thread with the server selects to inherit Callable < Boolean >, and the class can return an operation result.
The communication adopts an RSA asymmetric encryption mode and a token mechanism to transmit data. The Token is a string of character strings generated by the server side and used as a Token requested by the client side, after the first login, the Web server generates a Token and returns the Token to the client side, and the mobile terminal only needs to take the Token to request data before later without taking a user name and a password again. The login function adopts asymmetric encryption to encrypt the password, firstly, a public key is obtained through an interface provided by a background, the password is encrypted by using the public key, and the password is decrypted by using a private key through a Web server.
And the access controller state class processing module defines a SendListInfo class. The member variables of the class comprise info and gridActivity, the main function is to forward message information and update ListVIEW, and msg.what is 3; defining two BaseAdapter classes of MyAdapter and ListviewAdapter, wherein the MyAdapter is responsible for data updating of GridView, and the ListviewAdapter is responsible for a ListView list; defining various device types, state variables of offline, open, close and picture names of type _ unused, type _ on and type _ off corresponding to the device types. The equipment serial number of the ElementInfo id is the serial number of the equipment in the server, the devicemame is the equipment name, and the aWidit is the equipment state.
The device type picture downloading and program loading modes are as follows: and analyzing data returned by the app _ eqpt _ all to obtain the device type and the picture name, and judging whether the device is newly added. If not, a url is constructed according to the received picture name and the picture is downloaded from the server.
When the number of devices is large, reloading a large number of pictures is caused every time the interface is refreshed, which easily causes an Out of memory overflow error of the program. Therefore, a picture caching mechanism LruCache < String, Bitmap > linked list is adopted to store pictures. And the picture information of the existing equipment in the project cannot be checked after the mobile terminal app is installed, and the downloaded picture cannot be stored in a drawable directory of the project. And storing the downloaded picture into an external storage folder after optimized compression. And traversing the folder after the program is started, and caching the pictures downloaded from the server.
The home interface display module includes 2 sections, GridView and ListView as shown in fig. 2. The GridView comprises all control equipment and protocol equipment, wherein each equipment consists of a Name, an Image and control switch information; the ListView scroll column is arranged below and contains the time and the result of each operation, the operation is green after success, and the operation is red after failure.
The Web server has the functions of http request timeout and response timeout setting:
httpClient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,2000);
httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TI MEOUT,2000);
the login interface comprises: including username, password, program logo, and login button. And when the login button is clicked after the login name and the password are input, a server communication thread is newly started and the two parameters are sent to the server through an app _ login interface. The following is a message returned by the login success server.
{ "message": login success "," method ": null", "object": { "createTime": 2016-08-1711: 43:51",.," roleName ": administrator
",""loginName":"admin","fax":null,"updateTime":"2016-08-1711:43:51","status":1,
"loginCount":0, "card": null, "workNum": 1111, "" deleted ":0," picture ":" "addres s": "" roles ": 18," "realname": administrator, "" salt ": 6b60b9492e0a5fd8" }, "code":200}
(ii) successful login if resJsonString ("message"). equals ("login success")); or (resjsonobj. getstring ("message"). equals ("password error")) indicates a login failure, and further notifies the user of the result of the request at the login interface.
In the invention, the mobile terminal is provided with an opening control module, a closing control module, an entrance guard inquiry module and a time recording module;
the opening control module is used for opening the access controller by one key;
the closing control module is used for closing the access controller by one key;
the entrance guard inquiry module is used for inquiring the state of the entrance guard controller through the Web server;
the time recording module is used for recording the time for receiving the data information of the Web server, the time for connecting the Web server, the time for starting the mobile terminal and the current time.
The invention also provides an intelligent access control method based on the mobile terminal APP, as shown in FIG. 3, the method comprises the following steps:
s1, the mobile terminal is connected with the Web server in a Webservice interface mode;
s2, the Web server sets different authorities for each mobile terminal, and the mobile terminal can operate authorities or cannot operate authorities of the access controller;
s3, the mobile terminal sends an entrance guard controller control instruction to the Web server, and the entrance guard controller control instruction comprises: the id of the controlled access controller stored in the Mysql, the name of the access controller in the system, a state picture of the access controller, a control state of the access controller and a state class of the access controller;
and S4, the Web server controls the entrance guard controller to execute the control instruction, the thread communication monitoring mode of the mobile terminal, the Web server and the entrance guard controller is defined based on a Handler mechanism, the message information is monitored continuously, and the operation result is obtained.
Specifically, when the access controller is started or closed, whether the app program of the mobile terminal is started is checked, and the access controller can be switched on or off only after the program is started.
Monitoring the operation of the access controller, judging an operation failure mark, recording the on or off state of the operation, updating ListView and printing the operation process on an interface, wherein the default of the operation failure mark is false.
Sending an operation command to the Web server, wherein the operation command comprises id, operation and delay of the equipment in the server, and if the sending fails, the switch is set to be in the previous state and is set to be in an inoperable state and a red state; and if the sending is successful, monitoring the thread communicated with the server to return a result. Finally, the operation failure flag is set to false.
And constructing a Message whether the thread returns a result successfully or fails, and sending the Message through a handler of the main interface.
And the main thread receives the Message, analyzes the result field in the Message and compares the result field with the recorded switch state. If result is failure, setting the operation failure flag to true; if result is successful, no action is taken. And finally, changing a data linked list, changing the picture according to the state, updating the GridAdaper and informing the ListView.
The Android-based intelligent access control system fully exerts the technical advantages of the mobile internet and realizes convenience and real-time performance of operation. Has good expandability and maintainability.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (2)

1. The utility model provides an intelligent access control system based on mobile terminal APP which characterized in that includes: the system comprises a Web server, a plurality of mobile terminals and an access controller in communication connection with the Web server;
each mobile terminal is in communication connection with the Web server in a Webservice interface mode, and the mobile terminals realize control over the access controller by sending access controller control instructions to the Web server;
the Web server communicates with each mobile terminal in a Json data format, and feeds back control information to the mobile terminals according to the access controller control instructions sent by the mobile terminals;
the Web server is in communication connection with the gate controller through a TCP protocol, and comprises: the system comprises a MySQL database and an access control module used for controlling an access controller to execute a control instruction;
the Web server includes: the system comprises an authority management module, an operation record acquisition module, a login processing module, an encryption processing module, an access controller state processing module, an access controller type processing module, an access controller state setting module, an operation record query module, a main interface display module and a thread communication monitoring module;
the authority management module is used for setting the use authority of each mobile terminal,
the usage rights include: setting different authorities for each mobile terminal to realize the operable authority or the inoperable authority of the mobile terminal to the access controller; the permission management module returns the set operation permission of the mobile terminal to the mobile terminal, and the mobile terminal dynamically adjusts the operation permission according to the returned operation permission;
the operation record acquisition module is used for acquiring the operation record of each mobile terminal in real time; recording and dynamically displaying each operation record and data transmission of the mobile terminal in real time by adopting a rolling list; the operation records comprise the opening and closing of the access controller and the abnormal state alarm of the access controller;
the operation record query module is used for providing query data for the mobile terminal according to the query condition of the mobile terminal;
the entrance guard controller state setting module is used for setting id stored in Mysql by the entrance guard controller, setting name of the entrance guard controller in the system, setting state pictures of the entrance guard controller, setting state marks of the entrance guard controller and setting state classes of the entrance guard controller;
the Web server transmits the state of the entrance guard to the mobile terminal by adopting a Json data format;
the mobile terminal is used for setting id of the entrance guard controller stored in Mysql, setting name of the entrance guard controller in the system, setting a state picture of the entrance guard controller, setting a state mark of the entrance guard controller and setting a state class of the entrance guard controller through an entrance guard controller state setting module when the entrance guard controller state setting right exists;
the login processing module is used for correspondingly generating a preset character string for each mobile terminal respectively to serve as a token for each mobile terminal to request;
after the mobile terminal logs in the Web server for the first time, the data transmission processing module generates a preset character string and returns the preset character string to the mobile terminal, and then when the mobile terminal logs in the Web server, the corresponding preset character string is sent to the Web server to log in the Web server;
the encryption processing module is used for acquiring a public key through a public key interface provided by the encryption processing module when each mobile terminal logs in the Web server, encrypting the password of the login Web server by using the public key, and decrypting the password of the login Web server by using a private key by using the Web server;
the entrance guard rule query module is used for acquiring the detailed json structure data of the entrance guard rule of the entrance guard controller by calling a dictionary/getSelect interface, setting the id of the entrance guard controller stored in Mysql, the name of the entrance guard controller in the system, the state picture of the entrance guard controller, the state mark of the entrance guard controller and the state class of the entrance guard controller through the entrance guard controller state setting module;
the mobile terminal is used for acquiring the detailed json structure data of the entrance guard rule of the entrance guard controller through the entrance guard rule inquiry module when the entrance guard rule inquiry authority is possessed, setting the id of the entrance guard controller stored in Mysql through the entrance guard controller state setting module, setting the name of the entrance guard controller in the system, setting the state picture of the entrance guard controller, setting the state mark of the entrance guard controller and setting the state class of the entrance guard controller;
the access controller state class processing module is used for defining the state class of the access controller, and the state class comprises: SendlListInfo class; the SendListInfo type member variables comprise info and gridActivity, and have the functions of forwarding message messages and updating ListVIEW, wherein msg.what is 3; defining two BaseAdapter classes, an IndIsn class, a MyAdapter class and a ListviewAdapter class, wherein the MyAdapter class is responsible for data updating of GridView, and the ListviewAdapter class is responsible for a ListView list; the IndISign type defines the equipment type of the access controller, the state variables of open, open and close, and the picture names type _ unused, type _ on, type _ off and id equipment serial number corresponding to the access controller, wherein the id equipment serial number is the serial number of the access controller in the Web server;
the mobile terminal is used for defining the state class of the access controller through the state class processing module of the access controller when the state class definition authority of the access controller is possessed;
the access controller type processing module is used for acquiring information of an access controller, analyzing data returned by app _ eqpt _ all in the information of the access controller to obtain the type and picture name of the access controller, and judging whether the access controller is a newly added access controller; if the name is not newly added, constructing a url according to the received name, and downloading the picture information of the access controller from the MySQL database; if the new addition is carried out, according to the received information of the access controller, setting id stored in Mysql by the access controller, setting name of the access controller in the system, setting a state picture of the access controller, setting a state mark of the access controller and setting a state class of the access controller;
when information of a plurality of access controllers is acquired, storing the information of the access controllers by adopting a picture cache mechanism LrucCache < String, Bitmap > linked list; the mobile terminal obtains the information of the access controller from the cache;
the mobile terminal is used for acquiring information of the access controller through the access controller type processing module when the access controller type processing right is provided, analyzing data returned by app _ eqpt _ all in the access controller information to obtain the type and picture name of the access controller, and judging whether the access controller is a newly added access controller or not;
the thread communication monitoring module is used for defining a thread communication monitoring mode of the mobile terminal, the Web server and the access controller based on a Handler mechanism when the mobile terminal is in communication connection with the Web server to operate the access controller, continuously monitoring message information and acquiring an operation result;
the main interface display module is used for displaying the current state of the access controller, the login state of each mobile terminal and the control state of each mobile terminal to the access controller;
the mobile terminal is provided with an opening control module, a closing control module, an entrance guard inquiry module and a time recording module;
the opening control module is used for opening the access controller by one key;
the closing control module is used for closing the access controller by one key;
the entrance guard inquiry module is used for inquiring the state of the entrance guard controller through the Web server;
the time recording module is used for recording the time for receiving the data information of the Web server, the time for connecting the Web server, the time for starting the mobile terminal and the current time.
2. An intelligent access control method based on a mobile terminal APP is characterized in that the method adopts the intelligent access control system based on the mobile terminal APP in claim 1;
the method comprises the following steps:
the mobile terminal is in communication connection with the Web server in a Webservice interface form;
the Web server sets different authorities for each mobile terminal, and realizes the operable authority or the inoperable authority of the mobile terminal to the access controller;
the mobile terminal sends an access controller control instruction to the Web server, and the access controller control instruction comprises the following steps: the id of the controlled access controller stored in the Mysql, the name of the access controller in the system, a state picture of the access controller, a control state of the access controller and a state class of the access controller;
the Web server controls the entrance guard controller to execute the control instruction, and the thread communication monitoring mode of the mobile terminal, the Web server and the entrance guard controller is defined based on a Handler mechanism, so that the information is monitored continuously, and an operation result is obtained.
CN201711331170.8A 2017-12-13 2017-12-13 Intelligent access control system and method based on mobile terminal APP Active CN108269332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711331170.8A CN108269332B (en) 2017-12-13 2017-12-13 Intelligent access control system and method based on mobile terminal APP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711331170.8A CN108269332B (en) 2017-12-13 2017-12-13 Intelligent access control system and method based on mobile terminal APP

Publications (2)

Publication Number Publication Date
CN108269332A CN108269332A (en) 2018-07-10
CN108269332B true CN108269332B (en) 2020-12-29

Family

ID=62771979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711331170.8A Active CN108269332B (en) 2017-12-13 2017-12-13 Intelligent access control system and method based on mobile terminal APP

Country Status (1)

Country Link
CN (1) CN108269332B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116343382B (en) * 2023-04-17 2023-11-21 国网江苏省电力有限公司 Electric power access control system based on operation ticket and control method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103026682A (en) * 2010-06-16 2013-04-03 德尔斐系统有限公司 Wireless device enabled locking system
CN205378110U (en) * 2016-01-19 2016-07-06 北京理工大学珠海学院 Security protection system based on wireless control
CN105759626A (en) * 2016-04-20 2016-07-13 郑晓宁 Intelligent housing system based on embedded Web technology
CN105869238A (en) * 2016-03-24 2016-08-17 深圳市前海铂智科技有限公司 Access control system based on WeChat platform and WeChat control method
CN206096791U (en) * 2016-10-21 2017-04-12 东莞理工学院 Intelligent house control system based on WSN
CN206224599U (en) * 2016-08-26 2017-06-06 特斯联(北京)科技有限公司 A kind of information exchanging system based on mobile device
CN106998360A (en) * 2017-03-31 2017-08-01 福建省光速达物联网科技股份有限公司 Device management method and system based on mobile terminal APP
CN206584426U (en) * 2017-01-12 2017-10-24 深圳达实信息技术有限公司 A kind of Yunmen access control system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103026682A (en) * 2010-06-16 2013-04-03 德尔斐系统有限公司 Wireless device enabled locking system
CN205378110U (en) * 2016-01-19 2016-07-06 北京理工大学珠海学院 Security protection system based on wireless control
CN105869238A (en) * 2016-03-24 2016-08-17 深圳市前海铂智科技有限公司 Access control system based on WeChat platform and WeChat control method
CN105759626A (en) * 2016-04-20 2016-07-13 郑晓宁 Intelligent housing system based on embedded Web technology
CN206224599U (en) * 2016-08-26 2017-06-06 特斯联(北京)科技有限公司 A kind of information exchanging system based on mobile device
CN206096791U (en) * 2016-10-21 2017-04-12 东莞理工学院 Intelligent house control system based on WSN
CN206584426U (en) * 2017-01-12 2017-10-24 深圳达实信息技术有限公司 A kind of Yunmen access control system
CN106998360A (en) * 2017-03-31 2017-08-01 福建省光速达物联网科技股份有限公司 Device management method and system based on mobile terminal APP

Also Published As

Publication number Publication date
CN108269332A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
CN110603800B (en) Method for accessory communication, accessory device and computer readable medium
CN105009131B (en) Promote the multilayer authentication method communicated between intelligent home equipment and server based on cloud
CN104813685B (en) The subscription informing mechanism of synchronization for distributions
KR102303689B1 (en) Systems and methods for establishing secure communication channels with Internet of Things (IoT) devices
KR102293116B1 (en) Uniform communication protocols for communication between controllers and accessories
US10616075B2 (en) Communication protocols in integrated systems
US9021006B2 (en) Intelligent video network protocol
US7467400B1 (en) Integrated security system having network enabled access control and interface devices
US20170070563A1 (en) Data model for home automation
US20170005982A1 (en) Home automation system including hub coupled wireless radio controllers and related methods
KR20180025887A (en) System and method for Virtual Objects Internet (IoT) devices and hubs
CA2992429A1 (en) Data model for home automation
KR20180094985A (en) Systems and Methods for Provisioning Security Objects Internet (IoT) Devices
US20210351920A1 (en) Secure communication method and smart lock system based thereof
CN109979047B (en) Multi-network intelligent door lock control method, storage medium, controller and fingerprint lock
US20210144132A1 (en) Distributed encryption
US11632308B2 (en) Communication protocols in integrated systems
KR20180058140A (en) Method and system for controlling doorlock
CN108269332B (en) Intelligent access control system and method based on mobile terminal APP
CN117676203A (en) Method, computing device, and computer-readable medium for secure video frame management
CN101291247A (en) Information transmission method for information servo
US11262711B2 (en) Home automation (HA) system including virtual assistant audible notification based upon learned device operational pattern and related methods
US10964189B2 (en) Home automation system determining deviated operation device pattern and related methods
US10805106B2 (en) Home automation system including sleep to awake mode device switching and related methods
US20190173685A1 (en) Home automation system including shareable capacity determining hub devices and related methods

Legal Events

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