Summary of the invention
The present invention provides charging method, device, terminal device and the storage medium of a kind of unmanned gymnasium, has broken tradition
Member's blocking covert way of paying, only calculate the single body-building expense of user automatically when user is using gymnasium, in due order
Clearing, avoid the meaningless expenditure of user, reduce the monetary loss of user.
First embodiment of the invention provides a kind of charging method of unmanned gymnasium, comprising:
The first facial image and corresponding unique subscriber ID of user are obtained, and according to first facial image and described
User ID identifies the user identity;
After the user identity identification passes through, control automatically-controlled door is opened so that the user enters the unmanned body-building
Room, and start timing, obtain charging initial time;
The second facial image that will leave the user of the unmanned gymnasium is obtained, and according to second face
The corresponding User ID of image querying;
After inquiring the User ID, terminates timing and obtain the charging termination time, and institute is inquired according to the User ID
User is stated with the presence or absence of reservation duration;Wherein, a length of user is reserved by user terminal and uses the nothing when reservation
The duration of people gymnasium;
If it does not exist, then time calculating real time billing duration is terminated by the charging initial time and the charging, after
And the first bill is generated according to the real time billing duration and preset first charging policy;And the user is obtained in the nothing
Health and fitness facilities the second bill generated is used in people gymnasium, and uses self-service machine third bill generated;
Total bill is generated according to first bill, second bill and the third bill, so that the user
It is paid according to the total bill;
After identifying user charges success, open the automatically-controlled door so that the user left by the automatically-controlled door described in
Unmanned gymnasium.
Further, second bill generates by the following method:
When recognizing the user using health and fitness facilities, start timing and obtain instrument to use initial time;
When recognizing the user and stopping using the health and fitness facilities, when terminating timing and obtaining instrument using terminating
Between;
The use of the health and fitness facilities is calculated using the time is terminated using initial time and the instrument according to the instrument
Duration;
According to second used using duration and preset second charging policy generation fitness equipment of the health and fitness facilities
Bill.
Further, the third bill generates by the following method:
Consumer record of user when using the self-service machine is obtained by the User ID, is disappeared according to described
Take record and generates the third bill.
Further, when inquiring the user with the presence or absence of the reservation duration reservation if it exists according to the User ID
After length, further includes:
The reservation duration if it exists, then when judging that the real time billing duration is less than or equal to the reservation duration,
The first bill is generated according to the real time billing duration and preset first charging policy;
Judge the real time billing duration be greater than the reservation duration when, calculate the real time billing duration with it is described pre-
The about difference of duration;The first sub- bill of overtime charging is generated according to the difference and preset first charging policy, and
The second sub- bill is generated according to the reservation duration and preset first charging policy;Then, according to the described first sub- account
The single and described second sub- bill generates first bill.
It is further, described that the user identity is identified according to first facial image and the User ID, specifically:
Facial image is prestored according to what the User ID extracted the user in management terminal;
First facial image and the facial image that prestores are compared, if comparing successfully, determine the use
Family identification passes through.
Second embodiment is provided on the basis of first embodiment of the invention accordingly
Second embodiment of the invention provides a kind of message accounting of unmanned gymnasium, comprising:
User identification module, automatic door control and timing module, terminate timing module, account at User ID enquiry module
Single generation module and payment identification module;
Wherein, the user identification module, for obtaining the first facial image and corresponding unique subscriber of user
ID, and the user identity is identified according to first facial image and the User ID;
The automatic door control and timing module, for after the user identity identification passes through, control automatically-controlled door to be opened
So that the user enters the unmanned gymnasium, and start timing, obtains charging initial time;
The User ID enquiry module, for obtaining the second face that will leave the user of the unmanned gymnasium
Image, and the corresponding User ID is inquired according to second facial image;
The termination timing module obtains the charging termination time for after inquiring the User ID, terminating timing, and
The user is inquired with the presence or absence of reservation duration according to the User ID;Wherein, a length of user passes through use when the reservation
Terminal reservation in family uses the duration of the unmanned gymnasium;
The bill generation module, for after not inquiring the reservation duration, by the charging initial time and
The charging terminates time calculating real time billing duration, then according to the real time billing duration and preset first charging policy
Generate the first bill;And obtain the user and use health and fitness facilities the second bill generated in the unmanned gymnasium, with
And use self-service machine third bill generated;
Total bill is generated according to first bill, second bill and the third bill, so that the user
It is paid according to the total bill;
The payment identification module sends open command to device for controlling automatic door for identification after user charges success
So that the user leaves the unmanned gymnasium by the automatically-controlled door.
Further, the bill generation module is also used to: inquiring the reservation duration, then judge it is described in real time
When charging duration is less than or equal to the reservation duration, according to the real time billing duration and preset first charging policy
Generate the first bill;
Judge the real time billing duration be greater than the reservation duration when, calculate the real time billing duration with it is described pre-
The about difference of duration;The first sub- bill of overtime charging is generated according to the difference and preset first charging policy, and
The second sub- bill is generated according to the reservation duration and preset first charging policy;Then, according to the described first sub- account
The single and described second sub- bill generates first bill.
Further, the user identification module identifies institute according to first facial image and the User ID
User identity is stated, specifically:
Facial image is prestored according to what the User ID extracted the user in management terminal;
First facial image and the facial image that prestores are compared, if comparing successfully, determine the use
Family identification passes through.
Corresponding third embodiment of the invention provides a kind of billing terminal equipment of unmanned gymnasium, comprising: processor,
It memory and is stored in the memory and is configured as the computer program executed by the processor, the processor is held
The charging method of the unmanned gymnasium in the bright first embodiment of this law is realized when the row computer program.
Corresponding fourth embodiment of the invention provides kind of a computer readable storage medium, the computer-readable storage medium
Matter includes the computer program of storage, wherein controls the computer readable storage medium in computer program operation
The equipment at place executes the charging method of the unmanned gymnasium in first embodiment of the invention
By implementing the embodiment of the present invention, have the advantages that:
The embodiment of the invention provides charging method, device, terminal device and the storage mediums of a kind of unmanned gymnasium, lead to
It crosses recognition of face to identify the identity of user, and opens automatically-controlled door after identifying successfully, start timing, leave nothing in user
Terminate timing behind people gymnasium, obtains practical charging duration;It is generated according to practical charging duration and the first charging policy prestored
First order, while user is inquired according to the ID of user and uses health and fitness facilities the second bill generated in unmanned gymnasium,
And use self-service machine third bill generated;Total bill is generated according to the first bill, the second bill and third bill,
So that user pays according to total bill, finally after identification user charges success, automatically-controlled door is opened so that user passes through certainly
Dynamic door leaves unmanned gymnasium, to break the covert way of paying of traditional member's blocking, only uses gymnasium in user
Shi Zidong calculates the single body-building expense of user, settles accounts in due order, avoids the meaningless expenditure of user, reduce the money of user
Loss.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1, a kind of charging method for unmanned gymnasium that first embodiment of the invention provides includes:
S101, the first facial image and corresponding unique subscriber ID for obtaining user, and according to the first facial image and use
Family ID identifies user identity.
S102, after user identity identification passes through, control automatically-controlled door is opened so that user enters unmanned gymnasium, and starts
Timing obtains charging initial time.
S103, acquisition will leave the second facial image of the user of unmanned gymnasium, and be looked into according to the second facial image
Ask corresponding User ID.
S104, after inquiring User ID, terminate timing obtain charging terminate the time, and according to User ID inquire user
With the presence or absence of reservation duration;Wherein, a length of user reserves the duration using unmanned gymnasium by user terminal when reservation.
S105, if it does not exist then terminates the time by charging initial time and charging and calculates real time billing duration, then root
The first bill is generated according to real time billing duration and preset first charging policy;And user is obtained in unmanned gymnasium using strong
Body instrument the second bill generated, and use self-service machine third bill generated;According to the first bill, the second account
List and third bill generate total bill, so that user pays according to total bill.
S106, when identify user charges success after, open automatically-controlled door so that user leaves unmanned gymnasium by automatically-controlled door.
For step S101, specifically, when user need enter unmanned gymnasium when, portrait monitoring camera chance is adopted automatically
Collect the human face image information of user, and is tied up with the two-dimensional barcode information on the customer mobile terminal of two-dimensional code scanning device scanning
It is fixed, realize the binding procedure of user's facial image and corresponding User ID.After binding success, according to User ID in management terminal
Middle extraction user's prestores facial image;It by the first facial image and prestores facial image and is compared, if comparing successfully, sentence
Determine user identity identification to pass through.You need to add is that the new user for using the unmanned gymnasium for the first time, user needs moving
It is registered in dynamic terminal, a unique User ID can be generated after succeeding in registration, user is identified, when new user wants
Enter unmanned gymnasium when, can the ID of user and facial image be acquired and be bound, and be uploaded to management terminal and deposited
Storage with, for user's next time enter unmanned gymnasium when authentication, it is preferred that mobile terminal include but is not limited to be mobile phone
Or plate.
For step S102, confirmation user identity after, the automatically-controlled door of unmanned gymnasium can be opened, and start timing,
The charging initial time of record at this time, simultaneously user, which enters in unmanned gymnasium, starts body-building.
For step S103, specifically, after user terminates body-building, when leaving gymnasium, face monitor camera is again
The facial image of secondary acquisition user, and the User ID of user is inquired according to the facial image in management terminal.
For step S104, specifically, after inquiring the ID of user, terminate timing, and the charging recorded at this time terminates
Time, while according to the ID of user inquires the user and whether passes through mobile terminal be subscribed in advance using unmanned gymnasium, and pre-
Use duration about.
For step S105, specifically, if not inquiring the reservation recording of user, at this point, rising by charging
The termination time of beginning time and charging calculate the real time billing duration that user uses unmanned gymnasium.Then according to meter in real time
Time-consuming length and the first charging policy pre-set calculate this gymnasium usage charges of user, are denoted as the first bill.
You need to add is that when inquiring user has the record reserved in advance, then judging that real time billing duration is less than
Or when being equal to reservation duration, the first bill is generated according to real time billing duration and preset first charging policy;It is real-time in judgement
When charging duration is greater than reservation duration, calculates real time billing duration and reserve the difference of duration;According to difference and preset first
Charging policy generates the first sub- bill of overtime charging, and generates the second son according to reservation duration and preset first charging policy
Bill;Then, the first bill is generated according to the first sub- bill and the second sub- bill.It should be noted that in the first charging policy
In, set the rule of overtime charging.
Furthermore in the present invention, user also needs in addition to pay when using the health and fitness facilities of unmanned gymnasium, is generating the
While one bill, it can also be obtained according to the ID of user generated second when user uses health and fitness facilities in unmanned gymnasium
Bill.Wherein, the specific generation method of the second bill are as follows: when recognizing user using health and fitness facilities, start timing and obtain
Instrument uses initial time;When recognizing user and stopping using health and fitness facilities, when terminating timing and obtaining instrument using terminating
Between;The use duration of health and fitness facilities is calculated using the time is terminated using initial time and instrument according to instrument;According to health and fitness facilities
Generate the second bill that fitness equipment uses using duration and preset second charging policy.If user does not have in gymnasium
Using any health and fitness facilities, then the expense of the second bill is 0, i.e. user need to only pay the usage charges of unmanned gymnasium, without
Pay the usage charges of health and fitness facilities.
Preferably, in the present invention, the third generated after self-service machine also is used with according to the ID of user inquiry user
Bill, the wherein generation of third bill specifically: consumer record of user when using self-service machine is obtained by User ID,
Third bill is generated according to consumer record.You need to add is that when user does not use self-service machine to consume,
Third bill is zero.
Total bill can be generated after obtaining the first bill, the second bill and third bill, and is generated and paid according to total bill
Information is sent to the mobile phone or other mobile terminals of user, and preferred payment information can be the two dimensional code of payment.
For step S106, identification user charges success after, open automatically-controlled door so that user is left unmanned gymnasium, when with
When family is not paid and left by force, alarm will do it.
Second embodiment is provided on the basis of first embodiment of the invention accordingly.
As shown in Fig. 2, second embodiment of the invention provides a kind of message accounting of unmanned gymnasium, comprising: include: use
Family identification module 201, automatic door control and timing module 202, User ID enquiry module 203, terminate timing module 204,
Bill generation module 205 and payment identification module 206;
Wherein, user identification module 201, for obtaining the first facial image and corresponding unique subscriber of user
ID, and user identity is identified according to the first facial image and User ID;
Automatic door control and timing module 202, for after user identity identification passes through, control automatically-controlled door to be opened to use
Family enters unmanned gymnasium, and starts timing, obtains charging initial time;
User ID enquiry module 203, for obtaining the second facial image for the user that will leave unmanned gymnasium, and root
Corresponding User ID is inquired according to the second facial image;
Timing module 204 is terminated, for after inquiring User ID, terminates timing and obtain charging to terminate the time, and according to
User ID inquires user with the presence or absence of reservation duration;Wherein, a length of user is strong using nobody by user terminal reservation when reservation
The duration in body room;
Bill generation module 205, for after not inquiring reservation duration, when being terminated by charging initial time and charging
Between calculate real time billing duration, the first bill is then generated according to real time billing duration and preset first charging policy;And it obtains
Family is taken in unmanned gymnasium using health and fitness facilities the second bill generated, and uses self-service machine generated the
Three bills;
Total bill is generated according to the first bill, the second bill and third bill, so that user pays according to total bill
Take;
Pay identification module 206, for identification user charges success after, to device for controlling automatic door send open command with
User is set to leave unmanned gymnasium by automatically-controlled door.
Preferably, the second bill generates by the following method: when recognizing user using health and fitness facilities, starting timing simultaneously
It obtains instrument and uses initial time;When recognizing user and stopping using health and fitness facilities, terminate timing and simultaneously obtain instrument to use eventually
The only time;The use duration of health and fitness facilities is calculated using the time is terminated using initial time and instrument according to instrument;According to body-building
Instrument generates the second bill that fitness equipment uses using duration and preset second charging policy.
Preferably, third bill generates by the following method: obtaining user when using self-service machine by User ID
Consumer record, according to consumer record generate third bill.
Further, bill generation module 205 is also used to: being inquired reservation duration, is then being judged real time billing duration
When less than or equal to reservation duration, the first bill is generated according to real time billing duration and preset first charging policy;
When judging that real time billing duration is greater than reservation duration, calculates real time billing duration and reserve the difference of duration;Root
The first sub- bill of overtime charging is generated according to difference and preset first charging policy, and according to reservation duration and preset first
Charging policy generates the second sub- bill;Then, the first bill is generated according to the first sub- bill and the second sub- bill.
Preferably, user identification module 201 identify user identity according to the first facial image and User ID, specifically
Are as follows: that extracts user in management terminal according to User ID prestores facial image;By the first facial image and prestore facial image
It is compared, if comparing successfully, determines that user identity identification passes through.
Corresponding third embodiment of the invention provides a kind of billing terminal equipment of unmanned gymnasium, comprising: processor,
Memory and be stored in memory and be configured as by processor execute computer program, processor execute computer program
The charging method of unmanned gymnasium in the bright first embodiment of Shi Shixian this law.
Corresponding fourth embodiment of the invention provides kind of a computer readable storage medium, computer readable storage medium packet
Include the computer program of storage, wherein the equipment in computer program operation where control computer readable storage medium is held
The charging method of unmanned gymnasium in row first embodiment of the invention.
By implementing the embodiment of the present invention, have the advantages that:
The embodiment of the invention provides charging method, device, terminal device and the storage mediums of a kind of unmanned gymnasium, lead to
It crosses recognition of face to identify the identity of user, and opens automatically-controlled door after identifying successfully, start timing, leave nothing in user
Terminate timing behind people gymnasium, obtains practical charging duration;It is generated according to practical charging duration and the first charging policy prestored
First order, while user is inquired according to the ID of user and uses health and fitness facilities the second bill generated in unmanned gymnasium,
And use self-service machine third bill generated;Total bill is generated according to the first bill, the second bill and third bill,
So that user pays according to total bill, finally after identification user charges success, automatically-controlled door is opened so that user passes through certainly
Dynamic door leaves unmanned gymnasium, to break the covert way of paying of traditional member's blocking, only uses gymnasium in user
Shi Zidong calculates the single body-building expense of user, settles accounts in due order, avoids the meaningless expenditure of user, reduce the money of user
Loss.
It should be noted that the apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.In addition, device provided by the invention
In embodiment attached drawing, the connection relationship between module indicate between them have communication connection, specifically can be implemented as one or
A plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, it can understand
And implement.
It is the preferred embodiment of the present invention above, it is noted that for those skilled in the art,
Various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as this hair
Bright protection scope.