CN107995675A - Communication means, device, terminal and the storage medium of mobile POS machine - Google Patents

Communication means, device, terminal and the storage medium of mobile POS machine Download PDF

Info

Publication number
CN107995675A
CN107995675A CN201711128395.3A CN201711128395A CN107995675A CN 107995675 A CN107995675 A CN 107995675A CN 201711128395 A CN201711128395 A CN 201711128395A CN 107995675 A CN107995675 A CN 107995675A
Authority
CN
China
Prior art keywords
base station
time interval
identity code
dormancy
dormancy awakening
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711128395.3A
Other languages
Chinese (zh)
Other versions
CN107995675B (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.)
PAX Computer Technology Shenzhen Co Ltd
Original Assignee
PAX Computer Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PAX Computer Technology Shenzhen Co Ltd filed Critical PAX Computer Technology Shenzhen Co Ltd
Priority to CN201711128395.3A priority Critical patent/CN107995675B/en
Publication of CN107995675A publication Critical patent/CN107995675A/en
Application granted granted Critical
Publication of CN107995675B publication Critical patent/CN107995675B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • H04W52/0216Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave using a pre-established activity schedule, e.g. traffic indication frame
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The present invention is suitable for field of communication technology, more particularly to a kind of communication means, device, terminal and the storage medium of mobile POS machine, this method include:Search in base station identity code list and whether be stored with the corresponding dormancy awakening time interval of base station identity code;If not storing, the first dormancy awakening time interval is preset, establishes and communicates to connect with the base station;If sleep time reaches the first dormancy awakening time interval, detect whether the communication connection with the base station disconnects;If disconnecting, shorten the first dormancy awakening time interval, communication connection is re-established with base station, into dormancy next time;If not disconnecting, keep Alive Packet is sent to the webserver so that the base station does not discharge the Internet resources of the mobile POS machine, into dormancy next time.Power consumption can be reduced and in sleep procedure still so that base station does not discharge the Internet resources of the mobile POS machine by entering dormancy by realizing mobile POS machine, improve the trading efficiency of mobile POS machine.

Description

Communication means, device, terminal and the storage medium of mobile POS machine
Technical field
The invention belongs to field of communication technology, more particularly to a kind of communication means of mobile POS machine, device, terminal and deposit Storage media.
Background technology
Mobile POS machine is a kind of RF-SIM cards terminal reader, is called mobile point of sale, the shifting applied to industry-by-industry Dynamic sale.Fast with gathering speed, checkout is accurate, the advantages of without small change, and causes people need not carry cash can Purchase and consumption, the life to people bring great convenience.
But current mobile POS machine it is in running order when, have the shortcomings that power consumption is big.In order to reduce mobile POS machine Power consumption, usually allow mobile POS machine to enter resting state when mobile POS machine is idle in the prior art.However, mobile POS machine It is connected after being waken up in the dormant state, it is necessary to be re-established with base station, consumes a longer time, cause exchange hour to extend, is dropped Low trading efficiency.
The content of the invention
In view of this, an embodiment of the present invention provides a kind of communication means of mobile POS machine, device, terminal and storage to be situated between Matter, can solve the problems, such as low in order to reduce trading efficiency caused by power consumption in the prior art.
The first aspect of the embodiment of the present invention provides a kind of communication means of mobile POS machine, including:
The base station identity code of base station is obtained, searches in base station identity code list whether be stored with the base station identity code and institute State the corresponding dormancy awakening time interval of base station identity code;
If the base station identity code and the corresponding dormancy awakening time interval of the base station identity code are not stored with;Then preset The corresponding dormancy awakening time interval of the base station identity code is the first dormancy awakening time interval, and is established with the base station logical Letter connection;
If sleep time reaches the first dormancy awakening time interval, detect and whether the communication connection of the base station Disconnect;
If the communication connection disconnects, shorten the first dormancy awakening time interval, re-established with the base station Communication connection, into dormancy next time;If the communication connection does not disconnect, keep Alive Packet is sent to the webserver, so that The Internet resources that the base station does not discharge the mobile POS machine are obtained, into dormancy next time.
The second aspect of the embodiment of the present invention provides a kind of communicator of mobile POS machine, including:
Whether searching unit, for obtaining the base station identity code of base station, search described in being stored with base station identity code list Base station identity code and the corresponding dormancy awakening time interval of the base station identity code;
First connection unit, if being called out for not being stored with the base station identity code and the corresponding dormancy of the base station identity code Awake time interval;It is the first dormancy awakening time interval then to preset the corresponding dormancy awakening time interval of the base station identity code, And establish and communicate to connect with the base station;
Detection unit, if reaching the first dormancy awakening time interval, detection and the base station for sleep time Communication connection whether disconnect;
Second connection unit, if being disconnected for the communication connection, shortens the first dormancy awakening time interval, with The base station re-establishes communication connection, into dormancy next time;If the communication connection does not disconnect, send keep Alive Packet to The webserver, so that the base station does not discharge the Internet resources of distribution, into dormancy next time.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor performs the computer program The step of realizing method described above.
The fourth aspect of the embodiment of the present invention provides a kind of computer-readable storage medium, the computer-readable storage medium storage There is computer program, it is characterised in that the step of computer program realizes method described above when being executed by processor.
The embodiment of the present invention in the base station identity code list by not being stored with the base station identity code and the base During the corresponding dormancy awakening time interval of station identification code, the communication connection of mobile POS machine described in dynamic access and the base station is not The first dormancy awakening time interval during disconnection, and when sleep time reaches the first dormancy awakening time interval, send and protect Message living is to the webserver, so that the base station does not discharge the Internet resources of the mobile POS machine, into stopping next time Sleep.Power consumption can be reduced and in sleep procedure still so that the base by entering dormancy by realizing the mobile POS machine Stand and do not discharge the Internet resources of the mobile POS machine, solve and move POS machine in the prior art and be waken up in the dormant state It is connected afterwards, it is necessary to be re-established with base station, the low technical problem of trading efficiency, improves the trading efficiency of the mobile POS machine.
Brief description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, drawings in the following description be only the present invention some Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of the first schematic flow diagram of the communication means of mobile POS machine provided in an embodiment of the present invention;
Fig. 2 is a kind of the second schematic flow diagram of the communication means of mobile POS machine provided in an embodiment of the present invention;
Fig. 3 is a kind of the 3rd schematic flow diagram of the communication means of mobile POS machine provided in an embodiment of the present invention;
Fig. 4 is a kind of the 4th schematic flow diagram of the communication means of mobile POS machine provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic block diagram of the communicator of mobile POS machine provided in an embodiment of the present invention;
Fig. 6 is a kind of schematic diagram of terminal device provided in an embodiment of the present invention.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.Described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is logical The component for the embodiment of the present invention being often described and illustrated herein in the accompanying drawings can be arranged and designed with a variety of configurations. Therefore, the detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit claimed invention below Scope, but be merely representative of the present invention selected embodiment.Based on the embodiment of the present invention, those skilled in the art are not having All other embodiments obtained on the premise of creative work are made, belong to the scope of protection of the invention.
At present, mobile POS machine is commonly provided with that battery capacity is smaller, however, requiring the POS machine again in actual use Stand-by time is longer.In order to reduce the power consumption of mobile POS machine, in the prior art usually when mobile POS machine is idle, movement is allowed POS machine enters resting state.However, mobile POS machine, since long-time is without data communication, will cause in resting state Base station discharges the Internet resources of the mobile POS machine, cause the mobile POS machine be waken up in the dormant state after, it is necessary to Base station re-establishes connection, consumes a longer time, causes exchange hour to extend, and reduces trading efficiency.
For example, it is smaller in movings range such as dining rooms, and for more frequent application scenarios of merchandising, user it is generally desirable to often Secondary exchange hour is as far as possible short.Therefore the power consumption of the mobile POS machine can be reduced and so that the mobile POS to reach Machine is in long connection status with the base station, improves the trading efficiency of the mobile POS machine, and the embodiment of the present invention provides a kind of move The communication means of dynamic POS machine.
Fig. 1 is referred to, Fig. 1 is a kind of the first signal stream of the communication means of mobile POS machine provided in an embodiment of the present invention Cheng Tu.The executive agent of method in the present embodiment is a kind of communicator of mobile POS machine, the device can by software and/ Or hardware realization, it is integrated in mobile POS machine, is applicable to situation about communicating with base station.Movement as shown in Figure 1 The communication means of POS machine, it may include step S101 to step S105.
In S101, the base station identity code of base station is obtained, searches in base station identity code list whether be stored with the base station Identification code and the corresponding dormancy awakening time interval of the base station identity code.
, it is necessary to first carry out network registry after the mobile POS machine start.Judge that the mobile POS machine has net in base station During network access rights, the mobile POS machine obtains the base station identity code of the base station.For example, the base station is in the mobile POS When machine is started shooting, the username and password information of the mobile POS machine is obtained, according to judging the username and password information Whether mobile POS machine has network access authority.The base station identity code is used for base station described in unique mark.
, it is necessary to search in base station identity code list after the mobile POS machine obtains the base station identity code of the base station Whether the base station identity code and the base station identity code corresponding dormancy awakening time interval are stored with, so as in the movement When POS machine enters dormancy, it can be carried out when sleep time reaches the corresponding dormancy awakening time interval of the base station identity code The wake-up of mobile POS machine.
For example, when the mobile POS machine registers the upper base station for the first time, the base station identity code of the mobile POS machine The corresponding dormancy awakening time interval of base station identity code and the base station identity code that will not be stored with the base station in list. When the mobile POS machine once registers the upper base station, would be possible to deposit in the base station identity code list of the mobile POS machine Contain the base station identity code and the corresponding dormancy awakening time interval of the base station identity code of the base station.Wherein, the base station The corresponding dormancy awakening time interval of identification code can be the dormancy awakening time interval of user preset or utilize dynamic The dormancy awakening time interval that appraisal procedure obtains.
Wherein, the corresponding dormancy awakening time interval of the base station identity code refers to that the mobile POS machine does not carry out data During communication, the base station retains the time interval of Internet resources for the mobile POS machine;That is, between the dormancy awakening time Every interior, the mobile POS machine will not discharge the network for distributing to the mobile POS machine without data communication, the base station Resource.
In S102, if not being stored between the base station identity code and the base station identity code corresponding dormancy awakening time Every;It is the first dormancy awakening time interval then to preset the corresponding dormancy awakening time interval of the base station identity code, and with it is described Communication connection is established in base station;
Generally for the utilization rate for improving Internet resources, base station is in communication equipments such as mobile POS machine for a long time not into line number During according to communication, release is distributed to the Internet resources of the communication equipments such as the mobile POS machine.For example, the mobile POS machine into Enter resting state, not into row data communication when, the base station would be possible to release and distribute to the communication equipments such as the mobile POS machine Internet resources, communicate to connect, extend, it is necessary to be established again with the base station when causing the mobile POS machine dormancy awakening The exchange hour of the mobile POS machine, reduces the trading efficiency of the mobile POS machine.Therefore, the present invention is in the movement After POS machine start, the dormancy awakening time interval of the mobile POS machine is first obtained, enters back into dormancy, so as in the movement When the sleep time of POS machine reaches the dormancy awakening time interval of the mobile POS machine, the mobile POS machine is waken up, and cause The mobile POS machine keeps communicating to connect with the base station.
In certain embodiments of the present invention, when not being stored with the base station identity code in the base station identity code list And during the corresponding dormancy awakening time interval of the base station identity code, then need to obtain the base station by the method for dynamic evaluation Corresponding dormancy awakening time interval.
Specifically, the corresponding dormancy awakening time interval of the base station identity code is first preset between the first dormancy awakening time Every, and establish and communicate to connect with the base station.
For example, it is maximum sleep wakeup time interval T first to preset the first dormancy awakening time interval, in another example, in advance If the maximum sleep wakeup time interval T=60min, then establish and communicate to connect with the base station.It is it should be noted that described The value of maximum sleep wakeup time interval T is obtained according to practical experience or set according to practical application, is simply lifted herein Example explanation, does not indicate that as limiting the scope of the invention.
Wherein, it is described establish with the base station communication connection include with the base station establish PDP be connected or with the base PPP connections are established at station.
In S103, if sleep time reaches the first dormancy awakening time interval, detection is logical with the base station Whether letter connection disconnects.
Since the first dormancy awakening time interval most starts for default maximum sleep wakeup time interval T, to work as institute When stating sleep time and reaching the default maximum sleep wakeup time interval T, the mobile POS machine be possible to it is described Base station disconnects communication connection, it is also possible to still keeps communicating to connect with the base station, therefore, when the sleep time reaches described First dormancy awakening time interval is, it is necessary to detect with whether the communication connection of the base station disconnects.
In S104, if the communication connection disconnects, shorten the first dormancy awakening time interval, with the base station Communication connection is re-established, into dormancy next time.
Due to when the mobile POS machine and the base station, which disconnect, to be communicated to connect, then it represents that during the dormancy of the mobile POS machine Length is long, causes the base station to release the Internet resources for distributing to the mobile POS machine.Therefore, in the mobile POS , it is necessary to shorten the first dormancy awakening time interval when machine disconnects communication connection with the base station, and with the base station again Communication connection is established, enters back into dormancy next time.So that the sleep time of the mobile POS machine reaches first dormancy again During wakeup time interval, it is possible to keep communicating to connect with the base station.
Wherein, shortening the first dormancy awakening time interval is stopped including shortening described first in regular intervals Dormancy wakeup time interval, for example, the Fixed Time Interval is 10min, then it represents that the mobile POS machine sleep time reaches institute When stating the first dormancy awakening time interval, if the mobile POS machine and the communication connection of the base station are disconnected, described in shortening First dormancy awakening time interval T=T-10min, and communication connection is re-established with the base station, enter back into dormancy next time.
In certain embodiments of the present invention, shortening the first dormancy awakening time interval can also include pressing The first dormancy awakening time interval is shortened at gradient timetable interval, for example, the gradient timetable at intervals of 10min, 10min, 10min, 5min, 5min, 5min, 5min, 5min, 5min, then it represents that the mobile POS machine sleep time reaches described first and stops During dormancy wakeup time interval T=60min, if the mobile POS machine and the communication connection of the base station are disconnected, described in shortening First dormancy awakening time interval T=T-10min=50min, and communication connection is re-established with the base station, enter back into next Secondary dormancy.When the mobile POS machine sleep time reaches the first dormancy awakening time interval T=30min, if the shifting Dynamic POS machine and the communication connection of the base station are disconnected, then shorten the first dormancy awakening time interval T=T-5min= 25min, and communication connection is re-established with the base station, enter back into dormancy next time, and so on.It should be noted that institute It can also be any other gradient timetable interval to state gradient timetable interval, for example, 15min, 10min, 10min, 10min, 5min, 5min, 5min etc., are merely illustrative herein, are not meant as limiting the scope of the invention.
It should be noted that when having performed S104, S103 need to be re-executed, if until sleep time reaches described first When dormancy awakening time interval, the mobile POS machine and the communication connection of the base station do not disconnect, step S105 is performed.
In S105, if the communication connection does not disconnect, keep Alive Packet is sent to the webserver, so that the base Stand and do not discharge the Internet resources of the mobile POS machine, into dormancy next time.
When the sleep time of the mobile POS machine reaches the first dormancy awakening time interval, the mobile POS machine with When the communication connection of the base station does not disconnect;The mobile POS machine is represented in the first dormancy awakening time interval, not into During row data communication, the base station still retains Internet resources for the mobile POS machine, is protected at this time, it may be necessary to be sent to the base station Message living is to the webserver so that the mobile POS machine is thought still into row data communication in the base station, and is the shifting Dynamic POS machine retains Internet resources, enters back into dormancy next time.
Wherein, the keep Alive Packet can be the message of icmp packet or the message, such as udp protocol race of other agreements Deng.The icmp packet is a sub-protocol of TCP/IP protocol suite, is disappeared for transmitting control between IP hosts, router Breath.The webserver can be known to the public well-known server, for example, Google servers, Baidu's server etc. are outer Network server.
It should be noted that in order to ensure the reliability of communication connection, after execution of step S105, can re-execute S103, and reach the first dormancy awakening time interval, and the mobile POS machine and the communication of the base station in sleep time When connection does not disconnect, then step S105 is performed, otherwise perform step S104.In certain embodiments of the present invention, base station is worked as When distribution Internet resources are more stable, step S105 can also be directly repeated after execution of step S105, not in detection institute State mobile POS machine and whether the communication connection of the base station disconnects.
Alternatively, as shown in Fig. 2, after step s 103, further including step S201 to step S20
In S201, if being disconnected with the communication connection of the base station, judge that the first dormancy awakening time interval is It is no to be less than predetermined threshold value.
For example, the predetermined threshold value for above-mentioned shortening the first dormancy awakening time interval when Fixed Time Interval, It can also be the minimal gradient value in gradient timetable interval, or be the predetermined threshold value of other users setting.
After the first dormancy awakening time interval is by shortening, when can be by judging first dormancy awakening Between be spaced whether be less than predetermined threshold value, to terminate the dynamic evaluation process of the first dormancy awakening time interval.
In S202, if the first dormancy awakening time interval is less than predetermined threshold value, first dormancy is set to call out Awake time interval is zero, and the base station identity code of the base station and the first dormancy awakening time interval are stored in base station and known Other code list, into dormancy.
That is, when the first dormancy awakening time interval is reduced to less than predetermined threshold value, then directly by institute State the first dormancy awakening time interval and be arranged to zero, and the base station identity code of the base station and the base station identity code is corresponding Dormancy awakening time interval T=0 is stored in base station identity code list, enters back into dormancy, logical without being pre-established with the base station Letter connection.
It should be noted that during dormancy awakening time interval T=0 corresponding due to base station identity code, the movement is represented After POS machine completes data communication with the base station, the Internet resources of distribution are just discharged by the base station in the short period of time, because This, as the corresponding dormancy awakening time interval T=0 of the base station identity code, can not have to establish with the base station in advance logical Letter connection, but when into row data communication, then establish and communicate to connect with the base station.For example, when the mobile POS machine shutdown Afterwards, when then starting shooting, the base station identity code and institute are obtained from the base station identity code list according to the base station identity code of acquisition When stating the corresponding dormancy awakening time interval T=0 of base station identity code, then dormancy is directly entered, is built without advance with the base station Vertical communication connection.Only when the mobile POS machine is waken up, during into row data communication, just establishes and communicate to connect with the base station, And after the completion of data communication, disconnect and communicating to connect with the base station.
Alternatively, if not disconnected in the communication connection, send keep Alive Packet and also wrapped afterwards to the webserver Include:The base station identity code of the base station and the first dormancy awakening time interval are stored in base station identity code list.
It is described that the base station identity code of the base station and the first dormancy awakening time interval are stored in base station identity code In list so that after the mobile POS machine shutdown, then when starting shooting, can be known according to the base station identity code of acquisition from the base station The base station identity code and the corresponding dormancy awakening time interval of the base station identity code are obtained in other code list, to be stopped Wake-up during dormancy, and the base station is retained Internet resources for the mobile POS machine.
In certain embodiments of the present invention, as shown in figure 3, further including step S106 after the step S101.
In S106, if being stored with the base station identity code and the base station identity code pair in the base station identity code list The dormancy awakening time interval answered;Then establish and communicate to connect with the base station;Reach the dormancy awakening time in sleep time During interval, keep Alive Packet is sent to the webserver, so that the base station does not discharge the Internet resources of distribution, and is entered next Secondary dormancy.
In certain embodiments of the present invention, if as shown in figure 4, being stored with the base in the base station identity code list Step S107 is further included to step S109 after station identification code and the corresponding dormancy awakening time interval of the base station identity code.
In S107, judge whether the corresponding dormancy awakening time interval of the base station identity code is zero.
That is, when judging the corresponding dormancy awakening of the base station identity code that is stored in the base station identity code list Between whether be spaced be zero, if zero, then it represents that after the mobile POS machine completes data communication with the base station, when shorter It is interior therefore, to perform step S108 just by the Internet resources of base station release distribution, if the base station identity code is corresponding not Dormancy wakeup time is at intervals of zero, then into dormancy;Represent not having to establish with the base station in advance to communicate to connect, but During into row data communication, then establish and communicate to connect with the base station.
If the corresponding dormancy awakening time interval of the base station identity code is not zero, then it represents that the mobile POS machine and institute State after base station completes data communication, the Internet resources of distribution will not be discharged by the base station in the short period of time, therefore, can be with Step S109 is performed, if the corresponding dormancy awakening time interval of the base station identity code is not zero, reaches institute in sleep time When stating dormancy awakening time interval, keep Alive Packet is sent to the webserver, so that the base station does not discharge the network of distribution Resource, and enter dormancy next time.
The embodiment of the present invention in the base station identity code list by not being stored with the base station identity code and the base During the corresponding dormancy awakening time interval of station identification code, the communication connection of mobile POS machine described in dynamic access and the base station is not The first dormancy awakening time interval during disconnection, and when sleep time reaches the first dormancy awakening time interval, send and protect Message living is to the webserver, so that the base station does not discharge the Internet resources of the mobile POS machine, into stopping next time Sleep.So that the mobile POS machine can reduce power consumption and in sleep procedure still so that the base station by entering dormancy The Internet resources of the mobile POS machine are not discharged, are solved and are moved in the prior art after POS machine is waken up in the dormant state, Need to re-establish with base station and be connected, the problem of trading efficiency is low, improves the trading efficiency of the mobile POS machine.
The embodiment of the present invention also provides a kind of communicator of mobile POS machine, which includes being used to perform foregoing described Mobile POS machine communication means in each step module, which can be integrated in the mobile POS machine.In the device not Part, which is described in detail, please refer to the description of preceding method.
Referring to Fig. 5, Fig. 5 is a kind of schematic block diagram of the communicator of mobile POS machine provided in an embodiment of the present invention.This reality Applying the communicator 500 of the mobile POS machine of example includes:Searching unit 501, the first connection unit 502, detection unit 503 and Second connection unit 504.
Wherein, whether searching unit 501, for obtaining the base station identity code of base station, search and deposited in base station identity code list Contain the base station identity code and the corresponding dormancy awakening time interval of the base station identity code;
First connection unit 502, if corresponding not for not being stored with the base station identity code and the base station identity code Dormancy wakeup time interval;The corresponding dormancy awakening time interval of the base station identity code is then preset between the first dormancy awakening time Every, and establish and communicate to connect with the base station;
Detection unit 503, if reaching the first dormancy awakening time interval, detection and the base for sleep time Whether the communication connection stood disconnects;
Second connection unit 504, if being disconnected for the communication connection, between shortening the first dormancy awakening time Every communication connection being re-established with the base station, into dormancy next time;If the communication connection does not disconnect, keep-alive is sent Message is to the webserver, so that the base station does not discharge the Internet resources of distribution, into dormancy next time.
Fig. 6 is the schematic diagram of terminal device provided in an embodiment of the present invention, and the terminal device can be mobile POS machine. As shown in fig. 6, the terminal device 6 of the embodiment includes:Processor 60, memory 61 and it is stored in the memory 61 simultaneously The computer program 62 that can be run on the processor 60, such as move the program of the communication of POS machine.The processor 60 is held The step in the communication means embodiment of above-mentioned each mobile POS machine is realized during the row computer program 62, such as shown in Fig. 1 S101 to S105.Alternatively, the processor 60 is realized in above-mentioned each device embodiment respectively when performing the computer program 62 The function of module/unit, such as the function of unit 501 to 504 shown in Fig. 5.
Exemplary, the computer program 62 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 61, and are performed by the processor 60, to complete the present invention.Described one A or multiple module/units can be the series of computation machine programmed instruction section that can complete specific function, which is used for Implementation procedure of the computer program 62 in the terminal device 6 is described.For example, the computer program 62 can be divided It is cut into searching unit, the first connection unit, detection unit and the second connection unit (unit in virtual bench), each unit tool Body function is as follows:
Whether searching unit, for obtaining the base station identity code of base station, search described in being stored with base station identity code list Base station identity code and the corresponding dormancy awakening time interval of the base station identity code;
First connection unit, if being called out for not being stored with the base station identity code and the corresponding dormancy of the base station identity code Awake time interval;It is the first dormancy awakening time interval then to preset the corresponding dormancy awakening time interval of the base station identity code, And establish and communicate to connect with the base station;
Detection unit, if reaching the first dormancy awakening time interval, detection and the base station for sleep time Communication connection whether disconnect;
Second connection unit, if being disconnected for the communication connection, shortens the first dormancy awakening time interval, with The base station re-establishes communication connection, into dormancy next time;If the communication connection does not disconnect, send keep Alive Packet to The webserver, so that the base station does not discharge the Internet resources of distribution, into dormancy next time.
The terminal device 6 can be mobile POS machine.The terminal device may include, but be not limited only to, processor 60, Memory 61.It will be understood by those skilled in the art that Fig. 6 is only the example of terminal device 6, do not form to terminal device 6 Restriction, can include than illustrating more or fewer components, either combine some components or different components, such as institute Input-output equipment, network access equipment, bus etc. can also be included by stating terminal device.
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 61 can be the internal storage unit of the terminal device 6, such as the hard disk of terminal device 6 or interior Deposit.The memory 61 can also be the External memory equipment of the terminal device 6, such as be equipped with the terminal device 6 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, dodges Deposit card (Flash Card) etc..Further, the memory 61 can also both include the storage inside list of the terminal device 6 Member also includes External memory equipment.The memory 61 is used to store needed for the computer program and the terminal device Other programs and data.The memory 61 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each work( Can unit, module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device are divided into different functional units or module, more than completion The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used To be that unit is individually physically present, can also two or more units integrate in a unit, it is above-mentioned integrated Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.In addition, each function list Member, the specific name of module are not limited to the protection domain of the application also only to facilitate mutually distinguish.Said system The specific work process of middle unit, module, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in detail or remembers in some embodiment The part of load, may refer to the associated description of other embodiments.
Those of ordinary skill in the art may realize that each exemplary list described with reference to the embodiments described herein Member and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, application-specific and design constraint depending on technical solution.Professional technician Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, can be with Realize by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, is only a kind of division of logic function, there can be other dividing mode when actually realizing, such as Multiple units or component can combine or be desirably integrated into another system, or some features can be ignored, or not perform.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be by some interfaces, device Or INDIRECT COUPLING or the communication connection of unit, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple In network unit.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated module/unit realized in the form of SFU software functional unit and as independent production marketing or In use, it can be stored in a computer read/write memory medium.Based on such understanding, the present invention realizes above-mentioned implementation All or part of flow in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer-readable recording medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or some intermediate forms etc..The computer-readable medium It can include:Any entity or device, recording medium, USB flash disk, mobile hard disk, the magnetic of the computer program code can be carried Dish, CD, computer storage, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It is it should be noted that described The content that computer-readable medium includes can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice Subtract, such as in some jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and electricity Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality Example is applied the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to foregoing each Technical solution described in embodiment is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed Or replace, the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical solution, should all Within protection scope of the present invention.

Claims (10)

  1. A kind of 1. communication means of mobile POS machine, it is characterised in that including:
    The base station identity code of base station is obtained, searches in base station identity code list whether be stored with the base station identity code and the base The corresponding dormancy awakening time interval of station identification code;
    If the base station identity code and the corresponding dormancy awakening time interval of the base station identity code are not stored with;Then preset described The corresponding dormancy awakening time interval of base station identity code is the first dormancy awakening time interval, and establishes communication link with the base station Connect;
    If sleep time reaches the first dormancy awakening time interval, detect whether the communication connection with the base station breaks Open;
    If the communication connection disconnects, shorten the first dormancy awakening time interval, re-establish and communicate with the base station Connection, into dormancy next time;If the communication connection does not disconnect, keep Alive Packet is sent to the webserver, so that institute The Internet resources that base station does not discharge the mobile POS machine are stated, into dormancy next time.
  2. 2. the method as described in claim 1, it is characterised in that if the sleep time reaches the first dormancy awakening time Interval, then after whether detection and the communication connection of the base station disconnect, including:
    If the communication connection with the base station disconnects, judge whether the first dormancy awakening time interval is less than default threshold Value;
    If the first dormancy awakening time interval is less than predetermined threshold value, the first dormancy awakening time interval is set to be Zero, and the base station identity code of the base station and the first dormancy awakening time interval are stored in base station identity code list, into Enter dormancy.
  3. 3. method as claimed in claim 1 or 2, it is characterised in that if the communication connection does not disconnect, send keep-alive After message is to the webserver, including:
    The base station identity code of the base station and the first dormancy awakening time interval are stored in base station identity code list.
  4. 4. the method as described in claim 1-3 any one, it is characterised in that it is described lookup base station identity code list in whether It is stored with after the base station identity code and the corresponding dormancy awakening time interval of the base station identity code, including:
    If the base station identity code and the corresponding dormancy awakening of the base station identity code are stored with the base station identity code list Time interval;Then establish and communicate to connect with the base station;
    When sleep time reaches the dormancy awakening time interval, keep Alive Packet is sent to the webserver, so that described Base station does not discharge the Internet resources of distribution, and enters dormancy next time.
  5. 5. method as claimed in claim 4, it is characterised in that if being stored with the base in the base station identity code list After station identification code and the corresponding dormancy awakening time interval of the base station identity code, further include:
    Judge whether the corresponding dormancy awakening time interval of the base station identity code is zero;
    If the corresponding dormancy awakening time interval of the base station identity code is zero, into dormancy;
    If the corresponding dormancy awakening time interval of the base station identity code is not zero, reach the dormancy awakening in sleep time During time interval, keep Alive Packet is sent to the webserver, so that the base station does not discharge the Internet resources of distribution, and is entered Dormancy next time.
  6. A kind of 6. communicator of mobile POS machine, it is characterised in that including:
    Searching unit, for obtaining the base station identity code of base station, searches in base station identity code list whether be stored with the base station Identification code and the corresponding dormancy awakening time interval of the base station identity code;
    First connection unit, if during for not being stored with the base station identity code and the corresponding dormancy awakening of the base station identity code Between be spaced;It is the first dormancy awakening time interval then to preset the corresponding dormancy awakening time interval of the base station identity code, and with Communication connection is established in the base station;
    Detection unit, if reaching the first dormancy awakening time interval for sleep time, detection is logical with the base station Whether letter connection disconnects;
    Second connection unit, if being disconnected for the communication connection, shortens the first dormancy awakening time interval, and described Base station re-establishes communication connection, into dormancy next time;If the communication connection does not disconnect, keep Alive Packet is sent to network Server, so that the base station does not discharge the Internet resources of distribution, into dormancy next time.
  7. 7. device as claimed in claim 6, it is characterised in that including:
    Judgement and setting unit, for judging whether the first dormancy awakening time interval is less than predetermined threshold value;
    If the first dormancy awakening time interval is less than predetermined threshold value, the first dormancy awakening time interval is set to be Zero, and the base station identity code of the base station and the first dormancy awakening time interval are stored in base station identity code list, into Enter dormancy.
  8. 8. device as claimed in claim 7, it is characterised in that including:
    Storage unit, knows for the base station identity code of the base station and the first dormancy awakening time interval to be stored in base station In other code list.
  9. 9. a kind of terminal device, including memory, processor and it is stored in the memory and can be on the processor The computer program of operation, it is characterised in that the processor realizes such as claim 1 to 5 when performing the computer program The step of any one the method.
  10. 10. a kind of computer-readable storage medium, the computer-readable storage medium is stored with computer program, it is characterised in that described Realized when computer program is executed by processor such as the step of any one of claim 1 to 5 the method.
CN201711128395.3A 2017-11-15 2017-11-15 Communication method, device, terminal and storage medium of mobile POS machine Active CN107995675B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711128395.3A CN107995675B (en) 2017-11-15 2017-11-15 Communication method, device, terminal and storage medium of mobile POS machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711128395.3A CN107995675B (en) 2017-11-15 2017-11-15 Communication method, device, terminal and storage medium of mobile POS machine

Publications (2)

Publication Number Publication Date
CN107995675A true CN107995675A (en) 2018-05-04
CN107995675B CN107995675B (en) 2020-12-22

Family

ID=62030995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711128395.3A Active CN107995675B (en) 2017-11-15 2017-11-15 Communication method, device, terminal and storage medium of mobile POS machine

Country Status (1)

Country Link
CN (1) CN107995675B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110996249A (en) * 2019-11-12 2020-04-10 嘉联支付有限公司 Terminal transaction area range control method and device
CN112333766A (en) * 2020-11-13 2021-02-05 北京美斯顿科技开发有限公司 Wireless communication method, system, terminal communication equipment and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217407A (en) * 2008-11-17 2011-10-12 高通股份有限公司 Reducing an occurrence of a voip call on hold from being dropped in ev-do systems
CN102711254A (en) * 2012-04-16 2012-10-03 中国联合网络通信集团有限公司 Resource release control method of network side and radio network controller (RNC)
CN102724716A (en) * 2012-05-29 2012-10-10 清华大学 Long connection method based on Proxy server
US20140206333A1 (en) * 2011-02-21 2014-07-24 Telefonaktiebolaget L M Ericsson (Publ) Offline device paging
US9521625B2 (en) * 2008-09-15 2016-12-13 Apple Inc. Electronic devices for receiving pushed data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9521625B2 (en) * 2008-09-15 2016-12-13 Apple Inc. Electronic devices for receiving pushed data
CN102217407A (en) * 2008-11-17 2011-10-12 高通股份有限公司 Reducing an occurrence of a voip call on hold from being dropped in ev-do systems
US20140206333A1 (en) * 2011-02-21 2014-07-24 Telefonaktiebolaget L M Ericsson (Publ) Offline device paging
CN102711254A (en) * 2012-04-16 2012-10-03 中国联合网络通信集团有限公司 Resource release control method of network side and radio network controller (RNC)
CN102724716A (en) * 2012-05-29 2012-10-10 清华大学 Long connection method based on Proxy server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110996249A (en) * 2019-11-12 2020-04-10 嘉联支付有限公司 Terminal transaction area range control method and device
CN112333766A (en) * 2020-11-13 2021-02-05 北京美斯顿科技开发有限公司 Wireless communication method, system, terminal communication equipment and electronic equipment

Also Published As

Publication number Publication date
CN107995675B (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN107197091A (en) Terminal control method, device, terminal device and computer-readable recording medium
CN110392052A (en) A kind of block chain intelligence contract processing system and method
CN107995377A (en) Customer service management method, electronic device and computer-readable recording medium
CN106774786A (en) A kind of power consumption control method and device
CN107484190B (en) Method for connecting network, mobile terminal and computer readable storage medium
CN103856620B (en) Control the method and device of terminal closedown
CN107277657A (en) A kind of earphone method for retrieving, device and earphone
CN107404740B (en) Method for switching network, device and the terminal device of safety
CN108629660A (en) A kind of shared charger baby based on mobile terminal electricity leases configuration method, device and its system
CN107333287B (en) Network detecting method, network detection device and intelligent terminal
CN108733459A (en) A kind of method of distributed timing, server and system
CN107862352A (en) A kind of Quick Response Code sharing method and Quick Response Code share equipment
CN108196458A (en) Intelligent home equipment control method, device and terminal device
CN107995675A (en) Communication means, device, terminal and the storage medium of mobile POS machine
CN107168813A (en) Task processing method and system
CN107657441A (en) Self-service dealing method, system, server and mobile terminal
CN107277896A (en) Wifi hotspot management method, device and terminal device
CN107968848A (en) A kind of method, terminal device and storage medium for obtaining IP address
CN106406499A (en) An aligned awakening method and device based on a terminal system
CN108337706A (en) A kind of switching method of wireless network, mobile terminal and storage medium
CN107396316A (en) Method for switching network, device and terminal device
CN106899959A (en) A kind of method for obtaining SIM card information, device, terminal and system
CN107333286A (en) Wifi hotspot connection management method, device and terminal device
CN107589907A (en) Data processing method, electronic equipment and computer-readable recording medium
CN107608723A (en) One kind application alignment awakening method, terminal and computer-readable recording medium

Legal Events

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